validacion de contabilizacion
This commit is contained in:
@@ -315,6 +315,8 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
Dim Total As Decimal = 0
|
||||
Dim Conta As New ClsContabilidad
|
||||
Conta.IniciaTransacSQL()
|
||||
Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContPaq.IniciaTransacSQL()
|
||||
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/Fluctua", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim idCta As Integer = 0
|
||||
Dim CveCuenta As Integer = 0
|
||||
@@ -372,8 +374,19 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim SeContabilizo As Boolean = False
|
||||
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
If AutoConta Then
|
||||
If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
||||
SeContabilizo = True
|
||||
Else
|
||||
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorRegistrar And SeContabilizo Then
|
||||
|
||||
If Not ErrorRegistrar Then
|
||||
Conta.Commit()
|
||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver Póliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||
CargaDatosCuentas()
|
||||
|
||||
Reference in New Issue
Block a user