@@ -, +, @@ --- C4/Acquisition.pm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) --- a/C4/Acquisition.pm +++ a/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( --