Cambios en saldos iniciales

This commit is contained in:
RPimienta
2024-10-22 10:52:38 -07:00
parent 1335590a96
commit 3d8c35beaf

View File

@@ -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