<p><div class="listtop">[% title %]</div></p>
- <form action="sepa.pl" method="post">
+ <form action="sepa.pl" method="post" id="form">
<p>
[%- IF is_vendor %]
[% 'Please select the source bank account for the transfers:' | $T8 %]
<input type="hidden" id="skonto_amount_[% loop.count %]" name="skonto_amount_[% loop.count %]" value="[% LxERP.format_amount(invoice.skonto_amount, 2) %]">
- <tr class="listrow[% loop.count % 2 %]">
+ <tr class="listrow[% IF !invoice.vc_bank_info_ok && invoice.checked %]_error[% END %]">
<td align="center">
[%- IF invoice.vc_bank_info_ok %]
- <input type="checkbox" name="bank_transfers[].selected" value="1"[% IF invoice.checked %] checked[% END %]>
+ [% L.checkbox_tag("ids[]", value=invoice.id, checked=invoice.checked) %]
[%- END %]
</td>
<td>
[%- GET HTML.escape(invoice.vcname);
SET previous_vcname = invoice.vcname;
IF !invoice.vc_bank_info_ok;
- GET ' <sup>(1)</sup>';
+ IF invoice.checked;
+ GET ' <sup>(2)</sup>';
+ ELSE;
+ GET ' <sup>(1)</sup>';
+ END;
SET show_vc_bank_info_footnote = '1';
END; -%]
</a>
<td align="right">[% invoice.transdate %]</td>
<td align="right">[% invoice.duedate %]</td>
<td>
+ [% IF INSTANCE_CONF.get_sepa_reference_add_vc_vc_id %]
+ [%- SET reference = invoice.reference_prefix _ invoice.invnumber _ invoice.reference_prefix_vc _ invoice.vc_vc_id %]
+ [% ELSE %]
[%- SET reference = invoice.reference_prefix _ invoice.invnumber %]
- <input name="bank_transfers[].reference" value="[% HTML.escape(reference.substr(0, 140)) %]" maxlength="140" size="20">
+ [% END %]
+ <input name="bank_transfers[].reference" value="[% HTML.escape(reference.substr(0, 140)) %]" maxlength="140" size="30">
</td>
<td align="right">
<input id=[% loop.count %] name="bank_transfers[].amount" id="amount_[% loop.count %]" value="[% LxERP.format_amount(invoice.invoice_amount_suggestion, 2) %]" style="text-align: right" size="12">
[% "The required information consists of the IBAN, the BIC, the mandator ID and the mandate's date of signature." | $T8 %]
[%- END %]
</p>
- [%- END %]
- <p>
- <input type="submit" class="submit" name="action_bank_transfer_create" value="[% 'Step 2' | $T8 %]">
- </p>
+ <p>
+ <sup>(2)</sup>
+ [%- IF is_vendor %]
+ [%- 'No bank information has been entered in this vendor\'s master data entry. You cannot create bank transfers unless you enter bank information.' | $T8 %]
+ [% "The required information consists of the IBAN and the BIC." | $T8 %]
+ [% LxERP.t8("Additionally the invoice is not marked for direct debit and would have been checked automatically had the bank information been entered.") %]
+ [%- ELSE %]
+ [%- 'No bank information has been entered in this customer\'s master data entry. You cannot create bank collections unless you enter bank information.' | $T8 %]
+ [% "The required information consists of the IBAN, the BIC, the mandator ID and the mandate's date of signature." | $T8 %]
+ [% LxERP.t8("Additionally the invoice is marked for direct debit and would have been checked automatically had the bank information been entered.") %]
+ [%- END %]
+ </p>
+ [%- END %]
- <input type="hidden" name="action" value="dispatcher">
<input type="hidden" name="vc" value="[%- HTML.escape(vc) %]">
</form>
<script type="text/javascript">
<!--
$(function() {
- $("#select_all").checkall('INPUT[name="bank_transfers[].selected"]');
+ $("#select_all").checkall('INPUT[name="ids[]"]');
});
-->