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..8792861e6 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,30 +2326,26 @@ 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