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)