-- cambio en el globalDT
This commit is contained in:
@@ -597,26 +597,48 @@ Public Class ClsPaginas
|
|||||||
Application(AppNombre) = value
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTCuentasDepositosClientes(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional Estatus As Boolean = True) As DataTable
|
Property GlobalDTCuentasDepositosClientes(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveCuentaDeposito As Integer = -1) As DataTable
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = $"GlobalDTCuentasDepositosClientes-{CveEmpresa}"
|
Dim AppNombre As String = $"GlobalDTCuentasDepositosClientes-{CveEmpresa}"
|
||||||
If Application(AppNombre) Is Nothing Then
|
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||||
Dim P As New ClsGenerales
|
Dim P As New ClsGenerales
|
||||||
If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-2) Then Application(AppNombre) = P.DtResultados
|
If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-2) Then HttpContext.Current.Application(AppNombre) = P.DtResultados
|
||||||
P.Dispose()
|
P.Dispose()
|
||||||
End If
|
End If
|
||||||
Dim Str As New StringBuilder
|
Dim filtros As New List(Of String)
|
||||||
Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
|
If CveCliente <> -1 Then filtros.Add($"CveCliente = {CveCliente}")
|
||||||
If CveCliente <> -1 Then Str.AppendFormat(" AND CveCliente = {0}", CveCliente)
|
If CveCuentaDeposito <> -1 Then filtros.Add($"CveCuentaDeposito = {CveCuentaDeposito}")
|
||||||
If Estatus = True Then Str.AppendFormat(" AND Estatus = 1 ")
|
|
||||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
|
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||||
GlobalDTCuentasDepositosClientes = Dv.ToTable
|
GlobalDTCuentasDepositosClientes = Dv.ToTable
|
||||||
Dv.Dispose()
|
Dv.Dispose()
|
||||||
|
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Dim AppNombre As String = $"GlobalDTCuentasDepositosClientes-{CveEmpresa}"
|
Dim AppNombre As String = $"GlobalDTCuentasDepositosClientes-{CveEmpresa}"
|
||||||
Application(AppNombre) = value
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property GlobalDTCuentasDepositosPersonales(CveEmpresa As Integer, Optional CvePersonal As Integer = -1, Optional CveCuentaDeposito As Integer = -1) As DataTable
|
||||||
|
Get
|
||||||
|
Dim AppNombre As String = $"GlobalDTCuentasDepositosPersonales-{CveEmpresa}"
|
||||||
|
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||||
|
Dim P As New ClsGenerales
|
||||||
|
If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CvePersonal:=-2) Then HttpContext.Current.Application(AppNombre) = P.DtResultados
|
||||||
|
P.Dispose()
|
||||||
|
End If
|
||||||
|
Dim filtros As New List(Of String)
|
||||||
|
If CvePersonal <> -1 Then filtros.Add($"CvePersonal = {CvePersonal}")
|
||||||
|
If CveCuentaDeposito <> -1 Then filtros.Add($"CveCuentaDeposito = {CveCuentaDeposito}")
|
||||||
|
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||||
|
GlobalDTCuentasDepositosPersonales = Dv.ToTable
|
||||||
|
Dv.Dispose()
|
||||||
|
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
Dim AppNombre As String = $"GlobalDTCuentasDepositosPersonales-{CveEmpresa}"
|
||||||
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable
|
Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable
|
||||||
@@ -7571,7 +7593,7 @@ Public Class ClsPaginas
|
|||||||
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
|
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
|
||||||
If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
|
If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
|
||||||
Dim ContabilizableISR As Boolean = False
|
Dim ContabilizableISR As Boolean = False
|
||||||
If UsuarioActual.CveEmpresa.Contiene(140, 7, 11, 12, 122, 145, 172, 173) Then
|
If UsuarioActual.CveEmpresa.Contiene(140, 7, 11, 12, 122, 145, 172, 173, 174) Then
|
||||||
ContabilizableISR = True
|
ContabilizableISR = True
|
||||||
End If
|
End If
|
||||||
Dim Ret As ConceptosRetenciones = CompraActual.ConceptoPrePolizaRetISR
|
Dim Ret As ConceptosRetenciones = CompraActual.ConceptoPrePolizaRetISR
|
||||||
|
|||||||
@@ -5201,6 +5201,8 @@ Partial Class Bancos_IE
|
|||||||
dtc = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
dtc = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
||||||
ElseIf CveCliente > 0 Then
|
ElseIf CveCliente > 0 Then
|
||||||
dtc = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente)
|
dtc = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente)
|
||||||
|
ElseIf cvepersonal > 0 Then
|
||||||
|
dtc = GlobalDTCuentasDepositosPersonales(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -5221,20 +5223,16 @@ Partial Class Bancos_IE
|
|||||||
ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then
|
ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then
|
||||||
|
|
||||||
If dtc.Rows.Count > 0 Then
|
If dtc.Rows.Count > 0 Then
|
||||||
|
|
||||||
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ")
|
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ")
|
||||||
trCuentaDeposito.Visible = True
|
trCuentaDeposito.Visible = True
|
||||||
BtnGuardar.ToolTip = ""
|
BtnGuardar.ToolTip = ""
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
BtnGuardar.Enabled = False
|
BtnGuardar.Enabled = False
|
||||||
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
||||||
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||||
|
|
||||||
End If
|
End If
|
||||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
|
||||||
UpGuardar.Update()
|
UpGuardar.Update()
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|||||||
Reference in New Issue
Block a user