diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index ba2fb34e6..72c01ec75 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -5462,6 +5462,11 @@ Public Class ClsPaginas
Vta = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.Factura)
PathArchivo = String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)
+
+ If EsTicket Then
+ PathArchivo = String.Format("{0}PDF\{1}\{2}_Ticket.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)
+ End If
+
Dim Archivo As New System.IO.FileInfo(PathArchivo)
'SI EL ARCHIVO NO EXISTE O SE VA REGENERA EL PDF, SE DEBEN LLENAR LOS DATOS
@@ -7443,25 +7448,31 @@ Public Class ClsPaginas
params.Add(New ReportParameter("RegimenFiscalEmpresa", String.Format("{0} - {1}", UsuarioActual.Empresa.CodigoRegimenFiscal, UsuarioActual.Empresa.RegimenFiscal)))
End If
End If
+
+ Dim RutaPDF As String = String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)
+ If EsTicket Then
+ RutaPDF = String.Format("{0}PDF\{1}\{2}_Ticket.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)
+ End If
+
If Not UsarStimul Then
Dim Archivo As New System.IO.FileInfo(RutaFormato)
If Archivo.Exists Then
retorno = StreamPDF(RutaFormato, lrds, params, NombreArchivo, "PDF", MR:=Nothing, SubReportData:=SubReportData)
- Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio))
+ Dim ArchivoPDF As New System.IO.FileInfo(RutaPDF)
If Guardar Then
If Not ArchivoPDF.Exists Then
Try
DirectoryExistsCreate(String.Format("{0}PDF", UsuarioActual.Empresa.Ruta))
DirectoryExistsCreate(String.Format("{0}PDF\{1}", UsuarioActual.Empresa.Ruta, Vta.TipoDocto))
- File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
+ File.WriteAllBytes(RutaPDF, retorno)
Catch ex As Exception
Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
End Try
Else
Try
ArchivoPDF.Delete()
- File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
+ File.WriteAllBytes(RutaPDF, retorno)
Catch ex As Exception
Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
End Try
@@ -7480,20 +7491,20 @@ Public Class ClsPaginas
retorno = StreamBytesStimul("Facturas", RutaFormato, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF")
If UsuarioActual.Empresa.Funcionalidad(707) = "1" Then
- Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio))
+ Dim ArchivoPDF As New System.IO.FileInfo(RutaPDF)
If Guardar Then
If Not ArchivoPDF.Exists Then
Try
DirectoryExistsCreate(String.Format("{0}PDF", UsuarioActual.Empresa.Ruta))
DirectoryExistsCreate(String.Format("{0}PDF\{1}", UsuarioActual.Empresa.Ruta, Vta.TipoDocto))
- File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
+ File.WriteAllBytes(RutaPDF, retorno)
Catch ex As Exception
Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
End Try
Else
Try
ArchivoPDF.Delete()
- File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
+ File.WriteAllBytes(RutaPDF, retorno)
Catch ex As Exception
Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
End Try
diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb
index 4f6cc4926..453eaa541 100644
--- a/Ventas/PVCobranza.aspx.vb
+++ b/Ventas/PVCobranza.aspx.vb
@@ -576,8 +576,12 @@ Partial Class Ventas_PVCobranza
Dim ObjFactura As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, CargaDTDetalle:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False, VerificaAlmacen:=False)
Dim ExistePDF As Boolean = False
- Dim ArchivoPDF As String = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
-
+ Dim ArchivoPDF As String = ""
+ If ObjFactura.TipoDocto = "Ing" Then
+ ArchivoPDF = String.Format("{0}/PDF/{1}/{2}_Ticket.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
+ Else
+ ArchivoPDF = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
+ End If
If File.Exists(ArchivoPDF) AndAlso ObjFactura.TipoDocto = "Rem" Then
ExistePDF = True
Else
diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx
index dd13947ba..1101cbd35 100644
--- a/Ventas/Ventas.aspx
+++ b/Ventas/Ventas.aspx
@@ -4568,6 +4568,13 @@