d8c0844fedca92e8beb622c27b437526afaa8b8d
[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_key='displayable_name',
38                           with_empty=0,
39                           style='width:450px',
40                           onchange='filter_table();') %]</td>
41     </tr>
42
43     <tr>
44      <th align="right">[% 'From' | $T8 %]</th>
45      <td>[% L.date_tag('filter.fromdate:date::ge', FORM.filter.fromdate_date__ge, onchange='filter_table();') %]</td>
46      <th align="right">[% 'to (date)' | $T8 %]</th>
47      <td>[% L.date_tag('filter.todate:date::le', FORM.filter.todate_date__le, onchange='filter_table();') %]</td>
48     </tr>
49
50     <tr>
51      <th align="right">[% 'Cleared/uncleared only' | $T8 %]</th>
52      <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>
53     </tr>
54
55     <tr>
56      <th align="right">[% 'Show Stornos' | $T8 %]</th>
57      <td>[% L.checkbox_tag('filter.show_stornos', checked=FORM.filter.show_stornos, value='1', onchange='filter_table();') %]</td>
58     </tr>
59
60     <tr>
61      <th align="right">[% 'Absolute BT Balance' | $T8 %]</th>
62      <td class='absolut_bt_balance'>[% LxERP.format_amount(SELF.absolut_bt_balance, 2) %]</td>
63     </tr>
64
65     <tr>
66      <th align="right">[% 'Absolute BB Balance' | $T8 %]</th>
67      <td class='absolut_bb_balance'>[% LxERP.format_amount(-1 * SELF.absolut_bb_balance, 2) %]</td>
68     </tr>
69
70     <tr>
71      <th align="right">[% 'BT Balance' | $T8 %]</th>
72      <td class='bt_balance'>[% LxERP.format_amount(SELF.bt_balance, 2) %]</td>
73     </tr>
74
75     <tr>
76      <th align="right">[% 'BB Balance' | $T8 %]</th>
77      <td class='bb_balance'>[% LxERP.format_amount(-1 * SELF.bb_balance, 2) %]</td>
78     </tr>
79   </table>
80
81   [% L.submit_tag('submit_filter', LxERP.t8("Filter"), onclick='filter_table();return false;', style='display: none') %]
82
83   <div class="tabwidget" style="height:100%">
84     <ul>
85       <li><a href="#overview" onclick="load_overview();">[% 'Overview' | $T8 %]</a></li>
86       <li><a href="#automatic" onclick="load_proposals();">[% 'Proposals' | $T8 %]</a></li>
87     </ul>
88
89     <div id="overview" style="height:calc(100% - 60px);overflow: auto;">[% PROCESS "reconciliation/tabs/overview.html" %]</div>
90     <div id="automatic" style="height:calc(100% - 60px);overflow: auto;"></div>
91   </div>
92
93 </form>
94
95 <script type="text/javascript">
96 <!--
97
98 function load_proposals () {
99   var url="controller.pl?action=Reconciliation/load_proposals";
100   $.ajax({
101     url: url,
102     type: "POST",
103     data: $('#reconciliation_form').serialize(),
104     success: function(new_data) {
105       $('#overview').html('');
106       $('#automatic').html(new_data['html']);
107     }
108   });
109 }
110
111 function load_overview () {
112   var url="controller.pl?action=Reconciliation/load_overview";
113   $.ajax({
114     url: url,
115     type: "GET",
116     data: $('#reconciliation_form').serialize(),
117     success: function(new_data) {
118       $('#overview').html(new_data['html']);
119       $('#automatic').html('');
120     }
121   });
122 }
123
124 //-->
125 </script>
126