diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 59b3e072a..6045b7c57 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -1113,12 +1113,19 @@ Public Class ClsPaginas
Application("GlobalDTClasificacionesPresupuestos") = value
End Set
End Property
- Property GlobalDTMetodosPago() As DataTable
+ Public Shared Property GlobalDTMetodosPago() As DataTable
Get
- GlobalDTMetodosPago = DirectCast(Application("GlobalDTMetodosPago"), DataTable)
+ Dim AppNombre As String = "GlobalDTMetodosPago"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjMetodoPago As New ClsMetodosPagos
+ If ObjMetodoPago.GetMetodosPago() Then HttpContext.Current.Application(AppNombre) = ObjMetodoPago.DtResultados
+ ObjMetodoPago.Dispose()
+ End If
+ GlobalDTMetodosPago = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTMetodosPago") = value
+ Dim AppNombre As String = "GlobalDTMetodosPago"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTModulos() As DataTable
@@ -1337,67 +1344,72 @@ Public Class ClsPaginas
Application("GlobalDTEstatusOrdenCompra") = value
End Set
End Property
- Property GlobalDTLeyendasFiscales() As DataTable
+ Public Shared Property GlobalDTLeyendasFiscales() As DataTable
Get
- GlobalDTLeyendasFiscales = DirectCast(Application("GlobalDTLeyendasFiscales"), DataTable)
+ Dim AppNombre As String = "GlobalDTLeyendasFiscales"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjLeyendasFiscales As New ClsLeyendasFiscales
+ If ObjLeyendasFiscales.GetLeyendasFiscales() Then HttpContext.Current.Application(AppNombre) = ObjLeyendasFiscales.DtResultados
+ ObjLeyendasFiscales.Dispose()
+ End If
+ GlobalDTLeyendasFiscales = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTLeyendasFiscales") = value
+ Dim AppNombre As String = "GlobalDTLeyendasFiscales"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
-
- Property GlobalDTEstatusFactura() As DataTable
+ Public Shared Property GlobalDTEstatusFactura() As DataTable
Get
- GlobalDTEstatusFactura = DirectCast(Application("GlobalDTEstatusFactura"), DataTable)
+ Dim AppNombre As String = "GlobalDTEstatusFactura"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjEstatusFactura As New ClsEstatusFactura
+ If ObjEstatusFactura.GetEstatusFactura() Then HttpContext.Current.Application(AppNombre) = ObjEstatusFactura.DtResultados
+ ObjEstatusFactura.Dispose()
+ End If
+ GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTEstatusFactura") = value
+ Dim AppNombre As String = "GlobalDTEstatusFactura"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable
+ Public Shared Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable
Get
-
- If DirectCast(Application("GlobalDTProyectos"), DataTable) Is Nothing Or (DirectCast(Application("GlobalDTProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(Application("GlobalDTProyectos"), DataTable).Rows.Count = 0) Then
- Dim P As New ClsProyectos
- If P.GetProyectos Then
- Application("GlobalDTProyectos") = P.DtResultados
- End If
- P.Dispose()
+ Dim AppNombre As String = $"GlobalDTProyectos-{CveEmpresa}"
+ 'sino existe, recarga los datos
+ If HttpContext.Current.Application(AppNombre) Is Nothing OrElse DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0 Then
+ Dim ObjProyectos As New ClsProyectos
+ If ObjProyectos.GetProyectos(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjProyectos.DtResultados
+ ObjProyectos.Dispose()
Dim msg As String = "aqui no se carga proyectos"
- If Request IsNot Nothing Then
- msg = msg & Request.ServerVariables("URL")
+ If HttpContext.Current.Request IsNot Nothing Then
+ msg += HttpContext.Current.Request.ServerVariables("URL")
End If
msg.GuardaLog()
-
End If
-
- If CveEmpresa <> -1 OrElse Estatus <> -1 Then 'OrElse CveProyecto <> -1
-
- Dim StrSQL As New StringBuilder
- If CveEmpresa <> -1 Then StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- ' If CveProyecto <> -1 Then StrSQL.AppendFormat(" {0} CveProyecto = {1}", If(StrSQL.Length > 0, "AND", ""), CveProyecto)
- If Estatus <> -1 Then StrSQL.AppendFormat(" {0} CveEstatus = {1}", If(StrSQL.Length > 0, "AND", ""), Estatus)
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTProyectos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
+ If Estatus <> -1 Then 'OrElse CveProyecto <> -1
+ 'Dim StrSQL As New StringBuilder
+ 'If Estatus <> -1 Then StrSQL.Append($"Estatus = {Estatus}")
+ 'If CveProyecto <> -1 Then StrSQL.Append(" {If(StrSQL.Length > 0, "AND", "")} CveProyecto = {CveProyecto}")
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveEstatus = {Estatus}", "", DataViewRowState.CurrentRows)
GlobalDTProyectos = Dv.ToTable
Dv.Dispose()
-
Else
- GlobalDTProyectos = DirectCast(Application("GlobalDTProyectos"), DataTable)
+ GlobalDTProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
-
End Get
- Set(ByVal value As DataTable)
+ Set(value As DataTable)
If value Is Nothing OrElse value.Rows.Count = 0 Then
Dim msg As String = "aqui no se carga proyectos"
- If Request IsNot Nothing Then
- msg = msg & Request.ServerVariables("URL")
+ If HttpContext.Current.Request IsNot Nothing Then
+ msg += HttpContext.Current.Request.ServerVariables("URL")
End If
msg.GuardaLog()
-
End If
- Application("GlobalDTProyectos") = value
+ Dim AppNombre As String = $"GlobalDTProyectos-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
@@ -1500,12 +1512,20 @@ Public Class ClsPaginas
Application(AppNombre) = value
End Set
End Property
- Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable
+ Public Shared Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable
Get
- GlobalDTPrecioListas = DirectCast(Application("GlobalDTPrecioListas"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
+ Dim AppNombre As String = $"GlobalDTPrecioListas-{CveEmpresa}"
+ 'sino existe, recarga los datos
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetPrecioListas(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ GlobalDTPrecioListas = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTPrecioListas") = value
+ Dim AppNombre As String = $"GlobalDTPrecioListas-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
'Property GlobalDTMesas() As DataTable
@@ -1738,16 +1758,14 @@ Public Class ClsPaginas
Application(AppNombre) = value
End Set
End Property
- Public Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable
+ Public Shared Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias-{0}", CveEmpresa)
- If CveEmpresa <> -1 Then
- 'sino existe, recarga los datos
- If Application(AppNombre) Is Nothing Then
- Dim ObjPS As New ClsProductosServicios
- If ObjPS.GetPSEquivalencias(-1, CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados
- ObjPS.Dispose()
- End If
+
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjPS As New ClsProductosServicios
+ If ObjPS.GetPSEquivalencias(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjPS.DtResultados
+ ObjPS.Dispose()
End If
If CvePS <> -1 OrElse CveUM <> -1 Then
@@ -1756,16 +1774,16 @@ Public Class ClsPaginas
If CveUM <> -1 Then StrSQL.AppendFormat(" AND CveUM = {0}", CveUM)
If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
GlobalDTProductosServiciosEquivalencias = Dv.ToTable
Dv.Dispose()
Else
- GlobalDTProductosServiciosEquivalencias = DirectCast(Application(AppNombre), DataTable)
+ GlobalDTProductosServiciosEquivalencias = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias-{0}", CveEmpresa)
- Application(AppNombre) = value
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
@@ -1918,12 +1936,19 @@ Public Class ClsPaginas
End Set
End Property
'Bancos
- Property GlobalDTBancos() As DataTable
+ Public Shared Property GlobalDTBancos() As DataTable
Get
- GlobalDTBancos = DirectCast(Application("GlobalDTBancos"), DataTable)
+ Dim AppNombre As String = "GlobalDTBancos"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjBancos As New ClsBancos
+ If ObjBancos.GetBancos() Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
+ ObjBancos.Dispose()
+ End If
+ GlobalDTBancos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTBancos") = value
+ Dim AppNombre As String = "GlobalDTBancos"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
'Property GlobalDTBancosCuentas(CveUsuario As Integer) As DataTable
@@ -1940,54 +1965,64 @@ Public Class ClsPaginas
' Application("GlobalDTBancosCuentas") = value
' End Set
'End Property
- Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1, Optional CveTipoCuenta As Integer = -1) As DataTable
+ Public Shared Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1, Optional CveTipoCuenta As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa)
'sino existe, recarga los datos
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjBancos As New ClsBancos
If ObjBancos.GetBancosCuentasUsuarios(-1, CveEmpresa) Then
- Application(AppNombre) = ObjBancos.DtResultados
+ HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
Else
- Application(AppNombre) = Nothing
+ HttpContext.Current.Application(AppNombre) = Nothing
End If
End Using
End If
- Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa)
+ Dim Str As String = String.Format("CveEmpresa = {0} ", CveEmpresa)
If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario = {1}", Str, CveUsuario)
If CveTipoCuenta > -1 Then Str = String.Format("{0} AND CveTipoCuenta = {1}", Str, CveTipoCuenta)
If CveCuenta > -1 Then Str = String.Format("{0} AND CveCuenta = {1}", Str, CveCuenta)
If Estatus > -1 Then Str = String.Format("{0} AND Estatus = '{1}'", Str, If(Estatus = 1, "Activo", "Inactivo"))
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str, "", DataViewRowState.CurrentRows)
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str, "", DataViewRowState.CurrentRows)
GlobalDTBancosCuentas = Dv.ToTable
Dv.Dispose()
'GlobalDTBancosCuentas = DirectCast(Application("GlobalDTBancosCuentas"), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa)
- Application(AppNombre) = value
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTTipoTransacciones() As DataTable
+ Public Shared Property GlobalDTTipoTransacciones() As DataTable
Get
- If UsuarioActual.CveEmpresa = 66 Then
- GlobalDTTipoTransacciones = DirectCast(Application("GlobalDTTipoTransacciones"), DataTable).FiltraParametros("Estatus = 1")
- Else
- GlobalDTTipoTransacciones = DirectCast(Application("GlobalDTTipoTransacciones"), DataTable)
+ Dim AppNombre As String = "GlobalDTTipoTransacciones"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjBancos As New ClsBancos
+ If ObjBancos.GetBancos_TiposTransaccion(-1) Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
+ ObjBancos.Dispose()
End If
+ GlobalDTTipoTransacciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTTipoTransacciones") = value
+ Dim AppNombre As String = "GlobalDTTipoTransacciones"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTBancosEstatusIE() As DataTable
+ Public Shared Property GlobalDTBancosEstatusIE() As DataTable
Get
- GlobalDTBancosEstatusIE = DirectCast(Application("GlobalDTBancosEstatusIE"), DataTable)
+ Dim AppNombre As String = "GlobalDTBancosEstatusIE"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjBancos As New ClsBancos
+ If ObjBancos.GetBancos_EstatusIE() Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
+ ObjBancos.Dispose()
+ End If
+ GlobalDTBancosEstatusIE = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTBancosEstatusIE") = value
+ Dim AppNombre As String = "GlobalDTBancosEstatusIE"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTBancosIE() As DataTable
@@ -1998,12 +2033,19 @@ Public Class ClsPaginas
Application("GlobalDTBancosIE") = value
End Set
End Property
- Property GlobalDTTipoCuenta() As DataTable
+ Public Shared Property GlobalDTTipoCuenta() As DataTable
Get
- GlobalDTTipoCuenta = DirectCast(Application("GlobalDTTipoCuenta"), DataTable)
+ Dim AppNombre As String = "GlobalDTTipoCuenta"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjBancos As New ClsBancos
+ If ObjBancos.GetBancos_TiposCuenta() Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
+ ObjBancos.Dispose()
+ End If
+ GlobalDTTipoCuenta = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTTipoCuenta") = value
+ Dim AppNombre As String = "GlobalDTTipoCuenta"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
'Fin Bancos
@@ -2249,39 +2291,44 @@ Public Class ClsPaginas
Application(AppNombre) = value
End Set
End Property
- Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable
+ Public Shared Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable
Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTTipoAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTTipoAlmacen = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTTipoAlmacen = DirectCast(Application("GlobalDTTipoAlmacen"), DataTable)
+ Dim AppNombre As String = $"GlobalDTTipoAlmacen-{CveEmpresa}"
+ 'sino existe, recarga los datos
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim Objinventarios As New ClsInventarios
+ If Objinventarios.GetTiposAlmacenes() Then HttpContext.Current.Application(AppNombre) = Objinventarios.DtResultados
+ Objinventarios.Dispose()
End If
-
+ GlobalDTTipoAlmacen = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTTipoAlmacen") = value
+ Dim AppNombre As String = $"GlobalDTTipoAlmacen-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTInvConceptos() As DataTable
+ Public Shared Property GlobalDTInvConceptos() As DataTable
Get
-
- Return DirectCast(Application("GlobalDTInvConceptos"), DataTable)
-
+ Dim AppNombre As String = "GlobalDTInvConceptos"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim Objinventarios As New ClsInventarios
+ If Objinventarios.GetConceptos() Then HttpContext.Current.Application(AppNombre) = Objinventarios.DtResultados
+ Objinventarios.Dispose()
+ End If
+ GlobalDTInvConceptos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTInvConceptos") = value
+ Dim AppNombre As String = "GlobalDTInvConceptos"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
-
- Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable
+ Public Shared Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
'sino existe, recarga los datos
- If Application(AppNombre) Is Nothing Then
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjUsr As New ClsInventarios
- If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then Application(AppNombre) = ObjUsr.DtResultados
+ If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
ObjUsr.Dispose()
End If
@@ -2292,31 +2339,15 @@ Public Class ClsPaginas
If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTAlmacen = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
- Application(AppNombre) = value
+ HttpContext.Current.Application(AppNombre) = value
End Set
- 'Get
- ' Dim Str As New StringBuilder
- ' Str.Append("1=1 AND ")
- ' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
- ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
- ' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
- ' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
-
- ' Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- ' GlobalDTAlmacen = Dv.ToTable
- ' Dv.Dispose()
-
- 'End Get
- 'Set(value As DataTable)
- ' Application("GlobalDTAlmacen") = value
- 'End Set
End Property
Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1, Optional CveEstatus As Integer = 1) As DataTable
Get
@@ -2343,31 +2374,26 @@ Public Class ClsPaginas
End Set
End Property
- Property GlobalDTSeccionAlmacen(CveEmpresa As Integer, CveAlmacen As Integer) As DataTable
+ Public Shared Property GlobalDTSeccionAlmacen(CveEmpresa As Integer, CveAlmacen As Integer) As DataTable
Get
- Dim AppNombre As String = String.Format("GlobalDTSeccionAlmacen-{0}", CveEmpresa)
+ Dim AppNombre As String = $"GlobalDTSeccionAlmacen-{CveEmpresa}"
'sino existe, recarga los datos
- If Application(AppNombre) Is Nothing Then
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjInv As New ClsInventarios
- If ObjInv.GetSeccionesAlmacenes(CveEmpresa, -1) Then Application(AppNombre) = ObjInv.DtResultados
+ If ObjInv.GetSeccionesAlmacenes(CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjInv.DtResultados
ObjInv.Dispose()
End If
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
-
- If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
- If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ If CveAlmacen > 0 Then
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveAlmacen = {CveAlmacen}", "", DataViewRowState.CurrentRows)
GlobalDTSeccionAlmacen = Dv.ToTable
Dv.Dispose()
Else
- GlobalDTSeccionAlmacen = DirectCast(Application("GlobalDTSeccionAlmacen"), DataTable)
+ GlobalDTSeccionAlmacen = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
-
End Get
Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTSeccionAlmacen-{0}", CveEmpresa)
- Application(AppNombre) = value
+ Dim AppNombre As String = $"GlobalDTSeccionAlmacen-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
@@ -2425,54 +2451,89 @@ Public Class ClsPaginas
Application("GlobalDTNom_Periodos") = value
End Set
End Property
- Public Property GlobalDTVtaFormaPago() As DataTable
+ Public Shared Property GlobalDTVtaFormaPago() As DataTable
Get
- GlobalDTVtaFormaPago = DirectCast(Application("GlobalDTVtaFormaPago"), DataTable)
+ Dim AppNombre As String = "GlobalDTVtaFormaPago"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetFormaPago() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTVtaFormaPago") = value
+ Dim AppNombre As String = "GlobalDTVtaFormaPago"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTVtaMetodoPago() As DataTable
+ Public Shared Property GlobalDTVtaMetodoPago() As DataTable
Get
- GlobalDTVtaMetodoPago = DirectCast(Application("GlobalDTVtaMetodoPago"), DataTable)
+ Dim AppNombre As String = "GlobalDTVtaMetodoPago"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetMetodoPago() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTVtaMetodoPago") = value
+ Dim AppNombre As String = "GlobalDTVtaMetodoPago"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTVtaTiposRelacion() As DataTable
+ Public Shared Property GlobalDTVtaTiposRelacion() As DataTable
Get
- GlobalDTVtaTiposRelacion = DirectCast(Application("GlobalDTVtaTiposRelacion"), DataTable)
+ Dim AppNombre As String = "GlobalDTVtaTiposRelacion"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetTiposRelacion() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ GlobalDTVtaTiposRelacion = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTVtaTiposRelacion") = value
+ Dim AppNombre As String = "GlobalDTVtaTiposRelacion"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTTiposDocumentos() As DataTable
+ Public Shared Property GlobalDTTiposDocumentos() As DataTable
Get
- GlobalDTTiposDocumentos = DirectCast(Application("GlobalDTTiposDocumentos"), DataTable)
+ Dim AppNombre As String = "GlobalDTTiposDocumentos"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetTiposDocumentos() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ GlobalDTTiposDocumentos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTTiposDocumentos") = value
+ Dim AppNombre As String = "GlobalDTTiposDocumentos"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTCobranzaEstatus(CveEmpresa As Integer) As DataTable
+ Public Shared Property GlobalDTVtaCobranzaEstatus(CveEmpresa As Integer, Optional CveCobranzaEstatus As Integer = -1) As DataTable
Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTVtaCobranzaEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTCobranzaEstatus = Dv.ToTable
+ Dim AppNombre As String = $"GlobalDTVtaCobranzaEstatus-{CveEmpresa}"
+ 'sino existe, recarga los datos
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetCobranzaEstatus(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ If CveCobranzaEstatus <> -1 Then
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveCobranzaEstatus = {CveCobranzaEstatus}", "", DataViewRowState.CurrentRows)
+ GlobalDTVtaCobranzaEstatus = Dv.ToTable
Dv.Dispose()
Else
- GlobalDTCobranzaEstatus = DirectCast(Application("GlobalDTVtaCobranzaEstatus"), DataTable)
+ GlobalDTVtaCobranzaEstatus = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
- Application("GlobalDTVtaCobranzaEstatus") = value
+ Dim AppNombre As String = $"GlobalDTVtaCobranzaEstatus-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
-
#Region "***********************************************************************DT EVENTOS****************************************************************************************"
Property GlobalDTTiposEventos() As DataTable
Get
@@ -2492,21 +2553,48 @@ Public Class ClsPaginas
End Set
End Property
- Property GlobalDTOIEventoTarea() As DataTable
+ Public Shared Property GlobalDTOIEventoTarea(CveEmpresa As Integer, Optional CveUsuario As Integer = -1) As DataTable
Get
- GlobalDTOIEventoTarea = DirectCast(Application("GlobalDTOIEventoTarea"), DataTable)
+ Dim AppNombre As String = $"GlobalDTOIEventoTarea-{CveEmpresa}"
+ 'sino existe, recarga los datos
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjEventos As New ClsOIEventos
+ If ObjEventos.GetEventoTarea(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjEventos.DtResultados
+ ObjEventos.Dispose()
+ End If
+ If CveUsuario <> -1 Then
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveUsuario = {CveUsuario}", "", DataViewRowState.CurrentRows)
+ GlobalDTOIEventoTarea = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTOIEventoTarea = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
+ End If
End Get
Set(value As DataTable)
- Application("GlobalDTOIEventoTarea") = value
+ Dim AppNombre As String = $"GlobalDTOIEventoTarea-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTOIEstatusEventos() As DataTable
+ Public Shared Property GlobalDTOIEstatusEventos(Optional CveEventoEstatus As Integer = -1) As DataTable
Get
- GlobalDTOIEstatusEventos = DirectCast(Application("GlobalDTOIEstatusEventos"), DataTable)
+ Dim AppNombre As String = "GlobalDTOIEstatusEventos"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjEventos As New ClsOIEventos
+ If ObjEventos.GetEstatusEventos(-1) Then HttpContext.Current.Application(AppNombre) = ObjEventos.DtResultados
+ ObjEventos.Dispose()
+ End If
+ If CveEventoEstatus > 0 Then
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveEventoEstatus = {CveEventoEstatus}", "", DataViewRowState.CurrentRows)
+ GlobalDTOIEstatusEventos = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTOIEstatusEventos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
+ End If
End Get
Set(value As DataTable)
- Application("GlobalDTOIEstatusEventos") = value
+ Dim AppNombre As String = "GlobalDTOIEstatusEventos"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
#End Region
@@ -4030,50 +4118,53 @@ Public Class ClsPaginas
End Get
End Property
- Property GlobalDTOIRevision(CveEmpresa As Integer) As DataTable
+ Public Shared Property GlobalDTOIRevision(CveEmpresa As Integer) As DataTable
Get
- If CveEmpresa <> -1 Then
- Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(Application("GlobalDTOIRevision"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTOIRevision = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTOIRevision = DirectCast(Application("GlobalDTOIRevision"), DataTable)
+ Dim AppNombre As String = $"GlobalDTOIRevision-{CveEmpresa}"
+ 'sino existe, recarga los datos
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjEventos As New ClsOIEventos
+ If ObjEventos.GetRevisionesEventos(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjEventos.DtResultados
+ ObjEventos.Dispose()
End If
+ GlobalDTOIRevision = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTOIRevision") = value
+ Dim AppNombre As String = $"GlobalDTOIRevision-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTOIAgendaTipo() As DataTable
+
+ Public Shared Property GlobalDTOIAgendaTipo() As DataTable
Get
- GlobalDTOIAgendaTipo = DirectCast(Application("GlobalDTOIAgendaTipo"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTOIAgendaTipo") = value
- End Set
- End Property
- Property GlobalDTOIAgenda() As DataTable
- Get
- GlobalDTOIAgenda = DirectCast(Application("GlobalDTOIAgenda"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTOIAgenda") = value
- End Set
- End Property
- Property GlobalDTVtaCondicionesEntrega(Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(Application("GlobalDTVtaCondicionesEntrega"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTVtaCondicionesEntrega = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTVtaCondicionesEntrega = DirectCast(Application("GlobalDTVtaCondicionesEntrega"), DataTable)
+ Dim AppNombre As String = "GlobalDTOIAgendaTipo"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjEventos As New ClsOIEventos
+ If ObjEventos.GetAgendaTipo() Then HttpContext.Current.Application(AppNombre) = ObjEventos.DtResultados
+ ObjEventos.Dispose()
End If
+ GlobalDTOIAgendaTipo = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTVtaCondicionesEntrega") = value
+ Dim AppNombre As String = "GlobalDTOIAgendaTipo"
+ HttpContext.Current.Application(AppNombre) = value
+ End Set
+ End Property
+
+ Public Shared Property GlobalDTVtaCondicionesEntrega(Optional CveEmpresa As Integer = -1) As DataTable
+ Get
+ Dim AppNombre As String = $"GlobalDTVtaCondicionesEntrega-{CveEmpresa}"
+ 'sino existe, recarga los datos
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetCondicionesEntrega(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ GlobalDTVtaCondicionesEntrega = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = $"GlobalDTVtaCondicionesEntrega-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable
@@ -10362,7 +10453,7 @@ Public Class ClsPaginas
Public Function AplicaPrePolizaPagoVenta(VentaActual As Venta, Pago As VentaPago, CvePrePoliza As Integer, ByRef ObjConta As ClsContabilidad) As Boolean
Dim ErrorMovtos As Boolean = False
- Dim PorcentajePago As Decimal = Pago.ImportePago / VentaActual.Total
+ Dim PorcentajePago As Decimal = Pago.ImportePagoVenta / VentaActual.Total
Dim ImporteMovimiento As Decimal = 0
Dim ImporteMN As Decimal = 0
Dim ImporteME As Decimal = 0
@@ -10372,6 +10463,7 @@ Public Class ClsPaginas
Dim tFechaUltimaFluctuacion As Date
Dim tImportePago, tImporteVenta As Decimal
Dim CveConceptoContableComplementaria As Integer = 207
+ If PorcentajePago > 1 Then PorcentajePago = 1
Pago.CveConceptoPago = If(Pago.CveConceptoPago = -1, 2, Pago.CveConceptoPago) 'si viene en parametro lo toma com primera opcion, sino el 2
diff --git a/App_Code/ClsProyectos.vb b/App_Code/ClsProyectos.vb
index 38f6a15dd..f26258873 100644
--- a/App_Code/ClsProyectos.vb
+++ b/App_Code/ClsProyectos.vb
@@ -128,11 +128,12 @@ Public Class ClsProyectos
SqlTransacc = Nothing
End Sub
- Public Function GetProyectos(Optional Opcion As Integer = -1) As Boolean
+ Public Function GetProyectos(CveEmpresa As Integer, Optional Opcion As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_ProyectosGet")
With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Opcion", SqlDbType.Int).Value = Opcion
End With
Try
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index d1a3e66b5..93bb76a17 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -332,7 +332,7 @@ Namespace Modelos
Else
IniciaValores()
End If
- SetMetodoPago(ObjsClsPaginas)
+ SetMetodoPago()
Timbre = New CFDITimbre
DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
End Sub
@@ -2278,7 +2278,7 @@ Namespace Modelos
If GenerarPrePoliza AndAlso CveMovimiento > 0 Then
Dim Concepto As String = "Cancelación Usado" & factura.SerieFolio
Dim CvePrePoliza = ObjConta.AddPrePolizas("Mod/CancSalUsados", 74, DtMovimientosEntrada.SUMD("Total"), DtMovimientosEntrada.SUMD("Total"), 1, tFecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
- Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
+ Dim tCveSubProyecto = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
Dim tCveConcepto As Integer = 278
Dim ValorInventario As Decimal = 0
Dim MovAlmacen As Boolean = False 'debe quedar como el anterior, pero negativo
@@ -2503,7 +2503,7 @@ Namespace Modelos
If ValorMultiplicador = -1 AndAlso ConceptoContable = 291 Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
+ CuentasContablesInvalidas.Append("
" & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
@@ -2599,7 +2599,7 @@ Namespace Modelos
If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then
Dim Importe68 As Decimal = ObjInventario.DtResultados.SUMD("Total").RoundSQL * ValorMultiplicador
- Dim IdCtaContable68 = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
+ Dim IdCtaContable68 = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto68, Importe68, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable68, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoReferencia, ImporteMX:=Importe68, Contabilizable:=False) Then
ErrorPrepoliza = True
@@ -2622,7 +2622,7 @@ Namespace Modelos
If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then
Dim Importe68 As Decimal = 0
- Dim IdCtaContable68 = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
+ Dim IdCtaContable68 = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto68, Importe68, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable68, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoReferencia, ImporteMX:=Importe68, Contabilizable:=False) Then
ErrorPrepoliza = True
@@ -2687,7 +2687,7 @@ Namespace Modelos
ImporteConcepto12 = importeMX.RoundSQL
If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
+ CuentasContablesInvalidas.Append("
" & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
@@ -3332,20 +3332,20 @@ Namespace Modelos
importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal) * ValorMultiplicador)
importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
- Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
+ Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
If ObjFactura.TipoDocto.Contiene("Egs") Then
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
Else
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
End If
If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
+ CuentasContablesInvalidas.Append("
" & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
idCuentaContabilizacion = 0
End If
@@ -3407,14 +3407,14 @@ Namespace Modelos
importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
- Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
+ Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
Else
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
End If
If UsuarioActual.CveEmpresa = 119 Then
@@ -3425,7 +3425,7 @@ Namespace Modelos
If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
+ CuentasContablesInvalidas.Append("
" & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
idCuentaContabilizacion = 0
End If
@@ -3463,20 +3463,20 @@ Namespace Modelos
importeMovimiento = (TmpDTDetalle.SUM("Descuento", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
- Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}"
+ Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}"
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
If ObjFactura.TipoDocto.Contiene("Egs") Then
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
Else
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
End If
If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
+ CuentasContablesInvalidas.Append("
" & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
idCuentaContabilizacion = 0
End If
@@ -3646,12 +3646,12 @@ Namespace Modelos
Dim PorcentajeImpuestoPago As Decimal = TmpDTDetalle.MAX("PorcentajeIVA").ToDecimal
- If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count = 1 Then
- IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("IdCtaContable").ToString.ToEntero
+ If ClsPaginas.GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count = 1 Then
+ IdCtaContable = ClsPaginas.GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("IdCtaContable").ToString.ToEntero
End If
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.AppendFormat("
{0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("NumCuentaMoneda").ToString.ToEntero)
+ CuentasContablesInvalidas.AppendFormat("
{0}", ClsPaginas.GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("NumCuentaMoneda").ToString.ToEntero)
idCuentaContabilizacion = 0
End If
@@ -3714,7 +3714,7 @@ Namespace Modelos
If importeMovimiento <> 0 And Not ErrorPrepoliza Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
+ CuentasContablesInvalidas.Append("
" & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
@@ -3969,7 +3969,7 @@ Namespace Modelos
Private Function GenerarMovimientoGarantia(CveConceptoMovimiento As Integer, ConceptoPoliza As String, FechaMovimiento As DateTime, factura As Factura, ByRef ObjAcum As ClsAcumuladores, ByRef ObjInventario As ClsInventarios, ObjConta As ClsContabilidad, Optional Modulo As String = "Modelos/SDGA") As Boolean
Dim OcurrioError As Boolean = False
Try
- Dim CveAlmacenGarantia As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=6).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={factura.CveSubProyecto}").ToEntero()
+ Dim CveAlmacenGarantia As Integer = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=6).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={factura.CveSubProyecto}").ToEntero()
Dim DtGarantias As DataTable = Nothing
If ObjAcum.GetGarantiasDetalle(factura.CveVenta) Then
@@ -4248,7 +4248,7 @@ Namespace Modelos
For Each RowInv As DataRow In DtCostosDistinct.Rows
ValorInventario = DtCostos.SUM("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).ToString.ToDecimal
- IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
Try
If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, False, ValorInventario, Me.SerieFolio, 69, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=Me.CveSubProyecto) Then
@@ -4262,7 +4262,7 @@ Namespace Modelos
Next
If Not OcurrioError Then
- IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero
ValorInventario = (DtCostos.SUM("Total", "").ToDecimal).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, True, ValorInventario, Me.SerieFolio, 68, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=Me.CveSubProyecto) Then
OcurrioError = True
@@ -4346,7 +4346,7 @@ Namespace Modelos
If UsuarioActual.CveEmpresa = 1 Then
DtEquivalencias = New DataTable
- DtEquivalencias = GlobalDTProductosServiciosEquivalencias(CveProducto, -1, UsuarioActual.CveEmpresa)
+ DtEquivalencias = ClsPaginas.GlobalDTProductosServiciosEquivalencias(CveProducto, -1, UsuarioActual.CveEmpresa)
Dim CveUnidadBase As Integer = DtEquivalencias.FiltroPrimeroValor("CveUM", "UnidadBase = 'True'").ToEntero
Dim drUMBase As DataRow = DtEquivalencias.FiltroPrimero("UnidadBase = 'True'")
@@ -4408,7 +4408,7 @@ Namespace Modelos
End If
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString())
- IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
'If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario) Then
@@ -4418,7 +4418,7 @@ Namespace Modelos
cont += 1
Next
End If
- IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
'If TotalCosto <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveSubProyecto:=factura.CveSubProyecto) Then
@@ -4547,7 +4547,7 @@ Namespace Modelos
End If
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString())
- IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
'If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario) Then
@@ -4557,7 +4557,7 @@ Namespace Modelos
cont += 1
Next
End If
- IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
'If TotalCosto <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveSubProyecto:=factura.CveSubProyecto) Then
@@ -5495,7 +5495,7 @@ Namespace Modelos
DtCostos = ObjInventario.DtResultados
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
- Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {CveAlmacenMovimiento}").ToEntero
+ Dim IdCtaContableAlmacen As Integer = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {CveAlmacenMovimiento}").ToEntero
Dim IdCtaContable As Integer = 0
If tmpCostos.Rows.Count > 0 Then
@@ -5524,7 +5524,7 @@ Namespace Modelos
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
End If
- IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
If Not ErrorCancelar Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaDev, False, Multiplicador * ValorInventario, SerieFolio, 69, SerieFolio, Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimientoDevolucion, CveSubProyecto:=ObjFactura.CveSubProyecto, ImporteMX:=Multiplicador * ValorInventario, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero) Then
@@ -6406,7 +6406,7 @@ Namespace Modelos
Dim EsContabilizable As Boolean = False
Dim Concepto As String = "Cancelación"
Dim CvePrePoliza = ObjConta.AddPrePolizas("Mod/CancExAR1", 74, DtEntradaDetalle.SUMD("Total"), DtEntradaDetalle.SUMD("Total"), 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
- Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveSubProyecto").ToEntero
+ Dim tCveSubProyecto = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveSubProyecto").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorInventario, Concepto, 68, Concepto, Fecha, 0, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoSalidaDevRem, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto, Contabilizable:=EsContabilizable) Then
ErrorCancelar = True
@@ -7245,9 +7245,9 @@ Namespace Modelos
End If
End Sub
Public Sub SetMetodoPago()
- If CveMetodoPago > 0 AndAlso Not IsNothing(GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))) Then
- MetodoPago = GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString()
- ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString()
+ If CveMetodoPago > 0 AndAlso Not IsNothing(ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))) Then
+ MetodoPago = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString()
+ ClaveMetodoPagoSAT = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString()
End If
End Sub
Public Sub SetMoneda(ObjClsPaginas As ClsPaginas)
@@ -7262,9 +7262,9 @@ Namespace Modelos
End Sub
Public Sub SetMetodoPago(ObjClsPaginas As ClsPaginas)
If Not IsNothing(ObjClsPaginas) Then
- If Not IsNothing(ObjClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))) Then
- MetodoPago = ObjClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString()
- ClaveMetodoPagoSAT = ObjClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString()
+ If Not IsNothing(ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))) Then
+ MetodoPago = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString()
+ ClaveMetodoPagoSAT = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString()
End If
End If
End Sub
@@ -7478,111 +7478,7 @@ Namespace Modelos
End Set
End Property
- Public ReadOnly Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias-{0}", CveEmpresa)
-
- If CvePS <> -1 OrElse CveUM <> -1 Then
- Dim StrSQL As New StringBuilder
- If CvePS <> -1 Then StrSQL.AppendFormat(" AND CvePS = {0}", CvePS)
- If CveUM <> -1 Then StrSQL.AppendFormat(" AND CveUM = {0}", CveUM)
- If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
- GlobalDTProductosServiciosEquivalencias = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProductosServiciosEquivalencias = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
- End Get
-
- End Property
- Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProveedorClasificacion"), DataTable), String.Format("CveEmpresa ={0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProveedorClasificacion = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProveedorClasificacion = DirectCast(HttpContext.Current.Application("GlobalDTProveedorClasificacion"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProveedorClasificacion") = value
- End Set
- End Property
- Property GlobalDTProveedorSucursales(CveProveedor As Integer) As DataTable
- Get
- If CveProveedor <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProveedorSucursales"), DataTable), String.Format("CveProveedor = {0}", CveProveedor), "", DataViewRowState.CurrentRows)
- GlobalDTProveedorSucursales = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProveedorSucursales = DirectCast(HttpContext.Current.Application("GlobalDTProveedorSucursales"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProveedorSucursales") = value
- End Set
- End Property
- Property GlobalDTRoles(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTRoles"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTRoles = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTRoles = DirectCast(HttpContext.Current.Application("GlobalDTRoles"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTRoles") = value
- End Set
- End Property
- Property GlobalDTNomSatBancos() As DataTable
- Get
- GlobalDTNomSatBancos = DirectCast(HttpContext.Current.Application("GlobalDTNomSatBancos"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatBancos") = value
- End Set
- End Property
- Property GlobalDTNomSatConceptos() As DataTable
- Get
- GlobalDTNomSatConceptos = DirectCast(HttpContext.Current.Application("GlobalDTNomSatConceptos"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatConceptos") = value
- End Set
- End Property
- Property GlobalDTNomSatRegimenContratacion() As DataTable
- Get
- GlobalDTNomSatRegimenContratacion = DirectCast(HttpContext.Current.Application("GlobalDTNomSatRegimenContratacion"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatRegimenContratacion") = value
- End Set
- End Property
- Property GlobalDTNomSatRiesgoPuesto() As DataTable
- Get
- GlobalDTNomSatRiesgoPuesto = DirectCast(HttpContext.Current.Application("GlobalDTNomSatRiesgoPuesto"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatRiesgoPuesto") = value
- End Set
- End Property
- Property GlobalDTNomSatTipoIncapacidad() As DataTable
- Get
- GlobalDTNomSatTipoIncapacidad = DirectCast(HttpContext.Current.Application("GlobalDTNomSatTipoIncapacidad"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatTipoIncapacidad") = value
- End Set
- End Property
Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable
Get
@@ -7598,236 +7494,8 @@ Namespace Modelos
HttpContext.Current.Application("GlobalDTEmpresas") = value
End Set
End Property
- Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Dim ObjClasificaciones As New ClsClasificaciones
- If ObjClasificaciones.GetClasificaciones(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClasificaciones.DtResultados
- ObjClasificaciones.Dispose()
- End If
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
- If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion)
- If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificaciones = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- End Set
- End Property
- Property GlobalDTClasificaciones2(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificaciones2"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificaciones2 = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificaciones2 = DirectCast(HttpContext.Current.Application("GlobalDTClasificaciones2"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificaciones2") = value
- End Set
- End Property
- Property GlobalDTClasificacionesSubProyectos(Optional CveClasificacion As Integer = -1, Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionesSubProyectos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionesSubProyectos = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto") = value
- End Set
- End Property
- Property GlobalDTACClasificadorObjetoGasto(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTACClasificadorObjetoGasto = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTACClasificadorObjetoGasto = DirectCast(HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto") = value
- End Set
- End Property
- Property GlobalDTClasificacionesDetalle(Optional CveEmpresa As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesDetalle"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionesDetalle = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionesDetalle = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesDetalle"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificacionesDetalle") = value
- End Set
- End Property
- Property GlobalDTSubFamilias(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubFamilias"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTSubFamilias = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTSubFamilias = DirectCast(HttpContext.Current.Application("GlobalDTSubFamilias"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTSubFamilias") = value
- End Set
- End Property
- Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTFamilias"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTFamilias = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTFamilias = DirectCast(HttpContext.Current.Application("GlobalDTFamilias"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTFamilias") = value
- End Set
- End Property
- Property GlobalDTClasificacionesPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionesPresupuestos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionesPresupuestos = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos") = value
- End Set
- End Property
- Property GlobalDTMetodosPago() As DataTable
- Get
- GlobalDTMetodosPago = DirectCast(HttpContext.Current.Application("GlobalDTMetodosPago"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTMetodosPago") = value
- End Set
- End Property
- Property GlobalDTModulos() As DataTable
- Get
- GlobalDTModulos = DirectCast(HttpContext.Current.Application("GlobalDTModulos"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTModulos") = value
- End Set
- End Property
-
- Property GlobalDTEstatusOrdenCompra() As DataTable
- Get
- GlobalDTEstatusOrdenCompra = DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenCompra"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTEstatusOrdenCompra") = value
- End Set
- End Property
- Property GlobalDTLeyendasFiscales() As DataTable
- Get
- GlobalDTLeyendasFiscales = DirectCast(HttpContext.Current.Application("GlobalDTLeyendasFiscales"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTLeyendasFiscales") = value
- End Set
- End Property
- Property GlobalDTEstatusFactura() As DataTable
- Get
- GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTEstatusFactura"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTEstatusFactura") = value
- End Set
- End Property
- Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable
- Get
-
- If DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable).Rows.Count = 0) Then
- Dim P As New ClsProyectos
- If P.GetProyectos Then
- HttpContext.Current.Application("GlobalDTProyectos") = P.DtResultados
- End If
- P.Dispose()
-
- End If
-
- If CveEmpresa <> -1 OrElse Estatus <> -1 Then 'OrElse CveProyecto <> -1
-
- Dim StrSQL As New StringBuilder
- If CveEmpresa <> -1 Then StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- ' If CveProyecto <> -1 Then StrSQL.AppendFormat(" {0} CveProyecto = {1}", If(StrSQL.Length > 0, "AND", ""), CveProyecto)
- If Estatus <> -1 Then StrSQL.AppendFormat(" {0} CveEstatus = {1}", If(StrSQL.Length > 0, "AND", ""), Estatus)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProyectos = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTProyectos = DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- If value Is Nothing OrElse value.Rows.Count = 0 Then
-
- End If
- HttpContext.Current.Application("GlobalDTProyectos") = value
- End Set
- End Property
-
Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
@@ -7942,107 +7610,7 @@ Namespace Modelos
HttpContext.Current.Application("GlobalDTProyectosUsuarios") = value
End Set
End Property
- Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable
- Get
- GlobalDTPrecioListas = DirectCast(HttpContext.Current.Application("GlobalDTPrecioListas"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTPrecioListas") = value
- End Set
- End Property
- 'Property GlobalDTMesas() As DataTable
- ' Get
- ' GlobalDTMesas = DirectCast(HttpContext.Current.Application("GlobalDTMesas"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTMesas") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoOrdenServicios(CveEmpresa As Integer) As DataTable
- ' Get
- ' GlobalDTTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTTipoOrdenServicios"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoOrdenServicios") = value
- ' End Set
- 'End Property
- 'Property GlobalDTSubTipoOrdenServicios() As DataTable
- ' Get
- ' GlobalDTSubTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios") = value
- ' End Set
- 'End Property
- 'Property GlobalDTCaracteristicasOrdenServicios() As DataTable
- ' Get
- ' GlobalDTCaracteristicasOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios") = value
- ' End Set
- 'End Property
- 'Property GlobalDTOrdenesServiciosCaracteristicas() As DataTable
- ' Get
- ' GlobalDTOrdenesServiciosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas") = value
- ' End Set
- 'End Property
- 'Property GlobalDTCaracteristicasOpciones() As DataTable
- ' Get
- ' GlobalDTCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOpciones"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTCaracteristicasOpciones") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoCuentasEquipos(CveEmpresa As Integer) As DataTable
- ' Get
- ' If CveEmpresa <> -1 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- ' GlobalDTTipoCuentasEquipos = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTTipoCuentasEquipos = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable)
- ' End If
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoCuentasEquipos") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoCuentasEquiposCaracteristicas(CveEmpresa As Integer) As DataTable
- ' Get
- ' If CveEmpresa <> -1 Then
-
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- ' GlobalDTTipoCuentasEquiposCaracteristicas = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTTipoCuentasEquiposCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable)
- ' End If
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoCuentasEquiposOpciones(CveEmpresa As Integer) As DataTable
- ' Get
- ' If CveEmpresa <> -1 Then
-
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- ' GlobalDTTipoCuentasEquiposOpciones = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTTipoCuentasEquiposOpciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable)
- ' End If
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones") = value
- ' End Set
- 'End Property
ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1) As DataTable
Get
Dim ObjPS As New ClsProductosServicios
@@ -8059,469 +7627,132 @@ Namespace Modelos
- Property GlobalDTInvMetodosInventario() As DataTable
- Get
- GlobalDTInvMetodosInventario = DirectCast(HttpContext.Current.Application("GlobalDTInvMetodosInventario"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTInvMetodosInventario") = value
- End Set
- End Property
- 'Property GlobalDTAFCaracteristicasOpciones() As DataTable
+ 'Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable
' Get
- ' GlobalDTAFCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones") = value
- ' End Set
- 'End Property
- 'Property GlobalDTAFCaracteristicas() As DataTable
- ' Get
- ' GlobalDTAFCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicas"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTAFCaracteristicas") = value
- ' End Set
- 'End Property
- 'Property GlobalDTAFCaracteristicasClasificaciones() As DataTable
- ' Get
- ' GlobalDTAFCaracteristicasClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones") = value
- ' End Set
- 'End Property
- 'Property GlobalDTImpuestosLocales(CvePS As Integer, CveEmpresa As Integer) As DataTable
- ' Get
- ' Dim Str As New StringBuilder
- ' If CvePS > 0 Then Str.AppendFormat("CvePS = {0}", CvePS)
- ' If CveEmpresa > 0 Then Str.AppendFormat("{0} CveEmpresa = {1}", If(CvePS > 0, " AND ", ""), CveEmpresa)
-
- ' If CvePS > 0 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- ' GlobalDTImpuestosLocales = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTImpuestosLocales = DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable)
- ' End If
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTImpuestosLocales") = value
- ' End Set
- 'End Property
- 'Bancos
- Property GlobalDTBancos() As DataTable
- Get
- GlobalDTBancos = DirectCast(HttpContext.Current.Application("GlobalDTBancos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTBancos") = value
- End Set
- End Property
-
-
- Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
- Dim ObjBancos As New ClsBancos
- If ObjBancos.GetBancosCuentasUsuarios(-1, CveEmpresa) Then
- HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
- Else
- HttpContext.Current.Application(AppNombre) = Nothing
- End If
- ObjBancos.Dispose()
- End If
-
- Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa)
- If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario = {1}", Str, CveUsuario)
- If CveCuenta > -1 Then Str = String.Format("{0} AND CveCuenta = {1}", Str, CveCuenta)
- If Estatus > -1 Then Str = String.Format("{0} AND Estatus = '{1}'", Str, If(Estatus = 1, "Activo", "Inactivo"))
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str, "", DataViewRowState.CurrentRows)
- GlobalDTBancosCuentas = Dv.ToTable
- Dv.Dispose()
- 'GlobalDTBancosCuentas = DirectCast(Application("GlobalDTBancosCuentas"), DataTable)
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- End Set
- End Property
-
-
-
- Property GlobalDTTipoTransacciones() As DataTable
- Get
- If UsuarioActual.CveEmpresa = 66 Then
- GlobalDTTipoTransacciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoTransacciones"), DataTable).FiltraParametros("Estatus = 1")
- Else
- GlobalDTTipoTransacciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoTransacciones"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTipoTransacciones") = value
- End Set
- End Property
- 'Property GlobalDTEstatusIE() As DataTable
- ' Get
- ' GlobalDTEstatusIE = DirectCast(HttpContext.Current.Application("GlobalDTEstatusIE"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTEstatusIE") = value
- ' End Set
- 'End Property
- 'Property GlobalDTBancosIE() As DataTable
- ' Get
- ' GlobalDTBancosIE = DirectCast(HttpContext.Current.Application("GlobalDTBancosIE"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTBancosIE") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoCuenta() As DataTable
- ' Get
- ' GlobalDTTipoCuenta = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuenta"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoCuenta") = value
- ' End Set
- 'End Property
- ''Fin Bancos
-
- ''Fin EstadoCIvil
- ''TipoPerioso
- 'Property GlobalDTTipoPeriodo() As DataTable
- ' Get
- ' GlobalDTTipoPeriodo = DirectCast(HttpContext.Current.Application("GlobalDTTipoPeriodo"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoPeriodo") = value
- ' End Set
- 'End Property
- ''Fin TipoPeriodo
-
- 'Periodos
- 'Property GlobalDTNominasPeriodos(CveTipoPeriodo As Integer, CvePeriodo As Integer, CveEmpresa As Integer) As DataTable
- ' Get
- ' Dim Str As New StringBuilder
- ' If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- ' If CveTipoPeriodo <> -1 Then Str.AppendFormat(" {0} CveTipoPeriodo = {1}", If(Str.Length > 0, "AND", ""), CveTipoPeriodo)
- ' If CvePeriodo <> -1 Then Str.AppendFormat(" {0} CvePeriodo = {1}", If(Str.Length > 0, "AND", ""), CvePeriodo)
- ' If Str.Length > 0 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- ' GlobalDTNominasPeriodos = Dv.ToTable
- ' Dv.Dispose()
-
- ' Else
- ' GlobalDTNominasPeriodos = DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable)
+ ' Dim AppNombre As String = String.Format("GlobalDTCliente-{0}", CveEmpresa)
+ ' 'sino existe, recarga los datos
+ ' If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ ' Dim ObjClientes As New ClsClientes
+ ' If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados
+ ' ObjClientes.Dispose()
' End If
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTNominasPeriodos") = value
- ' End Set
- 'End Property
- 'Fin Periodos
- 'Fin Ruta
- 'Cliente
- Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTCliente-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Dim ObjClientes As New ClsClientes
- If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados
- ObjClientes.Dispose()
- End If
-
-
- If CveEmpresa <> -1 Then
-
- Dim StrSQL As New StringBuilder
- StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTCliente = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTCliente = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTCliente-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- 'Dim ObjClientes As New ClsClientes
- 'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then Application(AppNombre) = ObjClientes.DtResultados
- 'ObjClientes.Dispose()
- End Set
- End Property
- Property GlobalDTClienteClasificaciones(CveEmpresa As Integer) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Dim ObjClientes As New ClsClientes
- If ObjClientes.GetClienteClasificacion(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados
- ObjClientes.Dispose()
- End If
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTClienteClasificaciones = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClienteClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- 'Dim ObjClientes As New ClsClientes
- 'If ObjClientes.GetClienteClasificacion(CveEmpresa) Then Application(AppNombre) = ObjClientes.DtResultados
- 'ObjClientes.Dispose()
- End Set
- End Property
- Property GlobalDTEstatusOrdenServicios(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenServicios"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTEstatusOrdenServicios = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTEstatusOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenServicios"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTEstatusOrdenServicios") = value
- End Set
- End Property
- 'Variables para Ventas
- Property GlobalDTVendedores(CveEmpresa As Integer, Optional Estatus As Boolean = True, Optional VendedorTipo As Integer = 1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTVendedores"), DataTable), String.Format("CveEmpresa = {0} AND CveEstatus = {1} AND VendedorTipo = {2}", CveEmpresa, If(Estatus, 1, 0), VendedorTipo), "", DataViewRowState.CurrentRows)
- GlobalDTVendedores = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTVendedores = DirectCast(HttpContext.Current.Application("GlobalDTVendedores"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTVendedores") = value
- End Set
- End Property
- Property GlobalDTClientesCorporativo(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClientesCorporativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTClientesCorporativo = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClientesCorporativo = DirectCast(HttpContext.Current.Application("GlobalDTClientesCorporativo"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClientesCorporativo") = value
- End Set
- End Property
- Property GlobalDTCompProveedores(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCompProveedores"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTCompProveedores = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTCompProveedores = DirectCast(HttpContext.Current.Application("GlobalDTCompProveedores"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTCompProveedores") = value
- End Set
- End Property
- 'EstatusFactura
- 'Property GlobalDTCompEstatusFactura() As DataTable
- ' Get
- ' GlobalDTCompEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTCompEstatusFactura"), DataTable).FiltraParametros("Estatus = 'Activo'")
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTCompEstatusFactura") = value
- ' End Set
- 'End Property
- 'Property GlobalDTContratosSecciones() As DataTable
- ' Get
- ' GlobalDTContratosSecciones = DirectCast(HttpContext.Current.Application("GlobalDTContratosSecciones"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTContratosSecciones") = value
- ' End Set
- 'End Property
- 'Property GlobalDTContratos() As DataTable
- ' Get
- ' GlobalDTContratos = DirectCast(HttpContext.Current.Application("GlobalDTContratos"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTContratos") = value
- ' End Set
- 'End Property
- 'Property GlobalDTContratosTipos() As DataTable
- ' Get
- ' GlobalDTContratosTipos = DirectCast(HttpContext.Current.Application("GlobalDTContratosTipos"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTContratosTipos") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable
- ' Get
' If CveEmpresa <> -1 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- ' GlobalDTTipoAlmacen = Dv.ToTable
+
+ ' Dim StrSQL As New StringBuilder
+ ' StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
+ ' If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus)
+
+ ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
+ ' GlobalDTCliente = Dv.ToTable
' Dv.Dispose()
+
' Else
- ' GlobalDTTipoAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable)
+ ' GlobalDTCliente = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
' End If
-
' End Get
' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoAlmacen") = value
+ ' Dim AppNombre As String = String.Format("GlobalDTCliente-{0}", CveEmpresa)
+ ' HttpContext.Current.Application(AppNombre) = value
+ ' 'Dim ObjClientes As New ClsClientes
+ ' 'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then Application(AppNombre) = ObjClientes.DtResultados
+ ' 'ObjClientes.Dispose()
' End Set
'End Property
- 'Property GlobalDTInvConceptos() As DataTable
- ' Get
-
- ' Return DirectCast(HttpContext.Current.Application("GlobalDTInvConceptos"), DataTable)
-
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTInvConceptos") = value
- ' End Set
- 'End Property
- 'Property GlobalDTSeccionAlmacen(CveEmpresa As Integer) As DataTable
+ 'Property GlobalDTClienteClasificaciones(CveEmpresa As Integer) As DataTable
' Get
+ ' Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones-{0}", CveEmpresa)
+ ' 'sino existe, recarga los datos
+ ' If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ ' Dim ObjClientes As New ClsClientes
+ ' If ObjClientes.GetClienteClasificacion(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados
+ ' ObjClientes.Dispose()
+ ' End If
' If CveEmpresa <> -1 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- ' GlobalDTSeccionAlmacen = Dv.ToTable
+
+ ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ ' GlobalDTClienteClasificaciones = Dv.ToTable
' Dv.Dispose()
' Else
- ' GlobalDTSeccionAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable)
+ ' GlobalDTClienteClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
+ ' End If
+ ' End Get
+ ' Set(value As DataTable)
+ ' Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones-{0}", CveEmpresa)
+ ' HttpContext.Current.Application(AppNombre) = value
+ ' 'Dim ObjClientes As New ClsClientes
+ ' 'If ObjClientes.GetClienteClasificacion(CveEmpresa) Then Application(AppNombre) = ObjClientes.DtResultados
+ ' 'ObjClientes.Dispose()
+ ' End Set
+ 'End Property
+
+ 'Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable
+ ' Get
+ ' Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
+ ' 'sino existe, recarga los datos
+ ' If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ ' Dim ObjUsr As New ClsInventarios
+ ' If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
+ ' ObjUsr.Dispose()
' End If
+ ' Dim Str As New StringBuilder
+ ' Str.Append("1=1 AND ")
+ ' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
+ ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
+ ' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
+ ' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
+
+ ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ ' GlobalDTAlmacen = Dv.ToTable
+ ' Dv.Dispose()
' End Get
' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTSeccionAlmacen") = value
+ ' Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
+ ' HttpContext.Current.Application(AppNombre) = value
' End Set
+ ' 'Get
+
+ ' ' Dim Str As New StringBuilder
+ ' ' Str.Append("1=1 AND ")
+ ' ' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
+ ' ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
+ ' ' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
+ ' ' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
+
+ ' ' Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ ' ' GlobalDTAlmacen = Dv.ToTable
+ ' ' Dv.Dispose()
+
+ ' 'End Get
+ ' 'Set(value As DataTable)
+ ' ' Application("GlobalDTAlmacen") = value
+ ' 'End Set
'End Property
- Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Dim ObjUsr As New ClsInventarios
- If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
- ObjUsr.Dispose()
- End If
-
- Dim Str As New StringBuilder
- Str.Append("1=1 AND ")
- If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
- If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
- If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
- If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTAlmacen = Dv.ToTable
- Dv.Dispose()
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- End Set
- 'Get
-
- ' Dim Str As New StringBuilder
- ' Str.Append("1=1 AND ")
- ' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
- ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
- ' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
- ' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
-
- ' Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- ' GlobalDTAlmacen = Dv.ToTable
- ' Dv.Dispose()
-
- 'End Get
- 'Set(value As DataTable)
- ' Application("GlobalDTAlmacen") = value
- 'End Set
- End Property
- Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Dim ObjUsr As New ClsSisUsuarios
- If ObjUsr.GetAlmacen(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
- ObjUsr.Dispose()
- End If
- Dim Str As New StringBuilder
- Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
- If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTAlmacenUsuarios = Dv.ToTable
- Dv.Dispose()
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- End Set
- End Property
- 'Property GlobalDTNom_Periodos() As DataTable
+ 'Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable
' Get
- ' GlobalDTNom_Periodos = DirectCast(HttpContext.Current.Application("GlobalDTNom_Periodos"), DataTable)
+ ' Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
+ ' 'sino existe, recarga los datos
+ ' If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ ' Dim ObjUsr As New ClsSisUsuarios
+ ' If ObjUsr.GetAlmacen(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
+ ' ObjUsr.Dispose()
+ ' End If
+ ' Dim Str As New StringBuilder
+ ' Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
+ ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
+
+ ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ ' GlobalDTAlmacenUsuarios = Dv.ToTable
+ ' Dv.Dispose()
' End Get
' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTNom_Periodos") = value
- ' End Set
- 'End Property
- 'Property GlobalDTVtaFormaPago() As DataTable
- ' Get
- ' GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaFormaPago"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTVtaFormaPago") = value
- ' End Set
- 'End Property
- 'Property GlobalDTVtaMetodoPago() As DataTable
- ' Get
- ' GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaMetodoPago"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTVtaMetodoPago") = value
- ' End Set
- 'End Property
- 'Property GlobalDTVtaTiposRelacion() As DataTable
- ' Get
- ' GlobalDTVtaTiposRelacion = DirectCast(HttpContext.Current.Application("GlobalDTVtaTiposRelacion"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTVtaTiposRelacion") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTiposDocumentos() As DataTable
- ' Get
- ' GlobalDTTiposDocumentos = DirectCast(HttpContext.Current.Application("GlobalDTTiposDocumentos"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTiposDocumentos") = value
+ ' Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
+ ' HttpContext.Current.Application(AppNombre) = value
' End Set
'End Property
+
Public ReadOnly Property GlobalTipoCambioUltimaFluctuacion(Optional Fecha As Date = MinFecha) As ClsPaginas.MTipoCambioFluctuacion
Get
@@ -8597,30 +7828,6 @@ Namespace Modelos
End Set
End Property
- Property GlobalDTContaConceptosContables(CveConceptoContable As Integer) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables")
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Using ObjContabilidad As New ClsContabilidad
- If ObjContabilidad.GetConta_ConceptosContables() Then HttpContext.Current.Application(AppNombre) = ObjContabilidad.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing
- End Using
-
- End If
- If CveConceptoContable <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveConceptoContable = {0}", CveConceptoContable), "", DataViewRowState.CurrentRows)
- GlobalDTContaConceptosContables = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTContaConceptosContables = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables")
- HttpContext.Current.Application(AppNombre) = value
- End Set
- End Property
#End Region
diff --git a/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx
index d9fa69a59..590b27b3c 100644
--- a/Ashx/SIGFacturacion.ashx
+++ b/Ashx/SIGFacturacion.ashx
@@ -1650,7 +1650,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
If DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable).Rows.Count = 0) Then
Dim P As New ClsProyectos
- If P.GetProyectos Then
+ If P.GetProyectos(-1) Then
HttpContext.Current.Application("GlobalDTProyectos") = P.DtResultados
End If
P.Dispose()
diff --git a/CRM/RepAgendasBitacoras.aspx.cs b/CRM/RepAgendasBitacoras.aspx.cs
index 3a460798c..8f2242b97 100644
--- a/CRM/RepAgendasBitacoras.aspx.cs
+++ b/CRM/RepAgendasBitacoras.aspx.cs
@@ -103,6 +103,6 @@ public partial class CRM_AgendasBitacoras : ClsPaginas
protected void LnkExcel_Click(object sender, EventArgs e)
{
- GVDatos.ExportToExcelx("RepAgendaBiracora.xls");
+ GVDatos.ExportToExcelX("RepAgendaBiracora");
}
}
\ No newline at end of file
diff --git a/Compras/EvaluacionProveedor.aspx.vb b/Compras/EvaluacionProveedor.aspx.vb
index 460ed861b..517bedcec 100644
--- a/Compras/EvaluacionProveedor.aspx.vb
+++ b/Compras/EvaluacionProveedor.aspx.vb
@@ -118,7 +118,7 @@ Partial Class Compras_EvaluacionProveedor
TxtSerieFolio.Text = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString()
End If
End If
- If ObjCompras.GetCompraDetalle(CveCompra) Then
+ If ObjCompras.GetCompraDetalle(CveCompra, UsuarioActual.CveEmpresa) Then
Dim StrPS As New StringBuilder()
For Each Row As DataRow In ObjCompras.DtResultados.Rows
If ObjCompras.DtResultados.Rows.Count > 1 Then
diff --git a/Contabilidad/PopUpAuxiliar.aspx.vb b/Contabilidad/PopUpAuxiliar.aspx.vb
index 111ae7686..21da35698 100644
--- a/Contabilidad/PopUpAuxiliar.aspx.vb
+++ b/Contabilidad/PopUpAuxiliar.aspx.vb
@@ -225,13 +225,21 @@ Partial Class PopUpAuxiliar
e.Row.FCLinkButton("LnkDesAplicar").CommandName = "DesAplicarCompra"
e.Row.FCLinkButton("imgD").Visible = False
If e.Row.DBCampo("CveConceptoContable").Contiene("272") Then
- e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveCompraAmortizacion"))
+ e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}|{3}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveCompraAmortizacion"), e.Row.DBCampo("CveIE"))
Else
- e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompraAmortizacion"), e.Row.DBCampo("CveCompra"))
+ e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}|{3}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompraAmortizacion"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveIE"))
End If
- End If
- If e.Row.DBCampo("TipoReferencia").ToEntero = 1 Then
+ ElseIf e.Row.DBCampo("CveConceptoContable").Contiene("21") Then 'desaplicar anticipo de compra
+
+ e.Row.FCLinkButton("LnkDesAplicar").Visible = True
+ e.Row.FCLinkButton("LnkDesAplicar").CommandName = "DesAplicarAnticipoCompra"
+ e.Row.FCLinkButton("imgD").Visible = False
+ e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveIE"))
+
+ End If
+
+ If e.Row.DBCampo("TipoReferencia").ToEntero = 1 Then
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Bancos/IE.aspx?CveIE={e.Row.DBCampo("CveReferencia").ToEntero}"
'If e.Row.DBCampo("CveReferencia").ToEntero > 0 Then
' e.Row.Cells(10).Text = ""
@@ -519,6 +527,40 @@ Partial Class PopUpAuxiliar
End If
+ If e.CommandName = "DesAplicarAnticipoCompra" Then
+
+ Dim CvePrePoliza, CveCompra, CveIE As Integer
+ Dim TieneError = False
+
+ Dim St As String() = e.CommandArgument.ToString.Split("|"c)
+ If St.Length > 0 Then
+ CvePrePoliza = St(0).ToEntero
+ CveCompra = St(1).ToEntero
+ CveIE = St(2).ToEntero
+ End If
+
+ If CvePrePoliza > 0 Then
+ Dim Conta As New ClsContabilidad()
+ Conta.IniciaTransacSQL()
+
+ If Not Conta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
+ TieneError = True
+ End If
+
+ If Not TieneError AndAlso Not Conta.DesAplicarPago(CvePrePoliza, 21, CveCompra, CveIE) Then
+ TieneError = True
+ End If
+
+ If Not TieneError Then
+ Conta.Commit()
+ Alert("Pago Desaplicado.", TipoMensaje.ToastInformacion)
+ Else
+ Conta.RollBack()
+ Alert("Pago no fue desaplicado.", TipoMensaje.ToastError)
+ End If
+ End If
+
+ End If
End Sub
End Class
diff --git a/CxC/GestionCobranza.aspx.vb b/CxC/GestionCobranza.aspx.vb
index 183098cf2..836c147bf 100644
--- a/CxC/GestionCobranza.aspx.vb
+++ b/CxC/GestionCobranza.aspx.vb
@@ -57,11 +57,11 @@ Partial Class Ventas_GestionCobranza
DdlResponsableCobranza.DataBind()
DdlResponsableCobranza.Items.Insert(0, New ListItem("Todos", "-1"))
- DdlCobranzaEstatus.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa)
+ DdlCobranzaEstatus.DataSource = GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa)
DdlCobranzaEstatus.DataBind()
DdlCobranzaEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
- DdlCobranzaEstatusEdit.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa)
+ DdlCobranzaEstatusEdit.DataSource = GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa)
DdlCobranzaEstatusEdit.DataBind()
If ObjVentas.GetCobranzaTurnoEstatus(-1, UsuarioActual.CveEmpresa) Then
diff --git a/CxC/RepCxC.aspx b/CxC/RepCxC.aspx
index e66c3446e..8b9913fba 100644
--- a/CxC/RepCxC.aspx
+++ b/CxC/RepCxC.aspx
@@ -365,7 +365,7 @@