commit | b315acb5a7b4c77f7ff5ca677d2c3c6854e13abe | [log] [tgz] |
---|---|---|
author | Nabin Hait <nabinhait@gmail.com> | Fri Jul 12 14:27:19 2019 +0530 |
committer | Nabin Hait <nabinhait@gmail.com> | Fri Jul 12 14:32:53 2019 +0530 |
tree | f5ca55985e0f0f2226cf0f8dc79d8545b21cd118 | |
parent | bc2ff785f14b144d531568abb0cdac6c594ff4c7 [diff] |
fix: Calculate taxes and totals only if items added in transaction
diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index ebbe3d9..8e1510a 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py
@@ -15,6 +15,9 @@ self.calculate() def calculate(self): + if not len(self.doc.get("items")): + return + self.discount_amount_applied = False self._calculate()