[Fix] Currency field in Pricing rule (#14004)
* some minor changes * Set query for price list based on currency * Validate Price list with currency
This commit is contained in:
committed by
Rushabh Mehta
parent
557f40465b
commit
1906cadd94
@@ -518,10 +518,8 @@ class calculate_taxes_and_totals(object):
|
||||
if item.pricing_rule and not self.doc.ignore_pricing_rule:
|
||||
pricing_rule = frappe.get_doc('Pricing Rule', item.pricing_rule)
|
||||
|
||||
if pricing_rule.margin_type == 'Amount' and pricing_rule.currency == self.doc.currency:
|
||||
item.margin_type = pricing_rule.margin_type
|
||||
item.margin_rate_or_amount = pricing_rule.margin_rate_or_amount
|
||||
elif pricing_rule.margin_type == 'Percentage':
|
||||
if (pricing_rule.margin_type == 'Amount' and pricing_rule.currency == self.doc.currency)\
|
||||
or (pricing_rule.margin_type == 'Percentage'):
|
||||
item.margin_type = pricing_rule.margin_type
|
||||
item.margin_rate_or_amount = pricing_rule.margin_rate_or_amount
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user