From 70b30b2f10af3c4b96954c763fd89cac4807f17a Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 24 Nov 2020 10:47:18 -0700 Subject: [PATCH] --sugiere serie si es rol 1 --- Inventarios/EntregaAlmacen.aspx | 2 +- Inventarios/EntregaAlmacen.aspx.vb | 25 +++++++++++++++++++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx index 021f659dd..08a39f76b 100644 --- a/Inventarios/EntregaAlmacen.aspx +++ b/Inventarios/EntregaAlmacen.aspx @@ -630,7 +630,7 @@ - + diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 8618c1d7b..07dd38708 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -900,6 +900,22 @@ Partial Class Inventarios_EntregaAlmacen LbCantidad.Text = e.Row.DBCampo("CantidadF") LbCantidad2.Text = e.Row.DBCampo("CantidadF") AgregaSerie(e.Row.DBCampo("ObservacionesDetalle"), 3) + End If + + If TipoDocto = "Ing" AndAlso e.Row.DBCampo("ObservacionesDetalle").Length > 8 AndAlso DdlAlmacen.SelectedValue.ToEntero > 0 AndAlso UsuarioActual.CveRol = 1 Then + Dim Str = e.Row.DBCampo("ObservacionesDetalle").Replace(",", " ").Replace(".", " ").Replace(vbTab, " ").Replace(vbLf, " ").Split(" "c) + CveConsecSerie = e.Row.DBCampo("Consec").ToString().ToEntero() + PSSerie = e.Row.DBCampo("PS").ToString() + CvePSSerie = e.Row.DBCampo("CvePS").ToEntero() + CveUMSerie = e.Row.DBCampo("CveUM").ToEntero() + LbCantidad.Text = e.Row.DBCampo("CantidadF") + LbCantidad2.Text = e.Row.DBCampo("CantidadF") + For Each st As String In Str + If Not st.Contiene("", "/") Then + AgregaSerie(st, 3) + End If + Next + End If Else @@ -1156,10 +1172,10 @@ Partial Class Inventarios_EntregaAlmacen Exit Sub End If - Dim AplicaCaducidad = False - If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0) IsNot Nothing Then - AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False) - End If + Dim AplicaCaducidad As Boolean = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltroPrimeroValor("AplicaCaducidad", "") = "True" + 'If GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0) IsNot Nothing Then + ' AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False) + 'End If 'Valida Existencia @@ -1172,6 +1188,7 @@ Partial Class Inventarios_EntregaAlmacen ObjInventarios.Dispose() Exit Sub End If + ObjInventarios.Dispose() Else If DtExistencias IsNot Nothing Then Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Serie = '{Serie}'")