// GET: AdjustmentRecords/Details/5
        public async Task <IActionResult> Details(string id)
        {
            ADTeam5User user = await _userManager.GetUserAsync(HttpContext.User);

            List <string> identity = userCheck.checkUserIdentityAsync(user);
            int           userID   = user.WorkID;
            string        userRole = identity[1];

            if (id == null)
            {
                return(NotFound());
            }
            //ViewData for voucherNo
            ViewData["VoucherNo"] = id;

            //ViewBag for voucher price
            decimal?amount = b.GetTotalAmountForVoucher(id);
            decimal?GST    = Math.Round((decimal)(amount * (decimal?)0.07), 2);

            ViewBag.Amount      = amount;
            ViewBag.GST         = GST;
            ViewBag.TotalAmount = amount + GST;

            List <AdjustmentRecordDetails> result = b.GetAdjustmentRecordDetails(id);

            //Viewbag for category dropdown list, need to post back
            List <Catalogue> categoryList = new List <Catalogue>();
            var q = _context.Catalogue.GroupBy(x => new { x.Category }).Select(x => x.FirstOrDefault());

            foreach (var item in q)
            {
                categoryList.Add(item);
            }
            categoryList.Insert(0, new Catalogue {
                ItemNumber = "0", Category = "---Select Category---"
            });
            ViewBag.ListofCategory = categoryList;

            //ViewBag for record status
            ViewBag.AdjustmentRecordStatus = _context.AdjustmentRecord.FirstOrDefault(x => x.VoucherNo == id).Status;

            return(View(result));
        }