--Ajuste de 1 centavo al recibir usados

This commit is contained in:
2023-08-14 18:03:05 -07:00
parent 4157de2745
commit 97f8bd49fc
2 changed files with 10 additions and 4 deletions

View File

@@ -7873,6 +7873,11 @@ Partial Class PV
DescuentoCargo = (TotalAnterior - Dr("Descuento").ToString.ToDecimal())
End If
'AJUSTA EL DESCUENTO PARA QUE NO RESTE EL TOTAL
If DescuentoCargo = (TotalAnterior - Dr("Descuento").ToString.ToDecimal()) Then
DescuentoCargo -= 0.01D
End If
Dim Descuento As Decimal = Dr("Descuento").ToString.ToDecimal + DescuentoCargo
Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * (Dr("PU").ToString.ToDecimal)) - Descuento
TotalCargos -= DescuentoCargo
@@ -7896,6 +7901,7 @@ Partial Class PV
Next
TmpDT.AcceptChanges()
If TotalCargos > 0 Then ' cuando se entrega más valor de usados, que los cargos hechos, se descuenta sobre el PU del producto de venta
Dim DtPSFiltro As DataTable = TmpDT.FiltraParametros($"Consec = {ConsecPSPadre} AND EsCargo = False AND EliminarDB = False AND CvePS={CvePS} AND (Total - Descuento) > 0.0000", Orderby:="Consec DESC")
Dim Divisor As Decimal = 1