automated preferences for Switzerland, new sub get_default_coa in SL/Controller/Admin.pm
[kivitendo-erp.git] / templates / webpages / admin / create_dataset.html
1 [%- USE HTML %][%- USE LxERP -%][%- USE T8 -%][%- USE L -%]
2
3 [% INCLUDE 'common/flash.html' %]
4
5 <h1>[% HTML.escape(title) %]</h1>
6
7 <form method="post" action="controller.pl">
8  <p>
9   [% LxERP.t8('You can either create a new database or chose an existing database.') %]
10   [% LxERP.t8('In the latter case the tables needed by kivitendo will be created in that database.') %]
11  </p>
12
13  <table border="0">
14   <tr>
15    <th valign="top" align="right" nowrap>[% LxERP.t8('Existing Datasets') %]</th>
16    <td valign="top">[% FOREACH db = SELF.all_dbsources %][% UNLESS loop.first %] [% END %][[% HTML.escape(db) %]][% END %]</td>
17   </tr>
18
19   <tr>
20    <th align="right" nowrap>[% LxERP.t8('Create Dataset') %]</th>
21    <td>[% L.input_tag('db', FORM.db, class="initial_focus") %]</td>
22   </tr>
23
24   <tr>
25    <th valign="top" align="right" nowrap>[% LxERP.t8('Create Chart of Accounts') %]</th>
26    <td>[% L.select_tag('chart', SELF.all_charts, onchange='comment_selected_chart(this.value)', default=(FORM.chart || 'Germany-DATEV-SKR03EU')) %]</td>
27   </tr>
28
29   <tr>
30    <th align="right" nowrap>[% LxERP.t8('Default currency') %]</th>
31    <td>[% L.input_tag('defaultcurrency', FORM.defaultcurrency || 'EUR') %]</td>
32   </tr>
33
34   <tr>
35    <th valign="top" align="right" nowrap>[% LxERP.t8('Accounting method') %]</th>
36    <td>[% L.select_tag('accounting_method', SELF.all_accounting_methods, title_key='name', default=(FORM.accounting_method || 'cash')) %]</td>
37   </tr>
38
39   <tr>
40    <th valign="top" align="right" nowrap>[% LxERP.t8('Inventory system') %]</th>
41    <td>[% L.select_tag('inventory_system', SELF.all_inventory_systems, title_key='name', default=(FORM.inventory_system || 'periodic')) %]</td>
42   </tr>
43
44   <tr>
45    <th valign="top" align="right" nowrap>[% LxERP.t8('Profit determination') %]</th>
46    <td>[% L.select_tag('profit_determination', SELF.all_profit_determinations, title_key='name', default=(FORM.profit_determination || 'income')) %]</td>
47   </tr>
48  </table>
49
50  [% L.hidden_tag("dbhost", FORM.dbhost) %]
51  [% L.hidden_tag("dbport", FORM.dbport) %]
52  [% L.hidden_tag("dbuser", FORM.dbuser) %]
53  [% L.hidden_tag("dbpasswd", FORM.dbpasswd) %]
54  [% L.hidden_tag("dbdefault", FORM.dbdefault) %]
55  [% L.hidden_tag("action", "Admin/do_create_dataset") %]
56
57  <hr size="3" noshade>
58
59  <div>
60   [% L.submit_tag('dummy', LxERP.t8('Create Dataset')) %]
61  </div>
62
63 </form>
64
65 <script type="text/javascript">
66  <!--
67
68 function comment_selected_chart(s) {
69   if (s == 'Austria') {
70     alert("SKR07 Austria ist noch Stand 2002." +
71          "\n" +
72          "Die Buchungsgruppen sind nicht korrekt vorkonfiguriert" +
73          "\n" +
74          "fuer Kunden im Ausland." +
75          "\n" +
76          "Hinweis vom 20.09.2011");
77   } else if (/^Switzerland/.test(s)) {
78     document.getElementById('defaultcurrency').value='CHF';
79     document.getElementById('accounting_method').value='accrual';
80     document.getElementById('inventory_system').value='periodic';
81     document.getElementById('profit_determination').value='balance';
82   } else {
83     document.getElementById("defaultcurrency").value="EUR";
84     document.getElementById('accounting_method').value='cash';
85     document.getElementById('inventory_system').value='periodic';
86     document.getElementById('profit_determination').value='income';
87   }
88   return true;
89 }
90
91    -->
92 </script>