From 13ee4e900fc40be8beb73dc72eb6dceecddb3b5d Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 14 May 2025 18:54:49 -0700 Subject: [PATCH 1/4] --Hyperlink en reporte --- Ventas/RepAnticipo-NC-IXCAplicados.aspx | 6 +++++- Ventas/RepAnticipo-NC-IXCAplicados.aspx.cs | 24 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/Ventas/RepAnticipo-NC-IXCAplicados.aspx b/Ventas/RepAnticipo-NC-IXCAplicados.aspx index 587f29b93..f3474a5bc 100644 --- a/Ventas/RepAnticipo-NC-IXCAplicados.aspx +++ b/Ventas/RepAnticipo-NC-IXCAplicados.aspx @@ -112,7 +112,11 @@ CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" data-sort="true" Width="99%" DataKeyNames="CveCliente,CveMoneda,CveSubProyecto,FechaI,FechaF,FechaICorte,FechaFCorte,TipoCambio,TCEspecifico,ConSaldo"> - + + + + + diff --git a/Ventas/RepAnticipo-NC-IXCAplicados.aspx.cs b/Ventas/RepAnticipo-NC-IXCAplicados.aspx.cs index 301e29c7f..d5c7b9ede 100644 --- a/Ventas/RepAnticipo-NC-IXCAplicados.aspx.cs +++ b/Ventas/RepAnticipo-NC-IXCAplicados.aspx.cs @@ -210,6 +210,30 @@ public partial class Ventas_RepAnticipo_NC_IXCAplicados : ClsPaginas } } + if (e.Row.DBCampo("CveCliente").ToEntero() > 0) + { + if (e.Row.DBCampo("Tipo").ToEntero() == 0) + { + e.Row.CssClass = "SubTotales"; + } + + switch (e.Row.DBCampo("Tipo")) + { + case "0": + e.Row.FCHyperLink("HLFolio").NavigateUrl = string.Format("/Ventas/Clientes.aspx?CveCliente={0}", e.Row.DBCampo("CveCliente").ToEntero()); + break; + case "1": + e.Row.FCHyperLink("HLFolio").NavigateUrl = string.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DBCampo("Id").ToEntero()); + break; + case "2": + e.Row.FCHyperLink("HLFolio").NavigateUrl = string.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DBCampo("Id").ToEntero()); + break; + case "3": + e.Row.FCHyperLink("HLFolio").NavigateUrl = string.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("Id").ToEntero()); + break; + } + } + } } From 1db50763218e0020f870292c7af69d058c430f6a Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 14 May 2025 18:55:05 -0700 Subject: [PATCH 2/4] --Descuento global para alatel --- Ventas/Ventas.aspx | 57 +++++++++++++++++++++++++++--- Ventas/Ventas.aspx.vb | 81 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 125 insertions(+), 13 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index b060a909e..b6b2b0452 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -1127,8 +1127,8 @@ Predial - Ed. Med - + Ed. Med + IVA IEPS @@ -1262,8 +1262,7 @@ - - + @@ -4726,6 +4725,54 @@ + + +
- +
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 87393a619..b519e3528 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -3667,11 +3667,22 @@ Partial Class Ventas InicializaDevolucionAlmacen() + HabilitarDescuentoGlobal() + End If + + End Sub + + Private Sub HabilitarDescuentoGlobal() + If UsuarioActual.CveRol = 1 AndAlso UsuarioActual.CveEmpresa.Contiene(181, 182, 183) AndAlso (CveVenta <= 0 OrElse EsCreaApartirDe) Then + ImgDescTotal.Visible = True + ImgDescTotal.Attributes.Add("onclick", "javascript:$('#ModalDescuentoGlobal').modal();") + End If End Sub #Region "Bloqueo Pantalla" + Private Sub ValidaUsuarioAcceso() 'VERIFICAR SI LA SESION SE ENCUENTRA BLOQUEADA If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then @@ -17539,9 +17550,9 @@ Partial Class Ventas saldo = (e.Row.DataKey("Saldo").ToString().ToDecimal * tipoCambio).TruncateDecimal Else saldo = e.Row.DataKey("Saldo").ToDecimal - End If - Else - saldo = e.Row.DataKey("Saldo").ToString().ToDecimal + End If + Else + saldo = e.Row.DataKey("Saldo").ToString().ToDecimal If CveVenta <= 0 Then If DdlTipoAmortizacionAnticipo.SelectedValue.Contiene("2") Then 'cuando es por NC, debe de tomar el total de su saldo respectivo @@ -18592,6 +18603,25 @@ Partial Class Ventas RegistraScript("$('#ModalDescuento').modal('hide')", "hidemodal") UpPS.Update() End Sub + + Protected Sub BtnAplicarDescGlobal_Click(sender As Object, e As System.EventArgs) Handles BtnAplicarDescGlobal.Click + Dim DescuentoManual As Decimal = TxtMontoDescGlobal.Text.ToDecimal() + Dim PorcentajeDescuento As Decimal = TxtPorDescGlobal.Text.ToDecimal() + + If DescuentoManual <> 0 AndAlso PorcentajeDescuento <> 0 Then + Alert("Debe elegir un solo tipo de descuento", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + If PorcentajeDescuento > 100 Then + Alert("El porcentaje no puede ser mayor a 100", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + RecalculaPrecios(False, False, AplicarDescuentoGlobal:=True) + RegistraScript("$('#ModalDescuentoGlobal').modal('hide')", "hidemodal") + UpPS.Update() + End Sub Private Sub BtnAplicarOtrosConceptos_Click(sender As Object, e As EventArgs) Handles BtnAplicarOtrosConceptos.Click TotalOtrosConceptos = 0 @@ -40796,9 +40826,16 @@ Partial Class Ventas RegistraScript("MuestraAnticipos();", "AE") End Sub - Private Sub RecalculaPrecios(ByRef RecalculoPromociones As Boolean, Optional AplicarPromociones As Boolean = False) + Private Sub RecalculaPrecios(ByRef RecalculoPromociones As Boolean, Optional AplicarPromociones As Boolean = False, Optional AplicarDescuentoGlobal As Boolean = False) Dim PuedeRecalcular As Boolean = False + Dim DescuentoManual As Decimal = 0, DescuentoPorcentaje As Decimal = 0 + + If AplicarDescuentoGlobal Then + DescuentoManual = TxtMontoDescGlobal.Text.ToDecimal() + DescuentoPorcentaje = TxtPorDescGlobal.Text.ToDecimal() + End If + If CveVenta <= 0 OrElse EsCreaApartirDe OrElse (ModalidadEdicion AndAlso Not DdlTipoComprobante.SelectedValue = "Cot") Then PuedeRecalcular = True End If @@ -40812,19 +40849,25 @@ Partial Class Ventas PuedeRecalcular = True End If + If AplicarDescuentoGlobal Then + PuedeRecalcular = True + End If + If TmpDT IsNot Nothing AndAlso PuedeRecalcular Then For Each Row As DataRow In TmpDT.Rows Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal() Dim CveClasificacion As Integer = Row("CveClasificacion").ToString().ToEntero Dim CvePS As Integer = Row("CvePS").ToString().ToEntero + Dim CodigoPS As String = Row("CodigoPS").ToString() + Dim PUOriginal As Decimal = Row("PU").ToString().ToDecimal() Dim CvePrecioListaSugerido As Integer = -1 Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = Nothing - If AplicarPromociones Then + If AplicarPromociones OrElse AplicarDescuentoGlobal Then ObjPrecioSugerido = New Modelos.MPrecioSugerido() - ObjPrecioSugerido.PrecioSugerido = Row("PU").ToString().ToDecimal() + ObjPrecioSugerido.PrecioSugerido = PUOriginal ObjPrecioSugerido.CvePrecioLista = Row("CvePrecioLista").ToString().ToEntero() Else ObjPrecioSugerido = CalculaPrecioSugerido(CvePS, CveClasificacion) @@ -40834,8 +40877,30 @@ Partial Class Ventas Dim PU As Decimal = ObjPrecioSugerido.PrecioSugerido.RoundSQL(6) Dim ObjDescuento As Modelos.VentaDescuentos = CalcularDescuentos(CvePS, Cantidad, PU) - If ObjDescuento.EsPUModificado Then - PU = ObjDescuento.PU + If AplicarDescuentoGlobal Then + + If DescuentoManual > 0 Then + ObjDescuento.EsPUModificado = False + ObjDescuento.ImporteDescuento = DescuentoManual + ObjDescuento.ImporteProntoPago = 0 + + If ObjDescuento.ImporteDescuento > (Cantidad * PU) Then + Alert($"El producto y/o servicio '{CodigoPS}' no puede tener un descuento mayor al total", TipoMensaje.MsgAdvertencia) + Continue For + End If + + End If + + If DescuentoPorcentaje > 0 Then + ObjDescuento.EsPUModificado = False + ObjDescuento.ImporteDescuento = (Cantidad * PU) * (DescuentoPorcentaje / 100D) + ObjDescuento.ImporteProntoPago = 0 + End If + + Else + If ObjDescuento.EsPUModificado Then + PU = ObjDescuento.PU + End If End If 'SI NO TIENE PROMOCION, NO MODIFICAR NADA From bb79c3405671f2a49fb83e5ce6ca22531a22963a Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 15 May 2025 16:59:36 -0700 Subject: [PATCH 3/4] CAt Af Ultima Iamagen carga al estar visible, Correciones diario de pagos, Productos servicios franquicia sincronizacion campos de inventario --- AF/CatAF.aspx | 58 ++- AF/CatAF.aspx.vb | 41 +- App_Code/ClsPaginas.vb | 8 +- App_Code/DtDatos.xsd | 472 ++++++++++---------- Contabilidad/DiarioPagos.aspx | 1 + Contabilidad/DiarioPagos.aspx.vb | 12 +- Empresas/119/Formatos/RepIVAAcreditable.rpt | Bin 147456 -> 147456 bytes Ventas/ProductosServicios.aspx.vb | 4 +- 8 files changed, 332 insertions(+), 264 deletions(-) diff --git a/AF/CatAF.aspx b/AF/CatAF.aspx index 2477b9e6d..2e8c340f9 100644 --- a/AF/CatAF.aspx +++ b/AF/CatAF.aspx @@ -254,7 +254,9 @@
Encontrados:
- + <%-- 0 --%> @@ -432,10 +434,15 @@
- --%> + + <%-- - <%----%> + onclick="abrirModal(this.src)">--%> +
@@ -447,6 +454,7 @@
+ @@ -573,7 +581,7 @@ - <%-- + <%-- --%> - <%-- - lazyImages.forEach(function (img) { - observer.observe(img); - }); - }); - --%>