revert: "fix: ignore circular dependencies on barcode scan"
This reverts commit 98468fab18e08de440f2f6731759d221fe08c416.
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index 23c2bd4..6196392 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -404,13 +404,11 @@
}
barcode(doc, cdt, cdn) {
- const d = locals[cdt][cdn];
- if (!d.barcode) {
+ var d = locals[cdt][cdn];
+ if(d.barcode=="" || d.barcode==null) {
// barcode cleared, remove item
d.item_code = "";
}
- // flag required for circular triggers
- d._triggerd_from_barcode = true;
this.item_code(doc, cdt, cdn);
}
@@ -431,9 +429,7 @@
this.frm.doc.doctype === 'Delivery Note') {
show_batch_dialog = 1;
}
- if (!item._triggerd_from_barcode) {
- item.barcode = null;
- }
+ item.barcode = null;
if(item.item_code || item.barcode || item.serial_no) {