fix: Error handling in taxes and totals
This commit is contained in:
parent
2f1633bf41
commit
8bf19ce81a
@ -82,7 +82,7 @@ class calculate_taxes_and_totals(object):
|
||||
|
||||
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"))
|
||||
else:
|
||||
item.amount = flt(item.rate * item.qty, item.precision("amount"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user