public void CreateRequisition(string userId)
        {
            List <EmployeeCart> cartList       = dbcontext.employeeCarts.Where(x => x.EmployeeId == userId).ToList();
            Employee            emp            = deptService.findEmployeeById(userId);
            Requisition         newRequisition = new Requisition(emp.Departments.DeptCode);

            newRequisition.status = ReqStatus.AWAITING_APPROVAL;
            Employee approver = deptService.setApprover(userId);

            newRequisition.ApprovedEmployee   = approver;
            newRequisition.ApprovedEmployeeId = approver.Id;
            newRequisition.Employee           = emp;
            newRequisition.EmployeeId         = emp.Id;
            newRequisition.DepartmentId       = emp.Departments.Id;
            foreach (var i in cartList)
            {
/*                Inventory inv = dbcontext.inventories.Where(x => x.Id == i.Id).FirstOrDefault();*/
                RequisitionDetail requisitionDetail = new RequisitionDetail();
                requisitionDetail.Id            = Guid.NewGuid().ToString();
                requisitionDetail.RequisitionId = newRequisition.Id;
                requisitionDetail.Inventory     = i.Inventory;
                requisitionDetail.RequestedQty  = i.Qty;
                dbcontext.Add(requisitionDetail);
            }
            dbcontext.Add(newRequisition);
            dbcontext.employeeCarts.RemoveRange(cartList);
            dbcontext.SaveChanges();

            notificationService.sendNotification(NotificationType.REQUISITION, newRequisition, null, null);
        }
        public void CreateAdjustmentVoucher(string userId, string invId, int qty, string reason)
        {
            AdjustmentVoucher newAdjustmentVoucher = new AdjustmentVoucher();
            Inventory         inventory            = retrieveInventory(invId);
            Employee          appemployee          = setAdjustmentVoucherApprover(userId, invId, qty);
            Employee          employee             = deptService.findEmployeeById(userId);

            newAdjustmentVoucher.Inventory       = inventory;
            newAdjustmentVoucher.InventoryId     = invId;
            newAdjustmentVoucher.EmEmployee      = employee;
            newAdjustmentVoucher.EmEmployeeId    = employee.Id;
            newAdjustmentVoucher.appEmEmployee   = appemployee;
            newAdjustmentVoucher.appEmEmployeeId = appemployee.Id;
            newAdjustmentVoucher.reason          = reason;
            dbcontext.Add(newAdjustmentVoucher);
            dbcontext.SaveChanges();
            notificationService.sendNotification(NotificationType.ADJUSTMENTVOUCHER, null, null, newAdjustmentVoucher);
        }