Merge branch 'master' of http://jperez@adsistemasof.sytes.net:8383/SIG.git
This commit is contained in:
@@ -14303,6 +14303,7 @@ Partial Class Ventas
|
||||
Dim CantMinima As Integer = 0
|
||||
Dim CveMarcaPS As Integer = 0
|
||||
Dim CveClasifPS As Integer = 0
|
||||
Dim CveRinTamañoPS As Integer = 0
|
||||
Dim CvePromocionDetalle As Integer = 0
|
||||
Dim ObjDescuento As New Descuentos
|
||||
|
||||
@@ -14311,6 +14312,7 @@ Partial Class Ventas
|
||||
|
||||
CveMarcaPS = DrPS("CveMarca").ToString.ToEntero
|
||||
CveClasifPS = DrPS("CveClasificacion").ToString.ToEntero
|
||||
CveRinTamañoPS = DrPS("CveRinTamaño").ToString.ToEntero
|
||||
|
||||
If CveClasifPS = 20636 Then
|
||||
ValidaCondicionesComerciales = False
|
||||
@@ -14320,7 +14322,7 @@ Partial Class Ventas
|
||||
|
||||
|
||||
If DtPromociones IsNot Nothing AndAlso DtPromociones.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = DtPromociones.FiltroPrimero(String.Format("CvePS = {0} AND (CveSubProyecto = {1} OR CveSubProyecto IS NULL)", CvePS, DdlSubProyectoDatos.SelectedValue))
|
||||
Dim dr As DataRow = DtPromociones.FiltroPrimero(String.Format("CvePS = {0} AND (CveSubProyecto = {1} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {2} OR CveRinTamaño IS NULL)", CvePS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS))
|
||||
If dr IsNot Nothing Then
|
||||
TipoPromo = dr("TipoPromocion").ToString.ToEntero
|
||||
TotalPromocion = dr("PUPromocion").ToString.ToDecimal * TxtCantidad.Text.ToDecimal
|
||||
@@ -14329,13 +14331,18 @@ Partial Class Ventas
|
||||
CvePromocionDetalle = dr("CvePromocionDetalle").ToString.ToEntero
|
||||
Else
|
||||
'verifica marca, si tiene asignada la promocion
|
||||
Dim drC As DataRow = DtPromociones.FiltroPrimero(String.Format("CveClasificacion = {0} AND (CveMarca = {1} OR CveMarca IS NULL)", CveClasifPS, CveMarcaPS))
|
||||
Dim drC As DataRow = DtPromociones.FiltroPrimero(String.Format("CveClasificacion = {0} AND (CveMarca = {1} OR CveMarca IS NULL) AND (CveSubProyecto = {2} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {2} OR CveRinTamaño IS NULL)", CveClasifPS, CveMarcaPS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS))
|
||||
|
||||
If drC IsNot Nothing Then
|
||||
Dim Cant As Integer = 1
|
||||
TipoPromo = drC("TipoPromocion").ToString.ToEntero
|
||||
TotalPromocion = drC("PUPromocion").ToString.ToDecimal * TxtCantidad.Text.ToDecimal
|
||||
PromocionPorcentaje = drC("Promocion").ToString.ToDecimal
|
||||
CantMinima = drC("CantidadMinima").ToString.ToEntero
|
||||
If CantMinima > 0 Then
|
||||
Cant = Math.Floor(TxtCantidad.Text.ToDecimal / CantMinima).ToEntero
|
||||
|
||||
End If
|
||||
TotalPromocion = Math.Round(drC("PUPromocion").ToString.ToDecimal * Cant / (1 + PorcentajeIVA), 6)
|
||||
PromocionPorcentaje = drC("Promocion").ToString.ToDecimal
|
||||
CvePromocionDetalle = drC("CvePromocionDetalle").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
@@ -14818,7 +14825,7 @@ Partial Class Ventas
|
||||
End If
|
||||
PU = Math.Round(PU, 6)
|
||||
DrPoliza("PU") = PU
|
||||
TotalCalculableImpuestos = (DrPoliza("Cantidad").ToString.ToDecimal * (PU)) - Descuento
|
||||
TotalCalculableImpuestos = (DrPoliza("Cantidad").ToString.ToDecimal * (PU))
|
||||
|
||||
If DrPSAdicional("IVA").ToString.Contiene("-1", "") Then
|
||||
DrPoliza("PorcentajeIVA") = PorcentajeIVA
|
||||
@@ -14834,7 +14841,7 @@ Partial Class Ventas
|
||||
DrPoliza("PorcentajeIEPS") = DrPSAdicional("IEPSPorcentaje")
|
||||
DrPoliza("ImporteIEPS") = Math.Round(DrPSAdicional("IEPSPorcentaje").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
||||
DrPoliza("IEPS") = DrPoliza("ImporteIEPS")
|
||||
DrPoliza("Descuento") = Math.Round(Descuento, NumeroDecimales)
|
||||
DrPoliza("Descuento") = Descuento
|
||||
DrPoliza("TipoDescuento") = HdnTipoDescuento.Value
|
||||
DrPoliza("Total") = (DrPoliza("Cantidad").ToString.ToDecimal * PU)
|
||||
DrPoliza("TotalImporte") = Math.Round(DrPoliza("Cantidad").ToString.ToDecimal * PU, NumeroDecimales)
|
||||
|
||||
Reference in New Issue
Block a user