From 9ae5c979e894c791087579fdd00aa2cdb6e1e34f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 14:43:46 +0530 Subject: [PATCH] fix: Identical items are added line by line instead of grouped together in POS (#37986) fix: Identical items are added line by line instead of grouped together in POS (#37986) fix: Identical items are added line by line instead of grouped together in POS (#37986) (cherry picked from commit 011cf3d73e2f4dd98c4b33c502ca34665e067c57) Co-authored-by: bVisible --- erpnext/selling/page/point_of_sale/pos_controller.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index 9bba4ebf50..feecd9cfd8 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -609,11 +609,12 @@ erpnext.PointOfSale.Controller = class { // if item is clicked twice from item selector // then "item_code, batch_no, uom, rate" will help in getting the exact item // to increase the qty by one - const has_batch_no = batch_no; + const has_batch_no = (batch_no !== 'null' && batch_no !== null); item_row = this.frm.doc.items.find( i => i.item_code === item_code && (!has_batch_no || (has_batch_no && i.batch_no === batch_no)) && (i.uom === uom) + && (i.rate === flt(rate)) ); }