From 2770ca1b659a3217e249b60155434052d0a62730 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 21 Dec 2023 18:49:36 +0530 Subject: [PATCH] fix: reset the incoming rate on changing of the warehouse (#38909) --- erpnext/selling/sales_common.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index 3470aee8d8c..b2a64a5d461 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -200,6 +200,10 @@ erpnext.selling.SellingController = class SellingController extends erpnext.Tran item.serial_no = null; } + if (doc.docstatus === 0 && doc.is_return && !doc.return_against) { + item.incoming_rate = 0.0; + } + var has_batch_no; frappe.db.get_value('Item', {'item_code': item.item_code}, 'has_batch_no', (r) => { has_batch_no = r && r.has_batch_no;