1 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
3 <h1>[% HTML.escape(title) %]</h1>
5 <form action="controller.pl" method="post">
6 [%- L.hidden_tag("id", SELF.config.id) %]
10 <th align="right">[% 'Description' | $T8 %]</th>
11 <td>[%- L.input_tag("config.description", SELF.config.description) %]</td>
14 <th align="right">[% 'Inventory Account' | $T8 %]</th>
15 [%- IF NOT SELF.config.id %]
16 <td>[%- L.select_tag("config.inventory_accno_id", ACCOUNTS.ic, title_sub=\account_label, default=SELF.defaults.inventory_accno_id) %]</td>
17 [%- ELSIF SELF.config.id AND SELF.config.orphaned %]
18 <td>[%- L.select_tag("config.inventory_accno_id", ACCOUNTS.ic, title_sub=\account_label, default=SELF.config.inventory_accno_id) %]</td>
20 <td>[%- CHARTLIST.inventory_accno %] -- [%- CHARTLIST.inventory_accno_description %]</td>
23 [%- FOREACH tz = TAXZONES %]
25 <th align="right">[% 'Revenue' | $T8 %] [% HTML.escape(tz.description) %]</th>
26 [%- IF NOT SELF.config.id %]
27 <td>[%- L.select_tag('income_accno_id_' _ tz.id, ACCOUNTS.ic_income, title_sub=\account_label, default=SELF.defaults.income_accno_id) %]</td>
28 [%- ELSIF SELF.config.id AND SELF.config.orphaned %]
29 <td>[%- L.select_tag('income_accno_id_' _ tz.id, ACCOUNTS.ic_income, title_sub=\account_label, default=CHARTLIST.${tz.id}.income_accno_id) %]</td>
31 <td>[% CHARTLIST.${tz.id}.income_accno %] -- [% CHARTLIST.${tz.id}.income_accno_description %]</td>
35 <th align="right">[% 'Expense' | $T8 %] [% HTML.escape(tz.description) %]</th>
36 [%- IF NOT SELF.config.id %]
37 <td>[%- L.select_tag('expense_accno_id_' _ tz.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=SELF.defaults.expense_accno_id) %]</td>
38 [%- ELSIF SELF.config.id AND SELF.config.orphaned %]
39 <td>[%- L.select_tag('expense_accno_id_' _ tz.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=CHARTLIST.${tz.id}.expense_accno_id) %]</td>
41 <td>[% CHARTLIST.${tz.id}.expense_accno %] -- [% CHARTLIST.${tz.id}.expense_accno_description %]</td>
48 [% L.hidden_tag("action", "Buchungsgruppen/dispatch") %]
49 [% L.submit_tag("action_" _ (SELF.config.id ? "update" : "create"), LxERP.t8('Save'), onclick="return check_prerequisites();") %]
50 [%- IF SELF.config.id AND SELF.config.orphaned %]
51 [% L.submit_tag("action_delete", LxERP.t8('Delete'), confirm=LxERP.t8('Are you sure?')) %]
57 <script type="text/javascript">
59 function check_prerequisites() {
60 if ($('#config_description').val() === "") {
61 alert(kivi.t8('The description is missing.'));