Bugzilla – Attachment 162501 Details for
Bug 36173
Cancelling order confirmation view does not show basket's info
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36173: Display basket info when cancelling an order
Bug-36173-Display-basket-info-when-cancelling-an-o.patch (text/plain), 4.43 KB, created by
Jonathan Druart
on 2024-02-27 13:02:06 UTC
(
hide
)
Description:
Bug 36173: Display basket info when cancelling an order
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-02-27 13:02:06 UTC
Size:
4.43 KB
patch
obsolete
>From 5ba354bf5d1b9165ac9bf1f319d99d285141606a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 27 Feb 2024 14:00:06 +0100 >Subject: [PATCH] Bug 36173: Display basket info when cancelling an order > >The basketno is missing from the 2 links in acqui/parcel.tt > >Better to retrieve the basketno from the order in the controller. > >Test plan: >Create an order, receive it >On the parcel view notice that the "Cancel order" link leads to a >confirmation page that does not contain the info of the basket. >It's fixed with this patch applied. >--- > acqui/cancelorder.pl | 4 ++-- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/acqui/cancelorder.pl b/acqui/cancelorder.pl >index c6761adfa45..84e64714da7 100755 >--- a/acqui/cancelorder.pl >+++ b/acqui/cancelorder.pl >@@ -48,14 +48,14 @@ my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( { > my $op = $input->param('op') || q{}; > my $ordernumber = $input->param('ordernumber'); > my $biblionumber = $input->param('biblionumber'); >-my $basketno = $input->param('basketno'); >+my $order = Koha::Acquisition::Orders->find($ordernumber); >+my $basketno = $order->basketno; > my $basket = Koha::Acquisition::Baskets->find({ basketno => $basketno }, { prefetch => 'booksellerid' }); > my $referrer = $input->param('referrer') || $input->referer; > my $delete_biblio = $input->param('del_biblio') ? 1 : 0; > > if( $op eq "cud-confirmcancel" ) { > my $reason = $input->param('reason'); >- my $order = Koha::Acquisition::Orders->find($ordernumber); > my @messages; > if( !$order ) { > push @messages, Koha::Object::Message->new({ message => 'error_order_not_found', type => 'error' }); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index bcbd20b9bce..a1eaeea4758 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -721,10 +721,10 @@ > [% IF ( books_loo.left_holds_on_order ) %] > <span class="button" title="Can't cancel order, ([% books_loo.holds_on_order | html %]) holds are linked with this order. Cancel holds first">Can't cancel order</span><br> > [% ELSE %] >- <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&basketno=[% basketno | uri %]&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]" class="button">Cancel order</a><br> >+ <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]" class="button">Cancel order</a><br> > [% END %] > [% IF ( books_loo.can_del_bib ) %] >- <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&basketno=[% basketno | uri %]&del_biblio=1&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]" class="button">Cancel order and delete catalog record</a><br> >+ <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&del_biblio=1&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]" class="button">Cancel order and delete catalog record</a><br> > [% ELSE %] > <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br> > [% END %] >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36173
:
162501
|
163086
|
164262
|
164263