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