[Fix] Website Conversion factor query (#15866)
* [Fix] Conversion factor query * Update product.py
This commit is contained in:
parent
9e9e37d39b
commit
7d9689cc92
@ -108,8 +108,8 @@ def get_price(item_code, price_list, customer_group, company, qty=1):
|
|||||||
|
|
||||||
uom_conversion_factor = frappe.db.sql("""select C.conversion_factor
|
uom_conversion_factor = frappe.db.sql("""select C.conversion_factor
|
||||||
from `tabUOM Conversion Detail` C
|
from `tabUOM Conversion Detail` C
|
||||||
inner join `tabItem` I on C.uom = I.sales_uom
|
inner join `tabItem` I on C.parent = I.name and C.uom = I.sales_uom
|
||||||
where C.parent = %s""", item_code)
|
where I.name = %s""", item_code)
|
||||||
|
|
||||||
uom_conversion_factor = uom_conversion_factor[0][0] if uom_conversion_factor else 1
|
uom_conversion_factor = uom_conversion_factor[0][0] if uom_conversion_factor else 1
|
||||||
price_obj["formatted_price_sales_uom"] = fmt_money(price_obj["price_list_rate"] * uom_conversion_factor, currency=price_obj["currency"])
|
price_obj["formatted_price_sales_uom"] = fmt_money(price_obj["price_list_rate"] * uom_conversion_factor, currency=price_obj["currency"])
|
||||||
|
Loading…
Reference in New Issue
Block a user