Bankerweiterung - Zwischenstand, erster Entwurf
[kivitendo-erp.git] / templates / webpages / reconciliation / tabs / overview.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %]
5
6   <div style="height:60%;overflow:auto;">
7     <table width=100% id="link_table">
8       <thead>
9         <tr class="listheading">
10           <th></th>
11
12           <th></th>
13           <th>[% 'Type' | $T8 %]</th>
14           <th>[% 'ID/Acc_ID' | $T8 %]</th>
15           <th>[% 'Transdate' | $T8 %]</th>
16           <th>[% 'Amount BT' | $T8 %]</th>
17           <th>[% 'Amount BB' | $T8 %]</th>
18           <th>[% 'Remote Name/Customer/Description' | $T8 %]</th>
19           <th>[% 'Purpose/Reference' | $T8 %]</th>
20           <th>[% 'Remote account number' | $T8 %]</th>
21           <th>[% 'Remote bank code' | $T8 %]</th>
22           <th>[% 'Source' | $T8 %]</th>
23         </tr>
24       </thead>
25
26       [% PROCESS 'reconciliation/_linked_transactions.html' %]
27
28       <tfoot>
29         <tr class="listtotal">
30           <td class="top_border"></td>
31           <td class="top_border"></td>
32           <td class="top_border"></td>
33           <td class="top_border"></td>
34           <td class="top_border"></td>
35           <td class="bt_balance top_border" align="right">[% LxERP.format_amount(SELF.bt_balance, 2) %]</td>
36           <td class="bb_balance top_border" align="right">[% LxERP.format_amount(-1 * SELF.bb_balance, 2) %]</td>
37           <td class="top_border"></td>
38           <td class="top_border"></td>
39           <td class="top_border"></td>
40           <td class="top_border"></td>
41           <td class="top_border"></td>
42         </tr>
43       </tfoot>
44     </table>
45   </div>
46
47   <hr size="3" noshade>
48
49   <div id="assigned_elements"></div>
50
51 <script type="text/javascript">
52 <!--
53
54 function filter_table () {
55   var url="controller.pl?action=Reconciliation/filter_overview&" + $('#reconciliation_form') . serialize();
56   $.ajax({
57     url: url,
58     success: function(new_data) {
59       $("tbody[class^='listrow']").remove();
60       $("#assigned_elements").html('');
61       $("#link_table").append(new_data['html']);
62       $(".absolut_bt_balance").html(new_data['absolut_bt_balance']);
63       $(".absolut_bb_balance").html(new_data['absolut_bb_balance']);
64       $(".bt_balance").html(new_data['bt_balance']);
65       $(".bb_balance").html(new_data['bb_balance']);
66     }
67   });
68 }
69
70 function update_reconciliation_table () {
71   var url="controller.pl?action=Reconciliation/update_reconciliation_table&" + $('#reconciliation_form') . serialize();
72   $.ajax({
73     url: url,
74     success: function(new_data) {
75       $('#assigned_elements').html(new_data['html']);
76     }
77   });
78 }
79
80 function delete_element (id, type) {
81   if (type == 'BT') {
82     $("input[name^='bt_ids'][value=" + id + "]").attr('checked', false);
83   }
84   if (type == 'BB') {
85     $("input[name^='bb_ids'][value=" + id + "]").attr('checked', false);
86   }
87   update_reconciliation_table();
88 }
89
90 function submit_with_action(action) {
91   $('<input>').attr({
92     id : "action",
93     name : "action",
94     type : "hidden",
95     value : "Reconciliation/reconciliate"
96   }).appendTo('#reconciliation_form');
97   $("#reconciliation_form").submit();
98 }
99
100 function delete_reconciliation(rec_group) {
101   var check = confirm('[% 'Really cancel link?' | $T8 %]');
102   if (check == true) {
103     var url="controller.pl?action=Reconciliation/delete_reconciliation&rec_group=" + rec_group + "&" + $('#reconciliation_form') . serialize();
104     $.ajax({
105       url: url,
106       success: function(new_data) {
107         $("tbody[class^='listrow']").remove();
108         $("#assigned_elements").html('');
109         $("#link_table").append(new_data['html']);
110         $(".absolut_bt_balance").html(new_data['absolut_bt_balance']);
111         $(".absolut_bb_balance").html(new_data['absolut_bb_balance']);
112         $(".bt_balance").html(new_data['bt_balance']);
113         $(".bb_balance").html(new_data['bb_balance']);
114       }
115     });
116   }
117 }
118
119 //-->
120 </script>
121