Ejemplo n.º 1
0
        public static string ConcatenatePayPeriod(PayPeriod payPeriod)
        {
            var formattedStartDate = payPeriod.Start.ToString("MMMM dd");
            var formattedEndDate   = payPeriod.End.ToString("MMMM dd");

            return($"{formattedStartDate} - {formattedEndDate}");
        }
Ejemplo n.º 2
0
        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()
                }
            });
        }
Ejemplo n.º 3
0
 public static Payslip MakePayslip(Employee employee, PayPeriod payPeriod)
 {
     return(CreatePayslipObject(employee, payPeriod));
 }