public void MustCalculateNetPayableTaxWithAnnualSalaryOtherIncomesAndChapter6Investments()
        {
            var taxPayer = new User(50000, true, Gender.Female);

            TaxSlabs ts = TaxSlabs.GetInstance();
            AnnualSalary asal = new AnnualSalary
            {
                Basic = 810000.50,
                Hra = 1000,
                ProfessionalTax = 100,
                SpecialAllowance = 10
            };

            OtherIncomes otherIncomes = new OtherIncomes();
            otherIncomes.Add(new OtherIncomeItem("Income from Interest", 4000.0));
            otherIncomes.Add(new OtherIncomeItem("Income from House Rent", 8000.0));

            Chapter6Investments investments = new Chapter6Investments();
            investments.Add(new LifeInsurance(50000));
            investments.Add(new Elss(60000));

            TaxStatement stmt = new TaxStatement(asal, taxPayer);
            stmt.HousingLoanInterest = new HousingLoanInterest(10000);
            stmt.OtherIncomes = otherIncomes;
            stmt.Chapter6Investments = investments;

            Assert.AreEqual(120473,
                stmt.CalculateNetPayableTax(), 2);
        }
Beispiel #2
0
        public void MustCalculateNetPayableTaxWithAnnualSalaryOtherIncomesAndChapter6Investments()
        {
            var taxPayer = new User(50000, true, Gender.Female);


            TaxSlabs     ts   = TaxSlabs.GetInstance();
            AnnualSalary asal = new AnnualSalary
            {
                Basic            = 810000.50,
                Hra              = 1000,
                ProfessionalTax  = 100,
                SpecialAllowance = 10
            };

            OtherIncomes otherIncomes = new OtherIncomes();

            otherIncomes.Add(new OtherIncomeItem("Income from Interest", 4000.0));
            otherIncomes.Add(new OtherIncomeItem("Income from House Rent", 8000.0));

            Chapter6Investments investments = new Chapter6Investments();

            investments.Add(new LifeInsurance(50000));
            investments.Add(new Elss(60000));

            TaxStatement stmt = new TaxStatement(asal, taxPayer);

            stmt.HousingLoanInterest = new HousingLoanInterest(10000);
            stmt.OtherIncomes        = otherIncomes;
            stmt.Chapter6Investments = investments;

            Assert.AreEqual(120473,
                            stmt.CalculateNetPayableTax(), 2);
        }
        public void ShouldReturnCapValueAsDeductionIfLifeInsuranceAndElssInvestmentsExceedsTheCapAndOtherInvestmentAreZero()
        {
            var investments = new Chapter6Investments();
            investments.Add(new LifeInsurance(50000));
            investments.Add(new Elss(60000));

            var salary = new AnnualSalary {Epf = 0};
            TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = investments };
            Assert.AreEqual(Chapter6Investments.Cap, ts.GetChapter6Deductions(), 0.01);
        }
        public void ShouldReturnDeductionCapAsDeductionWhenTotalOfAllInvestmetIsAboveDeductionCap()
        {
            var investments = new Chapter6Investments();
            investments.Add(new LifeInsurance(50000));
            investments.Add(new Elss(30000));
            investments.Add(new PublicProvidentFund(10000));

            var salary = new AnnualSalary {Epf = 500000};
            TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = investments };
            Assert.AreEqual(Chapter6Investments.Cap, ts.GetChapter6Deductions(), 0.01);
        }
Beispiel #5
0
        ShouldReturnCapValueAsDeductionIfLifeInsuranceAndElssInvestmentsExceedsTheCapAndOtherInvestmentAreZero()
        {
            var investments = new Chapter6Investments();

            investments.Add(new LifeInsurance(50000));
            investments.Add(new Elss(60000));

            var salary = new AnnualSalary {
                Epf = 0
            };
            TaxStatement ts = new TaxStatement(salary, null)
            {
                Chapter6Investments = investments
            };

            Assert.AreEqual(Chapter6Investments.Cap, ts.GetChapter6Deductions(), 0.01);
        }
 public void ShouldReturnLifeInsuranceInvestmentAsDeductionIfNoOtherInvestmentIsMadeAndEpfIsZero()
 {
     var investments = new Chapter6Investments();
     investments.Add(new LifeInsurance(30000));
     var salary = new AnnualSalary {Epf = 0};
     TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = investments };
     Assert.AreEqual(30000.0, ts.GetChapter6Deductions(), 0.01);
 }
Beispiel #7
0
        public void ShouldReturnSumOfLifeInsuranceAndElssIfBothAreWithinCapAndOtherInvestmentAreZero()
        {
            var investments = new Chapter6Investments();

            investments.Add(new LifeInsurance(30000));
            investments.Add(new Elss(60000));

            var salary = new AnnualSalary {
                Epf = 0
            };
            TaxStatement ts = new TaxStatement(salary, null)
            {
                Chapter6Investments = investments
            };

            Assert.AreEqual(90000.0, ts.GetChapter6Deductions(), 0.01);
        }
