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'); }); }, };