InstaTax.Core.DomainObjects.TaxStatement.GetChapter6Deductions C# (CSharp) Метод

GetChapter6Deductions() публичный Метод

public GetChapter6Deductions ( ) : double
Результат double
        public virtual double GetChapter6Deductions()
        {
            var totalInvestments = AnnualSalary.Epf;
            if (Chapter6Investments != null)
            {
                totalInvestments += Chapter6Investments.GetTotal();
            }

            return (totalInvestments <= Chapter6Investments.Cap
                        ? totalInvestments
                        : Chapter6Investments.Cap);
        }

Usage Example

Пример #1
0
 public void ShouldReturnEpfAsDeductionIfNoOtherInvestmentIsMade()
 {
     const int epfContribution = 100;
     var salary = new AnnualSalary {Epf = epfContribution};
     TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = null };
     Assert.AreEqual(epfContribution, ts.GetChapter6Deductions(), 0.01);
 }
All Usage Examples Of InstaTax.Core.DomainObjects.TaxStatement::GetChapter6Deductions