mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-15 18:01:41 +00:00
fix: fetch/change tax template on basis of base_net_rate instead of net_rate (#39448)
fix: change tax template on basis of base_net_rate instead of net_rate Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
@@ -543,7 +543,7 @@ def get_item_tax_info(company, tax_category, item_codes, item_rates=None, item_t
|
||||
args = {
|
||||
"company": company,
|
||||
"tax_category": tax_category,
|
||||
"net_rate": item_rates.get(item_code[1]),
|
||||
"base_net_rate": item_rates.get(item_code[1]),
|
||||
}
|
||||
|
||||
if item_tax_templates:
|
||||
@@ -635,7 +635,7 @@ def is_within_valid_range(args, tax):
|
||||
if not flt(tax.maximum_net_rate):
|
||||
# No range specified, just ignore
|
||||
return True
|
||||
elif flt(tax.minimum_net_rate) <= flt(args.get("net_rate")) <= flt(tax.maximum_net_rate):
|
||||
elif flt(tax.minimum_net_rate) <= flt(args.get("base_net_rate")) <= flt(tax.maximum_net_rate):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user