diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 39ebe63e7..2c8d4284b 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -2176,7 +2176,7 @@ Public Class ClsInventarios #Region " INVENTARIOS - INVENTARIO FISICO " - Public Function AddInventarioFisico(CveEmpresa As Integer, InventarioFisico As String, Observaciones As String, Estatus As Integer, CveSubProyecto As Integer) As Boolean + Public Function AddInventarioFisico(CveEmpresa As Integer, InventarioFisico As String, Observaciones As String, Estatus As Integer, CveSubProyecto As Integer, Optional ConAplicacion As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_InventarioFisicoAdd") @@ -2186,6 +2186,7 @@ Public Class ClsInventarios .Add("@InventarioFisico", SqlDbType.VarChar).Value = InventarioFisico .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones .Add("@Estatus", SqlDbType.Int).Value = Estatus + .Add("@ConAplicacion", SqlDbType.Int).Value = If(ConAplicacion, 1, 0) .Add("@CveInventarioFisico", SqlDbType.Int).Direction = ParameterDirection.Output End With @@ -2582,6 +2583,101 @@ Public Class ClsInventarios Return Retorno End Function + Public Function GetInventarioFisicoDetallesUsuarios(CveInventarioFisico As Integer, CveEmpresa As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Inv_InventarioFisicoDetallesUsuariosGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + + Catch Ex1 As SqlException + Me.OnError("Ocurrió un error al obtener los usuarios del inventario fisico.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + OnError("Ocurrió un error al obtener llos usuarios del inventario fisico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + Public Function AddInventarioFisicoUsuarios(CveInventarioFisico As Integer, CveUsuario As Integer, Incluye As Boolean, Cerrado As Boolean, Bloqueado As Boolean) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Inv_InventarioFisicoUsuariosAdd") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@Incluye", SqlDbType.Bit).Value = If(Incluye, 1, 0) + .Add("@Cerrado", SqlDbType.Bit).Value = If(Cerrado, 1, 0) + .Add("@Bloqueado", SqlDbType.Bit).Value = If(Bloqueado, 1, 0) + + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + + Catch Ex1 As SqlException + Me.OnError("Ocurrió un error al guardar los usuarios del inventario fisico.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + OnError("Ocurrió un error al guardar los usuarios del inventario fisico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + + Public Function RemoveInventarioFisicoUsuarios(CveInventarioFisico As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Inv_InventarioFisicoUsuariosRemove") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico + + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + + Catch Ex1 As SqlException + Me.OnError("Ocurrió un error al eliminar los usuarios del inventario fisico.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + OnError("Ocurrió un error al eliminar los usuarios servicio del inventario fisico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + Public Function UpdateInventarioFisicoUsuarios(CveInventarioFisico As Integer, CveUsuario As Integer, Cerrado As Boolean, Bloqueado As Boolean) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Inv_InventarioFisicoUsuariosUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@Cerrado", SqlDbType.Bit).Value = Cerrado + .Add("@Bloqueado", SqlDbType.Bit).Value = Bloqueado + + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + + Catch Ex1 As SqlException + Me.OnError("Ocurrió un error al eliminar los usuarios del inventario fisico.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + OnError("Ocurrió un error al eliminar los usuarios servicio del inventario fisico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + Public Function GetInventarioFisicoDetallesProveedores(CveInventarioFisico As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False diff --git a/Bancos/Devoluciones.aspx b/Bancos/Devoluciones.aspx index 5bacecb2b..2e7b1a6a3 100644 --- a/Bancos/Devoluciones.aspx +++ b/Bancos/Devoluciones.aspx @@ -60,8 +60,16 @@
- -
+
+
+
+ + + + +
+
+
@@ -180,7 +188,49 @@
-
+
+
+
+
+ + +
+
+ +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+
+
+ +
@@ -189,6 +239,9 @@
+ + +
@@ -275,7 +328,6 @@