mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-13 14:41:53 +00:00
Co-authored-by: Vishnu Priya Baskaran <145791817+ervishnucs@users.noreply.github.com>
This commit is contained in:
@@ -1615,6 +1615,12 @@ def apply_price_list(ctx, as_doc=False, doc=None):
|
|||||||
def apply_price_list_on_item(ctx, doc=None):
|
def apply_price_list_on_item(ctx, doc=None):
|
||||||
item_doc = frappe.get_cached_doc("Item", ctx.item_code)
|
item_doc = frappe.get_cached_doc("Item", ctx.item_code)
|
||||||
item_details = get_price_list_rate(ctx, item_doc)
|
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))
|
item_details.update(get_pricing_rule_for_item(ctx, doc=doc))
|
||||||
|
|
||||||
return item_details
|
return item_details
|
||||||
|
|||||||
Reference in New Issue
Block a user