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)), };
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 }); }
public static string Combine(IEmployeeDetails employeeDetails) { return($"{employeeDetails.FirstName} {employeeDetails.Surname}"); }
public EmployeeInformationController() { employeeDetails = new EmployeeDetails(); }
public EmployeeController(IEmployeeDetails employeeDetails) { _employeeDetails = employeeDetails; }
public EmployeeDetail(IEmployeeDetails details) { this.details = details; }
public EmployeeDetailsService(IEmployeeDetails employeeDetails) { this.employeeDetails = employeeDetails; }
public PaySlipGenerator() { _employeeDetails = new CSVFileReader(); _calculator = new TaxCalculator(); }