-- docuemntos por pagar
This commit is contained in:
@@ -2,16 +2,17 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports Extensiones
|
||||
|
||||
Public Class ClsMovimientos
|
||||
Implements IDisposable
|
||||
|
||||
Implements IDisposable
|
||||
|
||||
#Region "Campos"
|
||||
|
||||
'SQL
|
||||
|
||||
'SQL
|
||||
Private SqlConexion As SqlConnection
|
||||
Private SqlAdapter As SqlDataAdapter
|
||||
Private SqlTransacc As SqlTransaction
|
||||
@@ -20,12 +21,12 @@ Public Class ClsMovimientos
|
||||
Private DS As DataSet
|
||||
|
||||
'Atributos de la clase
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
Public ReadOnly Property DtResultados() As DataTable
|
||||
Get
|
||||
@@ -36,12 +37,13 @@ Public Class ClsMovimientos
|
||||
Public ReadOnly Property DSResultados() As DataSet
|
||||
Get
|
||||
DSResultados = DS
|
||||
End Get
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property AlertaMensaje As New StringBuilder
|
||||
Public Property AlertaMensaje As New StringBuilder
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Sub New()
|
||||
SqlConexion = New SqlConnection
|
||||
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||
@@ -62,9 +64,10 @@ Public Class ClsMovimientos
|
||||
End With
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
#Region "Conexiones"
|
||||
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
@@ -97,9 +100,9 @@ Public Class ClsMovimientos
|
||||
CveConexion = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
Public Sub IniciaTransacSQL()
|
||||
SqlTransacc = SqlConexion.BeginTransaction()
|
||||
End Sub
|
||||
@@ -485,13 +488,13 @@ Public Class ClsMovimientos
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrió un error al descargar los segmentos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Anticipos de Clientes"
|
||||
Public Function GetAnticiposCliente(CveCliente As Integer, Optional SelectTop As Integer = -1, Optional CveMoneda As Integer = 1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -569,12 +572,14 @@ Public Class ClsMovimientos
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "CxP"
|
||||
|
||||
|
||||
Public Function GetCxPEmpresa(CveProveedor As Integer, FechaVencimientoInicio As String, FechaVencimientoFin As String, CveSubProyecto As Integer, DiasVencidos As Integer, CveUsuarioRegistro As Integer,
|
||||
CveUsuarioProgramo As Integer, CveUsuarioResponsable As Integer, CveClasificacion As Integer, CveMoneda As Integer, CveTipoPagoProgramo As Integer, CveEstatusFactura As Integer,
|
||||
CveAplicaNC As Integer, CveEmpresa As Integer, Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional CodigoProgramacion As String = "-1", Optional CveTipoProveedor As Integer = 0,
|
||||
@@ -1201,6 +1206,29 @@ Public Class ClsMovimientos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetDocumentosxPagarDetalle(CveCliente As Integer, CveMoneda As Integer, Opcion As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Banc_DocumentosxPagarSaldosDetalle")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el Reporte de documentos por pagar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetCajaChicaDetalle(CveCajaChica As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -1462,9 +1490,9 @@ Public Class ClsMovimientos
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Anticipos de Proveedores"
|
||||
Public Function GetAnticiposProveedor(CveProveedor As Integer, CveProveedorSucursal As Integer, Optional CveMoneda As Integer = -1, Optional SelectTop As Integer = -1, Optional FechaI As String = "-1", Optional FechaF As String = "-1", Optional TipoDocto As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -1486,33 +1514,32 @@ Public Class ClsMovimientos
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrió un error al consultar los Anticipos del proveedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
'Public Function GetAnticiposClienteAuxiliar(CveCliente As Integer, CveVenta As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
' 'Data = New DataTable
|
||||
' 'SqlAdapter = New SqlDataAdapter("PA_ClienteAnticiposAuxiliar", SqlConexion)
|
||||
' 'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
||||
' DataAdapter("PA_ClienteAnticiposAuxiliar")
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
' .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
' End With
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = True
|
||||
' Catch ex As SqlException
|
||||
' OnError("Ocurrió un error al consultar el Auxiliar Contable de Anticipos del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
'Public Function GetAnticiposClienteAuxiliar(CveCliente As Integer, CveVenta As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
' 'Data = New DataTable
|
||||
' 'SqlAdapter = New SqlDataAdapter("PA_ClienteAnticiposAuxiliar", SqlConexion)
|
||||
' 'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
||||
' DataAdapter("PA_ClienteAnticiposAuxiliar")
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
' .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
' End With
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = True
|
||||
' Catch ex As SqlException
|
||||
' OnError("Ocurrió un error al consultar el Auxiliar Contable de Anticipos del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "REP RECUPERACION"
|
||||
Public Function GetRepRecuperacion(FechaI As Date, FechaF As Date, CveCliente As Integer, CveSubProyecto As Integer,
|
||||
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String,
|
||||
@@ -1658,9 +1685,9 @@ Public Class ClsMovimientos
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "REP COBRADO"
|
||||
Public Function GetRepCobrado(FechaI As Date, FechaF As Date, CveProveedor As Integer, CveSubProyecto As Integer,
|
||||
CveUsuario As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, CveResponsable As Integer,
|
||||
@@ -1730,11 +1757,13 @@ Public Class ClsMovimientos
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "EDITAR FECHA DE MOVIMIENTO"
|
||||
|
||||
|
||||
Public Function UpdateMovimientoFecha(Fecha As DateTime, CveMovimiento As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Mov_MovimientoFechaUpdate")
|
||||
@@ -1749,12 +1778,16 @@ Public Class ClsMovimientos
|
||||
OnError("Ocurrió un error al actualizar la fecha del movimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Registros Contables"
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function AddMovimiento(CveConcepto As Integer, Tipo As String, Referencia1 As String, Referencia2 As String, CveMoneda As Integer, Cargo As Double, Abono As Double,
|
||||
Fecha As Date, FechaVencimiento As Date, Folio As String, IdCtaContable As Integer, CveUsuario As Integer, CveEmprea As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -1828,14 +1861,14 @@ Public Class ClsMovimientos
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "IDisposable Support"
|
||||
|
||||
|
||||
' IDisposable
|
||||
|
||||
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(disposing As Boolean)
|
||||
If Not Me.disposedValue Then
|
||||
If disposing Then
|
||||
@@ -1868,9 +1901,10 @@ Public Class ClsMovimientos
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Public Function GetPersonalCajaChica(CveEmpresa As Integer, CveCompra As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_PersonalCajaChica")
|
||||
|
||||
Reference in New Issue
Block a user