From d169b710b0f31bc85ed8cb39c7c5f551ff7515f3 Mon Sep 17 00:00:00 2001 From: Didier Gautheron Date: Thu, 3 Dec 2020 09:15:15 +0100 Subject: [PATCH] Bug 27203: (Bug 23294 follow up) set unitprice to ecost if it's 0. Test plan: 1 - Create a basket 2 - Add an order line, don't set 'Actual cost: ', but use vendor price and a discount. 3 - Save 4 - Display all columns, 'Actual cost tax inc.' are GST columns aren't set. 5 - Apply batch 6 - Redo 1,2, 3 7 - Display all columns, pre 23294 behaviour is back columns are set. Signed-off-by: Marjorie --- acqui/addorder.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acqui/addorder.pl b/acqui/addorder.pl index 417c57d261..a42bf0432f 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -283,7 +283,7 @@ if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { ); } - $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq ''; + $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq '' or $orderinfo->{unitprice} == 0; $orderinfo = C4::Acquisition::populate_order_with_prices( { -- 2.11.0