fix: map stock_qty in apply_price_list_on_item (backport #56869) (#57052)

Co-authored-by: Vishnu Priya Baskaran <145791817+ervishnucs@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2026-07-11 15:26:36 +05:30
committed by GitHub
parent 8eb92b8b18
commit 240fb2c4b8

View File

@@ -1615,6 +1615,12 @@ def apply_price_list(ctx, as_doc=False, doc=None):
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