From d607a51e329e532c50b3751291732565ef550f0d Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 30 Apr 2021 14:43:18 -0700 Subject: [PATCH] =?UTF-8?q?--=20se=20quit=C3=B3=20updatepanel,=20para=20al?= =?UTF-8?q?=20descarga?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contabilidad/RegPrePoliza.aspx | 9 ++------ Contabilidad/RegPrePoliza.aspx.vb | 38 +++++++++++++++---------------- 2 files changed, 21 insertions(+), 26 deletions(-) diff --git a/Contabilidad/RegPrePoliza.aspx b/Contabilidad/RegPrePoliza.aspx index ddfbb440e..648d661d5 100644 --- a/Contabilidad/RegPrePoliza.aspx +++ b/Contabilidad/RegPrePoliza.aspx @@ -67,8 +67,7 @@ - - +
  • Cargar Excel
  • @@ -82,11 +81,7 @@ Cargar Comprobante -
    - - - -
    +
    diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index 8c836c659..14d3b85a5 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -1870,6 +1870,8 @@ Partial Class ContabilidadC_RegPrePoliza Catch ex As Exception Alert("Error al descargar el paquete", TipoMensaje.MsgError) End Try + ObjCompra.Dispose() + ObjIE.Dispose() End Sub Private Function ImprimirPolizaPDF(IdPoliza As Integer) As String Dim ObjConta As New ClsContabilidad @@ -2324,34 +2326,32 @@ Partial Class ContabilidadC_RegPrePoliza Dim Path As String Dim dt As DataTable = DtMovimientos.FiltraParametros("", "", filtro) Dim ObjIE As New ClsBancos() - Dim TieneComprobante As Boolean = True + Dim TieneComprobante As Boolean = False - For Each Row As DataRow In dt.Rows + For Each Row As DataRow In dt.FiltraParametros("CveConceptoContable = 30").Rows - If TieneComprobante Then - If Row("CveConceptoContable").ToString.ToEntero = 30 Then - If Row("CveIE").ToString.ToEntero > 0 Then - If ObjIE.GetBancosIE(Row("CveIE").ToString.ToEntero, UsuarioActual.CveEmpresa) Then - If ObjIE.DtResultados.Rows.Count > 0 Then - Path = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString) - If File.Exists(Path) Then - TieneComprobante = True - Else - TieneComprobante = False - Exit For - End If - Else - TieneComprobante = False - Exit For - End If + If ObjIE.GetBancosIE(Row("CveIE").ToString.ToEntero, UsuarioActual.CveEmpresa) Then + If ObjIE.DtResultados.Rows.Count > 0 Then + Path = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString) + If File.Exists(Path) Then + TieneComprobante = True + Exit For + Else + TieneComprobante = False + Exit For End If + Else + TieneComprobante = False + Exit For End If End If - End If + Next ObjIE.Dispose() Return TieneComprobante + GuardaLog("Tiene Comprobante:" & TieneComprobante.ToString) + End Function End Class