Beispiel #8
0
        public void ShouldReturnDeductionCapAsDeductionWhenTotalOfAllInvestmetIsAboveDeductionCap()
        {
            var investments = new Chapter6Investments();

            investments.Add(new LifeInsurance(50000));
            investments.Add(new Elss(30000));
            investments.Add(new PublicProvidentFund(10000));

            var salary = new AnnualSalary {
                Epf = 500000
            };
            TaxStatement ts = new TaxStatement(salary, null)
            {
                Chapter6Investments = investments
            };

            Assert.AreEqual(Chapter6Investments.Cap, ts.GetChapter6Deductions(), 0.01);
        }
Beispiel #9
0
        ShouldReturnTotalInvestmentAsDeductionIfLicElssAndPpfInvestmentsAreWithinTheInvestmantCapAndEpfIsZero()
        {
            var investments = new Chapter6Investments();

            investments.Add(new LifeInsurance(50000.09));
            investments.Add(new Elss(30000));
            investments.Add(new PublicProvidentFund(19999.9));

            var salary = new AnnualSalary {
                Epf = 0
            };
            TaxStatement ts = new TaxStatement(salary, null)
            {
                Chapter6Investments = investments
            };

            Assert.AreEqual(99999.99, ts.GetChapter6Deductions(), 0.01);
        }
Beispiel #10
0
        public void ShouldReturnTotalInvestmentCapAsDeductionIfLicElssAndPpfInvestmentsExceedsTheCapAndEpfIsZero()
        {
            var investments = new Chapter6Investments();

            investments.Add(new LifeInsurance(50000));
            investments.Add(new Elss(30000));
            investments.Add(new PublicProvidentFund(20000.01));

            var salary = new AnnualSalary {
                Epf = 0
            };
            TaxStatement ts = new TaxStatement(salary, null)
            {
                Chapter6Investments = investments
            };

            Assert.AreEqual(Chapter6Investments.Cap, ts.GetChapter6Deductions(), 0.01);
        }
Beispiel #11
0
        public void ShouldReturnDeductionCapAsDeductionWhenOnlyHousingLoanPrincipalAsInvestementWithEpfAsZeroAndExceedsTheCap()
        {
            var investments = new Chapter6Investments();
            investments.Add(new HousingLoanPrincipal(100001));
            var salary = new AnnualSalary { Epf = 0 };

            TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = investments };

            Assert.AreEqual(Chapter6Investments.Cap, ts.GetChapter6Deductions(), 0.01);
        }
Beispiel #12
0
        public void MustCalculateNetPayableTaxWithAnnualSalaryOtherIncomesAndChapter6Investments()
        {
            var          taxPayer = new User(50000, true, Gender.Female);
            TaxSlabs     ts       = TaxSlabs.GetInstance();
            AnnualSalary asal     = new AnnualSalary
            {
                Basic            = 800000.50,
                Hra              = 1000,
                ProfessionalTax  = 100,
                SpecialAllowance = 10
            };

            OtherIncomes otherIncomes = new OtherIncomes();

            otherIncomes.Add(new OtherIncomeItem("Income from Interest", 4000.0));
            otherIncomes.Add(new OtherIncomeItem("Income from House Rent", 8000.0));

            Chapter6Investments investments = new Chapter6Investments();

            investments.Add(new LifeInsurance(50000));
            investments.Add(new Elss(60000));

            TaxStatement stmt = new TaxStatement(asal, taxPayer);

            stmt.OtherIncomes        = otherIncomes;
            stmt.Chapter6Investments = investments;

            double totalIncome = ((asal.GetTaxableSalary() + otherIncomes.CalculateTotalAmount())
                                  -
                                  (asal.CalculateHraExemption(taxPayer.FromMetro, taxPayer.RentPaid)));

            double totalInvestments = (asal.Epf + investments.GetTotal());

            totalIncome -= totalInvestments <= Chapter6Investments.Cap
                 ? totalInvestments
                 : Chapter6Investments.Cap;

            Assert.AreEqual(120473,
                            stmt.CalculateNetPayableTax(), 2);
        }
Beispiel #13
0
        public void MustCalculateNetPayableTaxWithAnnualSalaryOtherIncomesAndChapter6Investments()
        {
            var taxPayer = new User(50000, true, Gender.Female);
            TaxSlabs ts = TaxSlabs.GetInstance();
            AnnualSalary asal = new AnnualSalary
                                   {
                                       Basic = 800000.50,
                                       Hra = 1000,
                                       ProfessionalTax = 100,
                                       SpecialAllowance = 10
                                   };

            OtherIncomes otherIncomes = new OtherIncomes();
            otherIncomes.Add(new OtherIncomeItem("Income from Interest", 4000.0));
            otherIncomes.Add(new OtherIncomeItem("Income from House Rent", 8000.0));

            Chapter6Investments investments = new Chapter6Investments();
            investments.Add(new LifeInsurance(50000));
            investments.Add(new Elss(60000));

            TaxStatement stmt = new TaxStatement(asal,taxPayer);
            stmt.OtherIncomes = otherIncomes;
            stmt.Chapter6Investments = investments;

            double totalIncome = ((asal.GetTaxableSalary() + otherIncomes.CalculateTotalAmount())
                                  -
                                  (asal.CalculateHraExemption(taxPayer.FromMetro, taxPayer.RentPaid)));

            double totalInvestments = (asal.Epf + investments.GetTotal());

            totalIncome -= totalInvestments <= Chapter6Investments.Cap
                 ? totalInvestments
                 : Chapter6Investments.Cap;

            Assert.AreEqual(120473,
                stmt.CalculateNetPayableTax(),2);
        }
