Bug fix for "receive items" form (#4563)

* Bug fix for "receive items" form

* Fix for table filters
This commit is contained in:
Oliver 2023-04-03 17:00:48 +10:00 committed by GitHub
parent b69364fe17
commit b0668b72b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -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;
}
}

View File

@ -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,
});
}