Exemplo n.º 1
0
        public ActionResult GenerateBankPay(SetupEmployeeMasterModel model)
        {
            SetupEmployeeMasterProviders prop = new SetupEmployeeMasterProviders();

            if (string.IsNullOrEmpty(model.YearId.ToString()))
            {
                model.YearId = 0;
            }
            if (string.IsNullOrEmpty(model.MonthId.ToString()))
            {
                model.MonthId = 0;
            }
            model.SetupEmployeeMasterModelList = prop.GetDetailOfSalaryPayable(model.YearId, model.MonthId, model.EmployeeMasterId);
            int i = 0;

            if (model.SetupEmployeeMasterModelList.Count > 0)
            {
                i = prop.CreateSalaryPaidJv(model);
                if (i > 0)
                {
                    return(RedirectToAction("ShowJournalVoucher", "JVMaster", new { id = i }));
                }
                else
                {
                    return(View(model));
                }
            }
            return(View(model));
        }