Exemple #1
0
        public IActionResult Index()
        {
            var payRecords = _payComputationService.GetAllPaymentRecords().Select(pay => new PaymentRecordIndexViewModel
            {
                Id             = pay.Id,
                EmployeeId     = pay.EmployeeId,
                FullName       = pay.FullName,
                PayDate        = pay.PayDate,
                PayMonth       = pay.PayMonth,
                TaxYearId      = pay.TaxYearId,
                Year           = _payComputationService.GetTaxYearById(pay.TaxYearId).YearofTax,
                TotalEarnings  = pay.TotalEarnings,
                TotalDeduction = pay.TotalDeducation,
                NetPayment     = pay.NetPayment,
                Employee       = pay.Employee
            });

            return(View(payRecords));
        }