e171ef2d06245e3f520432c87647cda454615b54
[kivitendo-erp.git] / templates / webpages / sepa / bank_transfer_edit.html
1 [%- USE T8 %]
2 [% USE HTML %]
3 [% USE LxERP %]
4 [%- USE L %]
5 [% IF vc == 'vendor' %]
6  [% SET is_vendor = 1 %]
7  [% SET arap = 'ap' %]
8  [% SET iris = 'ir' %]
9 [% ELSE %]
10  [% SET is_vendor = 0 %]
11  [% SET arap = 'ar' %]
12  [% SET iris = 'is' %]
13 [%- END %]
14 <h1>[% title %]: [% HTML.escape(export.ids.join(', ')) %]</h1>
15
16  <form action="sepa.pl" method="post" id="form">
17   <p>
18    <table>
19     <tr>
20      <th class="listheading" align="center"><input type="checkbox" id="select_all"></th>
21      <th class="listheading">[% 'Invoice' | $T8 %]</th>
22      <th class="listheading">[%- IF is_vendor %][% 'Vendor' | $T8 %][%- ELSE %][%- LxERP.t8('Customer') %][%- END %]</th>
23      [%- IF is_vendor %]
24       <th class="listheading" colspan="2">[% 'Source bank account' | $T8 %]</th>
25       <th class="listheading" colspan="2">[% 'Target bank account' | $T8 %]</th>
26      [%- ELSE %]
27       <th class="listheading" colspan="2">[% 'Target bank account' | $T8 %]</th>
28       <th class="listheading" colspan="2">[% 'Source bank account' | $T8 %]</th>
29      [%- END %]
30      <th class="listheading" align="right">[% 'Amount' | $T8 %]</th>
31      <th class="listheading" align="right">[% 'Skonto amount' | $T8 %]</th>
32      <th class="listheading" align="right">[% 'Payment type' | $T8 %]</th>
33      [% IF vc == 'customer' %]
34       <th class="listheading" align="right">[% 'Mandator ID' | $T8 %]</th>
35      [%- END %]
36      <th class="listheading">[% 'Reference' | $T8 %]</th>
37      <th class="listheading" align="right">[% 'Requested execution date' | $T8 %]</th>
38      <th class="listheading" align="right">[% 'Execution date' | $T8 %]</th>
39     </tr>
40     <tr>
41      <th class="listheading" colspan="3">&nbsp;</th>
42      <th class="listheading">[% 'IBAN' | $T8 %]</th>
43      <th class="listheading">[% 'BIC' | $T8 %]</th>
44      <th class="listheading">[% 'IBAN' | $T8 %]</th>
45      <th class="listheading">[% 'BIC' | $T8 %]</th>
46      [%- IF show_post_payments_button %]
47       <th class="listheading" colspan="[% IF vc == 'customer' %]6[% ELSE %]5[% END %]">&nbsp;</th>
48       <th class="listheading">
49         [% L.date_tag('set_all_execution_date', '', onchange='set_all_execution_date_fields(this);') %]
50       </th>
51      [%- ELSE %]
52       <th class="listheading" colspan="[% IF vc == 'customer' %]7[% ELSE %]6[% END %]">&nbsp;</th>
53      [%- END %]
54     </tr>
55
56     [%- FOREACH item = export.items %]
57      <tr class="listrow">
58       <td align="center">
59        [%- IF (show_post_payments_button && !item.executed) || (!show_post_payments_button && item.executed) %]
60         [% L.hidden_tag("items[+].id", item.id) %]
61         [% L.hidden_tag("items[].sepa_export_id", item.sepa_export_id) %]
62         [% L.checkbox_tag("ids[]", value=item.id) %]
63        [%- END %]
64       </td>
65       <td>
66        <a href="[% IF item.invoice %][% iris %][% ELSE %][% arap %][% END %].pl?action=edit&type=invoice&id=[% IF is_vendor %][% HTML.url(item.ap_id) %][% ELSE %][% HTML.url(item.ar_id) %][% END %]">[% HTML.escape(item.invnumber) %]</a>
67       </td>
68       <td>[% HTML.escape(item.vc_name) %]</td>
69       <td>[% HTML.escape(item.our_iban) %]</td>
70       <td>[% HTML.escape(item.our_bic) %]</td>
71       <td>[% HTML.escape(item.vc_iban) %]</td>
72       <td>[% HTML.escape(item.vc_bic) %]</td>
73       <td align="right">[% HTML.escape(LxERP.format_amount(item.amount, 2)) %]</td>
74       <td align="right">[% HTML.escape(LxERP.format_amount(item.skonto_amount, 2)) %]</td>
75       <td align="right">[% item.payment_type | $T8 %]</td>
76       [% IF vc == 'customer' %]
77        <td>[% HTML.escape(item.mandator_id) %]</td>
78       [%- END %]
79       <td>[% HTML.escape(item.reference) %]</td>
80       <td align="right">[% HTML.escape(item.requested_execution_date) %]</td>
81       <td align="right" nowrap>
82        [%- IF item.executed %]
83         [% HTML.escape(item.execution_date) %]
84        [%- ELSIF item.export_closed %]
85         [% 'not executed' | $T8 %]
86        [%- ELSE %]
87          [% L.date_tag('items[].execution_date', item.requested_execution_date || current_date) %]
88        [%- END %]
89       </td>
90      </tr>
91     [%- END %]
92    </table>
93   </p>
94
95   <script type="text/javascript">
96    <!--
97     function set_all_execution_date_fields(input) {
98       var new_date = $(input).val();
99       $('INPUT[name="items[].execution_date"]').each(function() {
100         $(this).val(new_date);
101       });
102     }
103
104     $(function() {
105       $("#select_all").checkall('INPUT[name="ids[]"]');
106     });
107      -->
108   </script>
109
110      <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
111  </form>