public async Task <IActionResult> postSalaryDeductions([FromBody] PostNewSalaryDeductions postNewSalaryDeductions)
        {
            if (postNewSalaryDeductions == null)
            {
                return(Json(new
                {
                    msg = "No Data"
                }
                            ));
            }

            var orgId = getOrg();

            try
            {
                SalaryDeduction orgSalaryDeduction = new SalaryDeduction()
                {
                    Id = Guid.NewGuid(),
                    EmployeeDetailId = postNewSalaryDeductions.EmployeeDetailsId,
                    DeductionId      = postNewSalaryDeductions.DeductionId,
                    Amount           = postNewSalaryDeductions.Amount,
                    Description      = postNewSalaryDeductions.Description,
                    OrganisationId   = orgId,
                };

                _context.Add(orgSalaryDeduction);
                _context.SaveChanges();


                return(Json(new
                {
                    msg = "Success"
                }
                            ));
            }
            catch (Exception ee)
            {
            }

            return(Json(
                       new
            {
                msg = "Fail"
            }));
        }
        public async Task <IActionResult> editSalaryDeductions([FromBody] PostNewSalaryDeductions postNewSalaryDeductions)
        {
            if (postNewSalaryDeductions == null)
            {
                return(Json(new
                {
                    msg = "No Data"
                }
                            ));
            }

            var orgId = getOrg();
            var organisationDetails = await _context.Organisations.Where(x => x.Id == orgId).FirstOrDefaultAsync();


            try
            {
                var orgDedSal = _context.SalaryDeductions.Where(x => x.Id == Guid.Parse(postNewSalaryDeductions.AId)).FirstOrDefault();
                orgDedSal.EmployeeDetailId = postNewSalaryDeductions.EmployeeDetailsId;
                orgDedSal.DeductionId      = postNewSalaryDeductions.DeductionId;
                orgDedSal.Amount           = postNewSalaryDeductions.Amount;
                orgDedSal.Description      = postNewSalaryDeductions.Description;

                _context.Update(orgDedSal);
                _context.SaveChanges();


                return(Json(new
                {
                    msg = "Success"
                }
                            ));
            }
            catch (Exception ee)
            {
            }

            return(Json(
                       new
            {
                msg = "Fail"
            }));
        }