From 25d16a1869bcf40929f745cfcec5a3594a9e95b6 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 18 Feb 2025 18:09:06 -0700 Subject: [PATCH] --FIX promo alcalinas y condiciones comerciales --- Ventas/Ventas.aspx.vb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 93fbda7fc..76d3c1b0c 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -20348,6 +20348,8 @@ Partial Class Ventas PUModificado = (Costo + (Costo * PromocionPorcentaje / 100D)).RoundSQL(4) End If + Dim TieneCondicionesComerciales As Boolean = False + 'VERIFICA SI APLICAN CONDICIONES COMERCIALES If ValidaCondicionesComerciales AndAlso DtPorcentajeMarcas IsNot Nothing AndAlso DtPorcentajeMarcas.Rows.Count > 0 Then 'VERIFICA SI EL PRODUCTO TIENE ESPECIFICADA UNA MARCA @@ -20365,6 +20367,8 @@ Partial Class Ventas Dim TotalFinal As Decimal = TotalInicial 'SI APLICA EL PRIMER DESCUENTO If PorcentajeProducto > 0 Then + TieneCondicionesComerciales = True + Dim Descuento1 As Decimal = (TotalInicial * PorcentajeProducto).RoundSQL(2) Dim Total2 As Decimal = (TotalInicial - Descuento1) @@ -20409,7 +20413,7 @@ Partial Class Ventas Alert("No se calculó el descuento correctamente", TipoMensaje.MsgAdvertencia) End If - If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Not TieneCondicionesComerciales Then 'LTH AA Paq. 2 baterias, LTH AAA Paq. 02 baterias, LTH AA Paq. 4 baterias, LTH AAA Paq. 4 Baterias If CvePS.Contiene(521445, 521448, 402917, 402918) Then 'SI TIENE BATERIAS AGREGADAS CON LA MARCA LTH, APLICAR PROMOCION, LA CLASIFICACION DEBE SER ACUMULADORES