From b7611699764e799dece22eadcbca71a0a665ea62 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Sat, 3 Aug 2019 13:40:37 +0530 Subject: [PATCH] fix: Error handling in taxes and totals --- erpnext/controllers/taxes_and_totals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 34677ebc3e3..f925f94e8d8 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -77,7 +77,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"))