public EmployeePayDetailsService(EmployeeMonthlyPayslipAppContext employeeMonthlyPayslipAppContext,
                                  IEmployeeDetails employeeDetails, IMapper mapper)
 {
     _employeeMonthlyPayslipAppContext = employeeMonthlyPayslipAppContext;
     _employeeDetails = employeeDetails;
     _mapper          = mapper;
 }
Exemplo n.º 2
0
 public PayslipDetails GeneratePayslip(IEmployeeDetails employeeDetails) => new PayslipDetails()
 {
     PayPeriod   = employeeDetails.PaymentStartDate,
     Name        = $"{employeeDetails.FirstName} {employeeDetails.LastName}",
     GrossIncome = Convert.ToInt32(employeeDetails.AnnualSalary / 12),
     Super       = Convert.ToInt32(employeeDetails.AnnualSalary * employeeDetails.SuperRate / 1200),
     IncomeTax   = Convert.ToInt32(_taxYearManager.TaxDeduction(employeeDetails.AnnualSalary)),
 };
Exemplo n.º 3
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
     });
 }
Exemplo n.º 4
0
 public static string Combine(IEmployeeDetails employeeDetails)
 {
     return($"{employeeDetails.FirstName} {employeeDetails.Surname}");
 }
 public EmployeeInformationController()
 {
     employeeDetails = new EmployeeDetails();
 }
Exemplo n.º 6
0
 public EmployeeController(IEmployeeDetails employeeDetails)
 {
     _employeeDetails = employeeDetails;
 }
 public EmployeeDetail(IEmployeeDetails details)
 {
     this.details = details;
 }
Exemplo n.º 8
0
 public EmployeeDetailsService(IEmployeeDetails employeeDetails)
 {
     this.employeeDetails = employeeDetails;
 }
Exemplo n.º 9
0
 public PaySlipGenerator()
 {
     _employeeDetails = new CSVFileReader();
     _calculator      = new TaxCalculator();
 }