Lager->Einlagern: kein extra EAN-Feld mehr
[kivitendo-erp.git] / templates / webpages / inventory / warehouse_selection_stock.html
1 [%- USE T8 %]
2 [%- USE L %]
3 [%- USE P %]
4 [%- USE HTML %]
5 [%- USE LxERP %]
6
7 <h1>[% title | html %]</h1>
8
9 [%- INCLUDE 'common/flash.html' %]
10
11 <form name="Form" method="post" action="controller.pl" id="form">
12
13  <table>
14   <tr>
15    <th align="right" nowrap>[% 'Part' | $T8 %]</th>
16    <td>[% P.part.picker('part_id', SELF.part) %]</td>
17   </tr>
18
19   <tr>
20    <th align="right" nowrap>[% 'Destination warehouse' | $T8 %]</th>
21    <td>[% L.select_tag('warehouse_id', SELF.warehouses, default=SELF.warehouse.id, title_key='description') %]
22      [% IF SELF.warehouse.id %]
23        [% L.select_tag('bin_id', SELF.warehouse.bins, default=SELF.bin.id, title_key='description') %]
24       [%- ELSE %]
25        <span id='bin_id'></span>
26       [% END %]
27        <span id='write_default_bin_span' style='display:none'><br>[% L.checkbox_tag('write_default_bin', label=LxERP.t8('Write bin to default bin in part?')) %]</span>
28     </td>
29   </tr>
30
31   <tr>
32    <th align="right" nowrap>[% 'Charge number' | $T8 %]</th>
33    <td>[% L.input_tag('chargenumber', FORM.chargenumber, size=30) %]</td>
34   </tr>
35
36 [% IF INSTANCE_CONF.get_show_bestbefore %]
37   <tr>
38    <th align="right" nowrap>[% 'Best Before' | $T8 %]</th>
39    <td>[% L.date_tag('bestbefore', FORM.bestbefore) %]</td>
40   </tr>
41 [%- END %]
42
43   <tr>
44    <th align="right" nowrap>[% 'Quantity' | $T8 %]</th>
45    <td>
46     [% L.input_tag('qty', LxERP.format_amount(FORM.qty), size=10) %]
47 [%- IF SELF.part.unit %]
48     [% L.select_tag('unit_id', SELF.part.available_units, title_key='name', default=SELF.unit.id) %]
49 [%- ELSE %]
50     [% L.select_tag('unit_id', SELF.units, title_key='name') %]
51 [%- END %]
52    </td>
53   </tr>
54
55   <tr>
56    <td>[% 'Select type of transfer in' | $T8 %]:</td>
57    <td>[% L.select_tag('transfer_type_id', TRANSFER_TYPES, title_key='description') %] </td>
58   </tr>
59
60   <tr>
61    <th align="right" nowrap>[% 'Optional comment' | $T8 %]</th>
62    <td>[% L.input_tag('comment', FORM.comment, size=60) %]</td>
63   </tr>
64  </table>
65 </form>
66
67 <div id='stock'>
68   [%- PROCESS 'inventory/_stock.html' %]
69 </div>
70 <div id='journal'>
71  [%- PROCESS 'inventory/_journal.html' journal=SELF.mini_journal %]
72 </div>
73
74 <script type='text/javascript'>
75 function reload_warehouse_selection () {
76   $.post("controller.pl", { action: 'Inventory/part_changed', part_id: function(){ return $('#part_id').val() } }, kivi.eval_json_result);
77   $.post("controller.pl", { action: 'Inventory/mini_stock', part_id: function(){ return $('#part_id').val() } }, kivi.eval_json_result);
78 }
79 function reload_bin_selection () {
80   $.post("controller.pl", { action: 'Inventory/warehouse_changed', warehouse_id: function(){ return $('#warehouse_id').val() } }, kivi.eval_json_result);
81 }
82 function check_part_selection_before_stocking() {
83   if ($('#part_id').val() !== '')
84     return true;
85
86   alert(kivi.t8('No article has been selected yet.'));
87   return false;
88 }
89 $(function(){
90   $('#part_id').change(reload_warehouse_selection);
91   $('#warehouse_id').change(reload_bin_selection);
92 })
93 </script>