Merge pull request #18293 from nabinhait/taxes-calc-only-if-items-dev

fix: Calculate taxes and totals only if items added in transaction
This commit is contained in:
Deepesh Garg 2019-07-12 23:03:12 +05:30 committed by GitHub
commit 74e0f2cbae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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()