Bug 22716: (RM follow-up) missing filter and update description
[koha.git] / installer / data / mysql / atomicupdate / bug_22761.perl
1 $DBversion = 'XXX'; # will be replaced by the RM
2 if( CheckVersion( $DBversion ) ) {
3     $dbh->do(q{
4 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
5 ('circulation', 'ACCOUNT_CREDIT', '', 'Account payment', 0, 'Account payment', '<table>
6 [% IF ( LibraryName ) %]
7  <tr>
8     <th colspan="4" class="centerednames">
9         <h3>[% LibraryName | html %]</h3>
10     </th>
11  </tr>
12 [% END %]
13  <tr>
14     <th colspan="4" class="centerednames">
15         <h2><u>Fee receipt</u></h2>
16     </th>
17  </tr>
18  <tr>
19     <th colspan="4" class="centerednames">
20         <h2>[% Branches.GetName( patron.branchcode ) | html %]</h2>
21     </th>
22  </tr>
23  <tr>
24     <th colspan="4">
25         Received with thanks from  [% patron.firstname | html %] [% patron.surname | html %] <br />
26         Card number: [% patron.cardnumber | html %]<br />
27     </th>
28  </tr>
29   <tr>
30     <th>Date</th>
31     <th>Description of charges</th>
32     <th>Note</th>
33     <th>Amount</th>
34  </tr>
35
36   [% FOREACH account IN accounts %]
37     <tr class="highlight">
38       <td>[% account.date | $KohaDates %]</td>
39       <td>
40         [% PROCESS account_type_description account=account %]
41         [%- IF account.description %], [% account.description | html %][% END %]
42       </td>
43       <td>[% account.note | html %]</td>
44       [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount | $Price %]</td>
45     </tr>
46
47   [% END %]
48 <tfoot>
49   <tr>
50     <td colspan="3">Total outstanding dues as on date: </td>
51     [% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total | $Price %]</td>
52   </tr>
53 </tfoot>
54 </table>', 'print', 'default');
55     });
56     SetVersion( $DBversion );
57     print "Upgrade to $DBversion done (Bug 22809 - Move 'ACCOUNT_CREDIT' from template to a slip)\n";
58 }