public static string ConcatenatePayPeriod(PayPeriod payPeriod) { var formattedStartDate = payPeriod.Start.ToString("MMMM dd"); var formattedEndDate = payPeriod.End.ToString("MMMM dd"); return($"{formattedStartDate} - {formattedEndDate}"); }
private static Payslip CreatePayslipObject(Employee employee, PayPeriod payPeriod) { var calculator = new TaxCalculator(employee); return(new Payslip() { Employee = employee, PayPeriod = payPeriod, TaxInformation = new TaxDetails() { GrossIncome = calculator.GetGrossIncome(), IncomeTax = calculator.GetIncomeTax(), NetIncome = calculator.GetNetIncome(), SuperAmount = calculator.GetSuperAmount() } }); }
public static Payslip MakePayslip(Employee employee, PayPeriod payPeriod) { return(CreatePayslipObject(employee, payPeriod)); }