- mejora AF

This commit is contained in:
2022-10-18 14:05:06 -07:00
parent a141aa2d18
commit 1140ab1198

View File

@@ -1804,8 +1804,6 @@ Partial Class General_SaldosIniciales
If Not dt.Columns.Contains("CveCuentaContable") Then If Not dt.Columns.Contains("CveCuentaContable") Then
dt.Columns.Add("CveCuentaContable", GetType(Integer)) dt.Columns.Add("CveCuentaContable", GetType(Integer))
End If End If
Dim sbErrores As New StringBuilder Dim sbErrores As New StringBuilder
For Each Row As DataRow In dt.Rows For Each Row As DataRow In dt.Rows
@@ -1827,8 +1825,6 @@ Partial Class General_SaldosIniciales
End If End If
Next Next
If Not ErrorAF Then If Not ErrorAF Then
dt.AcceptChanges() dt.AcceptChanges()
Else Else
@@ -1836,7 +1832,6 @@ Partial Class General_SaldosIniciales
Exit Sub Exit Sub
End If End If
Dim ObjAF As New ClsAF Dim ObjAF As New ClsAF
Try Try
@@ -1845,7 +1840,7 @@ Partial Class General_SaldosIniciales
Dim Contador As Integer = 0 Dim Contador As Integer = 0
Dim NumRow As Integer = 0 Dim NumRow As Integer = 0
For Each Row As DataRow In dt.Rows For Each Row As DataRow In dt.FiltraParametros("Descripción <> ''").Rows
Dim Codigo As String = Row("Código").ToString Dim Codigo As String = Row("Código").ToString
Dim Descripcion As String = Row("Descripción").ToString Dim Descripcion As String = Row("Descripción").ToString
Dim TipoAF As String = Row("Tipo").ToString.Trim Dim TipoAF As String = Row("Tipo").ToString.Trim
@@ -1873,9 +1868,9 @@ Partial Class General_SaldosIniciales
'VALIDACIONES 'VALIDACIONES
If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
If Not CveSubProyecto > 0 Then Alert($"No se encontró el SubProyecto: {SubProyecto} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For If Not CveSubProyecto > 0 Then Alert($"No se encontró el SubProyecto: {SubProyecto} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
If Not CveEstadoActivoFijo > 0 Then Alert($"No se encontró el Estado: {Estado} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For If Not CveEstadoActivoFijo > 0 Then Alert($"No se encontró el Estado: {Estado} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
If Not CveCliente > 0 Then CveCliente = -1 If Not CveCliente > 0 Then CveCliente = -1