From e205326268f34fbe99ab813c1a6306d248a12aa7 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Wed, 12 Mar 2025 19:55:31 -0700 Subject: [PATCH] Compras EMD ajuste retenciones validacion ret IVA para compras Rafael Martinez de con OCS 72882 y 72881 --- Compras/Compras.aspx.vb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 1f3e35b51..241e90e0d 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -8488,7 +8488,7 @@ Partial Class Compras_Compras Dim DiferenciaRetISR As Decimal = TxtRetISR.Text.ToDecimal - RetISRDetalles If Math.Abs(DiferenciaRetISR) > 0 Then - If Math.Abs(DiferenciaRetISR) <= 0.05 Then + If Math.Abs(DiferenciaRetISR) <= 0.09 Then Dim DTConsulta As New DataTable DTConsulta = TmpDT.FiltraParametros(" RetISR > 0 ") @@ -8512,12 +8512,17 @@ Partial Class Compras_Compras If Math.Abs(DiferenciaRetISR) > 0.0D Then - If (TmpDT.Rows(IndiceUltimo)("RetISR").ToString.ToDecimal + DiferenciaRetISR) < 0 Then + If (TmpDT.Rows(IndiceUltimo)("RetISR").ToString.ToDecimal + DiferenciaRetISR) < 0 Or (Math.Abs(DiferenciaRetISR) >= 0.06) Then Dim AjusteteDividido As Decimal = Math.Abs(DiferenciaRetISR) / CantidadRegistroConRetISR For Each dRow As DataRow In TmpDT.Rows - dRow("RetISR") = dRow("RetISR").ToString.ToDecimal - AjusteteDividido + If DiferenciaRetISR > 0 Then + dRow("RetISR") = dRow("RetISR").ToString.ToDecimal + AjusteteDividido + Else + dRow("RetISR") = dRow("RetISR").ToString.ToDecimal - AjusteteDividido + End If + Next Else