7 <h1>[% title | html %]</h1>
9 [%- INCLUDE 'common/flash.html' %]
11 <form name="Form" method="post" action="controller.pl" id="form">
15 <th align="right" nowrap>[% 'Part' | $T8 %]</th>
16 <td>[% P.part.picker('part_id', SELF.part) %]</td>
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') %]
25 <span id='bin_id'></span>
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>
32 <th align="right" nowrap>[% 'Charge number' | $T8 %]</th>
33 <td>[% L.input_tag('chargenumber', FORM.chargenumber, size=30) %]</td>
36 [% IF INSTANCE_CONF.get_show_bestbefore %]
38 <th align="right" nowrap>[% 'Best Before' | $T8 %]</th>
39 <td>[% L.date_tag('bestbefore', FORM.bestbefore) %]</td>
44 <th align="right" nowrap>[% 'Quantity' | $T8 %]</th>
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) %]
50 [% L.select_tag('unit_id', SELF.units, title_key='name') %]
56 <td>[% 'Select type of transfer in' | $T8 %]:</td>
57 <td>[% L.select_tag('transfer_type_id', TRANSFER_TYPES, title_key='description') %] </td>
61 <th align="right" nowrap>[% 'Optional comment' | $T8 %]</th>
62 <td>[% L.input_tag('comment', FORM.comment, size=60) %]</td>
68 [%- PROCESS 'inventory/_stock.html' %]
71 [%- PROCESS 'inventory/_journal.html' journal=SELF.mini_journal %]
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);
79 function reload_bin_selection () {
80 $.post("controller.pl", { action: 'Inventory/warehouse_changed', warehouse_id: function(){ return $('#warehouse_id').val() } }, kivi.eval_json_result);
82 function check_part_selection_before_stocking() {
83 if ($('#part_id').val() !== '')
86 alert(kivi.t8('No article has been selected yet.'));
90 $('#part_id').change(reload_warehouse_selection);
91 $('#warehouse_id').change(reload_bin_selection);