-- cuentas depósitos corrección y agregado de cveempresa
This commit is contained in:
@@ -1170,7 +1170,7 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
If Not ErrorCuentaDeposito Then
|
||||
Dim ObjGrales As New ClsGenerales(ObjProv.IniciaTransacSQL)
|
||||
If Not ObjGrales.AddCuentasDepositos(Banco, "-1", "-1", NumeroCuenta, ClabeInter, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario, 1, CveProveedor:=ObjProv.CveProveedor) Then
|
||||
If Not ObjGrales.AddCuentasDepositos(Banco, "-1", "-1", NumeroCuenta, ClabeInter, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario, 1, UsuarioActual.CveEmpresa, CveProveedor:=ObjProv.CveProveedor) Then
|
||||
'ErrorProv = True
|
||||
End If
|
||||
End If
|
||||
@@ -1811,6 +1811,9 @@ Partial Class General_SaldosIniciales
|
||||
If Not dt.Columns.Contains("CveCuentaContable") Then
|
||||
dt.Columns.Add("CveCuentaContable", GetType(Integer))
|
||||
End If
|
||||
If Not dt.Columns.Contains("CveCuentaContableDepreciacion") Then
|
||||
dt.Columns.Add("CveCuentaContableDepreciacion", GetType(Integer))
|
||||
End If
|
||||
Dim sbErrores As New StringBuilder
|
||||
|
||||
For Each Row As DataRow In dt.Rows
|
||||
@@ -1830,6 +1833,18 @@ Partial Class General_SaldosIniciales
|
||||
ErrorAF = True
|
||||
End If
|
||||
End If
|
||||
CuentaContable = Row("Cuenta Depreciación").ToString().Trim.Replace("-", "").Replace(" ", "")
|
||||
|
||||
If CuentaContable.Length > 0 Then
|
||||
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
|
||||
|
||||
If CveCuentaContable > 0 Then
|
||||
Row("CveCuentaContableDepreciacion") = CveCuentaContable
|
||||
Else
|
||||
sbErrores.AppendLine($"Activo Fijo {Codigo} {Descripcion} cuenta {CuentaContable} no encontrada.<br>")
|
||||
ErrorAF = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not ErrorAF Then
|
||||
@@ -1840,9 +1855,11 @@ Partial Class General_SaldosIniciales
|
||||
End If
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
ObjAF.IniciaTransacSQL()
|
||||
Dim ObjConta As New ClsContabilidad(ObjAF.IniciaTransacSQL)
|
||||
Try
|
||||
|
||||
ObjAF.IniciaTransacSQL()
|
||||
|
||||
|
||||
Dim Contador As Integer = 0
|
||||
Dim NumRow As Integer = 0
|
||||
@@ -1872,7 +1889,7 @@ Partial Class General_SaldosIniciales
|
||||
Dim CveEstadoActivoFijo As Integer = GlobalDTEstadoActivoFijo().FiltroPrimeroValor("CveEstadoActivoFijo", $"EstadoActivoFijo = '{Estado}'").ToString().ToEntero()
|
||||
Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"Nombre = '{Cliente}'").ToString().ToEntero()
|
||||
Dim CveCuentaContable As Integer = Row("CveCuentaContable").ToString().ToEntero()
|
||||
|
||||
Dim CveCuentaContableDepreciacion As Integer = Row("CveCuentaContable").ToString().ToEntero()
|
||||
|
||||
'VALIDACIONES
|
||||
If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
|
||||
@@ -1890,27 +1907,27 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
If CveAF > 0 Then
|
||||
If CveCuentaContable > 0 Then
|
||||
|
||||
Dim ObjConta As New ClsContabilidad(ObjAF.IniciaTransacSQL)
|
||||
|
||||
If Not ObjConta.AddCuentasAsignaciones(49, UsuarioActual.CveEmpresa, CveCuentaContable, -1,
|
||||
-1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF,
|
||||
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
|
||||
ErrorAF = True
|
||||
End If
|
||||
|
||||
End If
|
||||
If CveCuentaContableDepreciacion > 0 Then
|
||||
If Not ObjConta.AddCuentasAsignaciones(101, UsuarioActual.CveEmpresa, CveCuentaContableDepreciacion, -1,
|
||||
-1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF,
|
||||
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
|
||||
ErrorAF = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
ErrorAF = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
NumRow = NumRow + 1
|
||||
Next
|
||||
|
||||
|
||||
If Not ErrorAF Then
|
||||
If Contador > 0 Then
|
||||
Alert(String.Format("Se agregaron: <b>{0}</b> Activos Fijos correctamente. <br>Se Omitieron: <b>{1}</b> Activos Fijos ya que ya se encontraban registrados.", NumRows - Contador, Contador), TipoMensaje.MsgInformacion)
|
||||
@@ -1933,19 +1950,17 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
Finally
|
||||
ObjAF.Dispose()
|
||||
ObjConta.Dispose()
|
||||
End Try
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
' C U E N T A S C O N T A B L E S
|
||||
ElseIf RblFormato.SelectedValue = "8" Then
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjConta.IniciaTransacSQL()
|
||||
Try
|
||||
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
Dim ContadorUpdate As Integer = 0
|
||||
Dim ContadorError As Integer = 0
|
||||
|
||||
Reference in New Issue
Block a user