Merge pull request #3025 from sbktechnology/v4.x.x
some fix in batch related cleanup
diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js
index c0f3507..117232d 100644
--- a/erpnext/selling/sales_common.js
+++ b/erpnext/selling/sales_common.js
@@ -505,7 +505,7 @@
var me = this;
var item = frappe.get_doc(cdt, cdn);
- if(doc.warehouse && doc.item_code && doc.batch_no) {
+ if(item.warehouse && item.item_code && item.batch_no) {
return this.frm.call({
method: "erpnext.stock.get_item_details.get_batch_qty",
child: item,