diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index b9cc28b9d..6f2ebaad9 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -2904,28 +2904,28 @@ Public Class ClsInventarios Return Retorno End Function - Public Function LoteBatchFechaCaducidadGet(CvePS As Integer, Lote As String, Batch As String, CveEmpresa As Integer, Optional CveAlmacen As Integer = -1) As Boolean - Dim Retorno As Boolean = False + 'Public Function LoteBatchFechaCaducidadGet(CvePS As Integer, Lote As String, Batch As String, CveEmpresa As Integer, Optional CveAlmacen As Integer = -1) As Boolean + ' Dim Retorno As Boolean = False - DataAdapter("PA_Inv_LoteBatchFechaCaducidadGet") + ' DataAdapter("PA_Inv_LoteBatchFechaCaducidadGet") - With SqlAdapter.SelectCommand.Parameters - .Add("@CvePS", SqlDbType.Int).Value = CvePS - .Add("@Lote", SqlDbType.VarChar).Value = Lote - .Add("@Batch", SqlDbType.VarChar).Value = Batch - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen - End With + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CvePS", SqlDbType.Int).Value = CvePS + ' .Add("@Lote", SqlDbType.VarChar).Value = Lote + ' .Add("@Batch", SqlDbType.VarChar).Value = Batch + ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + ' .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen + ' End With - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener la Fecha Caducidad del Lote-Batch.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al obtener la Fecha Caducidad del Lote-Batch.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' End Try - Return Retorno - End Function + ' Return Retorno + 'End Function Public Function ActualizarEsDevolucionVenta(CveVenta As Integer, Valor As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("Vta_UpdateDevolucionVenta") diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 4777d29aa..87b0ad449 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -596,7 +596,9 @@ Partial Class Inventarios_EntregaAlmacen DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen) End If - + If Not DtDatos.Columns.Contains("Serie") Then + DtDatos.Columns.Add("Serie", GetType(String)) + End If If Not DtDatos.Columns.Contains("Lote") Then DtDatos.Columns.Add("Lote", GetType(String)) End If @@ -744,6 +746,20 @@ Partial Class Inventarios_EntregaAlmacen DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen) End If + If Not DtDatos.Columns.Contains("CveSeccion") Then + DtDatos.Columns.Add("CveSeccion", GetType(Integer)) + End If + + If Not DtDatos.Columns.Contains("FechaCaducidad") Then + DtDatos.Columns.Add("FechaCaducidad", GetType(Date)) + End If + If Not DtDatos.Columns.Contains("Seleccionado") Then + DtDatos.Columns.Add("Seleccionado", GetType(Boolean)) + End If + If Not DtDatos.Columns.Contains("CantidadSeleccionada") Then + DtDatos.Columns.Add("CantidadSeleccionada", GetType(Double)) + End If + If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then DivCodigoSeriePS.Visible = True Else @@ -812,7 +828,8 @@ Partial Class Inventarios_EntregaAlmacen If e.Row.DBCampo("Consec") <> "" AndAlso DtDatosDetalle IsNot Nothing Then Dim Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DBCampo("Consec"))).Rows.Count e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString - 'e.Row.FCTextBox("TbCantidadF").Text = "0" + Else + e.Row.FCTextBox("TbCantidadF").Text = "0" End If @@ -867,6 +884,7 @@ Partial Class Inventarios_EntregaAlmacen 'FUNCIONALIDAD PISTOLA DE CODIGOS If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then + e.Row.FCTextBox("TbCantidadF").Text = "0" 'NO BLOQUEA PARA ROL AD If UsuarioActual.CveRol = 1 Then If e.Row.DBCampo("Inv_CveMetodoInventario").Contiene("5", "6") Then @@ -2540,10 +2558,10 @@ Partial Class Inventarios_EntregaAlmacen If CBool(Dr("AplicaSerie")) Then DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec"))) For Each Dr1 As DataRow In DtDetalle.Rows - StrXML.AppendFormat("", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("YYYY/MM/DD")) + StrXML.AppendFormat("", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("yyyy/MM/dd")) Next Else - StrXML.AppendFormat("", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("YYYY/MM/DD")) + StrXML.AppendFormat("", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("yyyy/MM/dd")) End If End If Next diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 212a0069d..f59b0d4b3 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -18371,6 +18371,10 @@ Partial Class Ventas DtTemporal.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime")) End If + If Not DtTemporal.Columns.Contains("Serie") Then + DtTemporal.Columns.Add("Serie", Type.GetType("System.String")) + End If + GvInv.Columns(4).Visible = DtTemporal.MAX("Serie", "Serie <> ''") <> "" Or CveVenta <= 0 GvInv.Columns(5).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> "" GvInv.Columns(6).Visible = DtTemporal.MAX("FechaCaducidad").ToDate > MinFecha