diff --git a/InvenTree/templates/js/translated/filters.js b/InvenTree/templates/js/translated/filters.js index 31a121fcb9..a889902543 100644 --- a/InvenTree/templates/js/translated/filters.js +++ b/InvenTree/templates/js/translated/filters.js @@ -250,8 +250,8 @@ function generateFilterInput(tableKey, filterKey) { options = options(); } for (var key in options) { - var option = options[key]; - html += ``; + let option = options[key]; + html += ``; } html += ``; @@ -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; } } diff --git a/InvenTree/templates/js/translated/purchase_order.js b/InvenTree/templates/js/translated/purchase_order.js index 4f7ae30d2a..cbea3fe245 100644 --- a/InvenTree/templates/js/translated/purchase_order.js +++ b/InvenTree/templates/js/translated/purchase_order.js @@ -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, }); }