From 754cf710d0e1157fa311fc27dcdf82bc7d051365 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 29 Aug 2018 17:26:14 -0300 Subject: [PATCH] Bug 21282: Sync ordered and spent values with acqui home The order list for each fund calculates using the ecost tax excl., but it should be tax incl. At the moment this means that the sum on the start page table and the order list don't match up. Test plan: - Create and receive orders - Values on acqui home and ordered/spent should be the same --- acqui/ordered.pl | 4 ++-- acqui/spent.pl | 8 ++++---- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/acqui/ordered.pl b/acqui/ordered.pl index a976cc9351..b3a6dd8331 100755 --- a/acqui/ordered.pl +++ b/acqui/ordered.pl @@ -53,7 +53,7 @@ my $query = <fetchrow_hashref ) { $left = $data->{'quantity'}; } if ( $left && $left > 0 ) { - my $subtotal = $left * $data->{'ecost'}; + my $subtotal = $left * $data->{'ecost_tax_included'}; $data->{subtotal} = sprintf( "%.2f", $subtotal ); $data->{'left'} = $left; push @ordered, $data; diff --git a/acqui/spent.pl b/acqui/spent.pl index 9a1c8059ec..4800299e62 100755 --- a/acqui/spent.pl +++ b/acqui/spent.pl @@ -55,14 +55,14 @@ my $query = <fetchrow_hashref ) { my $recv = $data->{'quantityreceived'}; if ( $recv > 0 ) { - my $rowtotal = $recv * $data->{'unitprice'}; + my $rowtotal = $recv * $data->{'unitprice_tax_included'}; $data->{'rowtotal'} = sprintf( "%.2f", $rowtotal ); - $data->{'unitprice'} = sprintf( "%.2f", $data->{'unitprice'} ); + $data->{'unitprice'} = sprintf( "%.2f", $data->{'unitprice_tax_included'} ); $subtotal += $rowtotal; push @spent, $data; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt index 802ae058a9..a964c45a8d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt @@ -61,7 +61,7 @@ [% order.left %] - [% order.ecost %] + [% order.ecost_tax_included %] [% order.entrydate | $KohaDates %] -- 2.11.0