[Fix] Incorrect tax amount calculation because of same fieldname in the code
This commit is contained in:
parent
26bfede116
commit
15f52e7b71
@ -223,13 +223,13 @@ def get_tax_accounts(item_list, columns, company_currency,
|
|||||||
item_tax_amount = flt((tax_amount * d.base_net_amount) / item_net_amount) \
|
item_tax_amount = flt((tax_amount * d.base_net_amount) / item_net_amount) \
|
||||||
if item_net_amount else 0
|
if item_net_amount else 0
|
||||||
if item_tax_amount:
|
if item_tax_amount:
|
||||||
tax_amount = flt(item_tax_amount, tax_amount_precision)
|
tax_value = flt(item_tax_amount, tax_amount_precision)
|
||||||
tax_amount = (tax_amount * -1
|
tax_value = (tax_value * -1
|
||||||
if (doctype == 'Purchase Invoice' and name in deducted_tax) else tax_amount)
|
if (doctype == 'Purchase Invoice' and name in deducted_tax) else tax_value)
|
||||||
|
|
||||||
itemised_tax.setdefault(d.name, {})[description] = frappe._dict({
|
itemised_tax.setdefault(d.name, {})[description] = frappe._dict({
|
||||||
"tax_rate": tax_rate,
|
"tax_rate": tax_rate,
|
||||||
"tax_amount": tax_amount
|
"tax_amount": tax_value
|
||||||
})
|
})
|
||||||
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user