From c1f7eb84294cd48c7975f21a732834e6763f5808 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 7 Nov 2019 18:18:31 +0100 Subject: [PATCH] Bug 14963: Set status=ORDERED for suggestions created from existing record MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Séverine QUEUNE Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize --- acqui/addorder.pl | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/acqui/addorder.pl b/acqui/addorder.pl index 2c269e01ed..9ff4e79604 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -269,13 +269,21 @@ if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { # create the record in catalogue, with framework '' my ($biblionumber,$bibitemnum) = AddBiblio($record,''); - # change suggestion status if applicable - if ($$orderinfo{suggestionid}) { - ModSuggestion( {suggestionid=>$$orderinfo{suggestionid}, STATUS=>'ORDERED', biblionumber=>$biblionumber} ); - } + $orderinfo->{biblionumber}=$biblionumber; } + # change suggestion status if applicable + if ( $orderinfo->{suggestionid} ) { + ModSuggestion( + { + suggestionid => $orderinfo->{suggestionid}, + biblionumber => $orderinfo->{biblionumber}, + STATUS => 'ORDERED', + } + ); + } + $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq ''; $orderinfo = C4::Acquisition::populate_order_with_prices( -- 2.39.5