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

View File

@@ -7873,6 +7873,11 @@ Partial Class PV
DescuentoCargo = (TotalAnterior - Dr("Descuento").ToString.ToDecimal()) DescuentoCargo = (TotalAnterior - Dr("Descuento").ToString.ToDecimal())
End If 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 Descuento As Decimal = Dr("Descuento").ToString.ToDecimal + DescuentoCargo
Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * (Dr("PU").ToString.ToDecimal)) - Descuento Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * (Dr("PU").ToString.ToDecimal)) - Descuento
TotalCargos -= DescuentoCargo TotalCargos -= DescuentoCargo
@@ -7896,6 +7901,7 @@ Partial Class PV
Next Next
TmpDT.AcceptChanges() 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 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 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 Dim Divisor As Decimal = 1