ajuste Serie lote caducidad

This commit is contained in:
rrene
2020-05-29 15:30:08 -07:00
parent 3a79dce99b
commit cf047d7412
3 changed files with 44 additions and 22 deletions

View File

@@ -2904,28 +2904,28 @@ Public Class ClsInventarios
Return Retorno Return Retorno
End Function End Function
Public Function LoteBatchFechaCaducidadGet(CvePS As Integer, Lote As String, Batch As String, CveEmpresa As Integer, Optional CveAlmacen As Integer = -1) As Boolean '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 ' Dim Retorno As Boolean = False
DataAdapter("PA_Inv_LoteBatchFechaCaducidadGet") ' DataAdapter("PA_Inv_LoteBatchFechaCaducidadGet")
With SqlAdapter.SelectCommand.Parameters ' With SqlAdapter.SelectCommand.Parameters
.Add("@CvePS", SqlDbType.Int).Value = CvePS ' .Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@Lote", SqlDbType.VarChar).Value = Lote ' .Add("@Lote", SqlDbType.VarChar).Value = Lote
.Add("@Batch", SqlDbType.VarChar).Value = Batch ' .Add("@Batch", SqlDbType.VarChar).Value = Batch
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen ' .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
End With ' End With
Try ' Try
SqlAdapter.Fill(Data) ' SqlAdapter.Fill(Data)
Retorno = True ' Retorno = True
Catch ex As Exception ' Catch ex As Exception
OnError("Ocurrió un error al obtener la Fecha Caducidad del Lote-Batch.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) ' OnError("Ocurrió un error al obtener la Fecha Caducidad del Lote-Batch.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try ' End Try
Return Retorno ' Return Retorno
End Function 'End Function
Public Function ActualizarEsDevolucionVenta(CveVenta As Integer, Valor As Integer) As Boolean Public Function ActualizarEsDevolucionVenta(CveVenta As Integer, Valor As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("Vta_UpdateDevolucionVenta") DataAdapter("Vta_UpdateDevolucionVenta")

View File

@@ -596,7 +596,9 @@ Partial Class Inventarios_EntregaAlmacen
DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen) DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen)
End If End If
If Not DtDatos.Columns.Contains("Serie") Then
DtDatos.Columns.Add("Serie", GetType(String))
End If
If Not DtDatos.Columns.Contains("Lote") Then If Not DtDatos.Columns.Contains("Lote") Then
DtDatos.Columns.Add("Lote", GetType(String)) DtDatos.Columns.Add("Lote", GetType(String))
End If End If
@@ -744,6 +746,20 @@ Partial Class Inventarios_EntregaAlmacen
DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen) DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen)
End If 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 If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
DivCodigoSeriePS.Visible = True DivCodigoSeriePS.Visible = True
Else Else
@@ -812,7 +828,8 @@ Partial Class Inventarios_EntregaAlmacen
If e.Row.DBCampo("Consec") <> "" AndAlso DtDatosDetalle IsNot Nothing Then If e.Row.DBCampo("Consec") <> "" AndAlso DtDatosDetalle IsNot Nothing Then
Dim Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DBCampo("Consec"))).Rows.Count 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 = Contador.ToString
'e.Row.FCTextBox("TbCantidadF").Text = "0" Else
e.Row.FCTextBox("TbCantidadF").Text = "0"
End If End If
@@ -867,6 +884,7 @@ Partial Class Inventarios_EntregaAlmacen
'FUNCIONALIDAD PISTOLA DE CODIGOS 'FUNCIONALIDAD PISTOLA DE CODIGOS
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
e.Row.FCTextBox("TbCantidadF").Text = "0"
'NO BLOQUEA PARA ROL AD 'NO BLOQUEA PARA ROL AD
If UsuarioActual.CveRol = 1 Then If UsuarioActual.CveRol = 1 Then
If e.Row.DBCampo("Inv_CveMetodoInventario").Contiene("5", "6") Then If e.Row.DBCampo("Inv_CveMetodoInventario").Contiene("5", "6") Then
@@ -2540,10 +2558,10 @@ Partial Class Inventarios_EntregaAlmacen
If CBool(Dr("AplicaSerie")) Then If CBool(Dr("AplicaSerie")) Then
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec"))) DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
For Each Dr1 As DataRow In DtDetalle.Rows For Each Dr1 As DataRow In DtDetalle.Rows
StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" CveSeccionAlmacen=""{3}"" Serie=""{4}"" Lote=""{5}"" FechaCaducidad=""{6}"" ></concepto>", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("YYYY/MM/DD")) StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" CveSeccionAlmacen=""{3}"" Serie=""{4}"" Lote=""{5}"" FechaCaducidad=""{6}"" ></concepto>", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("yyyy/MM/dd"))
Next Next
Else Else
StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" CveSeccionAlmacen=""{3}"" Serie=""{4}"" Lote=""{5}"" FechaCaducidad=""{6}"" ></concepto>", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("YYYY/MM/DD")) StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" CveSeccionAlmacen=""{3}"" Serie=""{4}"" Lote=""{5}"" FechaCaducidad=""{6}"" ></concepto>", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("yyyy/MM/dd"))
End If End If
End If End If
Next Next

View File

@@ -18371,6 +18371,10 @@ Partial Class Ventas
DtTemporal.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime")) DtTemporal.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime"))
End If 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(4).Visible = DtTemporal.MAX("Serie", "Serie <> ''") <> "" Or CveVenta <= 0
GvInv.Columns(5).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> "" GvInv.Columns(5).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> ""
GvInv.Columns(6).Visible = DtTemporal.MAX("FechaCaducidad").ToDate > MinFecha GvInv.Columns(6).Visible = DtTemporal.MAX("FechaCaducidad").ToDate > MinFecha