</body> entfernt
[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 <body>
15
16  <p><div class="listtop">[% title %]: [% HTML.escape(export.ids.join(', ')) %]</div></p>
17
18  <form action="sepa.pl" method="post">
19   <input type="hidden" name="action" value="dispatcher">
20
21   <p>
22    <table>
23     <tr>
24      [%- IF show_post_payments_button %]
25       <th class="listheading" align="center"><input type="checkbox" id="select_all"></th>
26      [%- END %]
27      <th class="listheading">[% 'Invoice' | $T8 %]</th>
28      <th class="listheading">[%- IF is_vendor %][% 'Vendor' | $T8 %][%- ELSE %][%- LxERP.t8('Customer') %][%- END %]</th>
29      [%- IF is_vendor %]
30       <th class="listheading" colspan="2">[% 'Source bank account' | $T8 %]</th>
31       <th class="listheading" colspan="2">[% 'Target bank account' | $T8 %]</th>
32      [%- ELSE %]
33       <th class="listheading" colspan="2">[% 'Target bank account' | $T8 %]</th>
34       <th class="listheading" colspan="2">[% 'Source bank account' | $T8 %]</th>
35      [%- END %]
36      <th class="listheading" align="right">[% 'Amount' | $T8 %]</th>
37      <th class="listheading">[% 'Reference' | $T8 %]</th>
38      <th class="listheading" align="right">[% 'Requested execution date' | $T8 %]</th>
39      <th class="listheading" align="right">[% 'Execution date' | $T8 %]</th>
40     </tr>
41     <tr>
42      <th class="listheading" colspan="[% IF show_post_payments_button %]3[% ELSE %]2[% END %]">&nbsp;</th>
43      <th class="listheading">[% 'IBAN' | $T8 %]</th>
44      <th class="listheading">[% 'BIC' | $T8 %]</th>
45      <th class="listheading">[% 'IBAN' | $T8 %]</th>
46      <th class="listheading">[% 'BIC' | $T8 %]</th>
47      [%- IF show_post_payments_button %]
48       <th class="listheading" colspan="3">&nbsp;</th>
49       <th class="listheading">
50         [% L.date_tag('set_all_execution_date') %]
51       </th>
52      [%- ELSE %]
53       <th class="listheading" colspan="4">&nbsp;</th>
54      [%- END %]
55     </tr>
56
57     [%- FOREACH item = export.items %]
58      <tr class="listrow[% loop.count % 2 %]">
59       [%- IF show_post_payments_button %]
60        <input type="hidden" name="items[+].id" value="[% HTML.escape(item.id) %]">
61        <input type="hidden" name="items[].sepa_export_id" value="[% HTML.escape(item.sepa_export_id) %]">
62        <td align="center">
63         [%- UNLESS item.executed %]
64         <input type="checkbox" name="items[].selected" value="1">
65         [%- END %]
66        </td>
67       [%- END %]
68       <td>
69        <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>
70       </td>
71       <td>[% HTML.escape(item.vc_name) %]</td>
72       <td>[% HTML.escape(item.our_iban) %]</td>
73       <td>[% HTML.escape(item.our_bic) %]</td>
74       <td>[% HTML.escape(item.vc_iban) %]</td>
75       <td>[% HTML.escape(item.vc_bic) %]</td>
76       <td align="right">[% HTML.escape(LxERP.format_amount(item.amount, 2)) %]</td>
77       <td>[% HTML.escape(item.reference) %]</td>
78       <td align="right">[% HTML.escape(item.requested_execution_date) %]</td>
79       <td align="right" nowrap>
80        [%- IF item.executed %]
81         [% HTML.escape(item.execution_date) %]
82        [%- ELSIF item.export_closed %]
83         [% 'not executed' | $T8 %]
84        [%- ELSE %]
85          [% L.date_tag('items[].execution_date', item.requested_execution_date || current_date) %]
86        [%- END %]
87       </td>
88      </tr>
89     [%- END %]
90    </table>
91   </p>
92
93   <p><hr></p>
94
95   [%- IF show_post_payments_button %]
96   <p>
97    <input type="submit" class="submit" name="action_bank_transfer_post_payments" value="[% 'Post payments' | $T8 %]">
98   </p>
99
100   <script type="text/javascript" src="js/jquery.js"></script>
101   <script type="text/javascript">
102    <!--
103     function set_all_execution_date_fields() {
104       var new_date = $('#set_all_execution_date').attr('value');
105       $('INPUT[name="items[].execution_date"]').each(function() {
106         $(this).attr('value', new_date);
107       });
108     }
109
110     $(document).ready(function() {
111       $("#select_all").click(function() {
112         var checked = $(this).attr('checked');
113         $('INPUT[name="items[].selected"]').each(function() {
114           $(this).attr('checked', checked);
115         });
116       });
117     });
118      -->
119   </script>
120
121   [%- ELSE %]
122   <p>
123    <input type="submit" class="submit" name="action_bank_transfer_payment_list_as_pdf" value="[% 'Payment list as PDF' | $T8 %]">
124   </p>
125
126    [%- FOREACH item = export.items %]
127     [%- IF item.executed %]
128      <input type="hidden" name="items[+].id" value="[% HTML.escape(item.id) %]">
129      <input type="hidden" name="items[].export_id" value="[% HTML.escape(item.export_id) %]">
130     [%- END %]
131    [%- END %]
132   [%- END %]
133
134      <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
135  </form>
136