Bugzilla – Attachment 28835 Details for
Bug 12415
Fee receipt: description of charges is empty
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12415: Fee receipt: a charges description should be displayed in all cases
Bug-12415-Fee-receipt-a-charges-description-should.patch (text/plain), 5.54 KB, created by
Jonathan Druart
on 2014-06-13 10:20:20 UTC
(
hide
)
Description:
Bug 12415: Fee receipt: a charges description should be displayed in all cases
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-06-13 10:20:20 UTC
Size:
5.54 KB
patch
obsolete
>From cc0fdeff03cf67cc11c6ac6687658055fc63f022 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 13 Jun 2014 11:20:33 +0200 >Subject: [PATCH] Bug 12415: Fee receipt: a charges description should be > displayed in all cases > >Bug 2546 removes the description DB field value in some case (3.15.00.003). >But the receipt generated by scripts members/printfeercpt.pl and >members/printinvoice.pl displays this field. >When the description field is empty, the default value (based on >accountlines.accounttype) should be displayed. > >Test plan: >- Generate and pay some different kinds of fees for a patron without > filling the 'description' field. >- In Fines>Account, click on the 'print' link. >- Before this patch, the "description of charges" values is empty if no > description was given. > It is a regression introduced by bug 2546, a default value was > inserted in the description field depending on the account type > selected. >- After this patch, the "description of charges" values should be based > on the account type. The string display on printing receipt should be > the same as on the account screen (staff and opac). > >Note for QA: If removed the "payment" key, it is not used in template >and generated a warning ("odd number of elements..."). >--- > .../prog/en/modules/members/printfeercpt.tt | 17 ++++++++++++++++- > .../prog/en/modules/members/printinvoice.tt | 17 ++++++++++++++++- > members/printfeercpt.pl | 3 +-- > members/printinvoice.pl | 2 +- > 4 files changed, 34 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt >index 64bbf35..5501c2c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt >@@ -43,7 +43,22 @@ > [% FOREACH account IN accounts %] > <tr class="highlight"> > <td>[% account.date %]</td> >- <td>[% account.description %]</td> >+ <td> >+ [% SWITCH account.accounttype %] >+ [% CASE 'Pay' %]Payment,thanks >+ [% CASE 'Pay00' %]Payment,thanks (cash via SIP2) >+ [% CASE 'Pay01' %]Payment,thanks (VISA via SIP2) >+ [% CASE 'Pay02' %]Payment,thanks (credit card via SIP2) >+ [% CASE 'N' %]New Card >+ [% CASE 'F' %]Fine >+ [% CASE 'A' %]Account management fee >+ [% CASE 'M' %]Sundry >+ [% CASE 'L' %]Lost Item >+ [% CASE 'W' %]Writeoff >+ [% CASE %][% account.accounttype %] >+ [%- END -%] >+ [%- IF account.description %], [% account.description %][% END %] >+ </td> > [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount %]</td> > </tr> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt >index 29e64da..6ae33c9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt >@@ -44,7 +44,22 @@ > [% FOREACH account IN accounts %] > <tr class="highlight"> > <td>[% account.date %]</td> >- <td>[% account.description %]</td> >+ <td> >+ [% SWITCH account.accounttype %] >+ [% CASE 'Pay' %]Payment,thanks >+ [% CASE 'Pay00' %]Payment,thanks (cash via SIP2) >+ [% CASE 'Pay01' %]Payment,thanks (VISA via SIP2) >+ [% CASE 'Pay02' %]Payment,thanks (credit card via SIP2) >+ [% CASE 'N' %]New Card >+ [% CASE 'F' %]Fine >+ [% CASE 'A' %]Account management fee >+ [% CASE 'M' %]Sundry >+ [% CASE 'L' %]Lost Item >+ [% CASE 'W' %]Writeoff >+ [% CASE %][% account.accounttype %] >+ [%- END -%] >+ [%- IF account.description %], [% account.description %][% END %] >+ </td> > [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount %]</td> > [% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding %]</td> > </tr> >diff --git a/members/printfeercpt.pl b/members/printfeercpt.pl >index b94fe7f..8228044 100755 >--- a/members/printfeercpt.pl >+++ b/members/printfeercpt.pl >@@ -99,8 +99,7 @@ for (my $i=0;$i<$numaccts;$i++){ > 'amount' => sprintf("%.2f",$accts->[$i]{'amount'}), > 'amountoutstanding' => sprintf("%.2f",$accts->[$i]{'amountoutstanding'}), > 'accountno' => $accts->[$i]{'accountno'}, >- 'payment' => ( $accts->[$i]{'accounttype'} =~ /^Pay/ ), >- >+ accounttype => $accts->[$i]{accounttype}, > ); > > if ($accts->[$i]{'accounttype'} ne 'F' && $accts->[$i]{'accounttype'} ne 'FU'){ >diff --git a/members/printinvoice.pl b/members/printinvoice.pl >index c8cf66d..742cb8e 100755 >--- a/members/printinvoice.pl >+++ b/members/printinvoice.pl >@@ -99,7 +99,7 @@ for ( my $i = 0 ; $i < $numaccts ; $i++ ) { > 'amount' => sprintf( "%.2f", $accts->[$i]{'amount'} ), > 'amountoutstanding' => sprintf( "%.2f", $accts->[$i]{'amountoutstanding'} ), > 'accountno' => $accts->[$i]{'accountno'}, >- 'payment' => ( $accts->[$i]{'accounttype'} =~ /^Pay/ ), >+ accounttype => $accts->[$i]{accounttype}, > ); > > if ( $accts->[$i]{'accounttype'} ne 'F' && $accts->[$i]{'accounttype'} ne 'FU' ) { >-- >2.0.0.rc2
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 12415
:
28835
|
28958
|
28959
|
31525
|
31598
|
31724
|
32377
|
33800