From 4a5d681c77f2a4c61538146318daffc3562e83ab Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sun, 3 Jul 2022 11:02:21 +0530 Subject: [PATCH] chore: use get instead of . operator (cherry picked from commit e54ec4b9b6280bf1d12ebd3f0fc8c704551f9652) --- erpnext/controllers/taxes_and_totals.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 4801315c977..589c75783fe 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -597,7 +597,9 @@ class calculate_taxes_and_totals(object): if not self.doc.apply_discount_on: frappe.throw(_("Please select Apply Discount On")) - if self.doc.apply_discount_on == "Grand Total" and self.doc.is_cash_or_non_trade_discount: + if self.doc.apply_discount_on == "Grand Total" and self.doc.get( + "is_cash_or_non_trade_discount" + ): self.discount_amount_applied = True return