@@ -746,6 +746,7 @@ def compute_income_tax_breakup(self):
746746
747747 self .standard_tax_exemption_amount = 0
748748 self .tax_exemption_declaration = 0
749+ self .deductions_before_tax_calculation = 0
749750
750751 self .non_taxable_earnings = self .compute_non_taxable_earnings ()
751752
@@ -755,12 +756,12 @@ def compute_income_tax_breakup(self):
755756
756757 self .total_earnings = self .ctc + self .income_from_other_sources
757758
758- self .deductions_before_tax_calculation = self .compute_annual_deductions_before_tax_calculation ()
759-
760759 if hasattr (self , "tax_slab" ):
761- self .standard_tax_exemption_amount = (
762- self .tax_slab .standard_tax_exemption_amount if self .tax_slab .allow_tax_exemption else 0.0
763- )
760+ if self .tax_slab .allow_tax_exemption :
761+ self .standard_tax_exemption_amount = self .tax_slab .standard_tax_exemption_amount
762+ self .deductions_before_tax_calculation = (
763+ self .compute_annual_deductions_before_tax_calculation ()
764+ )
764765
765766 self .tax_exemption_declaration = (
766767 self .get_total_exemption_amount () - self .standard_tax_exemption_amount
@@ -1597,6 +1598,7 @@ def get_total_exemption_amount(self):
15971598 if declaration :
15981599 total_exemption_amount = declaration
15991600
1601+ if self .tax_slab .standard_tax_exemption_amount :
16001602 total_exemption_amount += flt (self .tax_slab .standard_tax_exemption_amount )
16011603
16021604 return total_exemption_amount
0 commit comments