fix: test cases
diff --git a/erpnext/hr/doctype/employee_tax_exemption_declaration/employee_tax_exemption_declaration.py b/erpnext/hr/doctype/employee_tax_exemption_declaration/employee_tax_exemption_declaration.py
index 99ad18f..cbdfcf8 100644
--- a/erpnext/hr/doctype/employee_tax_exemption_declaration/employee_tax_exemption_declaration.py
+++ b/erpnext/hr/doctype/employee_tax_exemption_declaration/employee_tax_exemption_declaration.py
@@ -21,12 +21,13 @@
 		self.calculate_hra_exemption()
 
 	def validate_duplicate(self):
-		duplicate = frappe.db.exists({
-			"doctype": "Employee Tax Exemption Declaration",
-			"employee": self.employee,
-			"payroll_period": self.payroll_period,
-			"name": ["!=", self.name]
-		})
+		duplicate = frappe.db.get_value("Employee Tax Exemption Declaration",
+			filters = {
+				"employee": self.employee,
+				"payroll_period": self.payroll_period,
+				"name": ["!=", self.name]
+			}
+		)
 		if duplicate:
 			frappe.throw(_("Duplicate Tax Declaration of {0} for period {1}")
 				.format(self.employee, self.payroll_period), DuplicateDeclarationError)
diff --git a/erpnext/hr/doctype/employee_tax_exemption_proof_submission/employee_tax_exemption_proof_submission.py b/erpnext/hr/doctype/employee_tax_exemption_proof_submission/employee_tax_exemption_proof_submission.py
index 5299cac..ca46ee9 100644
--- a/erpnext/hr/doctype/employee_tax_exemption_proof_submission/employee_tax_exemption_proof_submission.py
+++ b/erpnext/hr/doctype/employee_tax_exemption_proof_submission/employee_tax_exemption_proof_submission.py
@@ -25,7 +25,8 @@
 		self.exemption_amount = get_total_exemption_amount(self.tax_exemption_proofs)
 
 	def calculate_hra_exemption(self):
-		if self.house_rent_payment_amount:
+		self.monthly_hra_exemption, self.monthly_house_rent, self.total_eligible_hra_exemption = 0, 0, 0
+		if self.get("house_rent_payment_amount"):
 			hra_exemption = calculate_hra_exemption_for_period(self)
 			if hra_exemption:
 				self.exemption_amount += hra_exemption["total_eligible_hra_exemption"]