Merge pull request #18576 from deepeshgarg007/taxes_and_totals_v12
fix: Error handling in taxes and totals
This commit is contained in:
commit
6f39db6a18
@ -82,7 +82,7 @@ class calculate_taxes_and_totals(object):
|
|||||||
|
|
||||||
item.net_rate = item.rate
|
item.net_rate = item.rate
|
||||||
|
|
||||||
if not item.qty and self.doc.is_return:
|
if not item.qty and self.doc.get("is_return"):
|
||||||
item.amount = flt(-1 * item.rate, item.precision("amount"))
|
item.amount = flt(-1 * item.rate, item.precision("amount"))
|
||||||
else:
|
else:
|
||||||
item.amount = flt(item.rate * item.qty, item.precision("amount"))
|
item.amount = flt(item.rate * item.qty, item.precision("amount"))
|
||||||
|
Loading…
Reference in New Issue
Block a user