From 805849e33e190416545cae9cfc4e690190765627 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 11 Apr 2013 12:00:45 +0200 Subject: [PATCH] Bug 10028: fix how ModReceiveOrder() calls NewOrder() In C4::Acquisition::ModReceiveOrder, a call to NewOrder is badly used. NewOrder returns ($basketno, $ordernumber) but in ModReceiveOrder the ordernumber is got with my $ordernumber = NewOrder( $args ); It works because: sub t{ return ("a", "b"); } my $a = t(); say $a; Will display 'b'. But it is not really clear. Test plan: Check that there is no regression for partial receives. Signed-off-by: Chris Cormack Signed-off-by: Kyle M Hall Signed-off-by: Galen Charlton (cherry picked from commit 29689de399a8927547c36e53461c7766ecc604f0) Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 27f96f606c90f85756b290e1a832377f5465bf40) Signed-off-by: Bernardo Gonzalez Kriegel (cherry picked from commit 27f96f606c90f85756b290e1a832377f5465bf40) --- C4/Acquisition.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index ec7769360f..abf0400209 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -1317,7 +1317,8 @@ sub ModReceiveOrder { $order->{'rrp'} = $rrp; $order->{ecost} = $ecost; $order->{'orderstatus'} = 3; # totally received - $new_ordernumber = NewOrder($order); + my $basketno; + ( $basketno, $new_ordernumber ) = NewOrder($order); if ($received_items) { foreach my $itemnumber (@$received_items) { -- 2.39.5