- opcion saldo
This commit is contained in:
@@ -7,11 +7,11 @@ 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
|
||||
@@ -21,10 +21,10 @@ Public Class ClsMovimientos
|
||||
'Atributos de la clase
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Propiedades"
|
||||
Public ReadOnly Property DtResultados() As DataTable
|
||||
Get
|
||||
@@ -32,9 +32,9 @@ Public Class ClsMovimientos
|
||||
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
|
||||
@@ -55,9 +55,9 @@ 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
|
||||
@@ -90,9 +90,9 @@ Public Class ClsMovimientos
|
||||
CveConexion = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
Public Sub IniciaTransacSQL()
|
||||
SqlTransacc = SqlConexion.BeginTransaction()
|
||||
End Sub
|
||||
@@ -103,27 +103,27 @@ Public Class ClsMovimientos
|
||||
|
||||
Public Sub Commit()
|
||||
SqlTransacc.Commit()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "CxC"
|
||||
'Public Function GetCxCCliente(CveCliente As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
' 'Data = New DataTable
|
||||
' 'SqlAdapter = New SqlDataAdapter("PA_ClienteCxC", SqlConexion)
|
||||
' 'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
||||
' DataAdapter("PA_ClienteCxC")
|
||||
' SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = True
|
||||
' Catch ex As SqlException
|
||||
' OnError("Ocurrió un error al consultar las CxC del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
'Public Function GetCxCCliente(CveCliente As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
' 'Data = New DataTable
|
||||
' 'SqlAdapter = New SqlDataAdapter("PA_ClienteCxC", SqlConexion)
|
||||
' 'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
||||
' DataAdapter("PA_ClienteCxC")
|
||||
' SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = True
|
||||
' Catch ex As SqlException
|
||||
' OnError("Ocurrió un error al consultar las CxC del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
'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
|
||||
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)
|
||||
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
|
||||
@@ -558,12 +558,12 @@ 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,
|
||||
@@ -1375,7 +1375,7 @@ Public Class ClsMovimientos
|
||||
Return Retorno
|
||||
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
|
||||
DataAdapter("PA_CxPPersonalCajaChica")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -1385,7 +1385,7 @@ Public Class ClsMovimientos
|
||||
.Add("@NumeroReembolso", SqlDbType.VarChar).Value = NumeroReembolso
|
||||
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
|
||||
|
||||
.Add("@OpcionSaldo", SqlDbType.Int).Value = OpcionSaldo ' 1. solo con saldo, -1. todos
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -1447,9 +1447,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
|
||||
@@ -1715,11 +1715,11 @@ 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")
|
||||
@@ -1734,12 +1734,12 @@ 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
|
||||
@@ -1813,14 +1813,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
|
||||
@@ -1853,9 +1853,9 @@ 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