48998c6a96a721a145311d149eecb21c911dc664
[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  [% IF !superuser.have_privileges %]
14   <p>
15    [% LxERP.t8("Database superuser privileges are required for parts of the database modifications.") %]
16    [% LxERP.t8("Please provide corresponding credentials.") %]
17   </p>
18  [% END %]
19
20  <table border="0">
21   <tr>
22    <th valign="top" align="right" nowrap>[% LxERP.t8('Existing Datasets') %]</th>
23    <td valign="top">[% FOREACH db = SELF.all_dbsources %][% UNLESS loop.first %] [% END %][[% HTML.escape(db) %]][% END %]</td>
24   </tr>
25
26   <tr>
27    <th align="right" nowrap>[% LxERP.t8('Create Dataset') %]</th>
28    <td>[% L.input_tag('db', FORM.db, class="initial_focus") %]</td>
29   </tr>
30
31   [% IF !superuser.have_privileges %]
32    <tr>
33     <th align="right" nowrap>[% LxERP.t8("Database Superuser") %]</th>
34     <td>[% L.input_tag("database_superuser_user", superuser.username) %]</td>
35    </tr>
36
37    <tr>
38     <th align="right" nowrap>[% LxERP.t8("Password") %]</th>
39     <td>[% L.input_tag("database_superuser_password", superuser.password, type="password") %]</td>
40    </tr>
41   [% END %]
42
43   <tr>
44    <td colspan="1"> </td>
45    <td><hr size="1" noshade></td>
46   </tr>
47
48   <tr>
49    <th align="right" nowrap>[% LxERP.t8('Default currency') %]</th>
50    <td>[% L.input_tag('defaultcurrency', FORM.defaultcurrency) %]</td>
51   </tr>
52
53   <tr>
54    <th align="right" nowrap>[% LxERP.t8('Precision') %]</th>
55    <td>[% L.input_tag('precision_as_number', LxERP.format_amount(FORM.precision, 2)) %] [% LxERP.t8('Precision Note') %]</td>
56   </tr>
57
58   <tr>
59    <th valign="top" align="right" nowrap>[% LxERP.t8('Create Chart of Accounts') %]</th>
60    <td>[% L.select_tag('chart', SELF.all_charts, default=(FORM.chart), onchange='comment_selected_chart(this.value)') %]</td>
61   </tr>
62
63   <tr>
64    <th valign="top" align="right" nowrap>[% LxERP.t8('Accounting method') %]</th>
65    <td>[% L.select_tag('accounting_method', SELF.all_accounting_methods, title_key='name', default=(FORM.accounting_method)) %]</td>
66   </tr>
67
68   <tr>
69    <th valign="top" align="right" nowrap>[% LxERP.t8('Inventory system') %]</th>
70    <td>[% L.select_tag('inventory_system', SELF.all_inventory_systems, title_key='name', default=(FORM.inventory_system)) %]</td>
71   </tr>
72
73   <tr>
74    <th valign="top" align="right" nowrap>[% LxERP.t8('Profit determination') %]</th>
75    <td>[% L.select_tag('profit_determination', SELF.all_profit_determinations, title_key='name', default=(FORM.profit_determination)) %]</td>
76   </tr>
77  </table>
78
79  [% L.hidden_tag("dbhost", FORM.dbhost) %]
80  [% L.hidden_tag("dbport", FORM.dbport) %]
81  [% L.hidden_tag("dbuser", FORM.dbuser) %]
82  [% L.hidden_tag("dbpasswd", FORM.dbpasswd) %]
83  [% L.hidden_tag("dbdefault", FORM.dbdefault) %]
84  [% L.hidden_tag("action", "Admin/do_create_dataset") %]
85  [% L.hidden_tag("feature_balance", FORM.feature_balance) %]
86  [% L.hidden_tag("feature_datev", FORM.feature_datev) %]
87  [% L.hidden_tag("feature_erfolgsrechnung", FORM.feature_erfolgsrechnung) %]
88  [% L.hidden_tag("feature_eurechnung", FORM.feature_eurechnung) %]
89  [% L.hidden_tag("feature_ustva", FORM.feature_ustva) %]
90
91
92  <hr size="3" noshade>
93
94  <div>
95   [% L.submit_tag('dummy', LxERP.t8('Create Dataset')) %]
96  </div>
97
98 </form>
99
100 <script type="text/javascript">
101  <!--
102
103 function comment_selected_chart(s) {
104   if (s == 'Austria') {
105     alert("SKR07 Austria ist noch Stand 2002." +
106          "\n" +
107          "Die Buchungsgruppen sind nicht korrekt vorkonfiguriert" +
108          "\n" +
109          "fuer Kunden im Ausland." +
110          "\n" +
111          "Hinweis vom 20.09.2011");
112   }
113   return true;
114 }
115
116 function select_country_defaults(country) {
117   if (/^CH/.test(country)) {
118     document.getElementById('defaultcurrency').value='CHF';
119     document.getElementById('precision').value='0.05';
120     document.getElementById('chart').value='Switzerland-deutsch-MWST-2014';
121     document.getElementById('accounting_method').value='accrual';
122     document.getElementById('inventory_system').value='periodic';
123     document.getElementById('profit_determination').value='balance';
124   } else {
125     document.getElementById('defaultcurrency').value='EUR';
126     document.getElementById('precision').value='0.01';
127     document.getElementById('chart').value='Germany-DATEV-SKR03EU';
128     document.getElementById('accounting_method').value='cash';
129     document.getElementById('inventory_system').value='periodic';
130     document.getElementById('profit_determination').value='income';
131   }
132   return true;
133 }
134
135    -->
136 </script>