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