16912fd85b0a7b614b796f4c5d4f8fb7a8ecaeca
[kivitendo-erp.git] / templates / webpages / buchungsgruppen / form.html
1 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
2 [% SET style="width: 400px" %]
3
4 <h1>[% HTML.escape(title) %]</h1>
5
6 <form action="controller.pl" method="post">
7 [%- L.hidden_tag("id", SELF.config.id) %]
8
9 <table>
10   <tr>
11     <th align="right">[% 'Description' | $T8 %]</th>
12     <td>[%- L.input_tag("config.description", SELF.config.description) %]</td>
13   </tr>
14   <tr>
15     <th align="right">[% 'Inventory Account' | $T8 %]</th>
16     [%- IF NOT SELF.config.id %]
17     <td>[% L.chart_picker("config.inventory_accno_id", SELF.defaults.inventory_accno_id, choose=1, type='IC', style=style) %]</td>
18     [%- ELSIF SELF.config.id AND SELF.config.orphaned %]
19     <td>[% L.chart_picker("config.inventory_accno_id", SELF.config.inventory_accno_id, choose=1, type='IC', style=style) %]</td>
20     [%- ELSE %]
21       <td>[%- CHARTLIST.inventory_accno %] -- [%- CHARTLIST.inventory_accno_description %]</td>
22     [%- END %]
23   </tr>
24 [%- FOREACH tz = TAXZONES %]
25   <tr>
26     <th align="right">[% 'Revenue' | $T8 %] [% HTML.escape(tz.description) %]</th>
27     [%- IF NOT SELF.config.id %]
28     <td>[% L.chart_picker('income_accno_id_' _ tz.id, SELF.defaults.income_accno_id, choose=1, type='IC_income,IC_sale', style=style) %]</td>
29     [%- ELSIF SELF.config.id AND SELF.config.orphaned %]
30     <td>[% L.chart_picker('income_accno_id_' _ tz.id, CHARTLIST.${tz.id}.income_accno_id, choose=1, type='IC_income,IC_sale', style=style) %]</td>
31     [%- ELSE %]
32       <td>[% CHARTLIST.${tz.id}.income_accno %] -- [% CHARTLIST.${tz.id}.income_accno_description %]</td>
33     [%- END %]
34   </tr>
35   <tr>
36     <th align="right">[% 'Expense' | $T8 %] [% HTML.escape(tz.description) %]</th>
37     [%- IF NOT SELF.config.id %]
38       <td>[% L.chart_picker('expense_accno_id_' _ tz.id, SELF.defaults.expense_accno_id, choose=1, type='IC_expense,IC_cogs', style=style) %]</td>
39     [%- ELSIF SELF.config.id AND SELF.config.orphaned %]
40       <td>[% L.chart_picker('expense_accno_id_' _ tz.id, CHARTLIST.${tz.id}.expense_accno_id, choose=1, type='IC_expense,IC_cogs', style=style) %]</td>
41     [%- ELSE %]
42       <td>[% CHARTLIST.${tz.id}.expense_accno %] -- [% CHARTLIST.${tz.id}.expense_accno_description %]</td>
43     [%- END %]
44   </tr>
45 [%- END %]
46 </table>
47
48  <p>
49   [% L.hidden_tag("action", "Buchungsgruppen/dispatch") %]
50   [% L.submit_tag("action_" _  (SELF.config.id ? "update" : "create"), LxERP.t8('Save'), onclick="return check_prerequisites();") %]
51   [%- IF SELF.config.id AND SELF.config.orphaned %]
52     [% L.submit_tag("action_delete", LxERP.t8('Delete'), confirm=LxERP.t8('Are you sure?')) %]
53   [%- END %]
54  </p>
55
56  <hr>
57
58 <script type="text/javascript">
59 <!--
60 function check_prerequisites() {
61   if ($('#config_description').val() === "") {
62     alert(kivi.t8('The description is missing.'));
63     return false;
64   }
65
66   return true;
67 }
68 -->
69 </script>
70 </form>