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 |
}, |