From c2acfc982850d00700c620f16f325638814d6e19 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 27 May 2015 12:00:47 +0530 Subject: [PATCH] [fix] clear barcode from table, fixes #3320 --- erpnext/selling/sales_common.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index 1e4ec7fa45..3ef85257f3 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -125,6 +125,11 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ }, barcode: function(doc, cdt, cdn) { + var d = locals[cdt][cdn]; + if(d.barcode=="" || d.barcode==null) { + // barcode cleared, remove item + d.item_code = ""; + } this.item_code(doc, cdt, cdn); },