Correcion descarga de pdf/xml en reporte de ventas detalle

This commit is contained in:
2021-05-19 10:19:09 -07:00
parent cca0e39474
commit 8a49803a96

View File

@@ -899,7 +899,11 @@ Partial Class RepVentaDetalle
pathPDF = Server.MapPath(String.Format("~/Empresas/{0}/PDF/{1}/{2}.pdf", UsuarioActual.CveEmpresa, TipoDocto, gvr.DataKey("SerieFolio").ToString)) pathPDF = Server.MapPath(String.Format("~/Empresas/{0}/PDF/{1}/{2}.pdf", UsuarioActual.CveEmpresa, TipoDocto, gvr.DataKey("SerieFolio").ToString))
If IO.File.Exists(pathPDF) Then If IO.File.Exists(pathPDF) Then
DescargaZIP.AddFile(pathPDF, "") 'NO AGREGAR ARCHIVOS REPETIDOS
Dim File As New IO.FileInfo(pathPDF)
If Not DescargaZIP.Any(Function(x) x.FileName.Contains(File.Name)) Then
DescargaZIP.AddFile(pathPDF, gvr.DataKey("TipoDocumento").ToString)
End If
End If End If
End If End If
Next Next
@@ -910,7 +914,7 @@ Partial Class RepVentaDetalle
Response.End() Response.End()
End Sub End Sub
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, CveUsuarioCreo As Integer) As Byte() Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, CveUsuarioCreo As Integer) As Byte()
Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", "http://localhost/", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta)))) Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", "http://localhost:85/", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
Dim File As Byte() = Nothing Dim File As Byte() = Nothing
Try Try
Using httpClient = New HttpClient() Using httpClient = New HttpClient()
@@ -961,7 +965,11 @@ Partial Class RepVentaDetalle
pathXML = Server.MapPath(String.Format("~/Empresas/{0}/XML/{1}/{2}.xml", UsuarioActual.CveEmpresa, TipoDocto, gvr.DataKey("SerieFolio").ToString)) pathXML = Server.MapPath(String.Format("~/Empresas/{0}/XML/{1}/{2}.xml", UsuarioActual.CveEmpresa, TipoDocto, gvr.DataKey("SerieFolio").ToString))
If IO.File.Exists(pathXML) Then If IO.File.Exists(pathXML) Then
DescargaZIP.AddFile(pathXML, "") 'NO AGREGAR ARCHIVOS REPETIDOS
Dim File As New IO.FileInfo(pathXML)
If Not DescargaZIP.Any(Function(x) x.FileName.Contains(File.Name)) Then
DescargaZIP.AddFile(pathXML, gvr.DataKey("TipoDocumento").ToString)
End If
End If End If
End If End If
Next Next