Diferencia de 1 centavo al aplicar NC

This commit is contained in:
2020-04-29 18:57:38 -07:00
parent 3072a1642d
commit 908ab3a7d0

View File

@@ -21961,14 +21961,14 @@ Partial Class Ventas
If UltimoRenglon = DtImpuestos.Rows.Count Then
'ajusta 5 centavos de diferencia
If Acumulado12 <> AcumuladoNC And Math.Abs(Acumulado12 - AcumuladoNC) <= 0.05 Then
Ajuste = Acumulado12 - AcumuladoNC
Ajuste = (Acumulado12 - AcumuladoNC)
End If
End If
UltimoRenglon += 1
AgregaTempDT(TmpDT, DrPS("CvePS").ToString.ToEntero, DrPS("PS").ToString, DrPS("Codigo").ToString, DrPS("PSCodigo").ToString, DrPS("CveTipoPS").ToString.ToEntero, DrPS("Inv_CveMetodoInventario").ToString.ToEntero,
DrPS("CveUM").ToString.ToEntero, DrPS("UnidadMedida").ToString, DrPS("CveClasificacion").ToString.ToEntero, DrPS("Clasificacion").ToString, CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString.ToDecimal + Ajuste, Dr("PorcentajeIVA").ToString.ToDecimal, Dr("ImporteIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("ImporteRetIVA").ToString.ToDecimal,
Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("ImporteRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("ImporteIEPS").ToString.ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString.ToDecimal, "", "", -1, -1,
Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("ImporteRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("ImporteIEPS").ToString.ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString.ToDecimal(), "", "", -1, -1,
DrPS("SATClavePS").ToString, DrPS("SATClaveUnidadMedida").ToString, -1, -1, -1, -1, -1, -1)
Next
@@ -22080,7 +22080,7 @@ Partial Class Ventas
'codigo para ajuste de centavo, si el importe total no cuadra con los totales
Dim difTmp As Decimal = Importe - importeNC
If Math.Abs(difTmp) >= 0.01 Then
If Math.Abs(difTmp) > 0.00D Then
'asusto la diferencia en el último concepto
Dim ImporteAjustado As Decimal = DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal").ToString.ToDecimal + difTmp
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal") = ImporteAjustado