Bugzilla – Attachment 81794 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), 4.49 KB, created by
Katrin Fischer
on 2018-11-01 11:57:22 UTC
(
hide
)
Description:
Bug 21282: Sync ordered and spent values with acqui home
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-11-01 11:57:22 UTC
Size:
4.49 KB
patch
obsolete
>From e4c3201dffe2eab9fd0d30a11784d99e25a47b5d 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 > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > acqui/ordered.pl | 4 ++-- > acqui/spent.pl | 8 ++++---- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt | 3 ++- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt | 3 ++- > 4 files changed, 10 insertions(+), 8 deletions(-) > >diff --git a/acqui/ordered.pl b/acqui/ordered.pl >index cc3f04918d..75291d9f5c 100755 >--- a/acqui/ordered.pl >+++ b/acqui/ordered.pl >@@ -54,7 +54,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, > aqbooksellers.name as vendorname, > itype, >@@ -92,7 +92,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 8909eb03e0..69a25379f9 100755 >--- a/acqui/spent.pl >+++ b/acqui/spent.pl >@@ -56,14 +56,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, > aqbooksellers.name as vendorname > FROM (aqorders, aqbasket) >@@ -95,9 +95,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_tax_included'} = 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 d95a36082b..5cc5ae7f6f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt >@@ -2,6 +2,7 @@ > [% USE Asset %] > [% USE KohaDates %] > [% USE ItemTypes %] >+[% USE Price %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › Ordered</title> >@@ -61,7 +62,7 @@ > [% order.left | html %] > </td> > <td class="data cell"> >- [% order.ecost | html %] >+ [% order.ecost_tax_included | $Price %] > </td> > <td class="cell"> > <span title="[% order.entrydate | html %]">[% order.entrydate | $KohaDates %]</span> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt >index 0797760990..5aeedabc3e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt >@@ -2,6 +2,7 @@ > [% USE Asset %] > [% USE KohaDates %] > [% USE ItemTypes %] >+[% USE Price %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › Spent</title> >@@ -62,7 +63,7 @@ > [% order.quantityreceived | html %] > </td> > <td class="cell"> >- [% order.unitprice | html %] >+ [% order.unitprice_tax_included | $Price %] > </td> > <td class="cell"> > <span title="[% order.entrydate | html %]">[% 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