From 7b7987363f6e28ac2e5421ee1939a841fd38e6da Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 26 Apr 2024 12:20:08 +0530 Subject: [PATCH] fix: basic rate for SABB (cherry picked from commit 7fa94843aadbd546a4d73d11491161f5b88955c8) --- erpnext/public/js/utils/sales_common.js | 1 + erpnext/stock/doctype/stock_entry/stock_entry.js | 1 + 2 files changed, 2 insertions(+) diff --git a/erpnext/public/js/utils/sales_common.js b/erpnext/public/js/utils/sales_common.js index 5bc4ffe1bff..0b482c3292f 100644 --- a/erpnext/public/js/utils/sales_common.js +++ b/erpnext/public/js/utils/sales_common.js @@ -373,6 +373,7 @@ erpnext.sales_common = { frappe.model.set_value(item.doctype, item.name, { serial_and_batch_bundle: r.name, use_serial_batch_fields: 0, + incoming_rate: r.avg_rate, qty: qty / flt( diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 9b929f9f1b8..fb63f1c23c6 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -1340,6 +1340,7 @@ erpnext.stock.select_batch_and_serial_no = (frm, item) => { frappe.model.set_value(item.doctype, item.name, { serial_and_batch_bundle: r.name, use_serial_batch_fields: 0, + basic_rate: r.avg_rate, qty: Math.abs(r.total_qty) / flt(item.conversion_factor || 1, precision("conversion_factor", item)),