From 17a27309646c6745df0ccace7e983b11564f8fd3 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. --- acqui/addorder.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acqui/addorder.pl b/acqui/addorder.pl index b9915e6aec..887645729c 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -280,7 +280,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