fix: map stock_qty in apply_price_list_on_item (#56869)

This commit is contained in:
Vishnu Priya Baskaran
2026-07-11 15:03:49 +05:30
committed by GitHub
parent 0264202b42
commit 199eeff22c

View File

@@ -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