- opcion saldo
This commit is contained in:
@@ -7,11 +7,11 @@ Imports System.Data.SqlClient
|
|||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
|
||||||
Public Class ClsMovimientos
|
Public Class ClsMovimientos
|
||||||
Implements IDisposable
|
Implements IDisposable
|
||||||
|
|
||||||
#Region "Campos"
|
#Region "Campos"
|
||||||
|
|
||||||
'SQL
|
'SQL
|
||||||
Private SqlConexion As SqlConnection
|
Private SqlConexion As SqlConnection
|
||||||
Private SqlAdapter As SqlDataAdapter
|
Private SqlAdapter As SqlDataAdapter
|
||||||
Private SqlTransacc As SqlTransaction
|
Private SqlTransacc As SqlTransaction
|
||||||
@@ -21,10 +21,10 @@ Public Class ClsMovimientos
|
|||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
'REGISTRAR CONEXIONES ABIERTAS
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
Private CveConexion As Integer = 0
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
Public ReadOnly Property DtResultados() As DataTable
|
Public ReadOnly Property DtResultados() As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -32,9 +32,9 @@ Public Class ClsMovimientos
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Property AlertaMensaje As New StringBuilder
|
Public Property AlertaMensaje As New StringBuilder
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
SqlConexion = New SqlConnection
|
SqlConexion = New SqlConnection
|
||||||
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||||
@@ -55,9 +55,9 @@ Public Class ClsMovimientos
|
|||||||
End With
|
End With
|
||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
End Sub
|
||||||
#Region "Conexiones"
|
#Region "Conexiones"
|
||||||
|
|
||||||
Private Sub ConexionAdd()
|
Private Sub ConexionAdd()
|
||||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
Try
|
Try
|
||||||
@@ -90,9 +90,9 @@ Public Class ClsMovimientos
|
|||||||
CveConexion = 0
|
CveConexion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Public Sub IniciaTransacSQL()
|
Public Sub IniciaTransacSQL()
|
||||||
SqlTransacc = SqlConexion.BeginTransaction()
|
SqlTransacc = SqlConexion.BeginTransaction()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -103,27 +103,27 @@ Public Class ClsMovimientos
|
|||||||
|
|
||||||
Public Sub Commit()
|
Public Sub Commit()
|
||||||
SqlTransacc.Commit()
|
SqlTransacc.Commit()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "CxC"
|
#Region "CxC"
|
||||||
'Public Function GetCxCCliente(CveCliente As Integer) As Boolean
|
'Public Function GetCxCCliente(CveCliente As Integer) As Boolean
|
||||||
' Dim Retorno As Boolean = False
|
' Dim Retorno As Boolean = False
|
||||||
' 'Data = New DataTable
|
' 'Data = New DataTable
|
||||||
' 'SqlAdapter = New SqlDataAdapter("PA_ClienteCxC", SqlConexion)
|
' 'SqlAdapter = New SqlDataAdapter("PA_ClienteCxC", SqlConexion)
|
||||||
' 'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
' 'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
||||||
' DataAdapter("PA_ClienteCxC")
|
' DataAdapter("PA_ClienteCxC")
|
||||||
' SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
' SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
|
||||||
' Try
|
' Try
|
||||||
' SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
' Retorno = True
|
' Retorno = True
|
||||||
' Catch ex As SqlException
|
' Catch ex As SqlException
|
||||||
' OnError("Ocurrió un error al consultar las CxC del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
' OnError("Ocurrió un error al consultar las CxC del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
' End Try
|
' End Try
|
||||||
|
|
||||||
' Return Retorno
|
' Return Retorno
|
||||||
'End Function
|
'End Function
|
||||||
|
|
||||||
Public Function GetCxCClienteDetalle(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveClienteSucursal As Integer, Optional TipoDocto As String = "-1", Optional FechaCorte As Date = MaxFecha, Optional CveIESustitucion As Integer = -1, Optional FechaVencimientoI As Date = MinFecha, Optional FechaVencimientoF As Date = MaxFecha) As Boolean
|
Public Function GetCxCClienteDetalle(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveClienteSucursal As Integer, Optional TipoDocto As String = "-1", Optional FechaCorte As Date = MaxFecha, Optional CveIESustitucion As Integer = -1, Optional FechaVencimientoI As Date = MinFecha, Optional FechaVencimientoF As Date = MaxFecha) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -476,11 +476,11 @@ Public Class ClsMovimientos
|
|||||||
OnError("Ocurrió un error al descargar los segmentos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al descargar los segmentos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Anticipos de Clientes"
|
#Region "Anticipos de Clientes"
|
||||||
Public Function GetAnticiposCliente(CveCliente As Integer, Optional SelectTop As Integer = -1, Optional CveMoneda As Integer = 1) As Boolean
|
Public Function GetAnticiposCliente(CveCliente As Integer, Optional SelectTop As Integer = -1, Optional CveMoneda As Integer = 1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -558,12 +558,12 @@ Public Class ClsMovimientos
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "CxP"
|
#Region "CxP"
|
||||||
|
|
||||||
Public Function GetCxPEmpresa(CveProveedor As Integer, FechaVencimientoInicio As String, FechaVencimientoFin As String, CveSubProyecto As Integer, DiasVencidos As Integer, CveUsuarioRegistro As Integer,
|
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,
|
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,
|
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,
|
||||||
@@ -1375,7 +1375,7 @@ Public Class ClsMovimientos
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetCxPPersonalCajaChica(CveEmpresa As Integer, CvePersonal As Integer, CveCajaChica As Integer, NumeroReembolso As String, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha) As Boolean
|
Public Function GetCxPPersonalCajaChica(CveEmpresa As Integer, CvePersonal As Integer, CveCajaChica As Integer, NumeroReembolso As String, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha, Optional OpcionSaldo As Integer = 1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_CxPPersonalCajaChica")
|
DataAdapter("PA_CxPPersonalCajaChica")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -1385,7 +1385,7 @@ Public Class ClsMovimientos
|
|||||||
.Add("@NumeroReembolso", SqlDbType.VarChar).Value = NumeroReembolso
|
.Add("@NumeroReembolso", SqlDbType.VarChar).Value = NumeroReembolso
|
||||||
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
|
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
|
||||||
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
|
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
|
||||||
|
.Add("@OpcionSaldo", SqlDbType.Int).Value = OpcionSaldo ' 1. solo con saldo, -1. todos
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -1447,9 +1447,9 @@ Public Class ClsMovimientos
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Anticipos de Proveedores"
|
#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
|
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
|
Dim Retorno As Boolean = False
|
||||||
@@ -1715,11 +1715,11 @@ Public Class ClsMovimientos
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "EDITAR FECHA DE MOVIMIENTO"
|
#Region "EDITAR FECHA DE MOVIMIENTO"
|
||||||
|
|
||||||
Public Function UpdateMovimientoFecha(Fecha As DateTime, CveMovimiento As Integer) As Boolean
|
Public Function UpdateMovimientoFecha(Fecha As DateTime, CveMovimiento As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Mov_MovimientoFechaUpdate")
|
DataAdapter("PA_Mov_MovimientoFechaUpdate")
|
||||||
@@ -1734,12 +1734,12 @@ Public Class ClsMovimientos
|
|||||||
OnError("Ocurrió un error al actualizar la fecha del movimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al actualizar la fecha del movimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Registros Contables"
|
#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,
|
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
|
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
|
Dim Retorno As Boolean = False
|
||||||
@@ -1813,14 +1813,14 @@ Public Class ClsMovimientos
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "IDisposable Support"
|
#Region "IDisposable Support"
|
||||||
|
|
||||||
|
|
||||||
' IDisposable
|
' IDisposable
|
||||||
Protected Overridable Sub Dispose(disposing As Boolean)
|
Protected Overridable Sub Dispose(disposing As Boolean)
|
||||||
If Not Me.disposedValue Then
|
If Not Me.disposedValue Then
|
||||||
If disposing Then
|
If disposing Then
|
||||||
@@ -1853,9 +1853,9 @@ Public Class ClsMovimientos
|
|||||||
ConexionClose()
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Public Function GetPersonalCajaChica(CveEmpresa As Integer, CveCompra As Integer) As Boolean
|
Public Function GetPersonalCajaChica(CveEmpresa As Integer, CveCompra As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_PersonalCajaChica")
|
DataAdapter("PA_PersonalCajaChica")
|
||||||
|
|||||||
Reference in New Issue
Block a user