From b3b5f35acd95da1a85317b537aab9ce369c47c32 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 10 May 2023 15:21:05 +0200 Subject: [PATCH] Bug 35717: Replace GetSuggestionFromBiblionumber Signed-off-by: Nick Clemens --- C4/Acquisition.pm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 370030895ef..08f606da4a7 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -22,7 +22,7 @@ use Modern::Perl; use Carp qw( carp croak ); use Text::CSV_XS; use C4::Context; -use C4::Suggestions qw( GetSuggestion GetSuggestionFromBiblionumber ModSuggestion ); +use C4::Suggestions qw( GetSuggestion ModSuggestion ); use C4::Biblio qw( GetMarcFromKohaField GetMarcStructure IsMarcStructureInternal ); use C4::Contract qw( GetContract ); use C4::Log qw( logaction ); @@ -1387,12 +1387,14 @@ sub ModReceiveOrder { $order->{invoice_unitprice} ||= $order->{unitprice}; $order->{invoice_currency} ||= Koha::Acquisition::Currencies->get_active->currency; - my $suggestionid = GetSuggestionFromBiblionumber( $biblionumber ); - if ($suggestionid) { - ModSuggestion( {suggestionid=>$suggestionid, - STATUS=>'AVAILABLE', - biblionumber=> $biblionumber} - ); + if ( $order->{suggestionid} ) { + ModSuggestion( + { + suggestionid => $order->{suggestionid}, + STATUS => 'AVAILABLE', + biblionumber => $biblionumber + } + ); } my $result_set = $dbh->selectrow_arrayref( -- 2.39.2