From 414c0ab3bbefbf7f9e48025222078aeb4a74c6b0 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 17 Mar 2017 17:19:17 +0530 Subject: [PATCH] [fix] Quantity is not copying in the Received Qty during making of debit note --- erpnext/buying/doctype/purchase_common/purchase_common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js index 47cdefc581..6074cc690a 100644 --- a/erpnext/buying/doctype/purchase_common/purchase_common.js +++ b/erpnext/buying/doctype/purchase_common/purchase_common.js @@ -139,7 +139,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({ qty: function(doc, cdt, cdn) { var item = frappe.get_doc(cdt, cdn); - if ((doc.doctype == "Purchase Receipt") || (doc.doctype == "Purchase Invoice" && doc.update_stock)) { + if ((doc.doctype == "Purchase Receipt") || (doc.doctype == "Purchase Invoice" && (doc.update_stock || doc.is_return))) { frappe.model.round_floats_in(item, ["qty", "received_qty"]); if(!item.rejected_qty && item.qty) { item.received_qty = item.qty;