Correcion de asignacion de poliza al cancelar
This commit is contained in:
@@ -4382,21 +4382,27 @@ Partial Class Bancos_IE
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Banc As New ClsBancos
|
||||
Dim ObjConta As New ClsContabilidad(Banc.IniciaTransacSQL())
|
||||
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
End If
|
||||
|
||||
|
||||
Dim ErrorCancelar = False
|
||||
Dim MensajeError = ""
|
||||
Dim IdPolizaNueva = -1
|
||||
Dim FolioPolizaNueva = -1
|
||||
|
||||
Dim Banc As New ClsBancos
|
||||
Dim ObjConta As New ClsContabilidad(Banc.IniciaTransacSQL())
|
||||
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
Try
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al iniciar la contabilización", ex)
|
||||
ErrorCancelar = True
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
Try
|
||||
If (IDPoliza > 0 AndAlso (UsuarioActual.Empresa.UsaAC)) Then
|
||||
|
||||
If ObjAC Is Nothing Then
|
||||
@@ -4504,6 +4510,9 @@ Partial Class Bancos_IE
|
||||
If CvePrePolizaCancelacion <= 0 Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Error al cancelar IE MES ANTERIOR"
|
||||
Else
|
||||
'DEBE GENERAR UNA NUEVA POLIZA
|
||||
IDPoliza = -1
|
||||
End If
|
||||
Else
|
||||
'CANCELA IE MES ACTUAL
|
||||
@@ -4612,6 +4621,9 @@ Partial Class Bancos_IE
|
||||
Alert("El movimiento bancario no se pudo cancelar. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
GuardaLog(MensajeError + " | CANCELAR IE")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrio un error al cancelar", ex)
|
||||
End Try
|
||||
|
||||
If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
||||
Banc.Dispose()
|
||||
|
||||
Reference in New Issue
Block a user