Merge pull request #48507 from frappe/mergify/bp/version-15-hotfix/pr-48506

fix: pos adding item multiple times on applying item group filter (backport #48506)
This commit is contained in:
Diptanil Saha
2025-07-10 12:42:00 +05:30
committed by GitHub

View File

@@ -345,7 +345,10 @@ erpnext.PointOfSale.ItemSelector = class {
const items = this.search_index[selling_price_list][search_term];
this.items = items;
this.render_item_list(items);
this.auto_add_item && this.items.length == 1 && this.add_filtered_item_to_cart();
this.auto_add_item &&
this.search_field.$input[0].value &&
this.items.length == 1 &&
this.add_filtered_item_to_cart();
return;
}
}
@@ -358,7 +361,10 @@ erpnext.PointOfSale.ItemSelector = class {
}
this.items = items;
this.render_item_list(items);
this.auto_add_item && this.items.length == 1 && this.add_filtered_item_to_cart();
this.auto_add_item &&
this.search_field.$input[0].value &&
this.items.length == 1 &&
this.add_filtered_item_to_cart();
});
}