From 62333628f1dc2f86cdb523953d45dacfc9f9c396 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 1 Jul 2022 10:02:38 +0100 Subject: [PATCH] Bug 30619: Add sample email notice This patch adds a default same email type notice for the point of sale receipt. --- .../data/mysql/atomicupdate/bug_30619.pl | 16 ++++ .../mysql/en/mandatory/sample_notices.yml | 77 +++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_30619.pl diff --git a/installer/data/mysql/atomicupdate/bug_30619.pl b/installer/data/mysql/atomicupdate/bug_30619.pl new file mode 100644 index 0000000000..777e502fb5 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_30619.pl @@ -0,0 +1,16 @@ +use Modern::Perl; + +return { + bug_number => "30619", + description => "Add email notice for Point of Sale > RECEIPT", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + # Add RECEIPT email notice + $dbh->do(q{ + INSERT IGNORE INTO letter (module, code, name, is_html, title, content, message_transport_type) VALUES ('pos', 'RECEIPT', 'Point of sale receipt', 1, "Receipt", "[% USE KohaDates %]\r\n[% USE Branches %]\r\n[% USE Price %]\r\n[% PROCESS \'accounts.inc\' %]\r\n\r\n[% IF ( LibraryName ) %]\r\n \r\n \r\n \r\n[% END %]\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n\r\n \r\n \r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n [% FOREACH debit IN credit.debits %]\r\n \r\n \r\n \r\n \r\n [% END %]\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n

[% LibraryName | html %]

\r\n
\r\n

[% Branches.GetName( credit.branchcode ) | html %]

\r\n
\r\n

[% credit.date | $KohaDates %]

\r\n
Transaction ID: [% credit.accountlines_id %]
Operator ID: [% credit.manager_id %]
Payment type: [% credit.payment_type %]
\r\n

Fee receipt

\r\n
Description of chargesAmount
[% PROCESS account_type_description account=debit %][% debit.amount * -1 | $Price %]
Total: [% credit.amount * -1| $Price %]
Tendered: [% collected | $Price %]
Change: [% change | $Price %]
\r\n", 'email'); + }); + }, +}; + + diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 4da53c29b5..f8f12f88e2 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -1211,6 +1211,83 @@ tables: - "" - "" + - module: pos + code: RECEIPT + branchcode: "" + name: "Point of sale receipt" + is_html: 1 + title: "Receipt" + message_transport_type: email + lang: default + content: + - "[% USE KohaDates %]" + - "[% USE Branches %]" + - "[% USE Price %]" + - "[% PROCESS \"accounts.inc\" %]" + - "" + - "[% IF ( LibraryName ) %]" + - " " + - " " + - " " + - "[% END %]" + - " " + - " " + - " " + - "" + - " " + - "" + - " " + - " " + - "" + - "" + - " " + - " " + - "" + - "" + - " " + - " " + - "" + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - "" + - " [% FOREACH debit IN credit.debits %]" + - " " + - " " + - " " + - " " + - " [% END %]" + - "" + - "" + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - "" + - "
" + - "

[% LibraryName | html %]

" + - "
" + - "

[% Branches.GetName( credit.branchcode ) | html %]

" + - "
" + - "

[% credit.date | $KohaDates %]

" + - "
Transaction ID: [% credit.accountlines_id %]
Operator ID: [% credit.manager_id %]
Payment type: [% credit.payment_type %]
" + - "

Fee receipt

" + - "
Description of chargesAmount
[% PROCESS account_type_description account=debit %][% debit.amount * -1 | $Price %]
Total: [% credit.amount * -1| $Price %]
Tendered: [% collected | $Price %]
Change: [% change | $Price %]
" + - module: reserves code: CANCEL_HOLD_ON_LOST branchcode: "" -- 2.20.1