-- nuevo método para actualizar cvveprepoliza en conta contpq
This commit is contained in:
@@ -1279,6 +1279,27 @@ Public Class ClsContabilidad
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateContabilizable(CvePrePolizaDetalle As Integer, Contabilizar As Boolean) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Conta_PrePolizasContabilizableUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePrePolizaDetalle", SqlDbType.Int).Value = CvePrePolizaDetalle
|
||||
.Add("@Contabilizar", SqlDbType.Bit).Value = If(Contabilizar, 1, 0)
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
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 contabilizar las prepoliza detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
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
|
||||
@@ -1286,7 +1307,7 @@ Public Class ClsContabilidad
|
||||
Dim Retorno As Boolean = False
|
||||
Dim OcurrioError As Boolean = False
|
||||
|
||||
StrLog.AppendFormat("CvePrep:{0} - Inicio -", CvePrePoliza)
|
||||
StrLog.AppendFormat("CvePrep:{0} - CveE:{1} - Inicio -", CvePrePoliza, Empresa.CveEmpresa)
|
||||
|
||||
If Empresa.TipoContabilizacion = 1 Then ' contabilidad en SIG
|
||||
|
||||
|
||||
Reference in New Issue
Block a user