From a9b89c5be1f63d14ba2e9b0e20f81a91b181eb3b Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 14 Dec 2021 13:05:48 -0700 Subject: [PATCH] descarga de xml junto con pdf, en el rol=1 --- Ventas/RepProductosServiciosDetalle.aspx.vb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Ventas/RepProductosServiciosDetalle.aspx.vb b/Ventas/RepProductosServiciosDetalle.aspx.vb index 9774ff465..022ce96af 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx.vb +++ b/Ventas/RepProductosServiciosDetalle.aspx.vb @@ -906,8 +906,20 @@ Partial Class Ventas_RepProductosServiciosDetalle If Drow("TipoDocumento").ToString.Trim <> String.Empty Then Archivo = String.Format("{0}PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString) If File.Exists(Archivo) Then + archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".pdf") - ' Exit For + + If UsuarioActual.CveRol = 1 Then + Archivo = String.Format("{0}XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString) + If File.Exists(Archivo) Then + archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".xml") + ' Exit For + Else + HuboInexistentes = True + SBInexistentes.AppendFormat("Tipo {0}, Folio {1} - {2}
", Drow("TipoDocumento").ToString, SerieFolio, Archivo) + End If + End If + Else HuboInexistentes = True SBInexistentes.AppendFormat("Tipo {0}, Folio {1} - {2}
", Drow("TipoDocumento").ToString, SerieFolio, Archivo)