-- IE, validacion de que tenga vinculado complementos, no pueda eliminarlo
-- sessionsactivas. boton par acorrer GC
This commit is contained in:
@@ -707,6 +707,7 @@ Partial Class Bancos_IE
|
||||
Dim ObjIE2 As New ClsBancos()
|
||||
If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
Dim NumComplementos As Integer
|
||||
|
||||
Try
|
||||
Tipo = ObjIE.DtResultados.Rows(0)("Tipo").ToString
|
||||
@@ -719,6 +720,7 @@ Partial Class Bancos_IE
|
||||
Cuenta = ObjIE.DtResultados(0)("NumCuenta").ToString
|
||||
|
||||
CveIEDeposito2 = ObjIE.DtResultados(0)("CveIEDeposito2").ToString.ToEntero
|
||||
NumComplementos = ObjIE.DtResultados(0)("NumComplementos").ToString.ToEntero
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(99) Then
|
||||
'BtnActualizar.Visible = True
|
||||
@@ -887,10 +889,10 @@ Partial Class Bancos_IE
|
||||
If UsuarioActual.TienePermisoProceso(85) Then LnkCancelar.Visible = True
|
||||
|
||||
'ELIMINAR IE SIN VALIDACIONES
|
||||
If UsuarioActual.TienePermisoProceso(80) Then LnkEliminar.Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(80) AndAlso NumComplementos = 0 Then LnkEliminar.Visible = True
|
||||
|
||||
'ELIMINA IE CUANDO ES EL MISMO USUARIO QUE LO CREO Y QUE NO ESTE CONTABILIZADO NI CONCILIADO
|
||||
If UsuarioActual.TienePermisoProceso(154) AndAlso ObjIE.CveUsuario = UsuarioActual.CveUsuario And Not ObjIE.IDPoliza > 0 Then
|
||||
If UsuarioActual.TienePermisoProceso(154) AndAlso ObjIE.CveUsuario = UsuarioActual.CveUsuario And Not ObjIE.IDPoliza > 0 AndAlso NumComplementos = 0 Then
|
||||
LnkEliminar.Visible = True
|
||||
End If
|
||||
End If
|
||||
@@ -906,10 +908,10 @@ Partial Class Bancos_IE
|
||||
LblEstatus.ForeColor = Drawing.Color.Red
|
||||
|
||||
'ELIMINAR IE SIN VALIDACIONES
|
||||
If UsuarioActual.TienePermisoProceso(80) Then LnkEliminar.Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(80) AndAlso NumComplementos = 0 Then LnkEliminar.Visible = True
|
||||
|
||||
'ELIMINA IE CUANDO ES EL MISMO USUARIO QUE LO CREO Y QUE NO ESTE CONTABILIZADO NI CONCILIADO
|
||||
If UsuarioActual.TienePermisoProceso(154) AndAlso ObjIE.CveUsuario = UsuarioActual.CveUsuario And Not ObjIE.IDPoliza > 0 Then
|
||||
If UsuarioActual.TienePermisoProceso(154) AndAlso ObjIE.CveUsuario = UsuarioActual.CveUsuario And Not ObjIE.IDPoliza > 0 AndAlso NumComplementos = 0 Then
|
||||
LnkEliminar.Visible = True
|
||||
End If
|
||||
|
||||
@@ -1089,7 +1091,7 @@ Partial Class Bancos_IE
|
||||
|
||||
'2019-08-28 unificados vista de controles complemento (Cancelado, conciliciado, Con complemento vigente, sin complemento vigente)
|
||||
Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True)
|
||||
Dim ExistenComplementos As Boolean = VerificaComplementos(False)
|
||||
'Dim ExistenComplementos As Boolean = VerificaComplementos(False)
|
||||
|
||||
If Not ChkConciliado.Checked And ObjIE.CveEstatusIE <> 2 Then
|
||||
|
||||
@@ -3121,40 +3123,19 @@ Partial Class Bancos_IE
|
||||
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Opcion.Contiene("EGSSINFACT") AndAlso CveSolicitudViatico > 0 AndAlso MsgError = "" Then
|
||||
If Not ObjIE.UpdateSolicitudesViaticosIE(CveSolicitudViatico, CveIE) Then
|
||||
MsgError = "Ocurrió un error al vincular el egreso con la solicitud de viatico."
|
||||
End If
|
||||
End If
|
||||
|
||||
End Select
|
||||
|
||||
'El movimiento 1 es el de Venta
|
||||
'Conta SIG
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" AndAlso UsuarioActual.Empresa.UsaContabilidadSIG Then
|
||||
If CveCuentaBeneficiario > 0 And CveCuentaConta > 0 Then
|
||||
If ObjMov.ContabilizarPrePolizaSIG(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
IDPoliza = ObjMov.ContaIdPoliza
|
||||
Else
|
||||
Alert("Ocurrio un error al contabilizar en SIG, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||
End If
|
||||
Else
|
||||
If CveCuentaConta < 1 Then
|
||||
Alert("No se puede contabilizar la Prepoliza en SIG debido a que la cuenta de Bancos es invalida", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
If CveCuentaBeneficiario < 1 Then
|
||||
Alert("No se puede contabilizar la Prepoliza en SIG debido a que las cuenta del Beneficiario es invalida", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta ContPAQ
|
||||
End Select
|
||||
|
||||
'El movimiento 1 es el de Venta
|
||||
|
||||
'Conta ContPAQ
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
||||
If IDCtaBeneficiario > 0 And IDCtaContable > 0 Then
|
||||
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
@@ -4774,16 +4755,17 @@ Partial Class Bancos_IE
|
||||
Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
Dim ObjGral As New ClsGenerales
|
||||
|
||||
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
Dim Banc As New ClsBancos
|
||||
Dim ObjConta As New ClsContabilidad(Banc.IniciaTransacSQL())
|
||||
Dim ObjGral As New ClsGenerales(Banc.IniciaTransacSQL())
|
||||
If ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, TxtDescripcion.Text, "Banco", TxtFolio.Text + " / " + Cuenta) Then
|
||||
Borrar = True
|
||||
End If
|
||||
ObjGral.Dispose()
|
||||
If Borrar = True Then
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
Dim Banc As New ClsBancos
|
||||
Dim ObjConta As New ClsContabilidad(Banc.IniciaTransacSQL())
|
||||
|
||||
If Borrar = True Then
|
||||
Dim ErrorCompra = False
|
||||
|
||||
'VERIFICA SI EL IES ESTA VINCULADO A UNA SOLICITUD VIATICO
|
||||
@@ -4840,6 +4822,7 @@ Partial Class Bancos_IE
|
||||
If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
||||
Banc.Dispose()
|
||||
ObjConta.Dispose()
|
||||
ObjGral.Dispose()
|
||||
End If
|
||||
Else
|
||||
Alert("Tiene que decir el motivo de su eliminacion.", TipoMensaje.MsgInformacion)
|
||||
|
||||
Reference in New Issue
Block a user