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

(-)a/installer/data/mysql/atomicupdate/bug_31713.pl (-4 / +12 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => "31713",
4
    bug_number => "31713",
5
    description => "Add FEE_SUMMARY slip notice",
5
    description => "Add ACCOUNTS_SUMMARY slip notice",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
Lines 34-45 return { Link Here
34
    </th>
34
    </th>
35
  </tr>
35
  </tr>
36
36
37
  [% IF borrower.account.outstanding_debits.total_outstanding %]
38
  <tr>
37
  <tr>
39
    <th colspan='4' class='centerednames'>
38
    <th colspan='4' class='centerednames'>
40
      <h4>Debts</h4>
39
      <h4>Debts</h4>
41
    </th>
40
    </th>
42
  </tr>
41
  </tr>
42
  [% IF borrower.account.outstanding_debits.total_outstanding %]
43
  <tr>
43
  <tr>
44
    <th>Date</th>
44
    <th>Date</th>
45
    <th>Charge</th>
45
    <th>Charge</th>
Lines 57-70 return { Link Here
57
    <td class='debit'>[% debit.amountoutstanding | $Price %]</td>
57
    <td class='debit'>[% debit.amountoutstanding | $Price %]</td>
58
  </tr>
58
  </tr>
59
  [% END %]
59
  [% END %]
60
  [% ELSE %]
61
  <tr>
62
    <td colspan='4'>There are no outstanding debts on your account</td>
63
  </tr>
60
  [% END %]
64
  [% END %]
61
65
62
  [% IF borrower.account.outstanding_credits.total_outstanding %]
63
  <tr>
66
  <tr>
64
    <th colspan='4' class='centerednames'>
67
    <th colspan='4' class='centerednames'>
65
      <h4>Credits</h4>
68
      <h4>Credits</h4>
66
    </th>
69
    </th>
67
  </tr>
70
  </tr>
71
  [% IF borrower.account.outstanding_credits.total_outstanding %]
68
  <tr>
72
  <tr>
69
    <th>Date</th>
73
    <th>Date</th>
70
    <th>Credit</th>
74
    <th>Credit</th>
Lines 82-87 return { Link Here
82
    <td class='credit'>[% credit.amountoutstanding | $Price %]</td>
86
    <td class='credit'>[% credit.amountoutstanding | $Price %]</td>
83
  </tr>
87
  </tr>
84
  [% END %]
88
  [% END %]
89
  [% ELSE %]
90
  <tr>
91
    <td colspan='4'>There are no outstanding credits on your account</td>
92
  </tr>
85
  [% END %]
93
  [% END %]
86
94
87
  <tfoot>
95
  <tfoot>
Lines 95-101 END_CONTENT Link Here
95
103
96
        $dbh->do(qq{
104
        $dbh->do(qq{
97
           INSERT IGNORE INTO letter ( module, code, branchcode, name, is_html, title, content, message_transport_type, lang)
105
           INSERT IGNORE INTO letter ( module, code, branchcode, name, is_html, title, content, message_transport_type, lang)
98
           VALUES ( 'members', 'FEE_SUMMARY', '', 'Fee Summary Slip', 1, 'Fee Summary for [% borrower.firstname %] [% borrower.surname %]', "$slip_content", 'print', 'default' )
106
           VALUES ( 'members', 'ACCOUNTS_SUMMARY', '', 'Account balance slip', 1, 'Account summary for [% borrower.firstname %] [% borrower.surname %]', "$slip_content", 'print', 'default' )
99
        });
107
        });
100
        say $out "Notice added";
108
        say $out "Notice added";
101
    },
109
    },
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (-5 / +13 lines)
Lines 1284-1294 tables: Link Here
1284
            - "It is valid one minute."
1284
            - "It is valid one minute."
1285
1285
1286
        - module: members
1286
        - module: members
1287
          code: FEE_SUMMARY
1287
          code: ACCOUNTS_SUMMARY
1288
          branchcode: ""
1288
          branchcode: ""
1289
          name: "Fee Summary Slip"
1289
          name: "Account balance slip"
1290
          is_html: 1
1290
          is_html: 1
1291
          title: "Fee Summary for [% borrower.firstname %] [% borrower.surname %]"
1291
          title: "Account summary for [% borrower.firstname %] [% borrower.surname %]"
1292
          message_transport_type: print
1292
          message_transport_type: print
1293
          lang: default
1293
          lang: default
1294
          content:
1294
          content:
Lines 1318-1329 tables: Link Here
1318
            - "    </th>"
1318
            - "    </th>"
1319
            - "  </tr>"
1319
            - "  </tr>"
1320
            - ""
1320
            - ""
1321
            - "  [% IF borrower.account.outstanding_debits.total_outstanding %]"
1322
            - "  <tr>"
1321
            - "  <tr>"
1323
            - "    <th colspan='4' class='centerednames'>"
1322
            - "    <th colspan='4' class='centerednames'>"
1324
            - "      <h4>Debts</h4>"
1323
            - "      <h4>Debts</h4>"
1325
            - "    </th>"
1324
            - "    </th>"
1326
            - "  </tr>"
1325
            - "  </tr>"
1326
            - "  [% IF borrower.account.outstanding_debits.total_outstanding %]"
1327
            - "  <tr>"
1327
            - "  <tr>"
1328
            - "    <th>Date</th>"
1328
            - "    <th>Date</th>"
1329
            - "    <th>Charge</th>"
1329
            - "    <th>Charge</th>"
Lines 1341-1354 tables: Link Here
1341
            - "    <td class='debit'>[% debit.amountoutstanding | $Price %]</td>"
1341
            - "    <td class='debit'>[% debit.amountoutstanding | $Price %]</td>"
1342
            - "  </tr>"
1342
            - "  </tr>"
1343
            - "  [% END %]"
1343
            - "  [% END %]"
1344
            - "  [% ELSE %]"
1345
            - "  <tr>"
1346
            - "    <td colspan='4'>There are no outstanding debts on your account</td>"
1347
            - "  </tr>"
1344
            - "  [% END %]"
1348
            - "  [% END %]"
1345
            - ""
1349
            - ""
1346
            - "  [% IF borrower.account.outstanding_credits.total_outstanding %]"
1347
            - "  <tr>"
1350
            - "  <tr>"
1348
            - "    <th colspan='4' class='centerednames'>"
1351
            - "    <th colspan='4' class='centerednames'>"
1349
            - "      <h4>Credits</h4>"
1352
            - "      <h4>Credits</h4>"
1350
            - "    </th>"
1353
            - "    </th>"
1351
            - "  </tr>"
1354
            - "  </tr>"
1355
            - "  [% IF borrower.account.outstanding_credits.total_outstanding %]"
1352
            - "  <tr>"
1356
            - "  <tr>"
1353
            - "    <th>Date</th>"
1357
            - "    <th>Date</th>"
1354
            - "    <th>Credit</th>"
1358
            - "    <th>Credit</th>"
Lines 1366-1371 tables: Link Here
1366
            - "    <td class='credit'>[% credit.amountoutstanding | $Price %]</td>"
1370
            - "    <td class='credit'>[% credit.amountoutstanding | $Price %]</td>"
1367
            - "  </tr>"
1371
            - "  </tr>"
1368
            - "  [% END %]"
1372
            - "  [% END %]"
1373
            - "  [% ELSE %]"
1374
            - "  <tr>"
1375
            - "    <td colspan='4'>There are no outstanding credits on your account</td>"
1376
            - "  </tr>"
1369
            - "  [% END %]"
1377
            - "  [% END %]"
1370
            - ""
1378
            - ""
1371
            - "  <tfoot>"
1379
            - "  <tfoot>"
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc (-2 / +1 lines)
Lines 25-31 Link Here
25
                <li><a id="printslip" href="#">Print slip</a></li>
25
                <li><a id="printslip" href="#">Print slip</a></li>
26
                <li><a id="printquickslip" href="#">Print quick slip</a></li>
26
                <li><a id="printquickslip" href="#">Print quick slip</a></li>
27
                [% IF patron.account_balance > 0 %]
27
                [% IF patron.account_balance > 0 %]
28
                <li><a id="printfineslip" target="_blank" href="/cgi-bin/koha/members/printnotice.pl?notice=FEE_SUMMARY&borrowernumber=[% patron.borrowernumber | uri %]">Print fines slip</a></li>
28
                <li><a id="printfineslip" target="_blank" href="/cgi-bin/koha/members/printnotice.pl?notice=ACCOUNTS_SUMMARY&borrowernumber=[% patron.borrowernumber | uri %]">Print account balance</a></li>
29
                [% END %]
29
                [% END %]
30
                [% IF patron.has_overdues %]
30
                [% IF patron.has_overdues %]
31
                    <li><a id="print_overdues" href="#">Print overdues</a></li>
31
                    <li><a id="print_overdues" href="#">Print overdues</a></li>
32
- 

Return to bug 31713