--FIX. ajuste de 1 centavo en garantias totales

This commit is contained in:
2024-03-14 17:27:29 -07:00
parent 9869c06b21
commit c41d5bdff6

View File

@@ -7383,12 +7383,6 @@ Partial Class PV
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDecimal * TxtPUFactura.Text.ToDecimal).FormatoNumero
ImportePagarCliente = TxtImporteAjuste.Text.ToDecimal
''ajustar un centavo
If PorcentajeAjuste = 0 Then 'PONE UN PAGO DE UN CENTAVO, PARA EL TIMBRADO
' TxtImporteAjuste.Text = (TxtImporteAjuste.Text.ToDecimal - 0.01D).FormatoNumero
TxtImporteAjuste.Text = "0.01"
End If
Dim CargoVendido As Decimal = 0
Dim CargoGarantia As Decimal = 0
Dim CveTamaño As Integer = 0
@@ -7447,6 +7441,7 @@ Partial Class PV
Alert("Especificar el producto a recibir")
End If
End If
Catch ex As Exception
OnError("Ocurrió un error al recalcular el costo", ex)
End Try
@@ -7551,7 +7546,7 @@ Partial Class PV
Dr("Descuento") = Math.Round(TxtImporteAjuste.Text.ToDouble, NumeroDecimales)
'Dr("Descuento") = Math.Round((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) + (CargoActual - CargoAnterior), NumeroDecimales)
If Dr("Descuento").ToString.ToDouble > TxtPrecio.Text.ToDouble Then Dr("Descuento") = TxtPrecio.Text.ToDouble
If Dr("Descuento").ToString.ToDouble >= TxtPrecio.Text.ToDouble Then Dr("Descuento") = TxtPrecio.Text.ToDouble - 0.01D
Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * (Dr("PU").ToString.ToDecimal)) - Dr("Descuento").ToString.ToDecimal
Dr("ImporteIVA") = Math.Round(Dr("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)