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(); }
public PaySlip GetMonthlyPaySlip(string paymentStart, string paymentEnd, ITaxRateSchedule taxRateSchedule) { return(new PaySlip(GetFullName(), paymentStart, paymentEnd, _salaryDetails.AnnualSalary, _salaryDetails.GetGrossIncome(), _salaryDetails.GetSuperAnnuation(), taxRateSchedule)); }
private int GetIncomeTax(int annualSalary, ITaxRateSchedule taxRateSchedule) { var incomeTax = taxRateSchedule.GetIncomeTax(annualSalary); return(incomeTax); }