mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-14 23:18:40 +00:00
fix: map stock_qty in apply_price_list_on_item (#56869)
This commit is contained in:
committed by
GitHub
parent
0264202b42
commit
199eeff22c
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user