From c02822381ac88ff6766e917adffa91a3c67f950e Mon Sep 17 00:00:00 2001 From: Jonathan Druart 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. Signed-off-by: David Nind --- 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 c6761adfa4..84e64714da 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 8d0ac49c38..706f9fa8ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -729,10 +729,10 @@ [% IF ( books_loo.left_holds_on_order ) %] Can't cancel order
[% ELSE %] - Cancel order
+ Cancel order
[% END %] [% IF ( books_loo.can_del_bib ) %] - Cancel order and delete catalog record
+ Cancel order and delete catalog record
[% ELSE %] Can't cancel order and delete catalog record
[% END %] -- 2.30.2