From 7452f3dabb66cb5042d723862069176a4601d60f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 28 Apr 2025 12:19:28 +0200 Subject: [PATCH] Bug 39711: Fix 500 when creating a new order for a basket without contract --- acqui/neworderempty.pl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index c31257c627c..88fedc29afa 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -88,7 +88,6 @@ use C4::Search qw( FindDuplicate ); use C4::ImportBatch qw( SetImportRecordStatus SetMatchedBiblionumber GetImportRecordMarc ); use Koha::Acquisition::Booksellers; -use Koha::Acquisition::Contracts; use Koha::Acquisition::Currencies qw( get_active ); use Koha::Biblios; use Koha::BiblioFrameworks; @@ -152,14 +151,13 @@ $template->param( ordernumber => $ordernumber, basketno => $basketno, basket => $basket, + basket_obj => $basketobj, booksellerid => $basket->{'booksellerid'}, name => $bookseller->name, ); output_and_exit( $input, $cookie, $template, 'order_cannot_be_edited' ) if $ordernumber and ( $basketobj->closedate || $data->{orderstatus} eq "complete" ); -my $contract = Koha::Acquisition::Contracts->find( $basket->{contractnumber} ); - my $listprice = 0; # the price, that can be in MARC record if we have one if ( $ordernumber eq '' and defined $breedingid ) { @@ -453,8 +451,6 @@ $template->param( basketnote => $basket->{'note'}, booksellerid => $basket->{'booksellerid'}, basketbooksellernote => $basket->{booksellernote}, - basketcontractno => $basket->{contractnumber}, - basketcontractname => $contract->contractname, creationdate => $basket->{creationdate}, authorisedby => $basket->{'authorisedby'}, authorisedbyname => $basket->{'authorisedbyname'}, -- 2.34.1