Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -250,14 +250,16 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
GvConcepto.Columns(4).Visible = False
|
||||
GvMov.Columns(5).Visible = False
|
||||
End If
|
||||
LnkExcel.Visible = False
|
||||
LnkImprimirPoliza.Visible = True
|
||||
|
||||
If IfNull(Request("Conta"), "").ToString = "1" Then
|
||||
Contabilizar()
|
||||
End If
|
||||
Exit Sub
|
||||
LnkExcel.Visible = False
|
||||
Else
|
||||
LnkExcel.Visible = True
|
||||
LnkImprimirPoliza.Visible = False
|
||||
CreaDT()
|
||||
BtnEliminar.Visible = False
|
||||
|
||||
@@ -1840,21 +1842,21 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Next
|
||||
|
||||
|
||||
dt = DtMovimientos.FiltraParametros("", "", filtroComplemento)
|
||||
For Each Row As DataRow In dt.Rows
|
||||
|
||||
For Each Row As DataRow In dt.FiltraParametros("CveConceptoContable = 30").Rows
|
||||
If ObjCompra.GetCompraComplementoPago(-1, UsuarioActual.CveEmpresa, Row("CveIE").ToString.ToEntero) Then
|
||||
If ObjCompra.DtResultados IsNot Nothing AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = ObjCompra.DtResultados.Rows(0)
|
||||
Dim RFC As String = dr("RFCde").ToString
|
||||
Dim CveFactura As String = dr("CveFactura").ToString
|
||||
Console.WriteLine(RFC & CveFactura)
|
||||
If CveFactura <> "" Then
|
||||
Path = String.Format("{0}Compras\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, RFC, CveFactura)
|
||||
Console.WriteLine(Path)
|
||||
If File.Exists(Path) Then
|
||||
Pathpdf.Add(Path)
|
||||
For Each RowComple As DataRow In ObjCompra.DtResultados.FiltraParametros("", "", {"RFCde", "CveFactura"}).Rows
|
||||
Dim RFC As String = RowComple.Item("RFCde").ToString
|
||||
Dim CveFactura As String = RowComple.Item("CveFactura").ToString
|
||||
If CveFactura <> "" Then
|
||||
Path = String.Format("{0}Compras\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, RFC, CveFactura)
|
||||
If File.Exists(Path) Then
|
||||
Pathpdf.Add(Path)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -1889,7 +1891,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtVC As DataTable
|
||||
Dim dr As DataRow
|
||||
dtVC = ObjConta.DtResultados
|
||||
dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
|
||||
dr = dtVC.Rows(0)
|
||||
Dim ruta As String = ""
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
@@ -2343,20 +2345,20 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
For Each Row As DataRow In dt.FiltraParametros("CveConceptoContable = 30").Rows
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
Next
|
||||
ObjIE.Dispose()
|
||||
@@ -2364,5 +2366,53 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
|
||||
End Function
|
||||
|
||||
Protected Sub LnkImprimirPoliza_Click(sender As Object, e As EventArgs)
|
||||
ImprimirPolizaPDFRunTime(IdPoliza)
|
||||
End Sub
|
||||
Private Function ImprimirPolizaPDFRunTime(IdPoliza As Integer) As String
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
'Dim ObjPoliza As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim Bytes As Byte() = Nothing
|
||||
|
||||
|
||||
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
|
||||
If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtVC As DataTable
|
||||
Dim dr As DataRow
|
||||
dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
|
||||
dr = dtVC.Rows(0)
|
||||
Dim ruta As String = ""
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString))
|
||||
params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString))
|
||||
'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString))
|
||||
params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString))
|
||||
params.Add(New ReportParameter("Moneda", ""))
|
||||
params.Add(New ReportParameter("CodigoPostal", ""))
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
End If
|
||||
If Archivo.Exists Then
|
||||
ruta = UsuarioActual.Empresa.Ruta & "Formatos/Polizas.rdlc"
|
||||
Else
|
||||
ruta = "Empresas/Grales/Formatos/Polizas.rdlc"
|
||||
End If
|
||||
ImprimirbytesPDF(StreamPDF(ruta, dtVC, params, "ppoliza"), String.Format("{0}-{1}", TipoPoliza, dr("FolioPoliza").ToString), "PDF", True)
|
||||
|
||||
End If
|
||||
Return String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, IdPoliza.ToString)
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user