From 29689de399a8927547c36e53461c7766ecc604f0 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 --- C4/Acquisition.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 1a210b56f6..74aae85f4e 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -1355,7 +1355,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