Bugzilla – Attachment 88553 Details for
Bug 22761
Move "Fee receipt" from template to a slip
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22761: Add notice based on existing template
Bug-22761-Add-notice-based-on-existing-template.patch (text/plain), 11.93 KB, created by
Kyle M Hall (khall)
on 2019-04-23 18:46:23 UTC
(
hide
)
Description:
Bug 22761: Add notice based on existing template
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-04-23 18:46:23 UTC
Size:
11.93 KB
patch
obsolete
>From d47c945022455fda092c9a19703aad28af564b4a Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 23 Apr 2019 14:39:44 -0400 >Subject: [PATCH] Bug 22761: Add notice based on existing template > >--- > .../data/mysql/atomicupdate/bug_22761.perl | 108 +++++++++++++++++ > .../mysql/en/mandatory/sample_notices.sql | 111 +++++++++++++++++- > 2 files changed, 215 insertions(+), 4 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_22761.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_22761.perl b/installer/data/mysql/atomicupdate/bug_22761.perl >new file mode 100644 >index 0000000000..ed0b312f16 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_22761.perl >@@ -0,0 +1,108 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{ >+INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES >+('circulation', 'ACCOUNT_PAYMENT', '', 'Account payment', 0, 'Account payment', '<table> >+[% IF ( LibraryName ) %] >+ <tr> >+ <th colspan="4" class="centerednames"> >+ <h3>[% LibraryName | html %]</h3> >+ </th> >+ </tr> >+[% END %] >+ <tr> >+ <th colspan="4" class="centerednames"> >+ <h2><u>Fee receipt</u></h2> >+ </th> >+ </tr> >+ <tr> >+ <th colspan="4" class="centerednames"> >+ <h2>[% Branches.GetName( patron.branchcode ) | html %]</h2> >+ </th> >+ </tr> >+ <tr> >+ <th colspan="4"> >+ Received with thanks from [% patron.firstname | html %] [% patron.surname | html %] <br /> >+ Card number: [% patron.cardnumber | html %]<br /> >+ </th> >+ </tr> >+ <tr> >+ <th>Date</th> >+ <th>Description of charges</th> >+ <th>Note</th> >+ <th>Amount</th> >+ </tr> >+ >+ [% FOREACH account IN accounts %] >+ <tr class="highlight"> >+ <td>[% account.date | $KohaDates %]</td> >+ <td> >+ [% PROCESS account_type_description account=account %] >+ [%- IF account.description %], [% account.description | html %][% END %] >+ </td> >+ <td>[% account.note | html %]</td> >+ [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount | $Price %]</td> >+ </tr> >+ >+ [% END %] >+<tfoot> >+ <tr> >+ <td colspan="3">Total outstanding dues as on date: </td> >+ [% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total | $Price %]</td> >+ </tr> >+</tfoot> >+</table>', 'print', 'default'), >+('circulation', 'ACCOUNT_WRITEOFF', '', 'Account writeoff', 0, 'Account writeoff', '<table> >+[% IF ( LibraryName ) %] >+ <tr> >+ <th colspan="4" class="centerednames"> >+ <h3>[% LibraryName | html %]</h3> >+ </th> >+ </tr> >+[% END %] >+ <tr> >+ <th colspan="4" class="centerednames"> >+ <h2><u>Fee receipt</u></h2> >+ </th> >+ </tr> >+ <tr> >+ <th colspan="4" class="centerednames"> >+ <h2>[% Branches.GetName( patron.branchcode ) | html %]</h2> >+ </th> >+ </tr> >+ <tr> >+ <th colspan="4"> >+ Received with thanks from [% patron.firstname | html %] [% patron.surname | html %] <br /> >+ Card number: [% patron.cardnumber | html %]<br /> >+ </th> >+ </tr> >+ <tr> >+ <th>Date</th> >+ <th>Description of charges</th> >+ <th>Note</th> >+ <th>Amount</th> >+ </tr> >+ >+ [% FOREACH account IN accounts %] >+ <tr class="highlight"> >+ <td>[% account.date | $KohaDates %]</td> >+ <td> >+ [% PROCESS account_type_description account=account %] >+ [%- IF account.description %], [% account.description | html %][% END %] >+ </td> >+ <td>[% account.note | html %]</td> >+ [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount | $Price %]</td> >+ </tr> >+ >+ [% END %] >+<tfoot> >+ <tr> >+ <td colspan="3">Total outstanding dues as on date: </td> >+ [% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total | $Price %]</td> >+ </tr> >+</tfoot> >+</table>', 'print', 'default'); >+ }): >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug XXXXX - description)\n"; >+} >diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql >index 4d37f9c71d..eda770bacc 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.sql >+++ b/installer/data/mysql/en/mandatory/sample_notices.sql >@@ -176,9 +176,112 @@ INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title` > ('circulation', 'AR_SLIP', '', 'Article request - print slip', 0, 'Article request', 'Article request:\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nTitle: <<biblio.title>>\r\nBarcode: <<items.barcode>>\r\n\r\nArticle requested:\r\nTitle: <<article_requests.title>>\r\nAuthor: <<article_requests.author>>\r\nVolume: <<article_requests.volume>>\r\nIssue: <<article_requests.issue>>\r\nDate: <<article_requests.date>>\r\nPages: <<article_requests.pages>>\r\nChapters: <<article_requests.chapters>>\r\nNotes: <<article_requests.patron_notes>>\r\n', 'print'), > ('circulation', 'AR_PROCESSING', '', 'Article request - processing', 0, 'Article request processing', 'Dear <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nWe are now processing your request for an article from <<biblio.title>> (<<items.barcode>>).\r\n\r\nArticle requested:\r\nTitle: <<article_requests.title>>\r\nAuthor: <<article_requests.author>>\r\nVolume: <<article_requests.volume>>\r\nIssue: <<article_requests.issue>>\r\nDate: <<article_requests.date>>\r\nPages: <<article_requests.pages>>\r\nChapters: <<article_requests.chapters>>\r\nNotes: <<article_requests.patron_notes>>\r\n\r\nThank you!', 'email'), > ('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'); >-INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) >- VALUES >- ('circulation', 'ACCOUNT_PAYMENT', '', 'Account payment', 0, 'Account payment', '[%- USE Price -%]\r\nA payment of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis payment affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'), >- ('circulation', 'ACCOUNT_WRITEOFF', '', 'Account writeoff', 0, 'Account writeoff', '[%- USE Price -%]\r\nAn account writeoff of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis writeoff affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'); >+ >+INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES >+('circulation', 'ACCOUNT_PAYMENT', '', 'Account payment', 0, 'Account payment', '[%- USE Price -%]\r\nA payment of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis payment affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'), >+('circulation', 'ACCOUNT_WRITEOFF', '', 'Account writeoff', 0, 'Account writeoff', '[%- USE Price -%]\r\nAn account writeoff of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis writeoff affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'); >+ >+INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES >+('circulation', 'ACCOUNT_PAYMENT', '', 'Account payment', 0, 'Account payment', '<table> >+[% IF ( LibraryName ) %] >+ <tr> >+ <th colspan="4" class="centerednames"> >+ <h3>[% LibraryName | html %]</h3> >+ </th> >+ </tr> >+[% END %] >+ <tr> >+ <th colspan="4" class="centerednames"> >+ <h2><u>Fee receipt</u></h2> >+ </th> >+ </tr> >+ <tr> >+ <th colspan="4" class="centerednames"> >+ <h2>[% Branches.GetName( patron.branchcode ) | html %]</h2> >+ </th> >+ </tr> >+ <tr> >+ <th colspan="4"> >+ Received with thanks from [% patron.firstname | html %] [% patron.surname | html %] <br /> >+ Card number: [% patron.cardnumber | html %]<br /> >+ </th> >+ </tr> >+ <tr> >+ <th>Date</th> >+ <th>Description of charges</th> >+ <th>Note</th> >+ <th>Amount</th> >+ </tr> >+ >+ [% FOREACH account IN accounts %] >+ <tr class="highlight"> >+ <td>[% account.date | $KohaDates %]</td> >+ <td> >+ [% PROCESS account_type_description account=account %] >+ [%- IF account.description %], [% account.description | html %][% END %] >+ </td> >+ <td>[% account.note | html %]</td> >+ [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount | $Price %]</td> >+ </tr> >+ >+ [% END %] >+<tfoot> >+ <tr> >+ <td colspan="3">Total outstanding dues as on date: </td> >+ [% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total | $Price %]</td> >+ </tr> >+</tfoot> >+</table>', 'print', 'default'), >+('circulation', 'ACCOUNT_WRITEOFF', '', 'Account writeoff', 0, 'Account writeoff', '<table> >+[% IF ( LibraryName ) %] >+ <tr> >+ <th colspan="4" class="centerednames"> >+ <h3>[% LibraryName | html %]</h3> >+ </th> >+ </tr> >+[% END %] >+ <tr> >+ <th colspan="4" class="centerednames"> >+ <h2><u>Fee receipt</u></h2> >+ </th> >+ </tr> >+ <tr> >+ <th colspan="4" class="centerednames"> >+ <h2>[% Branches.GetName( patron.branchcode ) | html %]</h2> >+ </th> >+ </tr> >+ <tr> >+ <th colspan="4"> >+ Received with thanks from [% patron.firstname | html %] [% patron.surname | html %] <br /> >+ Card number: [% patron.cardnumber | html %]<br /> >+ </th> >+ </tr> >+ <tr> >+ <th>Date</th> >+ <th>Description of charges</th> >+ <th>Note</th> >+ <th>Amount</th> >+ </tr> >+ >+ [% FOREACH account IN accounts %] >+ <tr class="highlight"> >+ <td>[% account.date | $KohaDates %]</td> >+ <td> >+ [% PROCESS account_type_description account=account %] >+ [%- IF account.description %], [% account.description | html %][% END %] >+ </td> >+ <td>[% account.note | html %]</td> >+ [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount | $Price %]</td> >+ </tr> >+ >+ [% END %] >+<tfoot> >+ <tr> >+ <td colspan="3">Total outstanding dues as on date: </td> >+ [% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total | $Price %]</td> >+ </tr> >+</tfoot> >+</table>', 'print', 'default'); >+ > INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES > ('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'); >-- >2.20.1 (Apple Git-117)
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 22761
:
88552
|
88553
|
88554
|
88557
|
88558
|
88559
|
88560
|
88622
|
88623
|
88624
|
88629
|
88630
|
88631
|
89222
|
89223
|
89224
|
89225
|
89227