This commit is contained in:
2025-02-17 21:51:51 -07:00
17 changed files with 1679 additions and 131 deletions

View File

@@ -21192,9 +21192,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
@@ -21214,7 +21229,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)
@@ -21222,7 +21237,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