fix: amount precision for Tax Exemption Proof Submission
diff --git a/erpnext/payroll/doctype/employee_tax_exemption_proof_submission/employee_tax_exemption_proof_submission.py b/erpnext/payroll/doctype/employee_tax_exemption_proof_submission/employee_tax_exemption_proof_submission.py
index c52efab..b3b66b9 100644
--- a/erpnext/payroll/doctype/employee_tax_exemption_proof_submission/employee_tax_exemption_proof_submission.py
+++ b/erpnext/payroll/doctype/employee_tax_exemption_proof_submission/employee_tax_exemption_proof_submission.py
@@ -31,7 +31,9 @@
self.total_actual_amount += flt(d.amount)
def set_total_exemption_amount(self):
- self.exemption_amount = get_total_exemption_amount(self.tax_exemption_proofs)
+ self.exemption_amount = flt(
+ get_total_exemption_amount(self.tax_exemption_proofs), self.precision("exemption_amount")
+ )
def calculate_hra_exemption(self):
self.monthly_hra_exemption, self.monthly_house_rent, self.total_eligible_hra_exemption = 0, 0, 0
@@ -39,6 +41,13 @@
hra_exemption = calculate_hra_exemption_for_period(self)
if hra_exemption:
self.exemption_amount += hra_exemption["total_eligible_hra_exemption"]
- self.monthly_hra_exemption = hra_exemption["monthly_exemption"]
- self.monthly_house_rent = hra_exemption["monthly_house_rent"]
- self.total_eligible_hra_exemption = hra_exemption["total_eligible_hra_exemption"]
+ self.exemption_amount = flt(self.exemption_amount, self.precision("exemption_amount"))
+ self.monthly_hra_exemption = flt(
+ hra_exemption["monthly_exemption"], self.precision("monthly_hra_exemption")
+ )
+ self.monthly_house_rent = flt(
+ hra_exemption["monthly_house_rent"], self.precision("monthly_house_rent")
+ )
+ self.total_eligible_hra_exemption = flt(
+ hra_exemption["total_eligible_hra_exemption"], self.precision("total_eligible_hra_exemption")
+ )