mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Bug fix for "receive items" form (#4563)
* Bug fix for "receive items" form * Fix for table filters
This commit is contained in:
parent
b69364fe17
commit
b0668b72b7
@ -250,8 +250,8 @@ function generateFilterInput(tableKey, filterKey) {
|
||||
options = options();
|
||||
}
|
||||
for (var key in options) {
|
||||
var option = options[key];
|
||||
html += `<option value='${key}'>${option.value}</option>`;
|
||||
let option = options[key];
|
||||
html += `<option value='${option.key || key}'>${option.value}</option>`;
|
||||
}
|
||||
|
||||
html += `</select>`;
|
||||
@ -549,10 +549,11 @@ function getFilterOptionValue(tableKey, filterKey, valueKey) {
|
||||
filter.options = filter.options();
|
||||
}
|
||||
|
||||
for (var key in filter.options) {
|
||||
for (var name in filter.options) {
|
||||
let option = filter.options[name];
|
||||
|
||||
if (key == valueKey) {
|
||||
return filter.options[key].value;
|
||||
if (option.key == valueKey) {
|
||||
return option.value;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1084,7 +1084,7 @@ function receivePurchaseOrderItems(order_id, line_items, options={}) {
|
||||
|
||||
for (var key in stockCodes) {
|
||||
choices.push({
|
||||
value: key,
|
||||
value: stockCodes[key].key,
|
||||
display_name: stockCodes[key].value,
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user