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 <alexbuckley@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
$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;
$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;