--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

@@ -1645,7 +1645,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>DESC.</Value>
<Value>=IIf((Min(Fields!Descuento.Value, "DsOC") = 0.01),"","DESC.")</Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>9.5pt</FontSize>
@@ -1969,7 +1969,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Descuento.Value</Value>
<Value>=IIf((Min(Fields!Descuento.Value, "DsOC") = 0.01),nothing,Fields!Descuento.Value)</Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>7.5pt</FontSize>
@@ -1994,6 +1994,7 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
@@ -2030,7 +2031,6 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
@@ -2101,7 +2101,7 @@
<Top>2.25503in</Top>
<Left>0.05854in</Left>
<Height>0.36345in</Height>
<Width>8.21572in</Width>
<Width>8.21571in</Width>
<ZIndex>5</ZIndex>
<Style>
<Border>

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