6bff8c09bf2c743d9056b2531b762718ce5926f3
[kivitendo-erp.git] / templates / webpages / reconciliation / tabs / automatic.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %]
5
6 <table width=100% id="proposal_table">
7   <thead>
8     <tr class="listheading">
9       <th>[% L.checkbox_tag('proposal_check_all') %]</th>
10
11       <th></th>
12       <th>[% 'Type' | $T8 %]</th>
13       <th>[% 'ID/Acc_ID' | $T8 %]</th>
14       <th>[% 'Transdate' | $T8 %]</th>
15       <th>[% 'Amount BT' | $T8 %]</th>
16       <th>[% 'Amount BB' | $T8 %]</th>
17       <th>[% 'Remote Name/Customer/Description' | $T8 %]</th>
18       <th>[% 'Purpose/Reference' | $T8 %]</th>
19       <th>[% 'Remote account number' | $T8 %]</th>
20       <th>[% 'Remote bank code' | $T8 %]</th>
21       <th>[% 'Source' | $T8 %]</th>
22     </tr>
23   </thead>
24
25   [% PROCESS "reconciliation/proposals.html" %]
26 <table>
27
28 [% L.button_tag("reconciliate_proposals()", LxERP.t8("Reconciliate")) %]
29
30 <script type="text/javascript">
31 <!--
32
33 function filter_table () {
34   var url="controller.pl?action=Reconciliation/filter_proposals&" + $('#reconciliation_form') . serialize();
35   $.ajax({
36     url: url,
37     success: function(new_data) {
38       $("tbody[class^='listrow']").remove();
39       $("#proposal_table").append(new_data['html']);
40       $(".absolut_bt_balance").html(new_data['absolut_bt_balance']);
41       $(".absolut_bb_balance").html(new_data['absolut_bb_balance']);
42       $(".bt_balance").html(new_data['bt_balance']);
43       $(".bb_balance").html(new_data['bb_balance']);
44     }
45   });
46 }
47
48 function reconciliate_proposals() {
49   $('<input>').attr({
50     id : "action",
51     name : "action",
52     type : "hidden",
53     value : "Reconciliation/reconciliate_proposals"
54   }).appendTo('#reconciliation_form');
55   $("#reconciliation_form").submit();
56 }
57
58 $(function() {
59   $('#proposal_check_all').checkall('INPUT[name^="bt_ids"]');
60 });
61
62 //-->
63 </script>
64