Revision fedfc383
Von Moritz Bunkus vor etwa 7 Jahren hinzugefügt
templates/webpages/inventory/warehouse_selection_stock.html | ||
---|---|---|
7 | 7 |
|
8 | 8 |
[%- INCLUDE 'common/flash.html' %] |
9 | 9 |
|
10 |
<form name="Form" method="post" action="controller.pl"> |
|
10 |
<form name="Form" method="post" action="controller.pl" id="form">
|
|
11 | 11 |
|
12 | 12 |
<table> |
13 | 13 |
<tr> |
... | ... | |
66 | 66 |
<td>[% L.input_tag('comment', FORM.comment, size=60) %]</td> |
67 | 67 |
</tr> |
68 | 68 |
</table> |
69 |
|
|
70 |
<input type="hidden" name="action" value="Inventory/dispatch"> |
|
71 |
<input type="submit" id='action_stock' class="submit" name="action_stock" value="[% 'Stock' | $T8 %]" [% IF !SELF.part.id %]disabled[% END %]> |
|
72 | 69 |
</form> |
73 | 70 |
|
74 | 71 |
<div id='stock'> |
... | ... | |
86 | 83 |
function reload_bin_selection () { |
87 | 84 |
$.post("controller.pl", { action: 'Inventory/warehouse_changed', warehouse_id: function(){ return $('#warehouse_id').val() } }, kivi.eval_json_result); |
88 | 85 |
} |
86 |
function check_part_selection_before_stocking() { |
|
87 |
if ($('#part_id').val() !== '') |
|
88 |
return true; |
|
89 |
|
|
90 |
alert(kivi.t8('No article has been selected yet.')); |
|
91 |
return false; |
|
92 |
} |
|
89 | 93 |
$(function(){ |
90 | 94 |
$('#part_id').change(reload_warehouse_selection); |
91 |
$('#part_id').change(function(){ |
|
92 |
if ($('#part_id').val() > 0) |
|
93 |
$('#action_stock').removeAttr('disabled'); |
|
94 |
else |
|
95 |
$('#action_stock').attr('disabled', 'disabled'); |
|
96 |
}); |
|
97 | 95 |
$('#warehouse_id').change(reload_bin_selection); |
98 | 96 |
}) |
99 | 97 |
</script> |
Auch abrufbar als: Unified diff
ActionBar: Verwendung bei Lager → Einlagern, Lager → Berichte → Lagerentnahme