From 70aaff46be966c6cee2dfac366680872a35765e3 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 29 Aug 2017 19:17:02 +0530 Subject: [PATCH] minor fix in item group search --- erpnext/selling/page/point_of_sale/point_of_sale.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js index b523a4952cb..c4bd59076b8 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -824,8 +824,10 @@ class POSItems { options: 'Item Group', default: 'All Item Groups', onchange: () => { - console.log("in the item_group") - this.filter_items({ item_group: this.item_group_field.get_value() }) + const 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'), @@ -879,7 +881,7 @@ class POSItems { this.render_items(items); return; } - } else { + } else if (item_group == "All Item Groups") { return this.render_items(this.all_items); }