Correction of the get_price method for pricing rules (#15082)
* Addition of currency arg in get_price * Change Price to Rate
This commit is contained in:
parent
ef961746c1
commit
614959d5f8
@ -87,14 +87,15 @@ def get_price(item_code, price_list, customer_group, company, qty=1):
|
||||
"customer_group": customer_group,
|
||||
"company": company,
|
||||
"conversion_rate": 1,
|
||||
"for_shopping_cart": True
|
||||
"for_shopping_cart": True,
|
||||
"currency": frappe.db.get_value("Price List", price_list, "currency")
|
||||
}))
|
||||
|
||||
if pricing_rule:
|
||||
if pricing_rule.pricing_rule_for == "Discount Percentage":
|
||||
price[0].price_list_rate = flt(price[0].price_list_rate * (1.0 - (flt(pricing_rule.discount_percentage) / 100.0)))
|
||||
|
||||
if pricing_rule.pricing_rule_for == "Price":
|
||||
if pricing_rule.pricing_rule_for == "Rate":
|
||||
price[0].price_list_rate = pricing_rule.price_list_rate
|
||||
|
||||
price_obj = price[0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user