From d05a8737f994add63647466ea27e5a38af2d982c Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 8 Mar 2017 10:30:23 +0530 Subject: [PATCH] [Fix] Purchase return issue --- 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 5d74760392..47cdefc581 100644 --- a/erpnext/buying/doctype/purchase_common/purchase_common.js +++ b/erpnext/buying/doctype/purchase_common/purchase_common.js @@ -141,7 +141,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({ var item = frappe.get_doc(cdt, cdn); if ((doc.doctype == "Purchase Receipt") || (doc.doctype == "Purchase Invoice" && doc.update_stock)) { frappe.model.round_floats_in(item, ["qty", "received_qty"]); - if(!(item.received_qty || item.rejected_qty) && item.qty) { + if(!item.rejected_qty && item.qty) { item.received_qty = item.qty; }