Verkaufs- und Einkaufslieferschein um Standardlagerverfahren erweitert (#2284)
[kivitendo-erp.git] / templates / webpages / client_config / form.html
1 [%- USE T8 %][%- USE L %][% USE LxERP %][% USE HTML %]
2 [%- USE JavaScript -%]
3  <script type="text/javascript" src="js/common.js"></script>
4  <script type="text/javascript" src="js/parts_language_selection.js"></script>
5  <script type="text/javascript">
6   <!--
7       warehouses = new Array();
8       [%- USE WAREHOUSES_it = Iterator(SELF.WAREHOUSES) %][%- FOREACH warehouse = WAREHOUSES_it %]
9       warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
10       warehouses[[% WAREHOUSES_it.count - 1 %]]['id'] = [% warehouse.id %];
11       warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'] = new Array();
12       [% USE BINS_it = Iterator(warehouse.BINS) %][% FOREACH bin = BINS_it %]
13       warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count - 1 %]] = new Array();
14       warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count - 1 %]]['description'] = "[% JavaScript.escape(bin.description) %]";
15       warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count - 1 %]]['id'] = [% bin.id %];
16       [% END %]
17       [% END %]
18
19       function warehouse_selected(warehouse_id, bin_id, bin_id_name) {
20
21         // bin_id_name is optional and only used in client_config.html
22         var bin_id_name = bin_id_name || 'bin_id';
23
24         var control = document.getElementById(bin_id_name);
25
26         for (var i = control.options.length - 1; i >= 0; i--) {
27           control.options[i] = null;
28         }
29
30         var warehouse_index = 0;
31
32         for (i = 0; i < warehouses.length; i++)
33           if (warehouses[i]['id'] == warehouse_id) {
34             warehouse_index = i;
35             break;
36           }
37
38         var warehouse = warehouses[warehouse_index];
39         var bin_index = 0;
40
41         for (i = 0; i < warehouse['bins'].length; i++)
42           if (warehouse['bins'][i]['id'] == bin_id) {
43             bin_index = i;
44             break;
45           }
46
47         for (i = 0; i < warehouse['bins'].length; i++) {
48           control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
49         }
50
51
52         control.options[bin_index].selected = true;
53       }
54
55       $(function() {
56         warehouse_selected([% SELF.warehouse_id %], [% SELF.bin_id %], 'bin_id');
57         warehouse_selected([% SELF.warehouse_id_ignore_onhand %], [% SELF.bin_id_ignore_onhand %], 'bin_id_ignore_onhand');
58       })
59     -->
60  </script>
61 <h1>[% title | html %]</h1>
62
63 [% PROCESS 'common/flash.html' %]
64
65 <form action='controller.pl' method='POST'>
66
67 <table>
68
69  <tr class='listheading'>
70    <th colspan="3">[% 'Posting Configuration' | $T8 %]</th>
71  </tr>
72
73  <tr>
74    <td align="right">[% 'Sales invoices changeable' | $T8 %]</td>
75    <td>[% L.select_tag('is_changeable', SELF.posting_options, value_key => 'value', title_key => 'title', default => SELF.is_changeable) %]</td>
76    <td>[% 'Should sales invoices be and when should they be changeable or deleteable after posting?' | $T8 %]</td>
77  </tr>
78  <tr>
79    <td align="right">[% 'Purchase invoices changeable' | $T8 %]</td>
80    <td>[% L.select_tag('ir_changeable', SELF.posting_options, value_key => 'value', title_key => 'title', default => SELF.ir_changeable) %]</td>
81    <td>[% 'Should purchase invoices be and when should they be deleteable after posting?' | $T8 %]</td>
82  </tr>
83  <tr>
84    <td align="right">[% 'AR transactions changeable' | $T8 %]</td>
85    <td>[% L.select_tag('ar_changeable', SELF.posting_options, value_key => 'value', title_key => 'title', default => SELF.ar_changeable) %]</td>
86    <td>[% 'Should ar transactions be and when should they be changeable or deleteable after posting?' | $T8 %]</td>
87  </tr>
88  <tr>
89    <td align="right">[% 'AP transactions changeable' | $T8 %]</td>
90    <td>[% L.select_tag('ap_changeable', SELF.posting_options, value_key => 'value', title_key => 'title', default => SELF.ap_changeable) %]</td>
91    <td>[% 'Should ap transactions be and when should they be changeable or deleteable after posting?' | $T8 %]</td>
92  </tr>
93  <tr>
94    <td align="right">[% 'GL transactions changeable' | $T8 %]</td>
95    <td>[% L.select_tag('gl_changeable', SELF.posting_options, value_key => 'value', title_key => 'title', default => SELF.gl_changeable) %]</td>
96    <td>[% 'Should gl transactions be and when should they be changeable or deleteable after posting?' | $T8 %]</td>
97  </tr>
98
99  <tr> </tr>
100  <tr> </tr>
101
102  <tr>
103    <td align="right">[% 'Payments Changeable' | $T8 %]</td>
104    <td>[% L.select_tag('payments_changeable', SELF.payment_options, value_key => 'value', title_key => 'title', default => SELF.payments_changeable) %]</td>
105    <td>[% 'Should payments be and when should they be changeable after posting?' | $T8 %]</td>
106  </tr>
107
108  <tr> </tr>
109  <tr> </tr>
110
111  <tr>
112    <td align="right">[% 'Show "mark as paid" in sales invoices' | $T8 %]</td>
113    <td>[% L.yes_no_tag('is_show_mark_as_paid', SELF.is_show_mark_as_paid) %]</td>
114    <td>[% 'Should the "mark as paid" button showed on sales invoices?' | $T8 %]</td>
115  </tr>
116  <tr>
117    <td align="right">[% 'Show "mark as paid" in purchase invoices' | $T8 %]</td>
118    <td>[% L.yes_no_tag('ir_show_mark_as_paid', SELF.ir_show_mark_as_paid) %]</td>
119    <td>[% 'Should the "mark as paid" button showed in purchase invoices?' | $T8 %]</td>
120  </tr>
121  <tr>
122    <td align="right">[% 'Show "mark as paid" in ar transactions' | $T8 %]</td>
123    <td>[% L.yes_no_tag('ar_show_mark_as_paid', SELF.ar_show_mark_as_paid) %]</td>
124    <td>[% 'Should the "mark as paid" button showed in ar transactions?' | $T8 %]</td>
125  </tr>
126  <tr>
127    <td align="right">[% 'Show "mark as paid" in ap transactions' | $T8 %]</td>
128    <td>[% L.yes_no_tag('ap_show_mark_as_paid', SELF.ap_show_mark_as_paid) %]</td>
129    <td>[% 'Should the "mark as paid" button showed in ap transactions?' | $T8 %]</td>
130  </tr>
131
132  <tr> </tr>
133  <tr> </tr>
134
135  <tr>
136    <td align="right">[% 'Accounting method' | $T8 %]</td>
137    <td>[% L.select_tag('accounting_method', SELF.accounting_options, value_key => 'value', title_key => 'title', default => SELF.accounting_method) %]</td>
138    <td>[% 'This option controls the posting and calculation behavior for the accounting method.' | $T8 %]</td>
139  </tr>
140  <tr>
141    <td align="right">[% 'Inventory system' | $T8 %]</td>
142    <td>[% L.select_tag('inventory_system', SELF.inventory_options, value_key => 'value', title_key => 'title', default => SELF.inventory_system) %]</td>
143    <td>
144      [% 'This option controls the inventory system.' | $T8 %]<br>
145      [% 'ATTENTION! You can not simply change it from periodic to perpetual once you started posting.' | $T8 %]
146    </td>
147  </tr>
148  <tr>
149    <td align="right">[% 'Profit determination' | $T8 %]</td>
150    <td>[% L.select_tag('profit_determination', SELF.profit_options, value_key => 'value', title_key => 'title', default => SELF.profit_determination) %]</td>
151    <td>[% 'This option controls the method used for profit determination.' | $T8 %]</td>
152  </tr>
153
154  <tr> </tr>
155  <tr> </tr>
156
157  <tr class='listheading'>
158    <th colspan="3">[% 'DATEV check configuration' | $T8 %]</th>
159  </tr>
160  <tr>
161    <td colspan="3">[% 'It is possible to make a quick DATEV export everytime you post a record to ensure things work nicely with their data requirements. This will result in a slight overhead though you can enable this for each type of record independantly.' | $T8 %]</td>
162  </tr>
163  <tr>
164    <td align="right">[% 'Check on sales invoice' | $T8 %]</td>
165    <td>[% L.yes_no_tag('datev_check_on_sales_invoice', SELF.datev_check_on_sales_invoice) %]</td>
166    <td>[% 'Perform check when a sales invoice or a payment for a sales invoice is posted?' | $T8 %]</td>
167  </tr>
168  <tr>
169    <td align="right">[% 'Check on purchase invoice' | $T8 %]</td>
170    <td>[% L.yes_no_tag('datev_check_on_purchase_invoice', SELF.datev_check_on_purchase_invoice) %]</td>
171    <td>[% 'Perform check when a purchase invoice or a payment for a purchase invoice is posted?' | $T8 %]</td>
172  </tr>
173  <tr>
174    <td align="right">[% 'Check on ar transaction' | $T8 %]</td>
175    <td>[% L.yes_no_tag('datev_check_on_ar_transaction', SELF.datev_check_on_ar_transaction) %]</td>
176    <td>[% 'Perform check when an ar transaction is posted?' | $T8 %]</td>
177  </tr>
178  <tr>
179    <td align="right">[% 'Check on ap transaction' | $T8 %]</td>
180    <td>[% L.yes_no_tag('datev_check_on_ap_transaction', SELF.datev_check_on_ap_transaction) %]</td>
181    <td>[% 'Perform check when an ap transaction is posted?' | $T8 %]</td>
182  </tr>
183  <tr>
184    <td align="right">[% 'Check on gl transaction' | $T8 %]</td>
185    <td>[% L.yes_no_tag('datev_check_on_gl_transaction', SELF.datev_check_on_gl_transaction) %]</td>
186    <td>[% 'Perform check when a gl transaction is posted?' | $T8 %]</td>
187  </tr>
188
189  <tr> </tr>
190  <tr> </tr>
191
192  <tr class='listheading'>
193    <th colspan="3">[% 'Orders / Delivery Orders deleteable' | $T8 %]</th>
194  </tr>
195  <tr>
196    <td align="right">[% 'Sales Orders deleteable' | $T8 %]</td>
197    <td>[% L.yes_no_tag('sales_order_show_delete', SELF.sales_order_show_delete) %]</td>
198    <td>[% 'Show delete button in sales orders?' | $T8 %]</td>
199  </tr>
200  <tr>
201    <td align="right">[% 'Purchase Orders deleteable' | $T8 %]</td>
202    <td>[% L.yes_no_tag('purchase_order_show_delete', SELF.purchase_order_show_delete) %]</td>
203    <td>[% 'Show delete button in purchase orders?' | $T8 %]</td>
204  </tr>
205  <tr>
206    <td align="right">[% 'Sales Delivery Orders deleteable' | $T8 %]</td>
207    <td>[% L.yes_no_tag('sales_delivery_order_show_delete', SELF.sales_delivery_order_show_delete) %]</td>
208    <td>[% 'Show delete button in sales delivery orders?' | $T8 %]</td>
209  </tr>
210  <tr>
211    <td align="right">[% 'Purchase Delivery Orders deleteable' | $T8 %]</td>
212    <td>[% L.yes_no_tag('purchase_delivery_order_show_delete', SELF.purchase_delivery_order_show_delete) %]</td>
213    <td>[% 'Show delete button in purchase delivery orders?' | $T8 %]</td>
214  </tr>
215
216  <tr> </tr>
217  <tr> </tr>
218
219  <tr class='listheading'>
220    <th colspan="3">[% 'Warehouse' | $T8 %]</th>
221  </tr>
222  <tr>
223    <td align="right">[% 'Default Transfer' | $T8 %]</td>
224    <td>
225      [% L.yes_no_tag('transfer_default', SELF.transfer_default) %]
226    </td>
227    <td>
228      [% 'Show Transfer via default' | $T8 %]<br>
229   </td>
230   </tr>
231   <tr>
232    <td align="right">[% 'Default Transfer with Master Bin' | $T8 %]</td>
233    <td>
234      [% L.yes_no_tag('transfer_default_use_master_default_bin', SELF.transfer_default_use_master_default_bin) %]
235    </td>
236    <td>
237      [% 'Use master default bin for Default Transfer, if no default bin for the part is configured' | $T8 %]<br>
238   </td>
239   </tr>
240   <tr>
241    <td align="right">[% 'Default Transfer Out with negative inventory' | $T8 %]</td>
242    <td>
243      [% L.yes_no_tag('transfer_default_ignore_onhand', SELF.transfer_default_ignore_onhand) %]
244    </td>
245    <td>
246      [% 'Default Transfer Out always succeed. The current part onhand is ignored and the inventory can have negative stocks (not recommended).' | $T8 %]<br>
247   </td>
248   </tr>
249
250  <tr> </tr>
251 <tr>
252 <th align="right" nowrap="true">[% 'Default Warehouse' | $T8 %]</th>
253 <td>
254  <select name="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)">
255   [%- FOREACH warehouse = SELF.WAREHOUSES %]
256     <option value="[% HTML.escape(warehouse.id) %]"[% IF SELF.warehouse_id == warehouse.id %] selected[% END %]>[% warehouse.description %]</option>
257   [%- END %]
258  </select>
259 </td>
260 <td>
261    [% 'This is the default bin for parts' | $T8 %]<br>
262    [% 'If configured this bin will be preselected for all new parts. Also this bin will be used as the master default bin, if default transfer out with master bin is activated.' | $T8 %]<br>
263 </td>
264 </tr>
265 <tr>
266 <th align="right" nowrap="true">[% 'Default Bin' | $T8 %]</th>
267 <td><select id="bin_id" name="bin_id"></select></td>
268 </tr>
269 <tr>
270 <th align="right" nowrap="true">[% 'Default Warehouse with ignoring on hand' | $T8 %]</th>
271 <td>
272  <select name="warehouse_id_ignore_onhand" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0, 'bin_id_ignore_onhand')">
273   [%- FOREACH warehouse = SELF.WAREHOUSES %]
274     <option value="[% HTML.escape(warehouse.id) %]"[% IF SELF.warehouse_id_ignore_onhand == warehouse.id %] selected[% END %]>[% warehouse.description %]</option>
275   [%- END %]
276  </select>
277 </td>
278 <td>
279    [% 'This is the default bin for ignoring onhand' | $T8 %]<br>
280    [% 'If the default transfer out always succeed use this bin for negative stock quantity.' | $T8 %]<br>
281 </td>
282 </tr>
283 <tr>
284 <th align="right" nowrap="true">[% 'Default Bin with ignoring onhand' | $T8 %]</th>
285 <td><select id="bin_id_ignore_onhand" name="bin_id_ignore_onhand"></select></td>
286 </tr>
287 <tr>
288    <td align="right">[% 'Show Bestbefore' | $T8 %]</td>
289    <td>
290      [% L.yes_no_tag('show_bestbefore', SELF.show_bestbefore) %]
291    </td>
292    <td>
293      [% 'Show fields used for the best before date?' | $T8 %]<br>
294      [% 'ATTENTION! If you enabled this feature you can not simply turn it off again without taking care that best_before fields are emptied in the database.' | $T8 %]<br>
295      [% 'This can be done with the following query:' | $T8 %]<br>
296      <br>
297      UPDATE inventory SET bestbefore = NULL; <br>
298      <br>
299      [% 'Any stock contents containing a best before date will be impossible to stock out otherwise.' | $T8 %]
300    </td>
301  </tr>
302  <tr class='listheading'>
303    <th colspan="3">[% 'Weight' | $T8 %]</th>
304  </tr>
305  <tr>
306    <td align="right">[% 'Show weights' | $T8 %]</td>
307    <td>
308      [% L.yes_no_tag('show_weight', SELF.show_weight) %]
309    </td>
310    <td>
311      [% 'Show the weights of articles and the total weight in orders, invoices and delivery notes?' | $T8 %]<br>
312    </td>
313  </tr>
314 </table>
315
316 <br>
317
318 [%- L.hidden_tag('action',  'ClientConfig/dispatch')  %]
319 [%- L.submit_tag('action_save',  LxERP.t8('Save'))  %]
320
321 <br><br>
322
323 </form>