-- genera cuenta desglosada
This commit is contained in:
@@ -1548,26 +1548,51 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetCuentaDobleConta(IdCtaContable As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
'Public Function GetCuentaDobleConta(IdCtaContable As Integer, CveEmpresa As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta_CuentaDobleContaGet")
|
||||
' DataAdapter("PA_Conta_CuentaDobleContaGet")
|
||||
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable
|
||||
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
' End With
|
||||
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = True
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al obtener la cuenta doble.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
Public Function GeneraCuentaDesglose(CveConceptoUnico As Integer, CveTipoSaldo As Integer, CveCuentaPadre As Integer, CveGeneral As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
DataAdapter("PA_Conta_CuentasGeneraDesglose")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable
|
||||
.Add("@CveConceptoContableUnico", SqlDbType.Int).Value = CveConceptoUnico
|
||||
.Add("@CveTipoSaldo", SqlDbType.Int).Value = CveTipoSaldo
|
||||
.Add("@CveGeneral", SqlDbType.Int).Value = CveGeneral
|
||||
.Add("@CveCuentaPadre", SqlDbType.Int).Value = CveCuentaPadre
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveCuentaGenerada", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CveCuentaGenerada").Value.ToString.ToEntero
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener la cuenta doble.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al obtener Movimientos Prepolizas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function DesAplicarPago(CvePrePoliza As Integer, CveConcepto As Integer, CveVenta As Integer, CveVentaAmortizacion As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Conta_DesAplicarMovimiento")
|
||||
@@ -6047,36 +6072,39 @@ Public Class ClsContabilidad
|
||||
#End Region
|
||||
|
||||
#Region "VALIDACION POLIZA DESCUADRADA"
|
||||
Public Function ValidacionPrePolizaCuadre(CvePrePoliza As Integer, Opcion As Integer, Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
'Public Function ValidacionPrePolizaCuadre(CvePrePoliza As Integer, Opcion As Integer, Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta_PrePolizasValidacion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@AutoConta", SqlDbType.Int).Value = If(AutoConta, 1, 0)
|
||||
.Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output
|
||||
.Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 8000).Direction = ParameterDirection.Output
|
||||
.Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output
|
||||
End With
|
||||
' DataAdapter("PA_Conta_PrePolizasValidacion")
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||
' .Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
' ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
' .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
' .Add("@AutoConta", SqlDbType.Int).Value = If(AutoConta, 1, 0)
|
||||
' .Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
' .Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output
|
||||
' .Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 8000).Direction = ParameterDirection.Output
|
||||
' .Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output
|
||||
' .Add("@FolioPoliza", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
' End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
ValorPolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@Valor").Value.ToString.ToEntero
|
||||
MensajePolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@MsgSalida").Value.ToString
|
||||
ValorDiferencia = SqlAdapter.SelectCommand.Parameters("@Diferencia").Value.ToString
|
||||
Dim MsgPrePoliza As String = SqlAdapter.SelectCommand.Parameters("@MsgPrePolizaSalida").Value.ToString
|
||||
If MsgPrePoliza <> "" Then MsgPrePoliza.GuardaLogAD("LogPrePoliza")
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al validar la PrePoliza.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = True
|
||||
' ValorPolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@Valor").Value.ToString.ToEntero
|
||||
' MensajePolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@MsgSalida").Value.ToString
|
||||
' ValorDiferencia = SqlAdapter.SelectCommand.Parameters("@Diferencia").Value.ToString
|
||||
' Dim MsgPrePoliza As String = SqlAdapter.SelectCommand.Parameters("@MsgPrePolizaSalida").Value.ToString
|
||||
' ContaFolio = SqlAdapter.SelectCommand.Parameters("@FolioPoliza").Value.ToString.ToEntero
|
||||
' If MsgPrePoliza <> "" Then MsgPrePoliza.GuardaLogAD("LogPrePoliza")
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al validar la PrePoliza.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
Public Function ValidacionesPrePoliza(CvePrePoliza As Integer, ByRef UsuarioActual As Usuario, Optional Opcion As Integer = 1,
|
||||
Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True,
|
||||
|
||||
Reference in New Issue
Block a user