Mejoras en reportes y cambios para generacion poliza
This commit is contained in:
@@ -1773,26 +1773,26 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Dim dt As DataTable = DtMovimientos.FiltraParametros("", "", filtro)
|
||||
Dim ObjCompra As New ClsCompras
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim pathPoliza As String
|
||||
Dim TieneComprobante As Boolean = True
|
||||
Dim pathPoliza As String = ""
|
||||
Dim TieneComprobante As Boolean
|
||||
|
||||
Try
|
||||
TieneComprobante = VerificarComprobante()
|
||||
If TieneComprobante Then
|
||||
|
||||
Path = ImprimirPolizaPDF(IdPoliza)
|
||||
pathPoliza = Path
|
||||
If File.Exists(Path) Then
|
||||
Pathpdf.Add(Path)
|
||||
End If
|
||||
|
||||
Path = ImprimirPolizaPDF(IdPoliza)
|
||||
pathPoliza = Path
|
||||
If File.Exists(Path) Then
|
||||
Pathpdf.Add(Path)
|
||||
End If
|
||||
|
||||
For Each Row As DataRow In dt.Rows
|
||||
If TieneComprobante Then
|
||||
For Each Row As DataRow In dt.Rows
|
||||
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
|
||||
Dim formato As String = System.IO.Path.GetExtension(Path)
|
||||
If formato.ToLower.Contiene(".jpg", ".png", ".jpeg") Then
|
||||
Dim ComprobantePDF As String = String.Format("{0}\{1}\comprobante.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick)
|
||||
@@ -1815,9 +1815,6 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Else
|
||||
Pathpdf.Add(Path)
|
||||
End If
|
||||
Else
|
||||
TieneComprobante = False
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -1837,10 +1834,9 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
|
||||
If TieneComprobante Then
|
||||
dt = DtMovimientos.FiltraParametros("", "", filtroComplemento)
|
||||
For Each Row As DataRow In dt.Rows
|
||||
If ObjCompra.GetCompraComplementoPago(-1, UsuarioActual.CveEmpresa, Row("CveIE").ToString.ToEntero) Then
|
||||
@@ -1865,6 +1861,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
If File.Exists(pathPoliza) Then
|
||||
Directory.Delete(String.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("No se tiene cargado comprobante de pago", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -2322,5 +2319,40 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function VerificarComprobante() As Boolean
|
||||
Dim filtro() As String = {"CveCompra", "CveIE", "CveConceptoContable"}
|
||||
Dim Path As String
|
||||
Dim dt As DataTable = DtMovimientos.FiltraParametros("", "", filtro)
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim TieneComprobante As Boolean = True
|
||||
|
||||
For Each Row As DataRow In dt.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
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
ObjIE.Dispose()
|
||||
Return TieneComprobante
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user