From f8a440f2d1fbcc5b50beb6f17e73910954c26a4d Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Sat, 4 Jan 2025 13:47:58 -0700 Subject: [PATCH] =?UTF-8?q?--Cuando=20no=20se=20emitio=20y=20te=20vas=20a?= =?UTF-8?q?=20ventas=20a=20emitir,=20no=20genera=20el=20PDF.=20--Cuando=20?= =?UTF-8?q?no=20se=20emiti=C3=B3=20y=20te=20vas=20a=20ventas=20a=20emitir,?= =?UTF-8?q?=20te=20manda=20la=20liga=20para=20ir=20al=20cliente,=20alli=20?= =?UTF-8?q?que=20refresque=20la=20ventana=20de=20historial=20de=20ventas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Clientes.aspx.vb | 11 ++++++++++- Ventas/Ventas.aspx.vb | 25 ++++++++++++++++++------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index f03e46c57..fb945b820 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -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() diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index df9f2f60a..97d9f0a55 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -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("
", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta))) + If ArchivoIng.Exists Or ArchivoRem.Exists Or ArchivoEgs.Exists Then + MensajeAlert.AppendFormat("
", 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("
", 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