1 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
3 [% SET style="width: 400px" %]
6 <h1>[% HTML.escape(title) %]</h1>
8 <form action="controller.pl" method="post">
10 [%- INCLUDE 'common/flash.html' %]
12 [%- L.hidden_tag("id", SELF.bank_account.id) %]
16 <th align="right">[% 'Description' | $T8 %]</th>
17 <td>[%- L.input_tag("bank_account.name", SELF.bank_account.name, size=size) %]</td>
20 <th align="right">[% 'IBAN' | $T8 %]</th>
21 <td>[%- L.input_tag("bank_account.iban", SELF.bank_account.iban, size=size) %]</td>
24 <th align="right">[% 'Bank' | $T8 %]</th>
25 <td>[%- L.input_tag("bank_account.bank", SELF.bank_account.bank, size=size) %]</td>
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>
32 <th align="right">[% 'BIC' | $T8 %]</th>
33 <td>[%- L.input_tag("bank_account.bic", SELF.bank_account.bic, size=size) %]</td>
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>
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>
44 <th align="right">[% 'Obsolete' | $T8 %]</th>
45 <td>[% L.checkbox_tag('bank_account.obsolete', checked = SELF.bank_account.obsolete, for_submit=1) %]</td>
48 <td align="left">[% 'Reconciliation' | $T8 %]:</td>
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>
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>
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')) %]
67 <a href="[% SELF.url_for(action='list') %]">[%- LxERP.t8("Cancel") %]</a>
72 <script type="text/javascript">
74 function check_prerequisites() {
75 if ($('#bank_account_name').val() === "") {
76 alert(kivi.t8('The name is missing.'));
79 if ($('#bank_account_iban').val() === "") {
80 alert(kivi.t8('The IBAN is missing.'));
83 if ($('#bank_account_chart_id').val() === "") {
84 alert(kivi.t8('There is no connected chart.'));