@@ -, +, @@
print
- Follow test plan in comment #2
- Additionally, verify that formatting follows syspref 'CurrencyFormat'
- Verify that amount column is right-aligned
---
.../intranet-tmpl/prog/en/modules/members/moremember-print.tt | 10 +++++-----
members/summary-print.pl | 9 +--------
2 files changed, 6 insertions(+), 13 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt
@@ -1,6 +1,7 @@
[% USE Koha %]
[% USE Branches %]
[% USE KohaDates %]
+[% USE Price %]
[% INCLUDE 'doc-head-open.inc' %]
Summary for [% firstname %] [% surname %] ([% cardnumber %])
[% INCLUDE 'doc-head-close.inc' %]
@@ -94,7 +95,7 @@
[% END %]
- [% IF ( accounts && ( totaldue != '0.00' ) ) %]
+ [% IF ( accounts ) %]
Account fines and payments
@@ -105,7 +106,6 @@
[% FOREACH account IN accounts %]
- [% NEXT IF account.amountoutstanding == '0.00' %]
[% IF ( account.itemnumber ) %][% END %]
@@ -113,15 +113,15 @@
[% IF ( account.itemnumber ) %][% END %]
|
[% account.date | $KohaDates %] |
- [% account.amount %] |
- [% account.amountoutstanding %] |
+ [% account.amount | $Price %] |
+ [% account.amountoutstanding | $Price %] |
[% END %]
Total due |
- [% totaldue %] |
+ [% totaldue | $Price %] |
--- a/members/summary-print.pl
+++ a/members/summary-print.pl
@@ -46,11 +46,6 @@ my $data = GetMember( 'borrowernumber' => $borrowernumber );
my ( $total, $accts, $numaccts ) = GetMemberAccountRecords($borrowernumber);
foreach my $accountline (@$accts) {
- $accountline->{amount} = sprintf( '%.2f', $accountline->{amount} )
- if ( $accountline->{amount} ) ;
- $accountline->{amountoutstanding} = sprintf( '%.2f', $accountline->{amountoutstanding} )
- if ( $accountline->{amountoutstanding} );
-
if ( $accountline->{accounttype} ne 'F'
&& $accountline->{accounttype} ne 'FU' )
{
@@ -59,8 +54,6 @@ foreach my $accountline (@$accts) {
}
our $totalprice = 0;
-my $total_format = '';
-$total_format = sprintf( "%.2f", $total ) if ($total);
my $holds_rs = Koha::Holds->search(
{ borrowernumber => $borrowernumber },
@@ -72,7 +65,7 @@ $template->param(
borrowernumber => $borrowernumber,
accounts => $accts,
- totaldue => $total_format,
+ totaldue => $total,
issues => build_issue_data( GetPendingIssues($borrowernumber) ),
totalprice => $totalprice,
--