View | Details | Raw Unified | Return to bug 30619
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_30619.pl (+14 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "30619",
5
    description => "Add email notice for Point of Sale > RECEIPT",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        # Add RECEIPT email notice
10
        $dbh->do(q{
11
             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');
12
        });
13
    },
14
};
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (-1 / +77 lines)
Lines 1211-1216 tables: Link Here
1211
            - "</tfoot>"
1211
            - "</tfoot>"
1212
            - "</table>"
1212
            - "</table>"
1213
1213
1214
        - module: pos
1215
          code: RECEIPT
1216
          branchcode: ""
1217
          name: "Point of sale receipt"
1218
          is_html: 1
1219
          title: "Receipt"
1220
          message_transport_type: email
1221
          lang: default
1222
          content:
1223
            - "[% USE KohaDates %]"
1224
            - "[% USE Branches %]"
1225
            - "[% USE Price %]"
1226
            - "[% PROCESS \"accounts.inc\" %]"
1227
            - "<table>"
1228
            - "[% IF ( LibraryName ) %]"
1229
            - " <tr>"
1230
            - "    <th colspan=\"2\" class=\"centerednames\">"
1231
            - "        <h3>[% LibraryName | html %]</h3>"
1232
            - "    </th>"
1233
            - " </tr>"
1234
            - "[% END %]"
1235
            - " <tr>"
1236
            - "    <th colspan=\"2\" class=\"centerednames\">"
1237
            - "        <h2>[% Branches.GetName( credit.branchcode ) | html %]</h2>"
1238
            - "    </th>"
1239
            - " </tr>"
1240
            - "<tr>"
1241
            - "    <th colspan=\"2\" class=\"centerednames\">"
1242
            - "        <h3>[% credit.date | $KohaDates %]</h3>"
1243
            - "</tr>"
1244
            - "<tr>"
1245
            - "  <td>Transaction ID: </td>"
1246
            - "  <td>[% credit.accountlines_id %]</td>"
1247
            - "</tr>"
1248
            - "<tr>"
1249
            - "  <td>Operator ID: </td>"
1250
            - "  <td>[% credit.manager_id %]</td>"
1251
            - "</tr>"
1252
            - "<tr>"
1253
            - "  <td>Payment type: </td>"
1254
            - "  <td>[% credit.payment_type %]</td>"
1255
            - "</tr>"
1256
            - " <tr></tr>"
1257
            - " <tr>"
1258
            - "    <th colspan=\"2\" class=\"centerednames\">"
1259
            - "        <h2><u>Fee receipt</u></h2>"
1260
            - "    </th>"
1261
            - " </tr>"
1262
            - " <tr></tr>"
1263
            - " <tr>"
1264
            - "    <th>Description of charges</th>"
1265
            - "    <th>Amount</th>"
1266
            - "  </tr>"
1267
            - ""
1268
            - "  [% FOREACH debit IN credit.debits %]"
1269
            - "    <tr>"
1270
            - "        <td>[% PROCESS account_type_description account=debit %]</td>"
1271
            - "        <td>[% debit.amount * -1 | $Price %]</td>"
1272
            - "    </tr>"
1273
            - "  [% END %]"
1274
            - ""
1275
            - "<tfoot>"
1276
            - "  <tr class=\"highlight\">"
1277
            - "    <td>Total: </td>"
1278
            - "    <td>[% credit.amount * -1| $Price %]</td>"
1279
            - "  </tr>"
1280
            - "  <tr>"
1281
            - "    <td>Tendered: </td>"
1282
            - "    <td>[% collected | $Price %]</td>"
1283
            - "  </tr>"
1284
            - "  <tr>"
1285
            - "    <td>Change: </td>"
1286
            - "    <td>[% change | $Price %]</td>"
1287
            - "    </tr>"
1288
            - "</tfoot>"
1289
            - "</table>"
1290
1214
        - module: reserves
1291
        - module: reserves
1215
          code: CANCEL_HOLD_ON_LOST
1292
          code: CANCEL_HOLD_ON_LOST
1216
          branchcode: ""
1293
          branchcode: ""
1217
- 

Return to bug 30619