diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index ebbe3d9d27..8e1510a836 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -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()