Beispiel #14
0
        public void ShouldReturnLifeInsuranceInvestmentAsDeductionIfNoOtherInvestmentIsMadeAndEpfIsZero()
        {
            var investments = new Chapter6Investments();

            investments.Add(new LifeInsurance(30000));
            var salary = new AnnualSalary {
                Epf = 0
            };
            TaxStatement ts = new TaxStatement(salary, null)
            {
                Chapter6Investments = investments
            };

            Assert.AreEqual(30000.0, ts.GetChapter6Deductions(), 0.01);
        }
Beispiel #15
0
        public void ShouldReturnDeductionCapAsDeductionWhenOnlyHousingLoanPrincipalAsInvestementWithEpfAndExceedsTheCap()
        {
            var investments = new Chapter6Investments();

            investments.Add(new HousingLoanPrincipal(90001));
            var salary = new AnnualSalary {
                Epf = 10000
            };

            TaxStatement ts = new TaxStatement(salary, null)
            {
                Chapter6Investments = investments
            };

            Assert.AreEqual(Chapter6Investments.Cap, ts.GetChapter6Deductions(), 0.01);
        }
Beispiel #16
0
        public void ShouldReturnTotalDeductionsAsDeductionWhenOnlyHousingLoanPrincipalAsInvestementWithEpfAsZeroAndUnderTheCap()
        {
            var investments = new Chapter6Investments();

            investments.Add(new HousingLoanPrincipal(60001));
            var salary = new AnnualSalary {
                Epf = 0
            };

            TaxStatement ts = new TaxStatement(salary, null)
            {
                Chapter6Investments = investments
            };

            Assert.AreEqual(60001, ts.GetChapter6Deductions(), 0.01);
        }
Beispiel #17
0
        public void ShouldReturnTotalPpfInvestmentAsDeductionIfPpfInvestmentIsWithinPpfCapAndNoOtherInvestmentIsMade()
        {
            var          investments     = new Chapter6Investments();
            const double ppfContribution = 69999.99;

            investments.Add(new PublicProvidentFund(ppfContribution));

            var salary = new AnnualSalary {
                Epf = 0
            };
            TaxStatement ts = new TaxStatement(salary, null)
            {
                Chapter6Investments = investments
            };

            Assert.AreEqual(ppfContribution, ts.GetChapter6Deductions(), 0.01);
        }
Beispiel #18
0
        public void ShouldReturnTotalDeductionsAsDeductionWhenOnlyHousingLoanPrincipalAsInvestementWithEpfAndUnderTheCap()
        {
            var investments = new Chapter6Investments();
            investments.Add(new HousingLoanPrincipal(60001));
            var salary = new AnnualSalary { Epf = 10000 };

            TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = investments };

            Assert.AreEqual(70001, ts.GetChapter6Deductions(), 0.01);
        }
Beispiel #19
0
        public void ShouldReturnTotalPpfInvestmentAsDeductionIfPpfInvestmentIsWithinPpfCapAndNoOtherInvestmentIsMade()
        {
            var investments = new Chapter6Investments();
            const double ppfContribution = 69999.99;
            investments.Add(new PublicProvidentFund(ppfContribution));

            var salary = new AnnualSalary {Epf = 0};
            TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = investments };
            Assert.AreEqual(ppfContribution, ts.GetChapter6Deductions(), 0.01);
        }
Beispiel #20
0
        public void ShouldReturnSumOfLifeInsuranceAndElssIfBothAreWithinCapAndOtherInvestmentAreZero()
        {
            var investments = new Chapter6Investments();
            investments.Add(new LifeInsurance(30000));
            investments.Add(new Elss(60000));

            var salary = new AnnualSalary {Epf = 0};
            TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = investments };
            Assert.AreEqual(90000.0, ts.GetChapter6Deductions(), 0.01);
        }
Beispiel #21
0
        public void ShouldReturnTotalInvestmentCapAsDeductionIfLicElssAndPpfInvestmentsExceedsTheCapAndEpfIsZero()
        {
            var investments = new Chapter6Investments();
            investments.Add(new LifeInsurance(50000));
            investments.Add(new Elss(30000));
            investments.Add(new PublicProvidentFund(20000.01));

            var salary = new AnnualSalary {Epf = 0 };
            TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = investments };
            Assert.AreEqual(Chapter6Investments.Cap, ts.GetChapter6Deductions(), 0.01);
        }