--- /dev/null
+[%- USE T8 %]
+[% USE HTML %]
+[% USE LxERP %]
+<body>
+
+ <p><div class="listtop">[% title %]: [% HTML.escape(export.ids.join(', ')) %]</div></p>
+
+ <form action="sepa.pl" method="post">
+ <input type="hidden" name="action" value="dispatcher">
+
+ <p>
+ <table>
+ <tr>
+ [%- IF show_post_payments_button %]
+ <th class="listheading" align="center"><input type="checkbox" id="select_all"></th>
+ [%- END %]
+ <th class="listheading">[% 'Invoice' | $T8 %]</th>
+ <th class="listheading">[% 'Vendor' | $T8 %]</th>
+ <th class="listheading" colspan="2">[% 'Source bank account' | $T8 %]</th>
+ <th class="listheading" colspan="2">[% 'Target bank account' | $T8 %]</th>
+ <th class="listheading" align="right">[% 'Amount' | $T8 %]</th>
+ <th class="listheading">[% 'Reference' | $T8 %]</th>
+ <th class="listheading" align="right">[% 'Requested execution date' | $T8 %]</th>
+ <th class="listheading" align="right">[% 'Execution date' | $T8 %]</th>
+ </tr>
+ <tr>
+ <th class="listheading" colspan="[% IF show_post_payments_button %]3[% ELSE %]2[% END %]"> </th>
+ <th class="listheading">[% 'IBAN' | $T8 %]</th>
+ <th class="listheading">[% 'BIC' | $T8 %]</th>
+ <th class="listheading">[% 'IBAN' | $T8 %]</th>
+ <th class="listheading">[% 'BIC' | $T8 %]</th>
+ [%- IF show_post_payments_button %]
+ <th class="listheading" colspan="3"> </th>
+ <th class="listheading">
+ <input name="set_all_execution_date" id="set_all_execution_date" size="11">
+ <input type="button" name="set_all_execution_date_trigger" id="set_all_execution_date_trigger" value="?">
+ </th>
+ [%- ELSE %]
+ <th class="listheading" colspan="4"> </th>
+ [%- END %]
+ </tr>
+
+ [%- FOREACH item = export.items %]
+ <tr class="listrow[% loop.count % 2 %]">
+ [%- IF show_post_payments_button %]
+ <input type="hidden" name="items[+].id" value="[% HTML.escape(item.id) %]">
+ <input type="hidden" name="items[].sepa_export_id" value="[% HTML.escape(item.sepa_export_id) %]">
+ <td align="center">
+ [%- UNLESS item.executed %]
+ <input type="checkbox" name="items[].selected" value="1">
+ [%- END %]
+ </td>
+ [%- END %]
+ <td>
+ <a href="[% IF item.invoice %]ir[% ELSE %]ap[% END %].pl?action=edit&type=invoice&id=[% HTML.url(item.ap_id) %]">[% HTML.escape(item.invnumber) %]</a>
+ </td>
+ <td>[% HTML.escape(item.vendor_name) %]</td>
+ <td>[% HTML.escape(item.our_iban) %]</td>
+ <td>[% HTML.escape(item.our_bic) %]</td>
+ <td>[% HTML.escape(item.vendor_iban) %]</td>
+ <td>[% HTML.escape(item.vendor_bic) %]</td>
+ <td align="right">[% HTML.escape(LxERP.format_amount(item.amount, 2)) %]</td>
+ <td>[% HTML.escape(item.reference) %]</td>
+ <td align="right">[% HTML.escape(item.requested_execution_date) %]</td>
+ <td align="right" nowrap>
+ [%- IF item.executed %]
+ [% HTML.escape(item.execution_date) %]
+ [%- ELSIF item.export_closed %]
+ [% 'not executed' | $T8 %]
+ [%- ELSE %]
+ <input name="items[].execution_date" id="execution_date_[% loop.count %]" size="11"
+ value="[% IF item.requested_execution_date %][% HTML.escape(item.requested_execution_date) %][% ELSE %][% HTML.escape(current_date) %][% END %]">
+ <input type="button" name="execution_date_[% loop.count %]_trigger" id="execution_date_[% loop.count %]_trigger" value="?">
+ [%- END %]
+ </td>
+ </tr>
+ [%- END %]
+ </table>
+ </p>
+
+ <p><hr></p>
+
+ [%- IF show_post_payments_button %]
+ <p>
+ <input type="submit" class="submit" name="action_bank_transfer_post_payments" value="[% 'Post payments' | $T8 %]">
+ </p>
+
+ <script type="text/javascript" src="js/jquery.js"></script>
+ <script type="text/javascript">
+ <!--
+ function set_all_execution_date_fields() {
+ var new_date = $('#set_all_execution_date').attr('value');
+ $('INPUT[name="items[].execution_date"]').each(function() {
+ $(this).attr('value', new_date);
+ });
+ }
+
+ $(document).ready(function() {
+ $("#select_all").click(function() {
+ var checked = $(this).attr('checked');
+ $('INPUT[name="items[].selected"]').each(function() {
+ $(this).attr('checked', checked);
+ });
+ });
+
+ [%- IF show_post_payments_button %]
+ Calendar.setup({ inputField : "set_all_execution_date",
+ ifFormat : "[% myconfig_jsc_dateformat %]",
+ align : "BL",
+ button : "set_all_execution_date_trigger",
+ onUpdate : set_all_execution_date_fields });
+
+ [%- FOREACH item = export.items %]
+ [%- IF !item.executed %]
+ Calendar.setup({ inputField : "execution_date_[% loop.count %]",
+ ifFormat : "[% myconfig_jsc_dateformat %]",
+ align : "BL",
+ button : "execution_date_[% loop.count %]_trigger" });
+ [%- END %]
+ [%- END %]
+ [%- END %]
+ });
+ -->
+ </script>
+
+ [%- ELSE %]
+ <p>
+ <input type="submit" class="submit" name="action_bank_transfer_payment_list_as_pdf" value="[% 'Payment list as PDF' | $T8 %]">
+ </p>
+
+ [%- FOREACH item = export.items %]
+ [%- IF item.executed %]
+ <input type="hidden" name="items[+].id" value="[% HTML.escape(item.id) %]">
+ <input type="hidden" name="items[].export_id" value="[% HTML.escape(item.export_id) %]">
+ [%- END %]
+ [%- END %]
+ [%- END %]
+ </form>
+
+</body>
+</html>