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