Bugzilla – Attachment 78293 Details for
Bug 21282
Ordered/spent lists should use prices including tax for calculations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21282: Sync ordered and spent values with acqui home
Bug-21282-Sync-ordered-and-spent-values-with-acqui.patch (text/plain), 3.22 KB, created by
Jonathan Druart
on 2018-08-29 20:27:33 UTC
(
hide
)
Description:
Bug 21282: Sync ordered and spent values with acqui home
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-08-29 20:27:33 UTC
Size:
3.22 KB
patch
obsolete
>From 754cf710d0e1157fa311fc27dcdf82bc7d051365 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 = <<EOQ; > SELECT > aqorders.biblionumber, aqorders.basketno, aqorders.ordernumber, > quantity-quantityreceived AS tleft, >- ecost, budgetdate, entrydate, >+ ecost_tax_included, budgetdate, entrydate, > aqbasket.booksellerid, > itype, > title >@@ -88,7 +88,7 @@ while ( my $data = $sth->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 = <<EOQ; > SELECT > aqorders.biblionumber, aqorders.basketno, aqorders.ordernumber, > quantity-quantityreceived AS tleft, >- ecost, budgetdate, entrydate, >+ budgetdate, entrydate, > aqbasket.booksellerid, > itype, > title, > aqorders.invoiceid, > aqinvoices.invoicenumber, > quantityreceived, >- unitprice, >+ unitprice_tax_included, > datereceived > FROM (aqorders, aqbasket) > LEFT JOIN biblio ON >@@ -91,9 +91,9 @@ my @spent; > while ( my $data = $sth->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 %] > </td> > <td class="data cell"> >- [% order.ecost %] >+ [% order.ecost_tax_included %] > </td> > <td class="cell"> > <span title="[% order.entrydate %]">[% order.entrydate | $KohaDates %]</span> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21282
:
78293
|
81003
|
81794
|
82252