Bugzilla – Attachment 137132 Details for
Bug 30619
Add the option to email receipts as an alternative to printing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30619: Add sample email notice
Bug-30619-Add-sample-email-notice.patch (text/plain), 5.98 KB, created by
ByWater Sandboxes
on 2022-07-04 16:55:24 UTC
(
hide
)
Description:
Bug 30619: Add sample email notice
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2022-07-04 16:55:24 UTC
Size:
5.98 KB
patch
obsolete
>From c328d27585f420476a3d20299f322a27c0c5e333 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >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 <david@davidnind.com> >--- > .../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<table>\r\n[% IF ( LibraryName ) %]\r\n <tr>\r\n <th colspan=\'2\' class=\'centerednames\'>\r\n <h3>[% LibraryName | html %]</h3>\r\n </th>\r\n </tr>\r\n[% END %]\r\n <tr>\r\n <th colspan=\'2\' class=\'centerednames\'>\r\n <h2>[% Branches.GetName( credit.branchcode ) | html %]</h2>\r\n </th>\r\n </tr>\r\n<tr>\r\n <th colspan=\'2\' class=\'centerednames\'>\r\n <h3>[% credit.date | $KohaDates %]</h3>\r\n</tr>\r\n<tr>\r\n <td>Transaction ID: </td>\r\n <td>[% credit.accountlines_id %]</td>\r\n</tr>\r\n<tr>\r\n <td>Operator ID: </td>\r\n <td>[% credit.manager_id %]</td>\r\n</tr>\r\n<tr>\r\n <td>Payment type: </td>\r\n <td>[% credit.payment_type %]</td>\r\n</tr>\r\n <tr></tr>\r\n <tr>\r\n <th colspan=\'2\' class=\'centerednames\'>\r\n <h2><u>Fee receipt</u></h2>\r\n </th>\r\n </tr>\r\n <tr></tr>\r\n <tr>\r\n <th>Description of charges</th>\r\n <th>Amount</th>\r\n </tr>\r\n\r\n [% FOREACH debit IN credit.debits %]\r\n <tr>\r\n <td>[% PROCESS account_type_description account=debit %]</td>\r\n <td>[% debit.amount * -1 | $Price %]</td>\r\n </tr>\r\n [% END %]\r\n\r\n<tfoot>\r\n <tr class=\'highlight\'>\r\n <td>Total: </td>\r\n <td>[% credit.amount * -1| $Price %]</td>\r\n </tr>\r\n <tr>\r\n <td>Tendered: </td>\r\n <td>[% collected | $Price %]</td>\r\n </tr>\r\n <tr>\r\n <td>Change: </td>\r\n <td>[% change | $Price %]</td>\r\n </tr>\r\n</tfoot>\r\n</table>\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: > - "</tfoot>" > - "</table>" > >+ - 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\" %]" >+ - "<table>" >+ - "[% IF ( LibraryName ) %]" >+ - " <tr>" >+ - " <th colspan=\"2\" class=\"centerednames\">" >+ - " <h3>[% LibraryName | html %]</h3>" >+ - " </th>" >+ - " </tr>" >+ - "[% END %]" >+ - " <tr>" >+ - " <th colspan=\"2\" class=\"centerednames\">" >+ - " <h2>[% Branches.GetName( credit.branchcode ) | html %]</h2>" >+ - " </th>" >+ - " </tr>" >+ - "<tr>" >+ - " <th colspan=\"2\" class=\"centerednames\">" >+ - " <h3>[% credit.date | $KohaDates %]</h3>" >+ - "</tr>" >+ - "<tr>" >+ - " <td>Transaction ID: </td>" >+ - " <td>[% credit.accountlines_id %]</td>" >+ - "</tr>" >+ - "<tr>" >+ - " <td>Operator ID: </td>" >+ - " <td>[% credit.manager_id %]</td>" >+ - "</tr>" >+ - "<tr>" >+ - " <td>Payment type: </td>" >+ - " <td>[% credit.payment_type %]</td>" >+ - "</tr>" >+ - " <tr></tr>" >+ - " <tr>" >+ - " <th colspan=\"2\" class=\"centerednames\">" >+ - " <h2><u>Fee receipt</u></h2>" >+ - " </th>" >+ - " </tr>" >+ - " <tr></tr>" >+ - " <tr>" >+ - " <th>Description of charges</th>" >+ - " <th>Amount</th>" >+ - " </tr>" >+ - "" >+ - " [% FOREACH debit IN credit.debits %]" >+ - " <tr>" >+ - " <td>[% PROCESS account_type_description account=debit %]</td>" >+ - " <td>[% debit.amount * -1 | $Price %]</td>" >+ - " </tr>" >+ - " [% END %]" >+ - "" >+ - "<tfoot>" >+ - " <tr class=\"highlight\">" >+ - " <td>Total: </td>" >+ - " <td>[% credit.amount * -1| $Price %]</td>" >+ - " </tr>" >+ - " <tr>" >+ - " <td>Tendered: </td>" >+ - " <td>[% collected | $Price %]</td>" >+ - " </tr>" >+ - " <tr>" >+ - " <td>Change: </td>" >+ - " <td>[% change | $Price %]</td>" >+ - " </tr>" >+ - "</tfoot>" >+ - "</table>" >+ > - module: reserves > code: CANCEL_HOLD_ON_LOST > branchcode: "" >-- >2.30.2
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 30619
:
136798
|
136800
|
136801
|
136802
|
137131
|
137132
|
139502
|
139503
|
139504