@@ -, +, @@
---
.../data/mysql/atomicupdate/bug_22761.perl | 58 ++++++++++++++++++
.../mysql/en/mandatory/sample_notices.sql | 61 +++++++++++++++++--
2 files changed, 115 insertions(+), 4 deletions(-)
create mode 100644 installer/data/mysql/atomicupdate/bug_22761.perl
--- a/installer/data/mysql/atomicupdate/bug_22761.perl
+++ a/installer/data/mysql/atomicupdate/bug_22761.perl
@@ -0,0 +1,58 @@
+$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_CREDIT', '', 'Account payment', 0, 'Account payment', '
+[% IF ( LibraryName ) %]
+
+
+ [% LibraryName | html %]
+ |
+
+[% END %]
+
+
+ Fee receipt
+ |
+
+
+
+ [% Branches.GetName( patron.branchcode ) | html %]
+ |
+
+
+
+ Received with thanks from [% patron.firstname | html %] [% patron.surname | html %]
+ Card number: [% patron.cardnumber | html %]
+ |
+
+
+ Date |
+ Description of charges |
+ Note |
+ Amount |
+
+
+ [% FOREACH account IN accounts %]
+
+ [% account.date | $KohaDates %] |
+
+ [% PROCESS account_type_description account=account %]
+ [%- IF account.description %], [% account.description | html %][% END %]
+ |
+ [% account.note | html %] |
+ [% IF ( account.amountcredit ) %][% ELSE %] | [% END %][% account.amount | $Price %] |
+
+
+ [% END %]
+
+
+ Total outstanding dues as on date: |
+ [% IF ( totalcredit ) %][% ELSE %] | [% END %][% total | $Price %] |
+
+
+
', 'print', 'default');
+ });
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug XXXXX - description)\n";
+}
--- a/installer/data/mysql/en/mandatory/sample_notices.sql
+++ a/installer/data/mysql/en/mandatory/sample_notices.sql
@@ -176,9 +176,62 @@ 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<> <> (<>),\r\n\r\nTitle: <>\r\nBarcode: <>\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\nNotes: <>\r\n', 'print'),
('circulation', 'AR_PROCESSING', '', 'Article request - processing', 0, 'Article request processing', 'Dear <> <> (<>),\r\n\r\nWe are now processing your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\nNotes: <>\r\n\r\nThank you!', 'email'),
('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<> <> has added a note to the item <> - <> (<>).','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_CREDIT', '', 'Account payment', 0, 'Account payment', '
+[% IF ( LibraryName ) %]
+
+
+ [% LibraryName | html %]
+ |
+
+[% END %]
+
+
+ Fee receipt
+ |
+
+
+
+ [% Branches.GetName( patron.branchcode ) | html %]
+ |
+
+
+
+ Received with thanks from [% patron.firstname | html %] [% patron.surname | html %]
+ Card number: [% patron.cardnumber | html %]
+ |
+
+
+ Date |
+ Description of charges |
+ Note |
+ Amount |
+
+
+ [% FOREACH account IN accounts %]
+
+ [% account.date | $KohaDates %] |
+
+ [% PROCESS account_type_description account=account %]
+ [%- IF account.description %], [% account.description | html %][% END %]
+ |
+ [% account.note | html %] |
+ [% IF ( account.amountcredit ) %][% ELSE %] | [% END %][% account.amount | $Price %] |
+
+
+ [% END %]
+
+
+ Total outstanding dues as on date: |
+ [% IF ( totalcredit ) %][% ELSE %] | [% END %][% total | $Price %] |
+
+
+
', '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');
--