Bugzilla – Attachment 111534 Details for
Bug 24381
ACCOUNT_CREDIT and ACCOUNT_DEBIT slip not printing information about paid fines/fees
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24381: (follow-up) Notice improvements
Bug-24381-follow-up-Notice-improvements.patch (text/plain), 13.53 KB, created by
Martin Renvoize (ashimema)
on 2020-10-13 11:32:00 UTC
(
hide
)
Description:
Bug 24381: (follow-up) Notice improvements
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-10-13 11:32:00 UTC
Size:
13.53 KB
patch
obsolete
>From a65e9a795b2d2f54b879dbb438a3ed0431ef7d85 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 13 Oct 2020 12:28:31 +0100 >Subject: [PATCH] Bug 24381: (follow-up) Notice improvements > >--- > .../data/mysql/atomicupdate/bug_24381.perl | 74 +++++++++++++++---- > .../mysql/en/mandatory/sample_notices.yml | 74 +++++++++++++++---- > 2 files changed, 118 insertions(+), 30 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_24381.perl b/installer/data/mysql/atomicupdate/bug_24381.perl >index 1538d8a3ab..51fcf9d183 100644 >--- a/installer/data/mysql/atomicupdate/bug_24381.perl >+++ b/installer/data/mysql/atomicupdate/bug_24381.perl >@@ -3,7 +3,8 @@ if ( CheckVersion($DBversion) ) { > > # ACCOUNT_CREDIT > my $account_credit = q{ >- [% PROCESS "accounts.inc" %] >+ [%- USE AuthorisedValues -%] >+ [%- PROCESS "accounts.inc" -%] > <table> > [% IF ( LibraryName ) %] > <tr> >@@ -21,7 +22,7 @@ if ( CheckVersion($DBversion) ) { > [% END %] > <tr> > <th colspan="2" class="centerednames"> >- <h3>[% credit.date | $KohaDates %]</h3> >+ <h3>[% today | $KohaDates %]</h3> > </th> > </tr> > <tr> >@@ -32,40 +33,76 @@ if ( CheckVersion($DBversion) ) { > <td>Operator ID: </td> > <td>[% credit.manager_id %]</td> > </tr> >+ [% IF credit.payment_type %] > <tr> > <td>Payment type: </td> >- <td>[% credit.payment_type %]</td> >+ <td>[% AuthorisedValues.GetByCode('PAYMENT_TYPE', credit.payment_type) %]</td> > </tr> >+ [% END %] > <tr> > <th colspan="2" class="centerednames"> >- <h2><u>Payment receipt</u></h2> >+ <h2><u>[%- PROCESS credit_type_description credit_type = credit.credit_type -%] receipt</u></h2> > </th> > </tr> >+ [% IF ( credit.credit_type_code == 'PAYMENT' ) %] > <tr> > <th colspan="2"> > Received with thanks from [% credit.patron.firstname | html %] [% credit.patron.surname | html %] <br /> > Card number: [% credit.patron.cardnumber | html %]<br /> > </th> > </tr> >+ [% ELSIF ( credit.credit_type_code == 'CREDIT' ) %] >+ <tr> >+ <th colspan="2"> >+ Credit added to account for [% credit.patron.firstname | html %] [% credit.patron.surname | html %] <br /> >+ Card number: [% credit.patron.cardnumber | html %]<br /> >+ </th> >+ </tr> >+ [% ELSIF ( credit.credit_type_code == 'WRITEOFF' ) %] >+ <tr> >+ <th colspan="2"> >+ Writeoff added to account for [% credit.patron.firstname | html %] [% credit.patron.surname | html %] <br /> >+ Card number: [% credit.patron.cardnumber | html %]<br /> >+ </th> >+ </tr> >+ [% END %] >+ [% IF credit.amountoutstanding + 0 != 0 %] >+ <tr> >+ <th>Description of credit</th> >+ <th>Amount</th> >+ </tr> >+ <tr> >+ <td>[%- PROCESS credit_type_description credit_type = credit.credit_type -%]</td> >+ <td>[% credit.amount * -1 | $Price %]</td> >+ </tr> >+ <tr> >+ <th style="text-align:right;">Total available:</th> >+ <td>[% credit.amountoutstanding * -1 | $Price %]</td> >+ </tr> >+ [% END %] >+ [% IF credit.amount != credit.amountoutstanding %] > <tr> > <th>Description of charges</th> > <th>Amount</th> > </tr> > [% FOREACH offset IN credit.credit_offsets %] > <tr> >- <td>[% PROCESS account_type_description account=offset.debit %]</td> >+ <td>[% PROCESS account_type_description account=offset.debit %][% IF ( offset.debit.itemnumber ) %] - [% offset.debit.item.biblio.title %][% END %]</td> > <td>[% offset.amount * -1 | $Price %]</td> > </tr> > [% END %] >+ [% END %] > <tfoot> > <tr class="highlight"> > <td>Total:</td> > <td>[% credit.amount * -1 | $Price %]</td> > </tr> >+ [% IF change.defined %] > <tr> > <td>Change given: </td> > <td>[% change | $Price %]</td> > </tr> >+ [% END %] > <tr> > <td colspan="2"></td> > </tr> >@@ -111,11 +148,6 @@ q{UPDATE letter SET content = ? WHERE code = 'ACCOUNT_CREDIT' AND REPLACE(REPLAC > </th> > </tr> > [% END %] >- <tr> >- <th colspan="3" class="centerednames"> >- <h3>[% debit.date | $KohaDates %]</h3> >- </th> >- </tr> > <tr> > <td colspan="2" style="text-align:right;">Fee ID: </td> > <td>[% debit.accountlines_id %]</td> >@@ -137,6 +169,22 @@ q{UPDATE letter SET content = ? WHERE code = 'ACCOUNT_CREDIT' AND REPLACE(REPLAC > Card number: [% debit.patron.cardnumber | html %]<br /> > </th> > </tr> >+ [% IF debit.amountoutstanding != 0 %] >+ <tr> >+ <th>Date</th> >+ <th>Description of charges</th> >+ <th>Amount</th> >+ </tr> >+ <tr> >+ <td>[% debit.date | $KohaDates %]</td> >+ <td>[% PROCESS account_type_description account=debit %]</td> >+ <td>[% debit.amount | $Price %]</td> >+ </tr> >+ <tr> >+ <td colspan="2" style="text-align:right;">Total owed:</td> >+ <td>[% debit.amount | $Price %]</td> >+ </tr> >+ [% END %] > [% IF debit.amount != debit.amountoutstanding %] > <tr> > <th>Date</th> >@@ -160,11 +208,7 @@ q{UPDATE letter SET content = ? WHERE code = 'ACCOUNT_CREDIT' AND REPLACE(REPLAC > <tr> > <tfoot> > <tr> >- <td colspan="2" style="text-align:right;">Total owed:</td> >- <td>[% debit.amount | $Price %]</td> >- </tr> >- <tr> >- <td colspan="2" style="text-align:right;">Total outstanding:</td> >+ <th colspan="2" style="text-align:right;">Total outstanding:</th> > <td>[% debit.amountoutstanding | $Price %]</td> > </tr> > </tfoot> >diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml >index 14de265cc3..faf95f3e90 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.yml >+++ b/installer/data/mysql/en/mandatory/sample_notices.yml >@@ -52,7 +52,8 @@ tables: > message_transport_type: print > lang: default > content: >- - "[% PROCESS \"accounts.inc\" %]" >+ - "[%- USE AuthorisedValues -%]" >+ - "[%- PROCESS \"accounts.inc\" -%]" > - "<table>" > - " [% IF ( LibraryName ) %]" > - " <tr>" >@@ -70,7 +71,7 @@ tables: > - " [% END %]" > - " <tr>" > - " <th colspan=\"2\" class=\"centerednames\">" >- - " <h3>[% credit.date | $KohaDates %]</h3>" >+ - " <h3>[% today | $KohaDates %]</h3>" > - " </th>" > - " </tr>" > - " <tr>" >@@ -81,40 +82,76 @@ tables: > - " <td>Operator ID: </td>" > - " <td>[% credit.manager_id %]</td>" > - " </tr>" >+ - " [% IF credit.payment_type %]" > - " <tr>" > - " <td>Payment type: </td>" >- - " <td>[% credit.payment_type %]</td>" >+ - " <td>[% AuthorisedValues.GetByCode('PAYMENT_TYPE', credit.payment_type) %]</td>" > - " </tr>" >+ - " [% END %]" > - " <tr>" > - " <th colspan=\"2\" class=\"centerednames\">" >- - " <h2><u>Payment receipt</u></h2>" >+ - " <h2><u>[%- PROCESS credit_type_description credit_type = credit.credit_type -%] receipt</u></h2>" > - " </th>" > - " </tr>" >+ - " [% IF ( credit.credit_type_code == 'PAYMENT' ) %]" > - " <tr>" > - " <th colspan=\"2\">" > - " Received with thanks from [% credit.patron.firstname | html %] [% credit.patron.surname | html %] <br />" > - " Card number: [% credit.patron.cardnumber | html %]<br />" > - " </th>" > - " </tr>" >+ - " [% ELSIF ( credit.credit_type_code == 'CREDIT' ) %]" >+ - " <tr>" >+ - " <th colspan=\"2\">" >+ - " Credit added to account for [% credit.patron.firstname | html %] [% credit.patron.surname | html %] <br />" >+ - " Card number: [% credit.patron.cardnumber | html %]<br />" >+ - " </th>" >+ - " </tr>" >+ - " [% ELSIF ( credit.credit_type_code == 'WRITEOFF' ) %]" >+ - " <tr>" >+ - " <th colspan=\"2\">" >+ - " Writeoff added to account for [% credit.patron.firstname | html %] [% credit.patron.surname | html %] <br />" >+ - " Card number: [% credit.patron.cardnumber | html %]<br />" >+ - " </th>" >+ - " </tr>" >+ - " [% END %]" >+ - " [% IF credit.amountoutstanding + 0 != 0 %]" >+ - " <tr>" >+ - " <th>Description of credit</th>" >+ - " <th>Amount</th>" >+ - " </tr>" >+ - " <tr>" >+ - " <td>[%- PROCESS credit_type_description credit_type = credit.credit_type -%]</td>" >+ - " <td>[% credit.amount * -1 | $Price %]</td>" >+ - " </tr>" >+ - " <tr>" >+ - " <th style=\"text-align:right;\">Total available:</th>" >+ - " <td>[% credit.amountoutstanding * -1 | $Price %]</td>" >+ - " </tr>" >+ - " [% END %]" >+ - " [% IF credit.amount != credit.amountoutstanding %]" > - " <tr>" > - " <th>Description of charges</th>" > - " <th>Amount</th>" > - " </tr>" > - " [% FOREACH offset IN credit.credit_offsets %]" > - " <tr>" >- - " <td>[% PROCESS account_type_description account=offset.debit %]</td>" >+ - " <td>[% PROCESS account_type_description account=offset.debit %][% IF ( offset.debit.itemnumber ) %] - [% offset.debit.item.biblio.title %][% END %]</td>" > - " <td>[% offset.amount * -1 | $Price %]</td>" > - " </tr>" > - " [% END %]" >+ - " [% END %]" > - " <tfoot>" > - " <tr class=\"highlight\">" > - " <td>Total:</td>" > - " <td>[% credit.amount * -1 | $Price %]</td>" > - " </tr>" >+ - " [% IF change.defined %]" > - " <tr>" > - " <td>Change given: </td>" > - " <td>[% change | $Price %]</td>" > - " </tr>" >+ - " [% END %]" > - " <tr>" > - " <td colspan=\"2\"></td>" > - " </tr>" >@@ -151,11 +188,6 @@ tables: > - " </tr>" > - " [% END %]" > - " <tr>" >- - " <th colspan=\"3\" class=\"centerednames\">" >- - " <h3>[% debit.date | $KohaDates %]</h3>" >- - " </th>" >- - " </tr>" >- - " <tr>" > - " <td colspan=\"2\" style=\"text-align:right;\">Fee ID: </td>" > - " <td>[% debit.accountlines_id %]</td>" > - " </tr>" >@@ -176,6 +208,22 @@ tables: > - " Card number: [% debit.patron.cardnumber | html %]<br />" > - " </th>" > - " </tr>" >+ - " [% IF debit.amountoutstanding != 0 %]" >+ - " <tr>" >+ - " <th>Date</th>" >+ - " <th>Description of charges</th>" >+ - " <th>Amount</th>" >+ - " </tr>" >+ - " <tr>" >+ - " <td>[% debit.date | $KohaDates %]</td>" >+ - " <td>[% PROCESS account_type_description account=debit %]</td>" >+ - " <td>[% debit.amount | $Price %]</td>" >+ - " </tr>" >+ - " <tr>" >+ - " <td colspan=\"2\" style=\"text-align:right;\">Total owed:</td>" >+ - " <td>[% debit.amount | $Price %]</td>" >+ - " </tr>" >+ - " [% END %]" > - " [% IF debit.amount != debit.amountoutstanding %]" > - " <tr>" > - " <th>Date</th>" >@@ -199,11 +247,7 @@ tables: > - " <tr>" > - " <tfoot>" > - " <tr>" >- - " <td colspan=\"2\" style=\"text-align:right;\">Total owed:</td>" >- - " <td>[% debit.amount | $Price %]</td>" >- - " </tr>" >- - " <tr>" >- - " <td colspan=\"2\" style=\"text-align:right;\">Total outstanding:</td>" >+ - " <th colspan=\"2\" style=\"text-align:right;\">Total outstanding:</th>" > - " <td>[% debit.amountoutstanding | $Price %]</td>" > - " </tr>" > - " </tfoot>" >-- >2.20.1
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 24381
:
106946
|
106947
|
106950
|
106951
|
106952
|
106953
|
106956
|
106957
|
106958
|
106959
|
106960
|
106974
|
106975
|
106976
|
106977
|
110210
|
110211
|
110212
|
110213
|
110461
|
110462
|
110463
|
110464
|
111530
|
111531
|
111532
|
111533
|
111534
|
111590
|
111591
|
111592
|
111593
|
111594
|
111595
|
116394
|
140868
|
140869
|
140870
|
140871
|
140872
|
140873
|
141619
|
141620
|
141621
|
141622
|
141623
|
142386
|
142387
|
142388
|
142389
|
142390