From: Nick Clemens Date: Fri, 21 Apr 2017 01:36:44 +0000 (-0400) Subject: Bug 18468 - When adding from a staged file order discounts are not passed into C4... X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=c026d9f4e130d0585def4b1deb98e802ad35d258;p=koha.git Bug 18468 - When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices To test: 1 - Setup a vendor with a discount 2 - Stage a file 3 - Create a basket 4 - Order from staged file 5 - Add a price but no discount 6 - Save order 7 - Note ecost is not discounted 8 - Apply patch 9 - Repeate 2-6 10 - Note ecost is discounted Signed-off-by: Alex Buckley Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl index de32805d2e..847c6353ba 100755 --- a/acqui/addorderiso2709.pl +++ b/acqui/addorderiso2709.pl @@ -261,6 +261,7 @@ if ($op eq ""){ $price = Koha::Number::Price->new($price)->unformat; $orderinfo{tax_rate} = $bookseller->tax_rate; my $c = $c_discount ? $c_discount : $bookseller->discount / 100; + $orderinfo{discount} = $c; if ( $bookseller->listincgst ) { if ( $c_discount ) { $orderinfo{ecost} = $price; @@ -329,6 +330,7 @@ if ($op eq ""){ $price = Koha::Number::Price->new($price)->unformat; $orderinfo{tax_rate} = $bookseller->tax_rate; my $c = $c_discount ? $c_discount : $bookseller->discount / 100; + $orderinfo{discount} = $c; if ( $bookseller->listincgst ) { if ( $c_discount ) { $orderinfo{ecost} = $price;