-- mejora en tipocontabilidad
This commit is contained in:
@@ -3765,7 +3765,7 @@ Partial Class Bancos_IE
|
||||
End Select
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
Dim ConceptoRenglon, Referencia As String
|
||||
Dim FolioPoliza As Integer
|
||||
Dim Fecha As Date = TxtFechaDocumento.Text.ToDate
|
||||
@@ -4484,7 +4484,7 @@ Partial Class Bancos_IE
|
||||
Dim ObjConta As New ClsContabilidad(Banc.IniciaTransacSQL())
|
||||
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") Then
|
||||
Try
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
@@ -4779,7 +4779,7 @@ Partial Class Bancos_IE
|
||||
Dim ObjConta As New ClsContabilidad(Banc.IniciaTransacSQL)
|
||||
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") Then
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
End If
|
||||
@@ -5107,49 +5107,53 @@ Partial Class Bancos_IE
|
||||
EliminaPoliza()
|
||||
End Sub
|
||||
Private Sub EliminaPoliza()
|
||||
Dim ObjAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
ObjConta.IniciaTransacSQL()
|
||||
|
||||
Dim ErrorCompra = False
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Dim ObjAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
ObjConta.IniciaTransacSQL()
|
||||
|
||||
'Elimina la poliza
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IDPoliza > 0 Then
|
||||
If Not ObjAC.RemovePoliza(IDPoliza) Then
|
||||
ErrorCompra = True
|
||||
Dim ErrorCompra = False
|
||||
|
||||
'Elimina la poliza
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IDPoliza > 0 Then
|
||||
If Not ObjAC.RemovePoliza(IDPoliza) Then
|
||||
ErrorCompra = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'Desasocia la poliza
|
||||
If Not ErrorCompra Then
|
||||
If Not ObjConta.DesasociarPoliza(IDPoliza, UsuarioActual.CveEmpresa) Then
|
||||
ErrorCompra = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorCompra Then
|
||||
If Not ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||
ErrorCompra = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorCompra Then
|
||||
Alert("La poliza ha sido desvinculada y eliminada con exito.", TipoMensaje.MsgInformacion)
|
||||
ObjAC.Commit()
|
||||
ObjConta.Commit()
|
||||
Else
|
||||
Alert("Ocurrió un error al desvincular y/o eliminar la poliza. Por favor intente de nuevo ", TipoMensaje.MsgError)
|
||||
ObjAC.RollBack()
|
||||
ObjConta.RollBack()
|
||||
End If
|
||||
|
||||
ObjAC.Dispose()
|
||||
ObjConta.Dispose()
|
||||
|
||||
If Not ErrorCompra Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End If
|
||||
|
||||
'Desasocia la poliza
|
||||
If Not ErrorCompra Then
|
||||
If Not ObjConta.DesasociarPoliza(IDPoliza, UsuarioActual.CveEmpresa) Then
|
||||
ErrorCompra = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorCompra Then
|
||||
If Not ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||
ErrorCompra = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorCompra Then
|
||||
Alert("La poliza ha sido desvinculada y eliminada con exito.", TipoMensaje.MsgInformacion)
|
||||
ObjAC.Commit()
|
||||
ObjConta.Commit()
|
||||
Else
|
||||
Alert("Ocurrió un error al desvincular y/o eliminar la poliza. Por favor intente de nuevo ", TipoMensaje.MsgError)
|
||||
ObjAC.RollBack()
|
||||
ObjConta.RollBack()
|
||||
End If
|
||||
|
||||
ObjAC.Dispose()
|
||||
ObjConta.Dispose()
|
||||
|
||||
If Not ErrorCompra Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -5593,7 +5597,7 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
End If
|
||||
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IDPoliza > 0 Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ((UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IDPoliza > 0) Then
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
If Not ObjAC.RemovePoliza(IDPoliza) Then
|
||||
|
||||
Reference in New Issue
Block a user