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