chore: use get instead of . operator
diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py
index a3a054c..0d8cffe 100644
--- a/erpnext/controllers/taxes_and_totals.py
+++ b/erpnext/controllers/taxes_and_totals.py
@@ -597,7 +597,9 @@
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