Bugzilla – Attachment 142872 Details for
Bug 31713
Allow easy printing of patron's fines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31713: Add FEE_SUMMARY slip template
Bug-31713-Add-FEESUMMARY-slip-template.patch (text/plain), 7.95 KB, created by
Martin Renvoize (ashimema)
on 2022-11-01 14:25:25 UTC
(
hide
)
Description:
Bug 31713: Add FEE_SUMMARY slip template
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-11-01 14:25:25 UTC
Size:
7.95 KB
patch
obsolete
>From 6817cb23f06339adbe0eef585726121c2233f8af Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 10 Oct 2022 12:02:43 +0100 >Subject: [PATCH] Bug 31713: Add FEE_SUMMARY slip template > >This patch adds the new FEE_SUMMARY print slip notice template to the >database. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../data/mysql/atomicupdate/bug_31713.pl | 101 ++++++++++++++++++ > .../mysql/en/mandatory/sample_notices.yml | 92 ++++++++++++++++ > 2 files changed, 193 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_31713.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_31713.pl b/installer/data/mysql/atomicupdate/bug_31713.pl >new file mode 100644 >index 0000000000..9ab4132d89 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_31713.pl >@@ -0,0 +1,101 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "31713", >+ description => "Add FEE_SUMMARY slip notice", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ >+ my $slip_content = <<~'END_CONTENT'; >+[% USE Koha %] >+[% USE Branches %] >+[% USE Price %] >+[% PROCESS 'accounts.inc' %] >+<table> >+ [% IF ( Koha.Preference('LibraryName') ) %] >+ <tr> >+ <th colspan='4' class='centerednames'> >+ <h1>[% Koha.Preference('LibraryName') | html %]</h1> >+ </th> >+ </tr> >+ [% END %] >+ >+ <tr> >+ <th colspan='4' class='centerednames'> >+ <h2>[% Branches.GetName( borrower.branchcode ) | html %]</h2> >+ </th> >+ </tr> >+ >+ <tr> >+ <th colspan='4' class='centerednames'> >+ <h3>Outstanding accounts</h3> >+ </th> >+ </tr> >+ >+ [% IF borrower.account.outstanding_debits.total_outstanding %] >+ <tr> >+ <th colspan='4' class='centerednames'> >+ <h4>Debts</h4> >+ </th> >+ </tr> >+ <tr> >+ <th>Date</th> >+ <th>Charge</th> >+ <th>Amount</th> >+ <th>Outstanding</th> >+ </tr> >+ [% FOREACH debit IN borrower.account.outstanding_debits %] >+ <tr> >+ <td>[% debit.date | $KohaDates %]</td> >+ <td> >+ [% PROCESS account_type_description account=debit %] >+ [%- IF debit.description %], [% debit.description | html %][% END %] >+ </td> >+ <td class='debit'>[% debit.amount | $Price %]</td> >+ <td class='debit'>[% debit.amountoutstanding | $Price %]</td> >+ </tr> >+ [% END %] >+ [% END %] >+ >+ [% IF borrower.account.outstanding_credits.total_outstanding %] >+ <tr> >+ <th colspan='4' class='centerednames'> >+ <h4>Credits</h4> >+ </th> >+ </tr> >+ <tr> >+ <th>Date</th> >+ <th>Credit</th> >+ <th>Amount</th> >+ <th>Outstanding</th> >+ </tr> >+ [% FOREACH credit IN borrower.account.outstanding_credits %] >+ <tr> >+ <td>[% credit.date | $KohaDates %]</td> >+ <td> >+ [% PROCESS account_type_description account=credit %] >+ [%- IF credit.description %], [% credit.description | html %][% END %] >+ </td> >+ <td class='credit'>[% credit.amount | $Price %]</td> >+ <td class='credit'>[% credit.amountoutstanding | $Price %]</td> >+ </tr> >+ [% END %] >+ [% END %] >+ >+ <tfoot> >+ <tr> >+ <td colspan='3'>Total outstanding dues as on date: </td> >+ [% IF ( borrower.account.balance <= 0 ) %]<td class='credit'>[% ELSE %]<td class='debit'>[% END %][% borrower.account.balance | $Price %]</td> >+ </tr> >+ </tfoot> >+</table> >+END_CONTENT >+ >+ $dbh->do(qq{ >+ INSERT IGNORE INTO letter ( module, code, branchcode, name, is_html, title, content, message_transport_type, lang) >+ VALUES ( 'members', 'FEE_SUMMARY', '', 'Fee Summary Slip', 1, 'Fee Summary for [% borrower.firstname %] [% borrower.surname %]', "$slip_content", 'print', 'default' ) >+ }); >+ say $out "Notice added"; >+ }, >+}; >diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml >index 738cd55bbd..436a1ecc6a 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.yml >+++ b/installer/data/mysql/en/mandatory/sample_notices.yml >@@ -1283,6 +1283,98 @@ tables: > - "Your authentication token is [% otp_token %]." > - "It is valid one minute." > >+ - module: members >+ code: FEE_SUMMARY >+ branchcode: "" >+ name: "Fee Summary Slip" >+ is_html: 1 >+ title: "Fee Summary for [% borrower.firstname %] [% borrower.surname %]" >+ message_transport_type: print >+ lang: default >+ content: >+ - "[% USE Koha %]" >+ - "[% USE Branches %]" >+ - "[% USE Price %]" >+ - "[% PROCESS 'accounts.inc' %]" >+ - "<table>" >+ - " [% IF ( Koha.Preference('LibraryName') ) %]" >+ - " <tr>" >+ - " <th colspan='4' class='centerednames'>" >+ - " <h1>[% Koha.Preference('LibraryName') | html %]</h1>" >+ - " </th>" >+ - " </tr>" >+ - " [% END %]" >+ - "" >+ - " <tr>" >+ - " <th colspan='4' class='centerednames'>" >+ - " <h2>[% Branches.GetName( borrower.branchcode ) | html %]</h2>" >+ - " </th>" >+ - " </tr>" >+ - "" >+ - " <tr>" >+ - " <th colspan='4' class='centerednames'>" >+ - " <h3>Outstanding accounts</h3>" >+ - " </th>" >+ - " </tr>" >+ - "" >+ - " [% IF borrower.account.outstanding_debits.total_outstanding %]" >+ - " <tr>" >+ - " <th colspan='4' class='centerednames'>" >+ - " <h4>Debts</h4>" >+ - " </th>" >+ - " </tr>" >+ - " <tr>" >+ - " <th>Date</th>" >+ - " <th>Charge</th>" >+ - " <th>Amount</th>" >+ - " <th>Outstanding</th>" >+ - " </tr>" >+ - " [% FOREACH debit IN borrower.account.outstanding_debits %]" >+ - " <tr>" >+ - " <td>[% debit.date | $KohaDates %]</td>" >+ - " <td>" >+ - " [% PROCESS account_type_description account=debit %]" >+ - " [%- IF debit.description %], [% debit.description | html %][% END %]" >+ - " </td>" >+ - " <td class='debit'>[% debit.amount | $Price %]</td>" >+ - " <td class='debit'>[% debit.amountoutstanding | $Price %]</td>" >+ - " </tr>" >+ - " [% END %]" >+ - " [% END %]" >+ - "" >+ - " [% IF borrower.account.outstanding_credits.total_outstanding %]" >+ - " <tr>" >+ - " <th colspan='4' class='centerednames'>" >+ - " <h4>Credits</h4>" >+ - " </th>" >+ - " </tr>" >+ - " <tr>" >+ - " <th>Date</th>" >+ - " <th>Credit</th>" >+ - " <th>Amount</th>" >+ - " <th>Outstanding</th>" >+ - " </tr>" >+ - " [% FOREACH credit IN borrower.account.outstanding_credits %]" >+ - " <tr>" >+ - " <td>[% credit.date | $KohaDates%]</td>" >+ - " <td>" >+ - " [% PROCESS account_type_description account=credit %]" >+ - " [%- IF credit.description %], [% credit.description | html %][% END %]" >+ - " </td>" >+ - " <td class='credit'>[% credit.amount | $Price %]</td>" >+ - " <td class='credit'>[% credit.amountoutstanding | $Price %]</td>" >+ - " </tr>" >+ - " [% END %]" >+ - " [% END %]" >+ - "" >+ - " <tfoot>" >+ - " <tr>" >+ - " <td colspan='3'>Total outstanding dues as on date: </td>" >+ - " [% IF ( borrower.account.balance <= 0 ) %]<td class='credit'>[% ELSE %]<td class='debit'>[% END %][% borrower.account.balance | $Price %]</td>" >+ - " </tr>" >+ - " </tfoot>" >+ - "</table>" >+ > - module: orderacquisition > code: ACQORDER > branchcode: "" >-- >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 31713
:
141517
|
141572
|
141573
|
141574
|
141575
|
142340
|
142341
|
142342
|
142360
|
142760
|
142871
|
142872
|
142873
|
142874
|
142875
|
142876
|
142926
|
142927
|
142928
|
142929
|
142930
|
142931