locales en/de
[kivitendo-erp.git] / templates / webpages / bank_transactions / tabs / automatic.html
1 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
2
3 <form method="post" id="list_automatic_form">
4 [% L.hidden_tag('filter.bank_account', FORM.filter.bank_account) %]
5 [% L.hidden_tag('filter.fromdate', FORM.filter.fromdate) %]
6 [% L.hidden_tag('filter.todate',   FORM.filter.todate) %]
7 [% L.hidden_tag('action', 'BankTransaction/dispatch') %]
8 [% L.hidden_tag('ui_tab', ui_tab) %]
9
10 <table id="bank_transactions_proposals">
11   <thead>
12     <tr class="listheading">
13       <th>[% L.checkbox_tag('check_all') %]</th>
14
15       <th>[% 'Type' | $T8 %]</th>
16       <th>[% 'ID' | $T8 %]</th>
17       <th>[% 'Transdate' | $T8 %]</th>
18       <th>[% 'Amount' | $T8 %]</th>
19       <th>[% 'Skonto' | $T8 %]</th>
20       <th>[% 'Purpose/Reference' | $T8 %]</th>
21       <th>[% 'Customer/Vendor/Remote name' | $T8 %]</th>
22       <th>[% LxERP.t8("Source") %]</th>
23       <th>[% LxERP.t8("Memo") %]</th>
24     </tr>
25   </thead>
26   [% IF !PROPOSALS.size %]
27     <tbody class="listrow">
28       <td colspan="7"><p class="message_hint">[% 'No data was found.' | $T8 %]</p></td>
29     </tbody>
30   [% ELSE %]
31     [% FOREACH proposal = PROPOSALS %]
32       <tbody class="listrow">
33         <tr>
34           <td rowspan=[% proposal.rowspan %] style="valign:center;">
35             [% L.checkbox_tag('proposal_ids[]', checked=0, value=proposal.id) %]
36           </td>
37
38           <td>[% HTML.escape(proposal.transaction_text) %]</td>
39           <td>[% proposal.id %]</td>
40           <td>[% proposal.transdate_as_date %]</td>
41           <td align="right">[% LxERP.format_amount(proposal.amount,2) %]</td>
42           <td></td>
43           <td>
44            [% SET purpose = HTML.escape(proposal.purpose)
45                   invnumber_found = '' ;
46               FOREACH proposed_invoice = proposal.proposals;
47                 IF purpose.match(proposed_invoice.invnumber);
48                   SET invnumber_found = proposed_invoice.invnumber ;
49                 END ;
50               END ;
51
52               IF invnumber_found ;
53                 purpose.replace(invnumber_found, '<span class="invoice_number_highlight">' _ invnumber_found _ '</span>') ;
54               ELSE ;
55                 purpose ;
56               END %]
57           </td>
58           <td>[% HTML.escape(proposal.remote_name) %]</td>
59           <td></td>
60           <td></td>
61         </tr>
62
63       [% FOREACH proposed_invoice = proposal.proposals %]
64         <tr>
65
66           <td></td>
67           <td>[% 'Invoice' | $T8 %]</td>
68           <td>[% proposed_invoice.id %]</td>
69           <td>[% proposed_invoice.transdate_as_date %]
70               [% L.hidden_tag("invoice_ids." _ proposal.id _ "[]", proposed_invoice.id) %]</td>
71           <td align="right">[% proposed_invoice.realamount %]</td>
72           <td>[% proposed_invoice.skonto_type | $T8 %]
73               [% L.hidden_tag("invoice_skontos." _ proposal.id _ "[]", proposed_invoice.skonto_type) %]</td>
74           <td[% IF proposed_invoice.invnumber == invnumber_found %] class="invoice_number_highlight"[% END %]>[% proposed_invoice.link %]</td>
75           <td>[% HTML.escape(proposed_invoice.customer.name) %][% HTML.escape(proposed_invoice.vendor.name) %]</td>
76           <td>[% L.input_tag("sources." _ proposal.id _ "[]", "", size=20) %]</td>
77           <td>[% L.input_tag("memos." _ proposal.id _ "[]", "", size=20) %]</td>
78         </tr>
79         [% END %]
80         <tr><td style="height:10px" colspan="10"></td></tr>
81       </tbody>
82     [% END %]
83   [% END %]
84 </table>
85
86 <p>
87  [% L.submit_tag('action_save_proposals', LxERP.t8('Save proposals')) %]
88  [% L.button_tag('kivi.BankTransaction.show_set_all_sources_memos_dialog("#list_automatic_form [name^=\\"sources.\\"]", "#list_automatic_form [name^=\\"memos.\\"]")', LxERP.t8('Set all source and memo fields')) %]
89 </p>
90
91 </form>