public EmployeePayDetailsService(EmployeeMonthlyPayslipAppContext employeeMonthlyPayslipAppContext,
                                  IEmployeeDetails employeeDetails, IMapper mapper)
 {
     _employeeMonthlyPayslipAppContext = employeeMonthlyPayslipAppContext;
     _employeeDetails = employeeDetails;
     _mapper          = mapper;
 }
 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)),
 };
Exemple #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
     });
 }
Exemple #4
0
 public static string Combine(IEmployeeDetails employeeDetails)
 {
     return($"{employeeDetails.FirstName} {employeeDetails.Surname}");
 }
 public EmployeeInformationController()
 {
     employeeDetails = new EmployeeDetails();
 }
Exemple #6
0
 public EmployeeController(IEmployeeDetails employeeDetails)
 {
     _employeeDetails = employeeDetails;
 }
 public EmployeeDetail(IEmployeeDetails details)
 {
     this.details = details;
 }
Exemple #8
0
 public EmployeeDetailsService(IEmployeeDetails employeeDetails)
 {
     this.employeeDetails = employeeDetails;
 }
Exemple #9
0
 public PaySlipGenerator()
 {
     _employeeDetails = new CSVFileReader();
     _calculator      = new TaxCalculator();
 }