From 3d8c35beafebd7b6df1b7336fb8d171b1303db92 Mon Sep 17 00:00:00 2001 From: RPimienta Date: Tue, 22 Oct 2024 10:52:38 -0700 Subject: [PATCH] Cambios en saldos iniciales --- General/SaldosIniciales.aspx.vb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index db74efea7..073f60a19 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1800,7 +1800,7 @@ Partial Class General_SaldosIniciales Dim dtsubp As DataTable = GlobalDTSubProyectos(UsuarioActual.CveEmpresa) If UsuarioActual.CveEmpresa = 189 Then - For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows + For Each Row As DataRow In dt.Rows Dim SubTotal = Row("SubTotal").ToString().ToDecimal.RoundSQL Dim IVA = Row("IVA").ToString().ToDecimal.RoundSQL Dim Total = Row("Total").ToString().ToDecimal.RoundSQL @@ -1810,8 +1810,16 @@ Partial Class General_SaldosIniciales If Total - SubTotal - IVA <> 0 Then Row("PU") = (Total - IVA) / Cantidad Row("SubTotal") = Row("PU").ToString.ToDecimal * Cantidad + + PU = Row("PU").ToString.ToDecimal + SubTotal = Row("SubTotal").ToString().ToDecimal.RoundSQL + End If + + If ((Cantidad * PU) - SubTotal) <> 0 Then + Row("PU") = SubTotal / Cantidad End If Next + dt.AcceptChanges() End If Dim CountRow As Integer = 1