Bugzilla – Attachment 79485 Details for
Bug 21427
Format prices on ordered/spent lists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21427: Format prices on ordered/spent lists
Bug-21427-Format-prices-on-orderedspent-lists.patch (text/plain), 5.28 KB, created by
Martin Renvoize (ashimema)
on 2018-09-27 11:53:57 UTC
(
hide
)
Description:
Bug 21427: Format prices on ordered/spent lists
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-09-27 11:53:57 UTC
Size:
5.28 KB
patch
obsolete
>From 39005cbe9532f17528210286beec777fb8461bac Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Thu, 27 Sep 2018 12:29:59 +0100 >Subject: [PATCH] Bug 21427: Format prices on ordered/spent lists > > Improvements to the display of lists of ordered and received orders: > - Format prices according to CurrencyFormat system preference > > To test: > - Make sure you have some pending and received orders > - Access the Spent and Ordered pages by clicking on the > amount ordered or spent on the acq start page > - Verify that > - All price information is shown according to CurrencyFormat > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > acqui/ordered.pl | 4 +--- > acqui/spent.pl | 7 ++----- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt | 7 ++++--- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt | 7 ++++--- > 4 files changed, 11 insertions(+), 14 deletions(-) > >diff --git a/acqui/ordered.pl b/acqui/ordered.pl >index cc3f04918d..27fe71bd9d 100755 >--- a/acqui/ordered.pl >+++ b/acqui/ordered.pl >@@ -93,7 +93,7 @@ while ( my $data = $sth->fetchrow_hashref ) { > } > if ( $left && $left > 0 ) { > my $subtotal = $left * $data->{'ecost'}; >- $data->{subtotal} = sprintf( "%.2f", $subtotal ); >+ $data->{subtotal} = $subtotal; > $data->{'left'} = $left; > push @ordered, $data; > $total += $subtotal; >@@ -105,8 +105,6 @@ while ( my $adj = $adjustments->next ){ > $total += $adj->adjustment; > } > >-$total = sprintf( "%.2f", $total ); >- > $template->{VARS}->{'fund'} = $fund_id; > $template->{VARS}->{'ordered'} = \@ordered; > $template->{VARS}->{'total'} = $total; >diff --git a/acqui/spent.pl b/acqui/spent.pl >index 8909eb03e0..b376973e8d 100755 >--- a/acqui/spent.pl >+++ b/acqui/spent.pl >@@ -96,8 +96,7 @@ while ( my $data = $sth->fetchrow_hashref ) { > my $recv = $data->{'quantityreceived'}; > if ( $recv > 0 ) { > my $rowtotal = $recv * $data->{'unitprice'}; >- $data->{'rowtotal'} = sprintf( "%.2f", $rowtotal ); >- $data->{'unitprice'} = sprintf( "%.2f", $data->{'unitprice'} ); >+ $data->{'rowtotal'} = $rowtotal; > $subtotal += $rowtotal; > push @spent, $data; > } >@@ -115,7 +114,7 @@ $sth->execute($bookfund); > my @shipmentcosts; > while (my $data = $sth->fetchrow_hashref) { > push @shipmentcosts, { >- shipmentcost => sprintf("%.2f", $data->{shipmentcost}), >+ shipmentcost => $data->{shipmentcost}, > invoicenumber => $data->{invoicenumber} > }; > $total += $data->{shipmentcost}; >@@ -127,8 +126,6 @@ while ( my $adj = $adjustments->next ){ > $total += $adj->adjustment; > } > >-$total = sprintf( "%.2f", $total ); >- > $template->param( > fund => $bookfund, > spent => \@spent, >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 179ba33bb7..233ea0529a 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,13 +62,13 @@ > [% order.left | html %] > </td> > <td class="data cell"> >- [% order.ecost | html %] >+ [% order.ecost | $Price %] > </td> > <td class="cell"> > <span title="[% order.entrydate | html %]">[% order.entrydate | $KohaDates %]</span> > </td> > <td class="data cell"> >- [% order.subtotal | html %] >+ [% order.subtotal | $Price %] > </td> > </tr> > [% END %] >@@ -92,7 +93,7 @@ > <td> </td> > <td> </td> > <td class="data"> >- [% total | html %] >+ [% total | $Price %] > </td> > </tr> > </tfoot> >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 67289b1379..816f264fac 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 | $Price %] > </td> > <td class="cell"> > <span title="[% order.entrydate | html %]">[% order.entrydate | $KohaDates %]</span> >@@ -71,7 +72,7 @@ > <span title="[% order.datereceived | html %]">[% order.datereceived | $KohaDates %]</span> > </td> > <td class="data cell"> >- [% order.rowtotal | html %] >+ [% order.rowtotal | $Price %] > </td> > </tr> > [% END %] >@@ -103,7 +104,7 @@ > [% END %] > <tr> > <td colspan="9">TOTAL</td> >- <td class="data total">[% total | html %]</td> >+ <td class="data total">[% total | $Price %]</td> > </tr> > </tfoot> > </table> >-- >2.18.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 21427
:
79485
|
83831
|
84168
|
84886
|
84887