Revision ba0c9f34
Von Jan Büren vor mehr als 11 Jahren hinzugefügt
templates/webpages/do/stock_in_form.html | ||
---|---|---|
29 | 29 |
} |
30 | 30 |
|
31 | 31 |
$(function(){ |
32 |
var bin_id_index = 0; |
|
33 |
var warehouse_id_index = 0; |
|
32 | 34 |
[%- USE STOCK_INFO_it = Iterator(STOCK_INFO) %][%- FOREACH si = STOCK_INFO_it %] |
33 | 35 |
// new si for wh [% si.warehouse_id %] bin [% si.bin_id %] |
34 | 36 |
[%- SET warehouse_selected = '0' %] |
35 | 37 |
[%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH wh = WAREHOUSES_it %] |
36 | 38 |
// wh [% wh.id %] |
39 |
[% IF HTML.escape(PART_INFO.warehouse_id) == wh.id %] |
|
40 |
warehouse_id_index = [% WAREHOUSES_it.count - 1%]; |
|
41 |
[% END %] |
|
37 | 42 |
[%- USE BINS_it = Iterator(wh.BINS) %][%- FOREACH bin = BINS_it %] |
38 | 43 |
// bin [% bin.id %] |
44 |
[% IF HTML.escape(PART_INFO.bin_id) == bin.id %] |
|
45 |
bin_id_index = [% BINS_it.count - 1%]; |
|
46 |
[% END %] |
|
39 | 47 |
[%- IF bin.id == si.bin_id %] |
40 | 48 |
warehouse_selected([% STOCK_INFO_it.count %], [% WAREHOUSES_it.count - 1 %], [% BINS_it.count - 1%]); |
41 | 49 |
[%- SET warehouse_selected = '1' %] |
... | ... | |
43 | 51 |
[%- END %] |
44 | 52 |
[%- END %] |
45 | 53 |
[%- UNLESS warehouse_selected %] |
46 |
warehouse_selected([% STOCK_INFO_it.count %], 0);
|
|
54 |
warehouse_selected([% STOCK_INFO_it.count %], warehouse_id_index, bin_id_index);
|
|
47 | 55 |
[%- END %] |
48 | 56 |
[%- END %] |
49 | 57 |
}); |
... | ... | |
120 | 128 |
<td> |
121 | 129 |
<select name="warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)"> |
122 | 130 |
[%- FOREACH wh = WAREHOUSES %] |
123 |
<option value="[% HTML.escape(wh.id) %]"[% IF wh.id == row.warehouse_id %] selected[% END %]>[% HTML.escape(wh.description) %]</option>
|
|
131 |
<option value="[% HTML.escape(wh.id) %]"[% IF wh.id == row.warehouse_id %] selected[% END %] [% IF wh.id == PART_INFO.warehouse_id %] selected[% END %]>[% HTML.escape(wh.description) %]</option>
|
|
124 | 132 |
[%- END %] |
125 | 133 |
</select> |
126 | 134 |
</td> |
Auch abrufbar als: Unified diff
Standardlager und Lagerplatz entsprechende Vorauswahl beim Einkaufslieferschein