From c5e97bb891955bee51ca4f66e1d33092d1980551 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 1 Feb 2023 10:38:49 -0700 Subject: [PATCH] =?UTF-8?q?--=20optmizaci=C3=B3n=20para=20sacar=20info=20d?= =?UTF-8?q?e=20ps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/EntregaAlmacen.aspx.vb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 6564616f1..c53d15091 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -1156,8 +1156,9 @@ Partial Class Inventarios_EntregaAlmacen If Not CargaMasivo Then RegistraScript("$('#DivSerie').modal('show')", "show") Dim AplicaCaducidad = False - If GlobalDTPS(UsuarioActual.CveEmpresa, ).FiltraParametros("").Rows(0) IsNot Nothing Then - AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False) + Dim dttt As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie) + If dttt IsNot Nothing AndAlso dttt.Rows.Count > 0 Then + AplicaCaducidad = If(dttt.FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False) End If GvSerie.Columns(1).HeaderText = UsuarioActual.Empresa.Funcionalidad(147) @@ -1177,7 +1178,7 @@ Partial Class Inventarios_EntregaAlmacen 'SERIE LOTE RECOMENDADO Dim DtSerie As New DataTable - If TipoMovimiento = 1 Then + If TipoMovimiento = 1 AndAlso Not CargaMasivo Then Dim ObjInventarios As New ClsInventarios If ObjInventarios.SerieRecomendadoGet(CvePSSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), CveSubProyecto:=CveSubProyecto, CveCliente:=CveCliente, CveVendedor:=CveVendedor) Then DtSerie = ObjInventarios.DtResultados @@ -1254,7 +1255,7 @@ Partial Class Inventarios_EntregaAlmacen ArraySeries = Series.Trim.Split(","c) For i As Integer = 0 To ArraySeries.Length - 1 - If ArraySeries(i).Trim.Length > 1 Then AgregaSerie(ArraySeries(i).Trim, 1) + If ArraySeries(i).Trim.Length > 1 Then AgregaSerie(ArraySeries(i).Trim, 1, True) Next Else AgregaSerie(TxtSerie.Text.Trim, 1)