36b628d074e565e7cfe091f4cf90e96e7a2d45b9
[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 align="right" nowrap>[% LxERP.t8('Precision') %]</th>
36    <td>[% L.input_tag('precision', FORM.precision || '0.01') %]</td>
37   </tr>
38
39   <tr>
40    <th valign="top" align="right" nowrap>[% LxERP.t8('Accounting method') %]</th>
41    <td>[% L.select_tag('accounting_method', SELF.all_accounting_methods, title_key='name', default=(FORM.accounting_method || 'cash')) %]</td>
42   </tr>
43
44   <tr>
45    <th valign="top" align="right" nowrap>[% LxERP.t8('Inventory system') %]</th>
46    <td>[% L.select_tag('inventory_system', SELF.all_inventory_systems, title_key='name', default=(FORM.inventory_system || 'periodic')) %]</td>
47   </tr>
48
49   <tr>
50    <th valign="top" align="right" nowrap>[% LxERP.t8('Profit determination') %]</th>
51    <td>[% L.select_tag('profit_determination', SELF.all_profit_determinations, title_key='name', default=(FORM.profit_determination || 'income')) %]</td>
52   </tr>
53  </table>
54
55  [% L.hidden_tag("dbhost", FORM.dbhost) %]
56  [% L.hidden_tag("dbport", FORM.dbport) %]
57  [% L.hidden_tag("dbuser", FORM.dbuser) %]
58  [% L.hidden_tag("dbpasswd", FORM.dbpasswd) %]
59  [% L.hidden_tag("dbdefault", FORM.dbdefault) %]
60  [% L.hidden_tag("action", "Admin/do_create_dataset") %]
61
62  <hr size="3" noshade>
63
64  <div>
65   [% L.submit_tag('dummy', LxERP.t8('Create Dataset')) %]
66  </div>
67
68 </form>
69
70 <script type="text/javascript">
71  <!--
72
73 function comment_selected_chart(s) {
74   if (s == 'Austria') {
75     alert("SKR07 Austria ist noch Stand 2002." +
76          "\n" +
77          "Die Buchungsgruppen sind nicht korrekt vorkonfiguriert" +
78          "\n" +
79          "fuer Kunden im Ausland." +
80          "\n" +
81          "Hinweis vom 20.09.2011");
82   } else if (/^Switzerland/.test(s)) {
83     document.getElementById('defaultcurrency').value='CHF';
84     document.getElementById('precision').value='0.05';
85     document.getElementById('accounting_method').value='accrual';
86     document.getElementById('inventory_system').value='periodic';
87     document.getElementById('profit_determination').value='balance';
88   } else {
89     document.getElementById("defaultcurrency").value="EUR";
90     document.getElementById('precision').value='0.01';
91     document.getElementById('accounting_method').value='cash';
92     document.getElementById('inventory_system').value='periodic';
93     document.getElementById('profit_determination').value='income';
94   }
95   return true;
96 }
97
98    -->
99 </script>