Esempio n. 1
0
 public PaySlip(string name, string paymentStart, string paymentEnd, int annualSalary, int grossIncome,
                int superAnnuation,
                ITaxRateSchedule taxRateSchedule)
 {
     FullName      = name;
     PaymentPeriod = GetPaymentPeriod(paymentStart, paymentEnd);
     GrossIncome   = grossIncome;
     Super         = superAnnuation;
     IncomeTax     = GetIncomeTax(annualSalary, taxRateSchedule);
     NetIncome     = GetNetIncome();
 }
Esempio n. 2
0
 public PaySlip GetMonthlyPaySlip(string paymentStart, string paymentEnd, ITaxRateSchedule taxRateSchedule)
 {
     return(new PaySlip(GetFullName(), paymentStart, paymentEnd, _salaryDetails.AnnualSalary, _salaryDetails.GetGrossIncome(), _salaryDetails.GetSuperAnnuation(), taxRateSchedule));
 }
Esempio n. 3
0
        private int GetIncomeTax(int annualSalary, ITaxRateSchedule taxRateSchedule)
        {
            var incomeTax = taxRateSchedule.GetIncomeTax(annualSalary);

            return(incomeTax);
        }