From 843c122811f0afc7267ae9db53d70dc43b6c5fbf Mon Sep 17 00:00:00 2001 From: RPimienta Date: Wed, 25 Sep 2024 21:43:09 -0600 Subject: [PATCH] Actualizacion a saldos iniciales para que corrija diferencias en compras --- General/SaldosIniciales.aspx.vb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 786b351da..db74efea7 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1799,6 +1799,21 @@ Partial Class General_SaldosIniciales Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero() Dim dtsubp As DataTable = GlobalDTSubProyectos(UsuarioActual.CveEmpresa) + If UsuarioActual.CveEmpresa = 189 Then + For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows + Dim SubTotal = Row("SubTotal").ToString().ToDecimal.RoundSQL + Dim IVA = Row("IVA").ToString().ToDecimal.RoundSQL + Dim Total = Row("Total").ToString().ToDecimal.RoundSQL + Dim Cantidad = Row("Cantidad").ToString.ToDecimal + Dim PU = Row("PU").ToString.ToDecimal + + If Total - SubTotal - IVA <> 0 Then + Row("PU") = (Total - IVA) / Cantidad + Row("SubTotal") = Row("PU").ToString.ToDecimal * Cantidad + End If + Next + End If + Dim CountRow As Integer = 1 Dim LastSerieFolioTipoDoc As String = String.Empty Dim EsDetalle As Boolean = False