public int UpdatePayrollSalaryMasterSheet(PayrollSalaryMasterSheetDTO data) { PayrollSalaryMasterSheet dataToUpdate = PayrollSalaryMasterSheetRequestFormatter.ConvertRespondentInfoFromDTO(data); var res = _unitOfWork.PayrollSalaryMasterSheetRepository.Update(dataToUpdate); return(res); }
// GET: PayrollSalaryMasterSheets/Edit/5 public ActionResult Edit(int id) { PayrollSalaryMasterSheetDTO res = new PayrollSalaryMasterSheetDTO(); res = _payrollSalaryMasterSheetService.GetPayrollSalaryMasterSheetById(id); return(View(res)); }
public PayrollSalaryMasterSheetDTO InsertPayrollSalaryMasterSheet(PayrollSalaryMasterSheetDTO data) { PayrollSalaryMasterSheet dataToInsert = new PayrollSalaryMasterSheet(); dataToInsert = PayrollSalaryMasterSheetRequestFormatter.ConvertRespondentInfoFromDTO(data); return(PayrollSalaryMasterSheetRequestFormatter.ConvertRespondentInfoToDTO(_unitOfWork.PayrollSalaryMasterSheetRepository.Create(dataToInsert))); }
public PayrollSalaryMasterSheetDTO GetIndividualSalarySheetDescription(int Id) { PayrollSalaryMasterSheet db = _unitOfWork.PayrollSalaryMasterSheetRepository.GetById(Id); PayrollSalaryMasterSheetDTO Record = PayrollSalaryMasterSheetRequestFormatter.ConvertRespondentInfoToDTO(db); Record.PayrollSalaryDetailSheets = PayrollSalaryDetailSheetResponseFormatter.GetAllPayrollDetailSheet(db.PayrollSalaryDetailSheets).Where(x => x.AllowanceType == "O"); Record.PayrollEmployeeTaxDetails = PayrollEmployeeTaxDetailResponseFormatter.GetAllTaxDetailSheet(db.PayrollEmployeeTaxDetails); return(Record); }
public static PayrollSalaryMasterSheet ConvertRespondentInfoFromDTO(PayrollSalaryMasterSheetDTO PayrollSalaryTableDTO) { Mapper.CreateMap <PayrollSalaryMasterSheetDTO, PayrollSalaryMasterSheet>().ConvertUsing( m => { return(new PayrollSalaryMasterSheet { Id = m.Id, EmployeeCode = m.EmployeeCode, CurrentGrade = m.CurrentGrade, DesignationCode = m.DesignationCode, DepartmentCode = m.DepartmentCode, BranchCode = m.BranchCode, MaritialStatus = m.MaritialStatus, RankSalary = m.RankSalary, RankMaxGrade = m.RankMaxGrade, RankPerGradeAmount = m.RankPerGradeAmount, BankAllowance = m.BankAllowance, RankSpecialAllowance = m.RankSpecialAllowance, RankInchargeShipAllowance = m.RankInchargeShipAllowance, RankOtherAllowances = m.RankOtherAllowances, TaxableAllowanceAmount = m.TaxableAllowanceAmount, NonTaxableAllowanceAmount = m.NonTaxableAllowanceAmount, TaxAmount = m.TaxAmount, GrossSalary = m.GrossSalary, WorkingDays = m.WorkingDays, WorkedDays = m.WorkedDays, PerDaysalary = m.PerDaysalary, DeductableDays = m.DeductableDays, ActualSalary = m.ActualSalary, PayrollSalaryTableId = m.PayrollSalaryTableId, GrossIncome = m.GrossIncome, TaxablePfCitAmount = m.TaxablePfCitAmount, CitAmount = m.CitAmount, TotalRankAllowances = m.TotalRankAllowances, SalaryWithRankAllowance = m.SalaryWithRankAllowance, RemoteAllowance = m.RemoteAllowance, PfSelf = m.PfSelf, EmpAttendanceIgnore = m.EmpAttendanceIgnore, GradeSalary = m.GradeSalary, PfCompany = m.PfCompany, PfExtra = m.PfExtra, RankAndGradeSalary = m.RankAndGradeSalary, RemoteAllowanceId = m.RemoteAllowanceId, RemoteAllowanceType = m.RemoteAllowanceType, RemoteTaxExcemption = m.RemoteTaxExcemption, SalaryAfterTaxDeduction = m.SalaryAfterTaxDeduction, EmployeeName = m.EmployeeName, TaxableSalary = m.TaxableSalary }); }); return(Mapper.Map <PayrollSalaryMasterSheetDTO, PayrollSalaryMasterSheet>(PayrollSalaryTableDTO)); }
// GET: PayrollSalaryMasterSheets/Details/5 public ActionResult Details(int id) { PayrollSalaryMasterSheetDTO res = new PayrollSalaryMasterSheetDTO(); res = _payrollSalaryMasterSheetService.GetPayrollSalaryMasterSheetById(id); res.totalPf = res.PfCompany + res.PfExtra + res.PfSelf; res.totalAllowance = res.TotalRankAllowances + res.RemoteAllowance + res.RankOtherAllowances; res.PayrollSalaryDetailSheets = _payrollSalaryMasterSheetService.GetAllPayrollSalaryDetail(res.Id.ToString()); foreach (var all in res.PayrollSalaryDetailSheets) { res.totalAllowance += all.CalculatedValue; } return(View(res)); }
public ActionResult Create(PayrollSalaryMasterSheetDTO data) { if (!ModelState.IsValid) { return(View()); } try { PayrollSalaryMasterSheetDTO res = new PayrollSalaryMasterSheetDTO(); res = _payrollSalaryMasterSheetService.InsertPayrollSalaryMasterSheet(data); ViewBag.Success = "Grade " + data.EmployeeName + " salary payroll has been created"; ModelState.Clear(); return(View()); } catch (Exception ex) { ViewBag.Error = ex.Message; return(View()); } }
public ActionResult Edit(PayrollSalaryMasterSheetDTO data) { int res = _payrollSalaryMasterSheetService.UpdatePayrollSalaryMasterSheet(data); return(View()); }
public ActionResult SalaryReceipt(int Id) { PayrollSalaryMasterSheetDTO payrollData = _PayrollGenerationService.GetIndividualSalarySheetDescription(Id); return(View("../PayrollSalarySheet/PayrollReceipt", payrollData)); }
public ActionResult IndividualSalarySheet(int Id) { PayrollSalaryMasterSheetDTO db = _PayrollGenerationService.GetIndividualSalarySheetDescription(Id); return(View(db)); }
public ActionResult Index() { decimal totalRankandGradesalary = 0; decimal totalRankAllowances = 0; decimal totalAllowances = 0; decimal totalGrossSalary = 0; decimal totalpfcompany = 0; decimal totalpfself = 0; decimal totalpfExtra = 0; decimal totalpf = 0; decimal totalcit = 0; decimal totaltax = 0; decimal totalcashinhand = 0; ViewBag.FiscalsDropdown = _fiscalService.GetFiscalDropDown(); int EmpCode = Convert.ToInt32(Session["Empcode"]); int fyid = Convert.ToInt32(Request["fyId"]); int officeId = Convert.ToInt32(Session["OfficeId"]); if (fyid == 0) { fyid = _fiscalService.GetCurrentFyId(); } if (officeId == 0) { officeId = Convert.ToInt32(Session["OfficeId"]); } ViewBag.fsId = fyid; ViewBag.officeId = officeId; List <MyPayrollSalaryTableDTO> MyPayroll = new List <MyPayrollSalaryTableDTO>(); IEnumerable <PayrollSalaryTableDTO> ViewList = _PayrollGenerationService.GetMyPayrollSalaryTable(fyid, officeId).Where(a => a.SalaryConfirmed == true).ToList(); foreach (var data in ViewList) { IEnumerable <PayrollSalaryMasterSheetDTO> view = _PayrollGenerationService.GetPayrollSalaryMasterSheet(data.Id); PayrollSalaryMasterSheetDTO singledata = view.Where(a => a.EmployeeCode == EmpCode).FirstOrDefault(); if (singledata != null) { MyPayrollSalaryTableDTO singles = new MyPayrollSalaryTableDTO() { Id = singledata.Id, PayrollMonth = data.PayrollMonthDescription.MonthNameNepali, FyId = data.Fiscal.FyName, PfSelf = singledata.PfSelf, PfCompany = singledata.PfCompany, PfExtra = singledata.PfExtra, PF = singledata.PfSelf + singledata.PfCompany + singledata.PfExtra, CIT = singledata.CitAmount, Tax = singledata.TaxAmount, GrossSalary = singledata.GrossSalary, CashInHand = singledata.SalaryAfterTaxDeduction, RankAndGradeSalary = singledata.RankAndGradeSalary, RankAllowances = singledata.RankOtherAllowances, TotalAllowances = singledata.TotalRankAllowances, }; totalRankandGradesalary += singledata.RankAndGradeSalary; totalRankAllowances += singledata.RankOtherAllowances; totalAllowances += singledata.TotalRankAllowances; totalpfself += singledata.PfSelf; totalpfcompany += singledata.PfCompany; totalpfExtra += singledata.PfExtra; totalpf += singles.PF; totalcit = singledata.CitAmount; totaltax += singledata.TaxAmount; totalGrossSalary += singledata.GrossSalary; totalcashinhand += singledata.SalaryAfterTaxDeduction; MyPayroll.Add(singles); } } ViewBag.TotalRankAndGradeSalary = totalRankandGradesalary.ToString("0.00"); ViewBag.TotalRankAllowances = totalRankAllowances.ToString("0.00"); ViewBag.TotalAllowances = totalAllowances.ToString("0.00"); ViewBag.TotalPFSelf = totalpfself.ToString("0.00"); ViewBag.TotalPFCompany = totalpfcompany.ToString("0.00"); ViewBag.TotalPfExtra = totalpfExtra.ToString("0.00"); ViewBag.TotalPf = totalpf.ToString("0.00"); ViewBag.TotalCit = totalcit.ToString("0.00"); ViewBag.TotalTax = totaltax.ToString("0.00"); ViewBag.TotalGrossSalary = totalGrossSalary.ToString("0.00"); ViewBag.TotalCashInHand = totalcashinhand.ToString("0.00"); return(View("../Payroll/MyPayroll/Index", MyPayroll)); }
public ActionResult SalarySheetDetail(int Id) { PayrollSalaryMasterSheetDTO db = _PayrollGenerationService.GetIndividualSalarySheetDescription(Id); return(View("../Payroll/MyPayroll/SalarySheetDetail", db)); }