From 199eeff22c3301040806edcec35344d7c575ba31 Mon Sep 17 00:00:00 2001 From: Vishnu Priya Baskaran <145791817+ervishnucs@users.noreply.github.com> Date: Sat, 11 Jul 2026 15:03:49 +0530 Subject: [PATCH] fix: map stock_qty in apply_price_list_on_item (#56869) --- erpnext/stock/get_item_details.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index a58c1b037ef..2ed89e5d640 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -1653,6 +1653,12 @@ def apply_price_list(ctx: ItemDetailsCtx, as_doc: bool = False, doc: Document | def apply_price_list_on_item(ctx, doc=None): item_doc = frappe.get_cached_doc("Item", ctx.item_code) item_details = get_price_list_rate(ctx, item_doc) + + ctx.conversion_factor = flt(ctx.conversion_factor) or get_conversion_factor(ctx.item_code, ctx.uom).get( + "conversion_factor", 1 + ) + ctx.stock_qty = flt(ctx.qty) * flt(ctx.conversion_factor) + item_details.update(get_pricing_rule_for_item(ctx, doc=doc)) return item_details