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 1225-1230 tables: Link Here
1225
            - "</tfoot>"
1225
            - "</tfoot>"
1226
            - "</table>"
1226
            - "</table>"
1227
1227
1228
        - module: pos
1229
          code: RECEIPT
1230
          branchcode: ""
1231
          name: "Point of sale receipt"
1232
          is_html: 1
1233
          title: "Receipt"
1234
          message_transport_type: email
1235
          lang: default
1236
          content:
1237
            - "[% USE KohaDates %]"
1238
            - "[% USE Branches %]"
1239
            - "[% USE Price %]"
1240
            - "[% PROCESS \"accounts.inc\" %]"
1241
            - "<table>"
1242
            - "[% IF ( LibraryName ) %]"
1243
            - " <tr>"
1244
            - "    <th colspan=\"2\" class=\"centerednames\">"
1245
            - "        <h3>[% LibraryName | html %]</h3>"
1246
            - "    </th>"
1247
            - " </tr>"
1248
            - "[% END %]"
1249
            - " <tr>"
1250
            - "    <th colspan=\"2\" class=\"centerednames\">"
1251
            - "        <h2>[% Branches.GetName( credit.branchcode ) | html %]</h2>"
1252
            - "    </th>"
1253
            - " </tr>"
1254
            - "<tr>"
1255
            - "    <th colspan=\"2\" class=\"centerednames\">"
1256
            - "        <h3>[% credit.date | $KohaDates %]</h3>"
1257
            - "</tr>"
1258
            - "<tr>"
1259
            - "  <td>Transaction ID: </td>"
1260
            - "  <td>[% credit.accountlines_id %]</td>"
1261
            - "</tr>"
1262
            - "<tr>"
1263
            - "  <td>Operator ID: </td>"
1264
            - "  <td>[% credit.manager_id %]</td>"
1265
            - "</tr>"
1266
            - "<tr>"
1267
            - "  <td>Payment type: </td>"
1268
            - "  <td>[% credit.payment_type %]</td>"
1269
            - "</tr>"
1270
            - " <tr></tr>"
1271
            - " <tr>"
1272
            - "    <th colspan=\"2\" class=\"centerednames\">"
1273
            - "        <h2><u>Fee receipt</u></h2>"
1274
            - "    </th>"
1275
            - " </tr>"
1276
            - " <tr></tr>"
1277
            - " <tr>"
1278
            - "    <th>Description of charges</th>"
1279
            - "    <th>Amount</th>"
1280
            - "  </tr>"
1281
            - ""
1282
            - "  [% FOREACH debit IN credit.debits %]"
1283
            - "    <tr>"
1284
            - "        <td>[% PROCESS account_type_description account=debit %]</td>"
1285
            - "        <td>[% debit.amount * -1 | $Price %]</td>"
1286
            - "    </tr>"
1287
            - "  [% END %]"
1288
            - ""
1289
            - "<tfoot>"
1290
            - "  <tr class=\"highlight\">"
1291
            - "    <td>Total: </td>"
1292
            - "    <td>[% credit.amount * -1| $Price %]</td>"
1293
            - "  </tr>"
1294
            - "  <tr>"
1295
            - "    <td>Tendered: </td>"
1296
            - "    <td>[% collected | $Price %]</td>"
1297
            - "  </tr>"
1298
            - "  <tr>"
1299
            - "    <td>Change: </td>"
1300
            - "    <td>[% change | $Price %]</td>"
1301
            - "    </tr>"
1302
            - "</tfoot>"
1303
            - "</table>"
1304
1228
        - module: reserves
1305
        - module: reserves
1229
          code: CANCEL_HOLD_ON_LOST
1306
          code: CANCEL_HOLD_ON_LOST
1230
          branchcode: ""
1307
          branchcode: ""
1231
- 

Return to bug 30619