--Cuando no se emitio y te vas a ventas a emitir, no genera el PDF.

--Cuando no se emitió y te vas a ventas a emitir, te manda la liga para ir al cliente, alli que refresque la ventana de historial de ventas
This commit is contained in:
2025-01-04 13:47:58 -07:00
parent ae5e1f533f
commit f8a440f2d1
2 changed files with 28 additions and 8 deletions

View File

@@ -770,7 +770,16 @@ Partial Class Clientes
HplAddVenta.NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveCliente={0}", CveCliente)
HplAddCotizacion.NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveCliente={0}&Op=Cot", CveCliente)
'ImgAddObs.Attributes.Add("onclick", "javascript:PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ")
If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero()
If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then
Tab.ActiveTabIndex = Request("Opt").ToEntero()
'CARGA LOS DATOS DEL TAB QUE SELECCIONO
Select Case Tab.ActiveTabIndex
Case 2 'Historial de ventas
BtnHistorialVentas_Click(Nothing, EventArgs.Empty)
End Select
End If
CargaDireccionesEnvio()
CargaAFAsignados()

View File

@@ -18004,16 +18004,27 @@ Partial Class Ventas
End If
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant", "Egs") Then
'If Not ImprimeAlert Then
Dim ArchivoIng As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.rdlc", UsuarioActual.Empresa.Ruta))
Dim ArchivoRem As New System.IO.FileInfo(String.Format("{0}Formatos/Remision.rdlc", UsuarioActual.Empresa.Ruta))
Dim ArchivoEgs As New System.IO.FileInfo(String.Format("{0}Formatos/NotaCredito.rdlc", UsuarioActual.Empresa.Ruta))
If UsuarioActual.Empresa.Funcionalidad(707) = "1" Then
Dim ArchivoIng As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.mrt", UsuarioActual.Empresa.Ruta))
Dim ArchivoRem As New System.IO.FileInfo(String.Format("{0}Formatos/Remision.mrt", UsuarioActual.Empresa.Ruta))
Dim ArchivoEgs As New System.IO.FileInfo(String.Format("{0}Formatos/NotaCredito.mrt", UsuarioActual.Empresa.Ruta))
If ArchivoIng.Exists Or ArchivoRem.Exists Or ArchivoEgs.Exists Then
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta)))
If ArchivoIng.Exists Or ArchivoRem.Exists Or ArchivoEgs.Exists Then
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta)))
Else
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
End If
Else
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
Dim ArchivoIng As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.rdlc", UsuarioActual.Empresa.Ruta))
Dim ArchivoRem As New System.IO.FileInfo(String.Format("{0}Formatos/Remision.rdlc", UsuarioActual.Empresa.Ruta))
Dim ArchivoEgs As New System.IO.FileInfo(String.Format("{0}Formatos/NotaCredito.rdlc", UsuarioActual.Empresa.Ruta))
If ArchivoIng.Exists Or ArchivoRem.Exists Or ArchivoEgs.Exists Then
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta)))
Else
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
End If
End If
End If