2c1a4dbb2b3744ae314e09980a557e520d2c6630
[kivitendo-erp.git] / templates / webpages / reconciliation / form.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %]
5
6 <style type="text/css">
7 <!--
8 html, body {
9   height: 100%;
10 }
11 .top_border {
12   border-top: solid black;
13   border-width: 4px;
14 }
15 .bottom_border {
16   border-bottom: solid black;
17   border-width: 4px;
18 }
19 #content.html-menu { height: 100%; }
20 .out_of_balance {
21   color: #888888;
22 }
23 -->
24 </style>
25
26 <div class="listtop">[% title %]</div>
27
28 [%- INCLUDE 'common/flash.html' %]
29
30 <form id="reconciliation_form" method="post" action="controller.pl" style="height:100%">
31   <table>
32     <tr>
33      <th align="right">[% 'Bank account' | $T8 %]</th>
34      <td>[% L.select_tag('filter.local_bank_account_id:number',
35                           SELF.BANK_ACCOUNTS,
36                           default=FORM.filter.local_bank_account_id_number,
37                           title_sub=\label_sub, with_empty=0,
38                           style='width:450px',
39                           onchange='filter_table();') %]</td>
40     </tr>
41
42     <tr>
43      <th align="right">[% 'From' | $T8 %]</th>
44      <td>[% L.date_tag('filter.fromdate:date::ge', FORM.filter.fromdate_date__ge, onchange='filter_table();') %]</td>
45      <th align="right">[% 'to (date)' | $T8 %]</th>
46      <td>[% L.date_tag('filter.todate:date::le', FORM.filter.todate_date__le, onchange='filter_table();') %]</td>
47     </tr>
48
49     <tr>
50      <th align="right">[% 'Cleared/uncleared only' | $T8 %]</th>
51      <td>[% L.select_tag('filter.cleared:eq_ignore_empty', SELF.cleared, value_key = 'value', title_key = 'title', default=FORM.filter.cleared_eq_ignore_empty, onchange='filter_table();') %]</td>
52     </tr>
53
54     <tr>
55      <th align="right">[% 'Show Stornos' | $T8 %]</th>
56      <td>[% L.checkbox_tag('filter.show_stornos', checked=FORM.filter.show_stornos, value='1', onchange='filter_table();') %]</td>
57     </tr>
58
59     <tr>
60      <th align="right">[% 'Absolute BT Balance' | $T8 %]</th>
61      <td class='absolut_bt_balance'>[% LxERP.format_amount(SELF.absolut_bt_balance, 2) %]</td>
62     </tr>
63
64     <tr>
65      <th align="right">[% 'Absolute BB Balance' | $T8 %]</th>
66      <td class='absolut_bb_balance'>[% LxERP.format_amount(-1 * SELF.absolut_bb_balance, 2) %]</td>
67     </tr>
68
69     <tr>
70      <th align="right">[% 'BT Balance' | $T8 %]</th>
71      <td class='bt_balance'>[% LxERP.format_amount(SELF.bt_balance, 2) %]</td>
72     </tr>
73
74     <tr>
75      <th align="right">[% 'BB Balance' | $T8 %]</th>
76      <td class='bb_balance'>[% LxERP.format_amount(-1 * SELF.bb_balance, 2) %]</td>
77     </tr>
78   </table>
79
80   [% L.submit_tag('submit_filter', LxERP.t8("Filter"), onclick='filter_table();return false;', style='display: none') %]
81
82   <div class="tabwidget" style="height:100%">
83     <ul>
84       <li><a href="#overview" onclick="load_overview();">[% 'Overview' | $T8 %]</a></li>
85       <li><a href="#automatic" onclick="load_proposals();">[% 'Proposals' | $T8 %]</a></li>
86     </ul>
87
88     <div id="overview" style="height:calc(100% - 60px);overflow: auto;">[% PROCESS "reconciliation/tabs/overview.html" %]</div>
89     <div id="automatic" style="height:calc(100% - 60px);overflow: auto;"></div>
90   </div>
91
92 </form>
93
94 <script type="text/javascript">
95 <!--
96
97 function load_proposals () {
98   var url="controller.pl?action=Reconciliation/load_proposals&" + $('#reconciliation_form') . serialize();
99   $.ajax({
100     url: url,
101     success: function(new_data) {
102       $('#overview').html('');
103       $('#automatic').html(new_data['html']);
104       $('#set_cleared').html('');
105     }
106   });
107 }
108
109 function load_overview () {
110   var url="controller.pl?action=Reconciliation/load_overview&" + $('#reconciliation_form') . serialize();
111   $.ajax({
112     url: url,
113     success: function(new_data) {
114       $('#overview').html(new_data['html']);
115       $('#automatic').html('');
116       $('#set_cleared').html('');
117     }
118   });
119 }
120
121 //-->
122 </script>
123