Chartpicker auch für Steuerzonen und Buchungsgruppen
[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 SELF.config.id %]
16     <td>[% CHARTLIST.${bg.id}.income_accno %] -- [% CHARTLIST.${bg.id}.income_accno_description %]</td>
17     [%- ELSE %]
18     <td>[% L.chart_picker('income_accno_id_' _ bg.id, SELF.defaults.income_accno_id, choose=1, type='IC_income,IC_sale', style=style) %]</td>
19     [%- END %]
20   </tr>
21   <tr>
22     <th align="right">[% 'Expense' | $T8 %] [% HTML.escape(bg.description) %]</th>
23     [%- IF SELF.config.id %]
24     <td>[% CHARTLIST.${bg.id}.expense_accno %] -- [% CHARTLIST.${bg.id}.expense_accno_description %]</td>
25     [%- ELSE %]
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     [%- END %]
28   </tr>
29 [%- END %]
30 </table>
31
32 [% LxERP.t8('Obsolete') %]: [% L.checkbox_tag('config.obsolete', checked = SELF.config.obsolete, for_submit=1) %]
33
34  <p>
35   [% L.hidden_tag("action", "Taxzones/dispatch") %]
36   [% L.submit_tag("action_" _  (SELF.config.id ? "update" : "create"), LxERP.t8('Save'), onclick="return check_prerequisites();") %]
37   <a href="[% SELF.url_for(action='list') %]">[%- LxERP.t8("Cancel") %]</a>
38  </p>
39
40  <hr>
41
42 <script type="text/javascript">
43 <!--
44 function check_prerequisites() {
45   if ($('#config_description').val() === "") {
46     alert(kivi.t8('The description is missing.'));
47     return false;
48   }
49
50   return true;
51 }
52 -->
53 </script>
54 </form>