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

(-)a/installer/data/mysql/atomicupdate/bug_28374.pl (+35 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "28374",
5
    description => "Update point of sale print receipt",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        $dbh->do(q{
11
            UPDATE letter SET content = CONCAT('[% USE KohaDates %][% USE Branches %][% USE Price %]', content), is_html = 1 WHERE code = 'RECEIPT';
12
        });
13
        say $out "Added KohaDates, Branches and Price plugins";
14
15
        $dbh->do(q{
16
            UPDATE letter SET content = REPLACE(content, 'payment.', 'credit.') WHERE code = 'RECEIPT';
17
        });
18
        say $out "Replaced 'payment' with 'credit' param in RECEIPT template";
19
20
        $dbh->do(q{
21
            UPDATE letter SET content = REPLACE(content, 'offsets', 'credit.debits') WHERE code = 'RECEIPT';
22
        });
23
        say $out "Replaced 'offsets' with 'credit.debits' param in RECEIPT template";
24
25
        $dbh->do(q{
26
            UPDATE letter SET content = REPLACE(content, 'offset', 'debit') WHERE code = 'RECEIPT';
27
        });
28
        say $out "Replaced 'offset' with 'debit' param in RECEIPT template";
29
30
        $dbh->do(q{
31
            UPDATE letter SET content = REPLACE(content, 'debit.debit', 'debit') WHERE code = 'RECEIPT';
32
        });
33
        say $out "Replaced 'debit.debit' with 'debit' param in RECEIPT template";
34
    },
35
}
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (-11 / +13 lines)
Lines 1113-1123 tables: Link Here
1113
          code: RECEIPT
1113
          code: RECEIPT
1114
          branchcode: ""
1114
          branchcode: ""
1115
          name: "Point of sale receipt"
1115
          name: "Point of sale receipt"
1116
          is_html: 0
1116
          is_html: 1
1117
          title: "Receipt"
1117
          title: "Receipt"
1118
          message_transport_type: print
1118
          message_transport_type: print
1119
          lang: default
1119
          lang: default
1120
          content:
1120
          content:
1121
            - "[% USE KohaDates %]"
1122
            - "[% USE Branches %]"
1123
            - "[% USE Price %]"
1121
            - "[% PROCESS \"accounts.inc\" %]"
1124
            - "[% PROCESS \"accounts.inc\" %]"
1122
            - "<table>"
1125
            - "<table>"
1123
            - "[% IF ( LibraryName ) %]"
1126
            - "[% IF ( LibraryName ) %]"
Lines 1129-1152 tables: Link Here
1129
            - "[% END %]"
1132
            - "[% END %]"
1130
            - " <tr>"
1133
            - " <tr>"
1131
            - "    <th colspan=\"2\" class=\"centerednames\">"
1134
            - "    <th colspan=\"2\" class=\"centerednames\">"
1132
            - "        <h2>[% Branches.GetName( payment.branchcode ) | html %]</h2>"
1135
            - "        <h2>[% Branches.GetName( credit.branchcode ) | html %]</h2>"
1133
            - "    </th>"
1136
            - "    </th>"
1134
            - " </tr>"
1137
            - " </tr>"
1135
            - "<tr>"
1138
            - "<tr>"
1136
            - "    <th colspan=\"2\" class=\"centerednames\">"
1139
            - "    <th colspan=\"2\" class=\"centerednames\">"
1137
            - "        <h3>[% payment.date | $KohaDates %]</h3>"
1140
            - "        <h3>[% credit.date | $KohaDates %]</h3>"
1138
            - "</tr>"
1141
            - "</tr>"
1139
            - "<tr>"
1142
            - "<tr>"
1140
            - "  <td>Transaction ID: </td>"
1143
            - "  <td>Transaction ID: </td>"
1141
            - "  <td>[% payment.accountlines_id %]</td>"
1144
            - "  <td>[% credit.accountlines_id %]</td>"
1142
            - "</tr>"
1145
            - "</tr>"
1143
            - "<tr>"
1146
            - "<tr>"
1144
            - "  <td>Operator ID: </td>"
1147
            - "  <td>Operator ID: </td>"
1145
            - "  <td>[% payment.manager_id %]</td>"
1148
            - "  <td>[% credit.manager_id %]</td>"
1146
            - "</tr>"
1149
            - "</tr>"
1147
            - "<tr>"
1150
            - "<tr>"
1148
            - "  <td>Payment type: </td>"
1151
            - "  <td>Payment type: </td>"
1149
            - "  <td>[% payment.payment_type %]</td>"
1152
            - "  <td>[% credit.payment_type %]</td>"
1150
            - "</tr>"
1153
            - "</tr>"
1151
            - " <tr></tr>"
1154
            - " <tr></tr>"
1152
            - " <tr>"
1155
            - " <tr>"
Lines 1160-1176 tables: Link Here
1160
            - "    <th>Amount</th>"
1163
            - "    <th>Amount</th>"
1161
            - "  </tr>"
1164
            - "  </tr>"
1162
            - ""
1165
            - ""
1163
            - "  [% FOREACH offset IN offsets %]"
1166
            - "  [% FOREACH debit IN credit.debits %]"
1164
            - "    <tr>"
1167
            - "    <tr>"
1165
            - "        <td>[% PROCESS account_type_description account=offset.debit %]</td>"
1168
            - "        <td>[% PROCESS account_type_description account=debit %]</td>"
1166
            - "        <td>[% offset.amount * -1 | $Price %]</td>"
1169
            - "        <td>[% debit.amount * -1 | $Price %]</td>"
1167
            - "    </tr>"
1170
            - "    </tr>"
1168
            - "  [% END %]"
1171
            - "  [% END %]"
1169
            - ""
1172
            - ""
1170
            - "<tfoot>"
1173
            - "<tfoot>"
1171
            - "  <tr class=\"highlight\">"
1174
            - "  <tr class=\"highlight\">"
1172
            - "    <td>Total: </td>"
1175
            - "    <td>Total: </td>"
1173
            - "    <td>[% payment.amount * -1| $Price %]</td>"
1176
            - "    <td>[% credit.amount * -1| $Price %]</td>"
1174
            - "  </tr>"
1177
            - "  </tr>"
1175
            - "  <tr>"
1178
            - "  <tr>"
1176
            - "    <td>Tendered: </td>"
1179
            - "    <td>Tendered: </td>"
1177
- 

Return to bug 28374