validaciones de tipocontabilidad

This commit is contained in:
2023-05-15 11:59:07 -07:00
parent f9cde1edbb
commit 3f5c767b73

View File

@@ -891,35 +891,42 @@ Partial Class Compras_ReembolsosComprobaciones
'Conta ContPAQ AUTOMATICA
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError.Trim = "" Then
If CvePrePolizaIERegistrado > 0 Then
If IdCtaPersonal > 0 Or DdlCajaChica.Visible Then
If IdCtaProveedor > 0 Then
If ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
If IdCtaPersonal > 0 Or DdlCajaChica.Visible Then
If IdCtaProveedor > 0 Then
If Not ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
End If
Else
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
MsgError = "No tiene cuenta contable de proveedor"
End If
Else
MsgError = "No tiene cuenta contable de proveedor"
MsgError = "No tiene cuenta contable de personal"
End If
Else
MsgError = "No tiene cuenta contable de personal"
If Not ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
End If
End If
End If
If ChkChequeExcedente.Checked Then
If IdCuentaBancaria > 0 Then
If IdCtaProveedor > 0 Then
If ObjMov.ContabilizarPrePoliza(CvePrePolizaExcedente, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
If IdCuentaBancaria > 0 Then
If IdCtaProveedor > 0 Then
If Not ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
End If
Else
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
MsgError = "No tiene cuenta contable de proveedor"
End If
Else
MsgError = "No tiene cuenta contable de proveedor"
MsgError = "No tiene cuenta contable de personal"
End If
Else
MsgError = "No tiene Cuenta contable Bancaria"
If Not ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
End If
End If
End If
End If