From e1750cbfdee99cdded9cc2c8f23ad92958bf1723 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 26 Feb 2024 14:11:23 -0700 Subject: [PATCH 1/3] --Atencion --No mostrar boton de ir al cliente en funcionalidad (109) --- Ventas/Ventas.aspx | 1 + Ventas/Ventas.aspx.vb | 25 +++++++++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index ddb128135..4b3a5f96e 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -9794,6 +9794,7 @@ function CalculaDescPS() { + console.log("evento descuento"); if ($get("TxtPorPS").value != "") { let PorcentajeDescuento = parseFloat($get("TxtPorPS").value); if (PorcentajeDescuento < 0 || PorcentajeDescuento > 99) { diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 79b0aff37..e95dc299a 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -4937,7 +4937,10 @@ Partial Class Ventas End If Case "Rem" - 'IPP 15 Julio 2017 + If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then + TxtAtencionA.Text = DbRowVenta("AtencionA").ToString() + End If + Trsaldo.Visible = True HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta")) HplPagado.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta")) @@ -10685,7 +10688,13 @@ Partial Class Ventas Liga = $"document.location.href=""/CRM/Acercamiento.aspx?CveAcercamiento={CveAcercamientoCRM}&OPTAB=COT"";" Alert(MensajeAlert.ToString(), TipoMensaje.MsgInformacion, Liga, TextoConfirmacion:="Aceptar", TextoSegundoBoton:=Nothing, JSBtn2:=Nothing, ShowCloseButton:=False) Else - Alert(MensajeAlert.ToString(), TipoMensaje.MsgDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False) + 'SI TIENE MODULO DE COBRANZA, NO MARDAR AL CLIENTE, DEBE SEGUIR REGISTRANDO + If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then + Alert(MensajeAlert.ToString(), TipoMensaje.MsgInformacion, Liga, TextoConfirmacion:="Seguir Registrando", ShowCloseButton:=False) + Else + Alert(MensajeAlert.ToString(), TipoMensaje.MsgDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False) + End If + End If MensajeAlert.Clear() @@ -10700,9 +10709,9 @@ Partial Class Ventas OnError("Ocurrió un error al limpiar los datos", ex) End Try - If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then - ImpresionDirectaPDF() - End If + 'If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then + ' ImpresionDirectaPDF() + 'End If Else ObjVentas.RollBack() @@ -10928,7 +10937,7 @@ Partial Class Ventas ObjFacturaDevolucion.Alfa1 = TxtAlfa1.Text.Trim End If - ObjFacturaDevolucion.AtencionA = If(ObjFacturaDevolucion.TipoDocto = "Cot" Or (ObjFacturaDevolucion.TipoDocto.Contiene("Ing", "Rem") AndAlso LblRFC.Text = "XAXX010101000"), TxtAtencionA.Text, "-1") + ObjFacturaDevolucion.AtencionA = "" ObjFacturaDevolucion.MotivoDescuento = TxtMotivoDescuento.Text.Trim ObjFacturaDevolucion.Observaciones = TxtObsFact.Text.Trim ObjFacturaDevolucion.Det_OrdenCompra = TxtDet_OrdenCompra.Text.Trim @@ -11211,7 +11220,7 @@ Partial Class Ventas ObjFacturaBonificacion.Alfa1 = TxtAlfa1.Text.Trim End If - ObjFacturaBonificacion.AtencionA = If(ObjFacturaBonificacion.TipoDocto = "Cot" Or (ObjFacturaBonificacion.TipoDocto.Contiene("Ing", "Rem") AndAlso LblRFC.Text = "XAXX010101000"), TxtAtencionA.Text, "-1") + ObjFacturaBonificacion.AtencionA = "" ObjFacturaBonificacion.MotivoDescuento = TxtMotivoDescuento.Text.Trim ObjFacturaBonificacion.Observaciones = TxtObsFact.Text.Trim ObjFacturaBonificacion.Det_OrdenCompra = TxtDet_OrdenCompra.Text.Trim @@ -11728,7 +11737,7 @@ Partial Class Ventas ObjFactura.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero() ObjFactura.CveSubProyectoCobranza = DdlSubProyectoCobranza.SelectedValue.ToEntero() ObjFactura.CveSubProyectoEjecucion = DdlSubProyectoEjecucion.SelectedValue.ToEntero() - ObjFactura.AtencionA = If(ObjFactura.TipoDocto = "Cot" Or (ObjFactura.TipoDocto.Contiene("Ing", "Rem") AndAlso LblRFC.Text = "XAXX010101000"), TxtAtencionA.Text, "-1") + ObjFactura.AtencionA = TxtAtencionA.Text ObjFactura.MotivoDescuento = TxtMotivoDescuento.Text.Trim ObjFactura.Observaciones = TxtObsFact.Text.Trim ObjFactura.Det_OrdenCompra = TxtDet_OrdenCompra.Text.Trim From 06d8f385e4a6ecbbcea59092dc8628f53c0536fb Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 27 Feb 2024 13:38:08 -0700 Subject: [PATCH 2/3] -- fix de impresion de ticket, etiqueta por empresa --- Compras/PopUpVerFactura.aspx.vb | 3 +++ Ventas/PVCobranza.aspx.vb | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 5c2593aa1..2e73e1c62 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -6040,6 +6040,9 @@ Partial Class PopUpVerFactura If DtPrecios IsNot Nothing Then Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/Etiqueta.mrt" + If System.IO.File.Exists(UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt") Then + DirectorioArchivo = UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt" + End If Dim params As New List(Of ReportParameter) ImprimirPDFStimul(DirectorioArchivo, DtPrecios, params, "Precios") diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index 8d0802f49..b07564e1a 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -539,12 +539,12 @@ Partial Class Ventas_PVCobranza Dim ExistePDF As Boolean = False Dim ArchivoPDF As String = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio) - If System.IO.File.Exists(ArchivoPDF) Then + If ObjFactura.TipoDocto = "Rem" AndAlso System.IO.File.Exists(ArchivoPDF) Then ExistePDF = True Else 'REGENERAR EL PDF Try - GenerarPDFVenta(CveVenta, AplicaPagare:="1", GuardarPDF:=True, RegenerarPDF:=True, DescargarArchivo:=False) + GenerarPDFVenta(CveVenta, AplicaPagare:="1", GuardarPDF:=True, RegenerarPDF:=True, DescargarArchivo:=False, EsTicket:=True) If System.IO.File.Exists(ArchivoPDF) Then ExistePDF = True End If From 8d3a44e25640abb6b2423cc84c3a4337cae8cf37 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 27 Feb 2024 19:05:44 -0700 Subject: [PATCH 3/3] --impresion de ticket desde ventas, solo sistema --- Ventas/Ventas.aspx | 4 +++- Ventas/Ventas.aspx.vb | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index c19b52fd6..65aa3a9ca 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -209,6 +209,9 @@
  • Imprimir PDF
  • +
  • + Imprimir Ticket +
  • Impresión directa
  • @@ -305,7 +308,6 @@
  • -
  • Imprimir diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index ddc56ee55..d0c65fca6 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -9774,6 +9774,9 @@ Partial Class Ventas HplImprimirPDFStimulsoft.Visible = True HplImprimirPDFStimulsoft.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=0&STIMULSOFT=1", CveVenta))) + + HplImprimirTicket.Visible = True + HplImprimirTicket.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1&TICKET=1®ENERAR=1", CveVenta))) End If End If