epic-ts
[kivitendo-erp.git] / templates / webpages / bankaccounts / form.html
1 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
2
3 [% SET style="width: 400px" %]
4 [% SET size=34 %]
5
6 <h1>[% HTML.escape(title) %]</h1>
7
8 <form action="controller.pl" method="post">
9
10 [%- INCLUDE 'common/flash.html' %]
11
12 [%- L.hidden_tag("id", SELF.bank_account.id) %]
13
14 <table>
15   <tr>
16     <th align="right">[% 'Description' | $T8 %]</th>
17     <td>[%- L.input_tag("bank_account.name", SELF.bank_account.name, size=size) %]</td>
18   </tr>
19   <tr>
20     <th align="right">[% 'IBAN' | $T8 %]</th>
21     <td>[%- L.input_tag("bank_account.iban", SELF.bank_account.iban, size=size) %]</td>
22   </tr>
23   <tr>
24     <th align="right">[% 'Bank' | $T8 %]</th>
25     <td>[%- L.input_tag("bank_account.bank", SELF.bank_account.bank, size=size) %]</td>
26   </tr>
27   <tr>
28     <th align="right">[% 'Account number' | $T8 %]</th>
29     <td>[%- L.input_tag("bank_account.account_number", SELF.bank_account.account_number, size=size) %]</td>
30   </tr>
31   <tr>
32     <th align="right">[% 'BIC' | $T8 %]</th>
33     <td>[%- L.input_tag("bank_account.bic", SELF.bank_account.bic, size=size) %]</td>
34   </tr>
35   <tr>
36     <th align="right">[% 'Bank code' | $T8 %]</th>
37     <td>[%- L.input_tag("bank_account.bank_code", SELF.bank_account.bank_code, size=size) %]</td>
38   </tr>
39   <tr>
40     <th align="right">[% 'Chart' | $T8 %]</th>
41     <td>[% L.chart_picker('bank_account.chart_id', SELF.bank_account.chart_id, type='AR_paid,AP_paid', category='A,L,Q', choose=1, style=style) %]</td>
42   </tr>
43   <tr>
44     <th align="right">[% 'Obsolete' | $T8 %]</th>
45     <td>[% L.checkbox_tag('bank_account.obsolete', checked = SELF.bank_account.obsolete, for_submit=1) %]</td>
46   </tr>
47   <tr>
48     <td align="left">[% 'Reconciliation' | $T8 %]:</td>
49     <td></td>
50   </tr>
51   <tr>
52     <th align="right">[% 'Starting date' | $T8 %]</th>
53     <td>[% L.date_tag('bank_account.reconciliation_starting_date', SELF.bank_account.reconciliation_starting_date) %]</td>
54   </tr>
55   <tr>
56     <th align="right">[% 'Starting balance' | $T8 %]</th>
57     <td>[%- L.input_tag('bank_account.reconciliation_starting_balance_as_number', SELF.bank_account.reconciliation_starting_balance_as_number) %]</td>
58   </tr>
59 </table>
60
61  <p>
62   [% L.hidden_tag("action", "BankAccount/dispatch") %]
63   [% L.submit_tag("action_" _  (SELF.bank_account.id ? "update" : "create"), LxERP.t8('Save'), onclick="return check_prerequisites();") %]
64   [%- IF SELF.bank_account.id AND SELF.bank_account.number_of_bank_transactions == 0 -%]
65     [% L.submit_tag("action_delete", LxERP.t8('Delete')) %]
66   [%- END %]
67   <a href="[% SELF.url_for(action='list') %]">[%- LxERP.t8("Cancel") %]</a>
68  </p>
69
70  <hr>
71
72 <script type="text/javascript">
73 <!--
74 function check_prerequisites() {
75   if ($('#bank_account_name').val() === "") {
76     alert(kivi.t8('The name is missing.'));
77     return false;
78   }
79   if ($('#bank_account_iban').val() === "") {
80     alert(kivi.t8('The IBAN is missing.'));
81     return false;
82   }
83   if ($('#bank_account_chart_id').val() === "") {
84     alert(kivi.t8('There is no connected chart.'));
85     return false;
86   }
87
88   return true;
89 }
90 -->
91 </script>
92 </form>