2 [% USE HTML %][% USE LxERP %]
3 [% IF vc == 'vendor' %]
4 [% SET is_vendor = 1 %]
8 [% SET is_vendor = 0 %]
14 <p><div class="listtop">[% title %]</div></p>
16 <form action="sepa.pl" method="post">
19 [% 'Please select the source bank account for the transfers:' | $T8 %]
21 [% 'Please select the destination bank account for the collections:' | $T8 %]
24 [%- INCLUDE generic/multibox.html
25 name = 'bank_account.id',
28 label_sub = 'bank_account_label',
35 <th class="listheading" align="center"><input type="checkbox" id="select_all"></th>
36 <th class="listheading">[% IF is_vendor %][% 'Vendor' | $T8 %][%- ELSE %][%- LxERP.t8('Customer') %][%- END %]</th>
37 <th class="listheading">[% 'Invoice' | $T8 %]</th>
38 <th class="listheading" align="right">[% 'Amount' | $T8 %]</th>
39 <th class="listheading" align="right">[% 'Open amount' | $T8 %]</th>
40 <th class="listheading" align="right">[% 'Due Date' | $T8 %]</th>
41 <th class="listheading">[% 'Purpose' | $T8 %]</th>
42 <th class="listheading" align="right">[% 'Bank transfer amount' | $T8 %]</th>
45 [%- FOREACH invoice = INVOICES %]
46 <input type="hidden" name="bank_transfers[+].[% arap %]_id" value="[% HTML.escape(invoice.id) %]">
48 <tr class="listrow[% loop.count % 2 %]">
50 [%- IF invoice.vc_bank_info_ok %]
51 <input type="checkbox" name="bank_transfers[].selected" value="1">
55 [%- IF loop.first || (previous_vcname != invoice.vcname) %]
56 <a href="ct.pl?action=edit&db=[% vc %]&id=[% HTML.url(invoice.vc_id) %]&callback=[% HTML.url('sepa.pl?action=bank_transfer_add&vc=' _ vc) %]">
57 [%- GET HTML.escape(invoice.vcname);
58 SET previous_vcname = invoice.vcname;
59 IF !invoice.vc_bank_info_ok;
60 GET ' <sup>(1)</sup>';
61 SET show_vc_bank_info_footnote = '1';
68 <a href="[% IF invoice.invoice %][% iris %][% ELSE %][% arap %][% END %].pl?action=edit&id=[% HTML.escape(invoice.id) %]">
69 [% HTML.escape(invoice.invnumber) %]
73 <td align="right">[% LxERP.format_amount(invoice.invoice_amount, -2) %]</td>
74 <td align="right">[% LxERP.format_amount(invoice.open_amount, -2) %]</td>
75 <td align="right">[% invoice.duedate %]</td>
76 <td><input name="bank_transfers[].reference" value="[% HTML.escape(invoice.reference_prefix _ invoice.invnumber) %]"></td>
78 <input name="bank_transfers[].amount" value="[% LxERP.format_amount(invoice.invoice_amount, -2) %]" style="text-align: right">
85 [%- IF show_vc_bank_info_footnote %]
89 [%- 'No bank information has been entered in this vendor\'s master data entry. You cannot create bank transfers unless you enter bank information.' | $T8 %]
91 [%- 'No bank information has been entered in this customer\'s master data entry. You cannot create bank collections unless you enter bank information.' | $T8 %]
97 <input type="submit" class="submit" name="action_bank_transfer_create" value="[% 'Step 2' | $T8 %]">
100 <input type="hidden" name="action" value="dispatcher">
101 <input type="hidden" name="vc" value="[%- HTML.escape(vc) %]">
104 <script type="text/javascript" src="js/jquery.js"></script>
105 <script type="text/javascript">
107 $(document).ready(function() {
108 $("#select_all").click(function() {
109 var checked = $(this).attr('checked');
110 $('INPUT[name="bank_transfers[].selected"]').each(function() {
111 $(this).attr('checked', checked);