[%- USE T8 %] [% USE HTML %] [% USE LxERP %] [%- USE L %] [% IF vc == 'vendor' %] [% SET is_vendor = 1 %] [% SET arap = 'ap' %] [% SET iris = 'ir' %] [% ELSE %] [% SET is_vendor = 0 %] [% SET arap = 'ar' %] [% SET iris = 'is' %] [%- END %]

[% title %]: [% HTML.escape(export.ids.join(', ')) %]

[%- IF show_post_payments_button %] [%- END %] [%- IF is_vendor %] [%- ELSE %] [%- END %] [% IF vc == 'customer' %] [%- END %] [%- IF show_post_payments_button %] [%- ELSE %] [%- END %] [%- FOREACH item = export.items %] [%- IF show_post_payments_button %] [%- END %] [% IF vc == 'customer' %] [%- END %] [%- END %]
[% 'Invoice' | $T8 %] [%- IF is_vendor %][% 'Vendor' | $T8 %][%- ELSE %][%- LxERP.t8('Customer') %][%- END %][% 'Source bank account' | $T8 %] [% 'Target bank account' | $T8 %][% 'Target bank account' | $T8 %] [% 'Source bank account' | $T8 %][% 'Amount' | $T8 %] [% 'Skonto amount' | $T8 %] [% 'Payment type' | $T8 %][% 'Mandator ID' | $T8 %][% 'Reference' | $T8 %] [% 'Requested execution date' | $T8 %] [% 'Execution date' | $T8 %]
  [% 'IBAN' | $T8 %] [% 'BIC' | $T8 %] [% 'IBAN' | $T8 %] [% 'BIC' | $T8 %]  [% L.date_tag('set_all_execution_date', '', onchange='set_all_execution_date_fields(this);') %]  
[%- UNLESS item.executed %] [%- END %] [% HTML.escape(item.invnumber) %] [% HTML.escape(item.vc_name) %] [% HTML.escape(item.our_iban) %] [% HTML.escape(item.our_bic) %] [% HTML.escape(item.vc_iban) %] [% HTML.escape(item.vc_bic) %] [% HTML.escape(LxERP.format_amount(item.amount, 2)) %] [% HTML.escape(LxERP.format_amount(item.skonto_amount, 2)) %] [% item.payment_type | $T8 %][% HTML.escape(item.mandator_id) %][% HTML.escape(item.reference) %] [% HTML.escape(item.requested_execution_date) %] [%- IF item.executed %] [% HTML.escape(item.execution_date) %] [%- ELSIF item.export_closed %] [% 'not executed' | $T8 %] [%- ELSE %] [% L.date_tag('items[].execution_date', item.requested_execution_date || current_date) %] [%- END %]


[%- IF show_post_payments_button %]

[%- ELSE %] [%- SET has_executed = 0; FOREACH item = export.items; IF item.executed; SET has_executed = 1; END ; END ; IF has_executed %]

[%- FOREACH item = export.items %] [%- IF item.executed %] [%- END %] [%- END %] [%- END %] [% END %]