From ee13e82d4ec2e793c32830089b30773ccf91c456 Mon Sep 17 00:00:00 2001 From: Lyon3 Team Date: Tue, 15 Oct 2013 14:57:36 +0200 Subject: [PATCH] Bug 10461 - tax not taken in to account in the acq budget summaries --- acqui/addorder.pl | 4 ++-- acqui/orderreceive.pl | 15 ++++++--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/acqui/addorder.pl b/acqui/addorder.pl index 42324aa..e24be41 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -154,7 +154,7 @@ my $orderinfo = $input->Vars; $orderinfo->{'list_price'} ||= 0; $orderinfo->{'uncertainprice'} ||= 0; $orderinfo->{subscriptionid} ||= undef; - +$orderinfo->{gstrate}; my $user = $input->remote_user; # create, modify or delete biblio @@ -195,7 +195,7 @@ if ( $orderinfo->{quantity} ne '0' ) { } $orderinfo->{biblionumber}=$biblionumber; } - +$orderinfo->{ecost}= $orderinfo->{ecost} + $orderinfo->{ecost}*$orderinfo->{gstrate} if $orderinfo->{listinc} == 0; $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq ''; # if we already have $ordernumber, then it's an ordermodif diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index 8fc760b..c938e46 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -170,19 +170,16 @@ if ( $bookseller->{listincgst} ) { $ecost = $order->{ecost}; $unitprice = $order->{unitprice}; } else { - $rrp = $order->{rrp} / ( 1 + $order->{gstrate} ); - $ecost = $order->{ecost} / ( 1 + $order->{gstrate} ); - $unitprice = $order->{unitprice} / ( 1 + $order->{gstrate} ); + $unitprice = $order->{unitprice} + ($order->{unitprice}*$order->{gstrate} ); } } else { if ( $bookseller->{invoiceincgst} ) { - $rrp = $order->{rrp} * ( 1 + $order->{gstrate} ); - $ecost = $order->{ecost} * ( 1 + $order->{gstrate} ); - $unitprice = $order->{unitprice} * ( 1 + $order->{gstrate} ); + $rrp = $order->{rrp} +($order->{rrp}*$order->{gstrate} ); + $ecost = $order->{ecost} +($order->{ecost}*$order->{gstrate}); } else { - $rrp = $order->{rrp}; - $ecost = $order->{ecost}; - $unitprice = $order->{unitprice}; + $unitprice = $order->{unitprice} + ($order->{unitprice}*$order->{gstrate} ); + $rrp = $order->{rrp} +($order->{rpp}*$order->{gstrate} ); + $ecost = $order->{ecost} +($order->{ecost}*$order->{gstrate}) } } -- 1.7.2.5