fix: Calculate taxes and totals only if items added in transaction

This commit is contained in:
Nabin Hait
2019-07-12 14:27:19 +05:30
parent 35fe0a6cbd
commit f01baaa56f

View File

@@ -15,6 +15,9 @@ class calculate_taxes_and_totals(object):
self.calculate()
def calculate(self):
if not len(self.doc.get("items")):
return
self.discount_amount_applied = False
self._calculate()