--FIX promo alcalinas y condiciones comerciales

This commit is contained in:
2025-02-18 18:09:06 -07:00
parent 37fb6c1813
commit 25d16a1869

View File

@@ -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