Se aplicaron Promociones en Ventas
This commit is contained in:
@@ -250,7 +250,7 @@ Partial Class Ventas_Promociones
|
||||
Dr("TipoPromocion") = DdlTipoPromocion.SelectedItem.Text
|
||||
Dr("Promocion") = TxtPromocionConcepto.Text
|
||||
|
||||
If DdlTipoPromocion.SelectedValue.ToEntero = 1 Then
|
||||
If DdlTipoPromocion.SelectedValue.ToEntero.Contiene(1, 3) Then
|
||||
Dr("PUPromocion") = TxtPromocionConcepto.Text.ToDecimal
|
||||
Else
|
||||
Dr("PUPromocion") = LbPUActual.Text.ToDecimal - (LbPUActual.Text.ToDecimal * TxtPromocionConcepto.Text.ToDecimal / 100)
|
||||
|
||||
@@ -13683,6 +13683,31 @@ Partial Class Ventas
|
||||
Descuento = HdnDescuento.Value.ToDecimal * TxtCantidad.Text.ToDecimal
|
||||
End If
|
||||
|
||||
|
||||
'Agrega Promocion en el Descuento
|
||||
Dim TipoPromo As Integer = 0
|
||||
Dim TotalPromocion As Decimal = 0
|
||||
Dim PromocionPorcentaje As Decimal = 0
|
||||
Dim CantMinima As Integer = 0
|
||||
|
||||
If DtPromociones.Rows.Count > 0 And DtPromociones IsNot Nothing Then
|
||||
Dim dr As DataRow = DtPromociones.FiltroPrimero($"CvePS = {CvePS}")
|
||||
TipoPromo = dr("TipoPromocion").ToString.ToEntero
|
||||
TotalPromocion = dr("PUPromocion").ToString.ToDecimal * TxtCantidad.Text.ToDecimal
|
||||
PromocionPorcentaje = dr("Promocion").ToString.ToDecimal
|
||||
CantMinima = dr("CantidadMinima").ToString.ToEntero
|
||||
End If
|
||||
|
||||
If TipoPromo = 1 Then 'Promocion por Importe $
|
||||
Descuento = Descuento + TotalPromocion
|
||||
ElseIf TipoPromo = 2 Then 'Promocion por %
|
||||
Descuento = Descuento + ((TxtPrecio.Text.Trim.ToDecimal * PromocionPorcentaje / 100) * TxtCantidad.Text.ToDecimal)
|
||||
ElseIf TipoPromo = 3 Then 'Promocion por Cantidad
|
||||
If TxtCantidad.Text.ToDecimal >= CantMinima Then
|
||||
Descuento = Descuento + TotalPromocion
|
||||
End If
|
||||
End If
|
||||
|
||||
AgregarProductoServicio(TxtCantidad.Text.ToDecimal, DdlUnidadMedida.SelectedValue.ToEntero, DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text,
|
||||
CvePS, "", TxtObsPS.Text.Trim, If(CvePSAmortizacion > 0, TxtPrecio.Text.Trim.ToDecimal * -1, TxtPrecio.Text.Trim.ToDecimal), Descuento,
|
||||
DdlProyecto.SelectedValue.ToEntero, DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedItem.Text,
|
||||
|
||||
Reference in New Issue
Block a user