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)),