Ejemplo n.º 1
0
 public static PaySlip Create(IEmployeeDetails employeeDetails, IPayPeriod payPeriod, IGrossIncome grossIncome,
                              IIncomeTax incomeTax, INetIncome netIncome, ISuper super)
 {
     return(new PaySlip()
     {
         FullName = FullNameBuilder.Combine(employeeDetails),
         PayPeriod = DateCalculator.GetDateString(payPeriod),
         GrossIncome = grossIncome.Amount,
         IncomeTax = incomeTax.Amount,
         NetIncome = netIncome.Amount,
         Super = super.Amount
     });
 }
Ejemplo n.º 2
0
 protected void SetIncomeTaxes(IIncomeTax incomeTax)
 {
     this.incomeTax = incomeTax;
     incomeTaxValue = incomeTax.Calculate(grossAmount);
 }