minor fix in item group search

This commit is contained in:
Rohit Waghchaure 2017-08-29 19:17:02 +05:30
parent c70bbacd34
commit 70aaff46be

View File

@ -824,8 +824,10 @@ class POSItems {
options: 'Item Group', options: 'Item Group',
default: 'All Item Groups', default: 'All Item Groups',
onchange: () => { onchange: () => {
console.log("in the item_group") const item_group = this.item_group_field.get_value()
this.filter_items({ item_group: this.item_group_field.get_value() }) if (item_group) {
this.filter_items({ item_group: item_group })
}
}, },
}, },
parent: this.wrapper.find('.item-group-field'), parent: this.wrapper.find('.item-group-field'),
@ -879,7 +881,7 @@ class POSItems {
this.render_items(items); this.render_items(items);
return; return;
} }
} else { } else if (item_group == "All Item Groups") {
return this.render_items(this.all_items); return this.render_items(this.all_items);
} }