codacy fixes
diff --git a/erpnext/hr/doctype/employee_tax_exemption_declaration/employee_tax_exemption_declaration.js b/erpnext/hr/doctype/employee_tax_exemption_declaration/employee_tax_exemption_declaration.js
index 130d202..72ce7a5 100644
--- a/erpnext/hr/doctype/employee_tax_exemption_declaration/employee_tax_exemption_declaration.js
+++ b/erpnext/hr/doctype/employee_tax_exemption_declaration/employee_tax_exemption_declaration.js
@@ -71,13 +71,15 @@
 			method: "calculate_hra_exemption",
 			doc: frm.doc,
 			callback: function(r) {
-				frm.refresh_fields();
+				if (!r.exc){
+					frm.refresh_fields();
+				}
 			}
 		});
 	},
 	set_null_value(frm){
 		let fields = ['salary_structure_hra', 'monthly_house_rent','annual_hra', 'monthly_hra',
-		'total_exemption_amount', 'payroll_period'];
+			'total_exemption_amount', 'payroll_period'];
 		fields.forEach(function(field) {
 			frm.set_value(field, '');
 		});
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 9bdba4a..a9b1e33 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
@@ -6,7 +6,6 @@
 import frappe
 from frappe.model.document import Document
 from frappe import _
-from frappe.utils import getdate
 from erpnext.hr.utils import validate_tax_declaration, calculate_eligible_hra_exemption
 
 class EmployeeTaxExemptionDeclaration(Document):
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 2be09ae..503cfe0 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
@@ -6,7 +6,7 @@
 import frappe
 from frappe.model.document import Document
 from frappe import _
-from frappe.utils import date_diff, flt, getdate, get_first_day, get_last_day
+from frappe.utils import date_diff, flt
 from erpnext.hr.utils import validate_tax_declaration, calculate_eligible_hra_exemption
 
 class EmployeeTaxExemptionProofSubmission(Document):