- contabilidad en SIG
This commit is contained in:
@@ -1096,15 +1096,17 @@ Public Class ClsContabilidad
|
||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||
.Add("@Contabilizar", SqlDbType.Bit).Value = Contabilizar
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@FolioPoliza", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
_ContaFolio = SqlAdapter.SelectCommand.Parameters("@FolioPoliza").Value.ToString.ToEntero
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
If ex.Message.Contains("50015;") Then
|
||||
OnError("No se puede actualizar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
Else
|
||||
OnError("Ocurrió un error al bloquear o desbloquear las prepolizas detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
OnError("Ocurrió un error al contabilizar las prepoliza detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
End Try
|
||||
Return Retorno
|
||||
@@ -1113,29 +1115,13 @@ Public Class ClsContabilidad
|
||||
|
||||
Public Function ContabilizarPrePoliza(CvePrePoliza As Integer, CveUsuario As Integer, Empresa As Empresa, Optional Fecha As Date = MinFecha, Optional Concepto As String = "",
|
||||
Optional ObjConta As ClsContPAQi = Nothing, Optional pIDPoliza As Integer = -1) As Boolean
|
||||
'Editado Por Charlie
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
If Empresa.TipoContabilizacion = 1 Then
|
||||
If Empresa.TipoContabilizacion = 1 Then ' contabilidad en SIG
|
||||
|
||||
ContabilizaDesContabilizaPrePoliza(CvePrePoliza, True, Empresa.CveEmpresa)
|
||||
|
||||
'DataAdapter("PA_Conta_ContabilizaPrepoliza")
|
||||
'With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||
' .Add("@CvePoliza", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
'End With
|
||||
|
||||
'Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' ContaIdPoliza = SqlAdapter.SelectCommand.Parameters("@CvePoliza").Value.ToString.ToEntero
|
||||
' If ContaIdPoliza <> 0 Then
|
||||
' Retorno = True
|
||||
' End If
|
||||
'Catch ex As Exception
|
||||
' OnError("Ocurrió un error al obtener Movimientos Prepolizas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
'End Try
|
||||
Else
|
||||
If CvePrePoliza <= 0 Then Return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user