926ff7988a6876bd475c7cd61a42cc5bc1dabb94
[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 [%- INCLUDE 'common/flash.html' %]
28
29 <form id="reconciliation_form" method="post" action="controller.pl" style="height:100%" id="filter_form">
30   <table>
31     <tr>
32      <th align="right">[% 'Bank account' | $T8 %]</th>
33      <td>[% L.select_tag('filter.local_bank_account_id:number',
34                           SELF.BANK_ACCOUNTS,
35                           default=FORM.filter.local_bank_account_id_number,
36                           title_key='displayable_name',
37                           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   <div id="reconc_tabs" class="tabwidget" style="height:100%">
81     <ul>
82       <li><a href="#overview" onclick="load_overview();">[% 'Overview' | $T8 %]</a></li>
83       <li><a href="#automatic" onclick="load_proposals();">[% 'Proposals' | $T8 %]</a></li>
84     </ul>
85
86     <div id="overview" style="height:calc(100% - 60px);overflow: auto;">
87     [%- IF ui_tab == 0 %]
88     [% PROCESS "reconciliation/tabs/overview.html" %]
89     [%- END %]</div>
90     <div id="automatic" style="height:calc(100% - 60px);overflow: auto;">
91     [%- IF ui_tab == 1 %]
92     [% PROCESS "reconciliation/tabs/automatic.html" %]
93     [%- END %]    </div>
94   </div>
95
96 </form>
97
98 <script type="text/javascript">
99 <!--
100
101 function load_proposals () {
102   var url="controller.pl?action=Reconciliation/load_proposals";
103   $.ajax({
104     url: url,
105     type: "POST",
106     data: $('#reconciliation_form').serialize(),
107     success: function(new_data) {
108       $('#overview').html('');
109       $('#automatic').html(new_data['html']);
110     }
111   });
112 }
113
114 function load_overview () {
115   var url="controller.pl?action=Reconciliation/load_overview";
116   $.ajax({
117     url: url,
118     type: "GET",
119     data: $('#reconciliation_form').serialize(),
120     success: function(new_data) {
121       $('#overview').html(new_data['html']);
122       $('#automatic').html('');
123     }
124   });
125 }
126
127 $.cookie('jquery_ui_tab_reconc_tabs', [% ui_tab %] );
128
129 //-->
130 </script>