--Promociones para productos adicionales

This commit is contained in:
2025-02-14 12:33:26 -07:00
parent a912f64620
commit 99811acc6f

View File

@@ -21191,9 +21191,24 @@ Partial Class Ventas
End If
End If
Dim DescAdicional As Decimal = 0
Dim CvePromoDetalle As Integer = -1
Dim ObjDesc As New VentaDescuentos
If PrecioSugerido > 0 Then
PU = PrecioSugerido
ObjDesc = CalcularDescuentos(CvePSAdicional, DrPoliza("Cantidad").ToString().ToDecimal(), PU)
If ObjDesc IsNot Nothing Then
If ObjDesc.EsPUModificado Then
PU = ObjDesc.PU
End If
DescAdicional = ObjDesc.ImporteDescuento
CvePromoDetalle = ObjDesc.CvePromocionDetalle
End If
End If
PU = PU.RoundSQL(6)
DrPoliza("PU") = PU
@@ -21213,7 +21228,7 @@ Partial Class Ventas
DrPoliza("PorcentajeIEPS") = DrPSAdicional("IEPSPorcentaje")
DrPoliza("ImporteIEPS") = (DrPSAdicional("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
DrPoliza("IEPS") = DrPoliza("ImporteIEPS")
DrPoliza("Descuento") = 0 ' Descuento
DrPoliza("Descuento") = DescAdicional ' Descuento
DrPoliza("TipoDescuento") = HdnTipoDescuento.Value
DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU)
DrPoliza("TotalImporte") = (DrPoliza("Cantidad").ToString().ToDecimal * PU).RoundSQL(NumeroDecimales)
@@ -21221,7 +21236,7 @@ Partial Class Ventas
DrPoliza("SATClaveProdServ") = DrPSAdicional("SATClavePS")
DrPoliza("SATClaveUM") = DrPSAdicional("SATClaveUnidadMedida")
DrPoliza("CveActivoFijo") = -1
DrPoliza("CvePromocionDetalle") = -1
DrPoliza("CvePromocionDetalle") = CvePromoDetalle
TmpDT.Rows.Add(DrPoliza)
End If