public async Task <IActionResult> VaciarStock(int suministroId, int stock) { if (User.Identity.IsAuthenticated) { string permiso = Permisos("PermisoSubModulo").PSMAPB ? "PermisoSubModulo" : "PermisoModulo"; bool eliminar = Permisos(permiso).PMMAPL.Where(w => w.Value.Contains("Eliminar")).Any(); if (eliminar) { ApiCallResult insumos = await service.VaciarStock(suministroId, stock); return(Json(insumos)); } else { return(NotFound()); } } else { return(RedirectToAction("Index", "Login")); } }