From e09654da55a4541e0e07c1ff77b9c1ee9a44ec25 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. Signed-off-by: David Nind Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- .../data/mysql/atomicupdate/bug_30619.pl | 14 ++++ .../mysql/en/mandatory/sample_notices.yml | 77 +++++++++++++++++++ 2 files changed, 91 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..6396fdd7e9 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_30619.pl @@ -0,0 +1,14 @@ +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 9c425d74f6..759dc12920 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -1225,6 +1225,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.39.5