Bugzilla – Attachment 54261 Details for
Bug 17100
On summary print, "Account fines and payments" is displayed even if there is nothing to pay
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17100: [Alternative patch] Fix issues for on summary print
Bug-17100-Alternative-patch-Fix-issues-for-on-summ.patch (text/plain), 3.87 KB, created by
Marc Véron
on 2016-08-10 09:48:53 UTC
(
hide
)
Description:
Bug 17100: [Alternative patch] Fix issues for on summary print
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2016-08-10 09:48:53 UTC
Size:
3.87 KB
patch
obsolete
>From 09dfaca3260f589ae828054c84fd178252bdc228 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Wed, 10 Aug 2016 11:42:28 +0200 >Subject: [PATCH] Bug 17100: [Alternative patch] Fix issues for on summary > print > >This alternative patch moves logic and formatting to the template file. > >To test: >- 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(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt >index f087760..e44239e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt >+++ b/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' %] > <title>Summary for [% firstname %] [% surname %] ([% cardnumber %])</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -94,7 +95,7 @@ > </table> > [% END %] > >- [% IF ( accounts && ( totaldue != '0.00' ) ) %] >+ [% IF ( accounts ) %] > <table> > <caption>Account fines and payments</caption> > <tr> >@@ -105,7 +106,6 @@ > </tr> > > [% FOREACH account IN accounts %] >- [% NEXT IF account.amountoutstanding == '0.00' %] > <tr> > <td> > [% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.biblionumber %]&itemnumber=[% account.itemnumber %]">[% END %] >@@ -113,15 +113,15 @@ > [% IF ( account.itemnumber ) %]</a>[% END %] > </td> > <td>[% account.date | $KohaDates %]</td> >- <td>[% account.amount %]</td> >- <td>[% account.amountoutstanding %]</td> >+ <td style="text-align:right;">[% account.amount | $Price %]</td> >+ <td style="text-align:right;">[% account.amountoutstanding | $Price %]</td> > </tr> > [% END %] > > <tfoot> > <tr> > <td colspan="3">Total due</td> >- <td colspan="2">[% totaldue %]</td> >+ <td colspan="2" style="text-align:right;">[% totaldue | $Price %]</td> > </tr> > </tfoot> > </table> >diff --git a/members/summary-print.pl b/members/summary-print.pl >index f1933f5..82b1ca2 100755 >--- a/members/summary-print.pl >+++ b/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, >-- >2.1.4
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 17100
:
54260
|
54261
|
54270
|
54312
|
54478
|
54479