diff --git a/Acumuladores/CatGarantiasMeses.aspx.vb b/Acumuladores/CatGarantiasMeses.aspx.vb index 0f204a538..190f4dd6c 100644 --- a/Acumuladores/CatGarantiasMeses.aspx.vb +++ b/Acumuladores/CatGarantiasMeses.aspx.vb @@ -72,22 +72,12 @@ Partial Class Acumuladores_CatFoliosGarantia Private Sub CargaCombos() - 'Dim ObjPS As New ClsProductosServicios - - 'If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then - ' DdlMarca.DataSource = ObjPS.DtResultados - ' DdlMarca.DataBind() - ' DdlMarca.Items.Insert(0, New ListItem("Todos", "-1")) - ' DdlMarca.SelectedValue = "-1" - 'End If - 'ObjPS.Dispose() - DdlMarca.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa) DdlMarca.DataBind() DdlMarca.Items.Insert(0, New ListItem("Todos", "-1")) DdlMarca.SelectedValue = "-1" - DdlTipoUso.DataSource = GlobalDTAcumTiposUso() + DdlTipoUso.DataSource = GlobalDTAcumTiposUso(UsuarioActual.CveEmpresa) DdlTipoUso.DataBind() DdlTipoUso.Items.Insert(0, New ListItem("Todos", "-1")) DdlTipoUso.SelectedValue = "-1" @@ -124,7 +114,7 @@ Partial Class Acumuladores_CatFoliosGarantia DdlMarca.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa) DdlMarcaM.DataBind() - DdlTipoUsoM.DataSource = GlobalDTAcumTiposUso() + DdlTipoUsoM.DataSource = GlobalDTAcumTiposUso(UsuarioActual.CveEmpresa) DdlTipoUsoM.DataBind() End Sub diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index cfdf5421e..36e99b747 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -252,7 +252,7 @@ Public Class ClsMovimientos TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1", Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional FechaCorte As Date = Nothing, Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1, Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1, Optional CveMoneda As Integer = -1, - Optional TieneLineaAdicional As Integer = -1) As Boolean + Optional TieneLineaAdicional As Integer = -1, Optional CveContrato As Integer = -1) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -287,7 +287,8 @@ Public Class ClsMovimientos .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente .Add("@AplicaAnticiposPagados", SqlDbType.Int).Value = AplicaAnticiposPagados .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda - .Add("@TieneLineaAdicional", SqlDbType.Int).Value = TieneLineaAdicional + .Add("@TieneLineaAdicional", SqlDbType.Int).Value = TieneLineaAdicional + .Add("@CveContrato", SqlDbType.Int).Value = CveContrato End With Try @@ -338,7 +339,8 @@ Public Class ClsMovimientos CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1", Optional FechaVI As String = "-1", Optional FechaVF As String = "1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1, - Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1, Optional TieneLineaAdicional As Integer = -1) As Boolean + Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1, + Optional TieneLineaAdicional As Integer = -1, Optional CveContrato As Integer = -1) As Boolean Dim Retorno As Boolean = False DS = New DataSet @@ -382,6 +384,7 @@ Public Class ClsMovimientos .Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente .Add("@AplicaAnticiposPagados", SqlDbType.Int).Value = AplicaAnticiposPagados .Add("@TieneLineaAdicional", SqlDbType.Int).Value = TieneLineaAdicional + .Add("@CveContrato", SqlDbType.Int).Value = CveContrato End With Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 8c9fc0de4..30f81f474 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -227,23 +227,24 @@ Public Class ClsPaginas End Property Property GlobalDTNomConceptos(CveEmpresa As Integer) As DataTable Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTNomConceptos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTNomConceptos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTNomConceptos = DirectCast(Application("GlobalDTNomConceptos"), DataTable) + Dim AppNombre As String = String.Format("GlobalDTNomConceptos-{0}", CveEmpresa) + If Application("GlobalDTNomConceptos") Is Nothing Then + Dim ObjNom As New ClsNominas + If ObjNom.GetConceptos(CveEmpresa) Then Application(AppNombre) = ObjNom.DtResultados + ObjNom.Dispose() End If + GlobalDTNomConceptos = DirectCast(Application(AppNombre), DataTable) + End Get Set(value As DataTable) - Application("GlobalDTNomConceptos") = value + Dim AppNombre As String = String.Format("GlobalDTNomConceptos-{0}", CveEmpresa) + Application(AppNombre) = value End Set End Property Property GlobalDTTiposGastos(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTTiposGastos-{0}", CveEmpresa) - 'sino existe, recarga los datos If Application(AppNombre) Is Nothing Then Dim ObjCompra As New ClsCompras() If ObjCompra.GetTipoGasto(-1, -1) Then Application(AppNombre) = ObjCompra.DtResultados Else Application(AppNombre) = Nothing @@ -382,7 +383,7 @@ Public Class ClsPaginas Public Shared Property GlobalDTFraccionArancelaria() As EnumerableRowCollection(Of DataRow) Get Dim AppNombre As String = "GlobalDTFraccionArancelaria" - If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + If HttpContext.Current.Application(AppNombre) Is Nothing Then Dim ObjGrales As New ClsGenerales If ObjGrales.GetSATFraccionArancelaria() Then HttpContext.Current.Application(AppNombre) = ObjGrales.DtResultados.AsEnumerable() ObjGrales.Dispose() @@ -597,27 +598,28 @@ Public Class ClsPaginas #End Region - Property GlobalDTPSATUM() As DataTable + Public Shared Property GlobalDTPSATUM() As EnumerableRowCollection(Of DataRow) Get - If Application("GlobalDTPSATUM") Is Nothing Then + If HttpContext.Current.Application("GlobalDTPSATUM") Is Nothing Then Dim ObjGrales As New ClsGenerales - If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() + If ObjGrales.GetSATUnidadMedida Then HttpContext.Current.Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() ObjGrales.Dispose() End If + Return DirectCast(HttpContext.Current.Application("GlobalDTPSATUM"), EnumerableRowCollection(Of DataRow)) - 'System.Data.EnumerableRowCollection - If Not IsNothing(Application("GlobalDTPSATUM")) Then - If Application("GlobalDTPSATUM").GetType().IsSubclassOf(GetType(EnumerableRowCollection)) Then - Return DirectCast(Application("GlobalDTPSATUM"), EnumerableRowCollection(Of DataRow)).CopyToDataTable() - Else - Return DirectCast(Application("GlobalDTPSATUM"), DataTable) - End If - Else - Return Nothing - End If + ''System.Data.EnumerableRowCollection + 'If Not IsNothing(HttpContext.Current.Application("GlobalDTPSATUM")) Then + ' If HttpContext.Current.Application("GlobalDTPSATUM").GetType().IsSubclassOf(GetType(EnumerableRowCollection)) Then + ' Return DirectCast(HttpContext.Current.Application("GlobalDTPSATUM"), EnumerableRowCollection(Of DataRow)) + ' Else + ' Return DirectCast(HttpContext.Current.Application("GlobalDTPSATUM"), EnumerableRowCollection(Of DataRow)) + ' End If + 'Else + ' Return Nothing + 'End If End Get - Set(value As DataTable) - Application("GlobalDTPSATUM") = value + Set(value As EnumerableRowCollection(Of DataRow)) + HttpContext.Current.Application("GlobalDTPSATUM") = value End Set End Property Property GlobalDTNomConceptosFunciones() As DataTable @@ -1127,43 +1129,45 @@ Public Class ClsPaginas Application("GlobalDTModulos") = value End Set End Property - Property GlobalDTMonedas() As DataTable + Public Shared Property GlobalDTMonedas() As DataTable Get - GlobalDTMonedas = DirectCast(Application("GlobalDTMonedas"), DataTable) + Dim AppNombre As String = "GlobalDTMonedas" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjMonedas As New ClsMonedas + If ObjMonedas.GetMonedas() Then HttpContext.Current.Application(AppNombre) = ObjMonedas.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing + ObjMonedas.Dispose() + End If + GlobalDTMonedas = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTMonedas") = value + Dim AppNombre As String = "GlobalDTMonedas" + HttpContext.Current.Application(AppNombre) = value End Set End Property Property GlobalDTMonedasAlias() As DataTable Get - GlobalDTMonedasAlias = DirectCast(Application("GlobalDTMonedasAlias"), DataTable) + Dim AppNombre As String = "GlobalDTMonedasAlias" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjMonedas As New ClsMonedas + If ObjMonedas.GetMonedasAlias() Then HttpContext.Current.Application(AppNombre) = ObjMonedas.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing + ObjMonedas.Dispose() + End If + GlobalDTMonedasAlias = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTMonedasAlias") = value + Dim AppNombre As String = "GlobalDTMonedasAlias" + HttpContext.Current.Application(AppNombre) = value End Set + End Property - 'Property GlobalDTSucursales(Optional CveEmpresa As Integer = -1) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim Dv As New DataView(DirectCast(Application("GlobalDTSucursales"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " Sucursal", DataViewRowState.CurrentRows) - ' GlobalDTSucursales = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTSucursales = DirectCast(Application("GlobalDTSucursales"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' Application("GlobalDTSucursales") = value - ' End Set - 'End Property - Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable + + + Public Shared Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable Get Dim AppNombre As String = "GlobalDTSATUsosCFDI" - 'sino existe, recarga los datos - If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then Dim ObjGrales As New ClsGenerales - If ObjGrales.GetSATUsosCFDI() Then Application(AppNombre) = ObjGrales.DtResultados + If ObjGrales.GetSATUsosCFDI() Then HttpContext.Current.Application(AppNombre) = ObjGrales.DtResultados ObjGrales.Dispose() End If @@ -1175,40 +1179,40 @@ Public Class ClsPaginas Tipo.AppendFormat("AND RegimenFiscalReceptor LIKE '%{0}%'", RegimenFiscalReceptor) End If - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows) GlobalDTSATUsosCFDI = Dv.ToTable Dv.Dispose() Else - GlobalDTSATUsosCFDI = DirectCast(Application(AppNombre), DataTable) + GlobalDTSATUsosCFDI = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If End Get Set(value As DataTable) Dim AppNombre As String = "GlobalDTSATUsosCFDI" - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set End Property - Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable + Public Shared Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida-{0}", CveEmpresa) 'sino existe, recarga los datos - If DirectCast(Application(AppNombre), DataTable) Is Nothing Or (DirectCast(Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(Application(AppNombre), DataTable).Rows.Count = 0) Then + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then Dim ObjUnidadesMedida As New ClsUnidadesMedida() - If ObjUnidadesMedida.GetUnidadesMedida(CveEmpresa) Then Application(AppNombre) = ObjUnidadesMedida.DtResultados + If ObjUnidadesMedida.GetUnidadesMedida(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUnidadesMedida.DtResultados ObjUnidadesMedida.Dispose() End If If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows) GlobalDTUnidadesMedida = Dv.ToTable Dv.Dispose() Else - GlobalDTUnidadesMedida = DirectCast(Application(AppNombre), DataTable) + GlobalDTUnidadesMedida = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If End Get Set(value As DataTable) Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida-{0}", CveEmpresa) - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set End Property Property GlobalDTUnidadesMedidaAlias(Optional CveEmpresa As Integer = -1) As DataTable @@ -2051,7 +2055,6 @@ Public Class ClsPaginas ObjClientes.Dispose() End If - If CveEmpresa <> -1 Then Dim StrSQL As New StringBuilder @@ -4133,30 +4136,45 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property - Property GlobalDTAcumTiposDefecto() As DataTable + Public Shared Property GlobalDTAcumTiposDefecto(CveEmpresa As Integer) As DataTable Get - GlobalDTAcumTiposDefecto = DirectCast(Application("GlobalDTAcumTiposDefecto"), DataTable) - End Get - Set(value As DataTable) - Application("GlobalDTAcumTiposDefecto") = value - End Set - End Property - Property GlobalDTAcumTiposUso() As DataTable - Get - GlobalDTAcumTiposUso = DirectCast(Application("GlobalDTAcumTiposUso"), DataTable) - End Get - Set(value As DataTable) - Application("GlobalDTAcumTiposUso") = value - End Set - End Property + Dim AppNombre As String = String.Format("GlobalDTAcumTiposDefecto-{0}", CveEmpresa) + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjAcumuladores As New ClsAcumuladores() + If ObjAcumuladores.TiposDefectoGet(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjAcumuladores.DtResultados + ObjAcumuladores.Dispose() + End If + GlobalDTAcumTiposDefecto = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + End Get + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTAcumTiposDefecto-{0}", CveEmpresa) + HttpContext.Current.Application(AppNombre) = value + End Set + End Property + Public Shared Property GlobalDTAcumTiposUso(CveEmpresa As Integer) As DataTable + Get + Dim AppNombre As String = String.Format("GlobalDTAcumTiposUso-{0}", CveEmpresa) + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjAcumuladores As New ClsAcumuladores() + If ObjAcumuladores.TiposUsoGet(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjAcumuladores.DtResultados + ObjAcumuladores.Dispose() + End If + GlobalDTAcumTiposUso = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + + End Get + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTAcumTiposUso-{0}", CveEmpresa) + HttpContext.Current.Application(AppNombre) = value + End Set + End Property Property GlobalDTAcumGarantiasMesesTipoUso(CveEmpresa As Integer, CveMarca As Integer) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTAcumGarantiasMesesTipoUso-{0}", CveEmpresa) If Application(AppNombre) Is Nothing Then Dim ObjAcumuladores As New ClsAcumuladores() - If ObjAcumuladores.GarantiasMesesGet(-1, -1) Then Application(AppNombre) = ObjAcumuladores.DtResultados.FiltraParametros("", DistinctColumns:={"CveMarca", "CveTipoUso", "TipoUso"}) + If ObjAcumuladores.GarantiasMesesGet(-1, CveEmpresa) Then Application(AppNombre) = ObjAcumuladores.DtResultados.FiltraParametros("", DistinctColumns:={"CveMarca", "CveTipoUso", "TipoUso"}) ObjAcumuladores.Dispose() End If @@ -4191,17 +4209,6 @@ Public Class ClsPaginas End If - 'If CveMarca <> -1 Then - ' Dim Str As StringBuilder = New StringBuilder() - ' If CveMarca <> -1 Then Str.AppendFormat("CveMarca = {0}", CveMarca) - - ' Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - ' GlobalDTCultivosCuadro = Dv.ToTable - ' Dv.Dispose() - 'Else - - 'End If - GlobalDTCultivosCuadro = DirectCast(Application(AppNombre), DataTable) End Get @@ -4211,79 +4218,23 @@ Public Class ClsPaginas End Set End Property - - - - Property GlobalDTAcumTamaños() As DataTable + Public Shared Property GlobalDTAcumTamaños(CveEmpresa As Integer) As DataTable Get - GlobalDTAcumTamaños = DirectCast(Application("GlobalDTAcumTamaños"), DataTable) + Dim AppNombre As String = String.Format("GlobalDTAcumTamaños-{0}", CveEmpresa) + + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Using ObjAcumuladores As New ClsAcumuladores() + If ObjAcumuladores.TamañoGet(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjAcumuladores.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing + End Using + End If + GlobalDTAcumTamaños = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTAcumTamaños") = value + Dim AppNombre As String = String.Format("GlobalDTAcumTamaños-{0}", CveEmpresa) + HttpContext.Current.Application(AppNombre) = value End Set End Property -#Region "GDT'S RASTREO" - Property GlobalDTDispositivos(CveCliente As Integer) As DataTable - Get - Dim Str As StringBuilder = New StringBuilder() - - If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente) - - - If CveCliente <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTDispositivos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTDispositivos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTDispositivos = DirectCast(Application("GlobalDTDispositivos"), DataTable) - End If - - End Get - Set(value As DataTable) - Application("GlobalDTDispositivos") = value - End Set - End Property - - Public Sub RecargaGlobalDTDispositivos(GPS As ClsGPS) - If GPS.DispositivosGet(-1, -1, -1, -1) Then - GlobalDTDispositivos(-1) = GPS.DtResultados - End If - End Sub - - Property GlobalDTDispositivosUsuarios(CveCliente As Integer, Optional CveUsuario As Integer = -1) As DataTable - Get - If Application("GlobalDTDispositivosUsuarios") Is Nothing Then - Dim ObjGPS As New ClsGPS - If ObjGPS.DispositivosUsuariosGet(-1, -1, -1, -1, -1) Then - Application("GlobalDTDispositivosUsuarios") = ObjGPS.DtResultados - End If - ObjGPS.Dispose() - End If - - Dim Str As StringBuilder = New StringBuilder() - - If CveUsuario <> -1 Then Str.AppendFormat("CveUsuario = {0}", CveUsuario) - If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente) - - - If CveUsuario <> -1 OrElse CveCliente <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTDispositivosUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTDispositivosUsuarios = Dv.ToTable - Dv.Dispose() - Else - GlobalDTDispositivosUsuarios = DirectCast(Application("GlobalDTDispositivosUsuarios"), DataTable) - End If - - End Get - Set(value As DataTable) - Application("GlobalDTDispositivosUsuarios") = value - End Set - End Property - -#End Region - - Property GlobalDTClientesVendedoresSubProyectos(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveSubProyecto As Integer = -1) As DataTable Get @@ -4345,6 +4296,66 @@ Public Class ClsPaginas #End Region +#Region "GDT'S RASTREO" + Property GlobalDTDispositivos(CveCliente As Integer) As DataTable + Get + Dim Str As StringBuilder = New StringBuilder() + + If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente) + + + If CveCliente <> -1 Then + Dim Dv As New DataView(DirectCast(Application("GlobalDTDispositivos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + GlobalDTDispositivos = Dv.ToTable + Dv.Dispose() + Else + GlobalDTDispositivos = DirectCast(Application("GlobalDTDispositivos"), DataTable) + End If + + End Get + Set(value As DataTable) + Application("GlobalDTDispositivos") = value + End Set + End Property + + Public Sub RecargaGlobalDTDispositivos(GPS As ClsGPS) + If GPS.DispositivosGet(-1, -1, -1, -1) Then + GlobalDTDispositivos(-1) = GPS.DtResultados + End If + End Sub + + Property GlobalDTDispositivosUsuarios(CveCliente As Integer, Optional CveUsuario As Integer = -1) As DataTable + Get + If Application("GlobalDTDispositivosUsuarios") Is Nothing Then + Dim ObjGPS As New ClsGPS + If ObjGPS.DispositivosUsuariosGet(-1, -1, -1, -1, -1) Then + Application("GlobalDTDispositivosUsuarios") = ObjGPS.DtResultados + End If + ObjGPS.Dispose() + End If + + Dim Str As StringBuilder = New StringBuilder() + + If CveUsuario <> -1 Then Str.AppendFormat("CveUsuario = {0}", CveUsuario) + If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente) + + + If CveUsuario <> -1 OrElse CveCliente <> -1 Then + Dim Dv As New DataView(DirectCast(Application("GlobalDTDispositivosUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + GlobalDTDispositivosUsuarios = Dv.ToTable + Dv.Dispose() + Else + GlobalDTDispositivosUsuarios = DirectCast(Application("GlobalDTDispositivosUsuarios"), DataTable) + End If + + End Get + Set(value As DataTable) + Application("GlobalDTDispositivosUsuarios") = value + End Set + End Property + +#End Region + Public Enum SisParametros As Integer URL = 1 DirectorioSitio = 2 @@ -10514,8 +10525,8 @@ Public Class ClsPaginas If Pago.TipoPago = "I" AndAlso Not ErrorMovtos Then ' I N G R E S O S X C O M P R O B A R Dim Ret As New ConceptosRetenciones If UsuarioActual.Empresa.TipoContabilidad = 2 Then - If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero - If Pago.CveMonedaPago > 1 AndAlso ObjConta.GetRetCuenta(207, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero + 'If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero + 'If Pago.CveMonedaPago > 1 AndAlso ObjConta.GetRetCuenta(207, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero If UsuarioActual.CveEmpresa.Contiene(119) Then If Pago.FechaDocumentoRelacionado.Year <= 2017 Then diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 67d37fb3b..4b7dd81fb 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -418,7 +418,7 @@ Public Class ClsVentas Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1", - Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1) As Boolean + Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasAdd") @@ -517,6 +517,7 @@ Public Class ClsVentas .Add("@DevolucionImportePagado", SqlDbType.Money).Value = DevolucionImportePagado .Add("@EsGarantia", SqlDbType.Bit).Value = EsGarantia .Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional + .Add("@DescripcionVenta", SqlDbType.VarChar).Value = DescripcionVenta .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue End With 'SqlTypes.SqlDateTime.Null diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index b388fa640..d1a3e66b5 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -498,8 +498,8 @@ Namespace Modelos Me.TipoCambio = 0 Me.ConvertirPesos = False Me.CveMoneda = 1 - Me.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda} ") - Me.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda} ") + Me.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda} ") + Me.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda} ") Me.RefDocto = "" ' Me.CveMesa = -1 Me.Fecha = Now @@ -2109,10 +2109,10 @@ Namespace Modelos If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then For Each RowSalida As DataRow In DtMovimientos.Rows Dim Cantidad As Decimal = RowSalida("Cantidad").ToString().ToDecimal() * -1 - Dim Puntos As Decimal = RowSalida("Puntos").ToString().ToDecimal() + Dim Puntos As Decimal = RowSalida("Puntos").ToString().ToDecimal() * -1 - Dim ImporteCargo As Decimal = RowSalida("ImporteCargo").ToString().ToDecimal() - Dim ImporteBonificacion As Decimal = RowSalida("ImporteBonificacion").ToString().ToDecimal() + Dim ImporteCargo As Decimal = RowSalida("ImporteCargo").ToString().ToDecimal() * -1 + Dim ImporteBonificacion As Decimal = RowSalida("ImporteBonificacion").ToString().ToDecimal() * -1 Dim FacturadoBonificacion = False Dim CveVentaBonificacion As Integer = -1 @@ -2146,7 +2146,7 @@ Namespace Modelos For Each drow As DataRow In factura.DtDetalle.Rows If drow("CveTamaño").ToString.ToEntero > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={drow("CveTamaño").ToString.ToEntero}") + Dim DrTamanio As DataRow = ClsPaginas.GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CveTamaño={drow("CveTamaño").ToString.ToEntero}") If DrTamanio IsNot Nothing Then Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal() Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal() @@ -2194,6 +2194,10 @@ Namespace Modelos For Each Dr As DataRow In factura.DtMovimientosUsados.Rows + If factura.EsGarantia Then + ImporteConcepto = Dr("PU").ToString().ToDecimal() + End If + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, Observaciones:=Dr("Observaciones").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then 'Mensaje = "Error al guardar los movimientos" Resultado = False @@ -2212,7 +2216,7 @@ Namespace Modelos If factura.Cliente.EsDistribuidor AndAlso factura.CveConceptoMovimiento = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}") + Dim DrTamanio As DataRow = ClsPaginas.GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}") If DrTamanio IsNot Nothing Then Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal() Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal() @@ -2591,27 +2595,63 @@ Namespace Modelos CveMovimientoReferencia = CveMovimiento End If - If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then - Dim Importe68 As Decimal = 0 + If ObjFactura.EsGarantia Then + 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 = 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 + 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 + End If + + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + ErrorPrepoliza = True + End If + + Dim Importe318 As Decimal = (Math.Abs(importeMovimiento) - Math.Abs(Importe68)) * ValorMultiplicador + + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, Importe318, Referencia, 318, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Importe318, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + ErrorPrepoliza = True + End If + + Else ErrorPrepoliza = True End If + Else + If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then + Dim Importe68 As Decimal = 0 + Dim IdCtaContable68 = 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 + End If + + If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + ErrorPrepoliza = True + End If + Else + ErrorPrepoliza = True + End If + + Else + ErrorPrepoliza = True + End If + End If + + Else + If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + ErrorPrepoliza = True + End If Else ErrorPrepoliza = True End If End If - If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then - ErrorPrepoliza = True - End If - Else - ErrorPrepoliza = True - End If + importeMovimiento = 0 ObjFactura.SeGuardoPrePoliza = True @@ -7196,7 +7236,7 @@ Namespace Modelos End Sub Public Sub SetMoneda() If CveMoneda > 0 Then - Dim dr As DataRow = GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda ={0}", CveMoneda)) + Dim dr As DataRow = ClsPaginas.GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda ={0}", CveMoneda)) If Not IsNothing(dr) Then Moneda = dr("Moneda").ToString() MonedaSAT = dr("AbreviaturaSAT").ToString() @@ -7212,7 +7252,7 @@ Namespace Modelos End Sub Public Sub SetMoneda(ObjClsPaginas As ClsPaginas) If Not IsNothing(ObjClsPaginas) Then - Dim dr As DataRow = ObjClsPaginas.GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda ={0}", CveMoneda)) + Dim dr As DataRow = ClsPaginas.GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda ={0}", CveMoneda)) If Not IsNothing(dr) Then Moneda = dr("Moneda").ToString() MonedaSAT = dr("AbreviaturaSAT").ToString() @@ -7351,14 +7391,7 @@ Namespace Modelos #End Region #Region "G L O B A L - D T" - Property GlobalDTAcumTamaños() As DataTable - Get - GlobalDTAcumTamaños = DirectCast(HttpContext.Current.Application("GlobalDTAcumTamaños"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAcumTamaños") = value - End Set - End Property + Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double Get If GlobalTipoCambio <= 0 Then @@ -7407,14 +7440,7 @@ Namespace Modelos End Set End Property - 'Property GlobalValidarCFDI As Boolean - ' Get - ' GlobalValidarCFDI = CBool(HttpContext.Current.Application("GlobalValidarCFDI")) - ' End Get - ' Set(value As Boolean) - ' HttpContext.Current.Application("GlobalValidarCFDI") = value - ' End Set - 'End Property + Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1) As DataTable Get Dim Str As New StringBuilder @@ -7435,90 +7461,6 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTUsuarios") = value End Set End Property - Property GlobalDTNomConceptos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTNomConceptos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTNomConceptos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTNomConceptos = DirectCast(HttpContext.Current.Application("GlobalDTNomConceptos"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTNomConceptos") = value - End Set - End Property - Property GlobalDTTiposGastos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTiposGastos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTiposGastos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTiposGastos = DirectCast(HttpContext.Current.Application("GlobalDTTiposGastos"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTiposGastos") = value - End Set - End Property - Property GlobalDTMFActividad(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveActividad As Integer = -1) As DataTable - Get - - Dim dt As DataTable = Nothing - Dim ObjMF As New ClsMF - - If ObjMF.GetActividad(CveActividad, CveEmpresa, Estatus) Then - dt = ObjMF.DtResultados - End If - - ObjMF.Dispose() - GlobalDTMFActividad = dt - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTActividad") = value - End Set - End Property - Property GlobalDTMFOperador(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveOperador As Integer = -1) As DataTable - Get - - Dim dt As DataTable = Nothing - Dim ObjMF As New ClsMF - - If ObjMF.GetOperador(CveOperador, CveEmpresa, Estatus) Then - dt = ObjMF.DtResultados - End If - - ObjMF.Dispose() - GlobalDTMFOperador = dt - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOperador") = value - End Set - End Property - Property GlobalDTMFEstatus(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable - Get - - Dim dt As DataTable = Nothing - Dim ObjMF As New ClsMF - - If ObjMF.GetEstatus(CveEstatus, Estatus, CveEmpresa) Then - dt = ObjMF.DtResultados - End If - - ObjMF.Dispose() - GlobalDTMFEstatus = dt - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstatus") = value - End Set - End Property Property DtFacturaDefault() As DataTable Get DtFacturaDefault = DirectCast(HttpContext.Current.Application("DtFacturaDefault"), DataTable) @@ -7535,162 +7477,6 @@ Namespace Modelos HttpContext.Current.Application("Directorio") = value End Set End Property - Property GlobalDTPSATPS() As DataTable - Get - GlobalDTPSATPS = DirectCast(HttpContext.Current.Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow)).CopyToDataTable - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPSATPS") = value - End Set - End Property - -#Region "GLOBALES DE SAT COMERCIO EXTERIOR" - - Property GlobalDTClavePedimento() As DataTable - Get - GlobalDTClavePedimento = DirectCast(HttpContext.Current.Application("GlobalDTClavePedimento"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTClavePedimento") = value - End Set - End Property - - Property GlobalDTFraccionArancelaria() As DataTable - Get - GlobalDTFraccionArancelaria = DirectCast(HttpContext.Current.Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow)).CopyToDataTable - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTFraccionArancelaria") = value - End Set - End Property - - Property GlobalDTIncoterm() As DataTable - Get - GlobalDTIncoterm = DirectCast(HttpContext.Current.Application("GlobalDTIncoterm"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTIncoterm") = value - End Set - End Property - - Property GlobalDTTipoOperacion() As DataTable - Get - GlobalDTTipoOperacion = DirectCast(HttpContext.Current.Application("GlobalDTTipoOperacion"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoOperacion") = value - End Set - End Property - - Property GlobalDTSATMotivoTraslado() As DataTable - Get - GlobalDTSATMotivoTraslado = DirectCast(HttpContext.Current.Application("GlobalDTSATMotivoTraslado"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSATMotivoTraslado") = value - End Set - End Property - - Property GlobalDTUnidadAduana() As DataTable - Get - GlobalDTUnidadAduana = DirectCast(HttpContext.Current.Application("GlobalDTUnidadAduana"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTUnidadAduana") = value - End Set - End Property - - Property GlobalDTPais() As DataTable - Get - GlobalDTPais = DirectCast(HttpContext.Current.Application("GlobalDTPais"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPais") = value - End Set - End Property - - Property GlobalDTEstado(ClaveSATPais As String) As DataTable - Get - If ClaveSATPais <> "-1" Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEstado"), DataTable), String.Format("ClaveSATPais = '{0}'", ClaveSATPais), "", DataViewRowState.CurrentRows) - GlobalDTEstado = Dv.ToTable - Dv.Dispose() - Else - GlobalDTEstado = DirectCast(HttpContext.Current.Application("GlobalDTEstado"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstado") = value - End Set - End Property - - Property GlobalDTMunicipio(ClaveSATEstado As String) As DataTable - Get - If ClaveSATEstado <> "-1" Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTMunicipio"), DataTable), String.Format("ClaveSATEstado = '{0}'", ClaveSATEstado), "", DataViewRowState.CurrentRows) - GlobalDTMunicipio = Dv.ToTable - Dv.Dispose() - Else - GlobalDTMunicipio = DirectCast(HttpContext.Current.Application("GlobalDTMunicipio"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMunicipio") = value - End Set - End Property - - Property GlobalDTColonia(ClaveSATMunicipio As String) As DataTable - Get - If ClaveSATMunicipio <> "-1" Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTColonia"), DataTable), String.Format("ClaveSATMunicipio = '{0}'", ClaveSATMunicipio), "", DataViewRowState.CurrentRows) - GlobalDTColonia = Dv.ToTable - Dv.Dispose() - Else - GlobalDTColonia = DirectCast(HttpContext.Current.Application("GlobalDTColonia"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTColonia") = value - End Set - End Property - -#End Region - - Property GlobalDTPSATUM() As DataTable - Get - GlobalDTPSATUM = DirectCast(HttpContext.Current.Application("GlobalDTPSATUM"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPSATUM") = value - End Set - End Property - Property GlobalDTNomConceptosFunciones() As DataTable - Get - GlobalDTNomConceptosFunciones = DirectCast(HttpContext.Current.Application("GlobalDTNomConceptosFunciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTNomConceptosFunciones") = value - End Set - End Property - Property GlobalDTUsuarioResponsable() As DataTable - Get - GlobalDTUsuarioResponsable = DirectCast(HttpContext.Current.Application("GlobalDTUsuarioResponsable"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTUsuarioResponsable") = value - End Set - End Property - Property GlobalDTProveedoresCuentas(CveProveedor As Integer, Estatus As Boolean) As DataTable - Get - GlobalDTProveedoresCuentas = DirectCast(HttpContext.Current.Application("GlobalDTProveedoresCuentas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProveedoresCuentas") = value - End Set - End Property Public ReadOnly Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable Get @@ -7981,82 +7767,7 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTModulos") = value End Set End Property - Property GlobalDTMonedas() As DataTable - Get - GlobalDTMonedas = DirectCast(HttpContext.Current.Application("GlobalDTMonedas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMonedas") = value - End Set - End Property - Property GlobalDTMonedasAlias() As DataTable - Get - GlobalDTMonedasAlias = DirectCast(HttpContext.Current.Application("GlobalDTMonedasAlias"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMonedasAlias") = value - End Set - End Property - Property GlobalDTSucursales(Optional CveEmpresa As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSucursales"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " Sucursal", DataViewRowState.CurrentRows) - GlobalDTSucursales = Dv.ToTable - Dv.Dispose() - Else - GlobalDTSucursales = DirectCast(HttpContext.Current.Application("GlobalDTSucursales"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSucursales") = value - End Set - End Property - Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1) As DataTable - Get - If EsPersonaFisica <> -1 Then - Dim Tipo As String = "" - If EsPersonaFisica = 1 Then Tipo = "AplicaPersonaFisica = 1" Else Tipo = "AplicaPersonaMoral = 1" - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSATUsosCFDI"), DataTable), Tipo, " UsoCFDIDescripcion", DataViewRowState.CurrentRows) - GlobalDTSATUsosCFDI = Dv.ToTable - Dv.Dispose() - Else - GlobalDTSATUsosCFDI = DirectCast(HttpContext.Current.Application("GlobalDTSATUsosCFDI"), DataTable) - End If - - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTSATUsosCFDI") = value - End Set - End Property - 'Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedida"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows) - ' GlobalDTUnidadesMedida = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTUnidadesMedida = DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedida"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTUnidadesMedida") = value - ' End Set - 'End Property - 'Property GlobalDTUnidadesMedidaAlias(Optional CveEmpresa As Integer = -1) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - ' GlobalDTUnidadesMedidaAlias = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTUnidadesMedidaAlias = DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias") = value - ' End Set - 'End Property Property GlobalDTEstatusOrdenCompra() As DataTable Get GlobalDTEstatusOrdenCompra = DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenCompra"), DataTable) @@ -8239,99 +7950,99 @@ Namespace Modelos 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 + '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("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("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 + ' 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 @@ -8356,48 +8067,48 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTInvMetodosInventario") = value End Set End Property - Property GlobalDTAFCaracteristicasOpciones() 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) + 'Property GlobalDTAFCaracteristicasOpciones() 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 + ' 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 @@ -8453,65 +8164,65 @@ Namespace Modelos 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 + '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 + ''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() + '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) - End If + ' Else + ' GlobalDTNominasPeriodos = DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable) + ' End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTNominasPeriodos") = value - End Set - End Property + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTNominasPeriodos") = value + ' End Set + 'End Property 'Fin Periodos 'Fin Ruta @@ -8634,78 +8345,78 @@ Namespace Modelos 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 - Dv.Dispose() - Else - GlobalDTTipoAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable) - End If + '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 + ' Dv.Dispose() + ' Else + ' GlobalDTTipoAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable) + ' End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoAlmacen") = value - End Set - End Property - Property GlobalDTInvConceptos() As DataTable - Get + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTipoAlmacen") = value + ' End Set + 'End Property + 'Property GlobalDTInvConceptos() As DataTable + ' Get - Return DirectCast(HttpContext.Current.Application("GlobalDTInvConceptos"), DataTable) + ' 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 - Get - 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 - Dv.Dispose() - Else - GlobalDTSeccionAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable) - End If + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTInvConceptos") = value + ' End Set + 'End Property + 'Property GlobalDTSeccionAlmacen(CveEmpresa As Integer) As DataTable + ' Get + ' 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 + ' Dv.Dispose() + ' Else + ' GlobalDTSeccionAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable) + ' End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSeccionAlmacen") = value - End Set - End Property + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTSeccionAlmacen") = 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) @@ -8771,46 +8482,46 @@ Namespace Modelos HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTNom_Periodos() As DataTable - Get - GlobalDTNom_Periodos = DirectCast(HttpContext.Current.Application("GlobalDTNom_Periodos"), DataTable) - 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 - End Set - End Property + 'Property GlobalDTNom_Periodos() As DataTable + ' Get + ' GlobalDTNom_Periodos = DirectCast(HttpContext.Current.Application("GlobalDTNom_Periodos"), DataTable) + ' 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 + ' End Set + 'End Property Public ReadOnly Property GlobalTipoCambioUltimaFluctuacion(Optional Fecha As Date = MinFecha) As ClsPaginas.MTipoCambioFluctuacion Get @@ -8847,1008 +8558,6 @@ Namespace Modelos End Get End Property - Property GlobalDTCobranzaEstatus(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTCobranzaEstatus = Dv.ToTable - Dv.Dispose() - Else - GlobalDTCobranzaEstatus = DirectCast(HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus") = value - End Set - End Property - - -#Region "***********************************************************************DT EVENTOS****************************************************************************************" - Property GlobalDTTiposEventos() As DataTable - Get - GlobalDTTiposEventos = DirectCast(HttpContext.Current.Application("GlobalDTTiposEventos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTiposEventos") = value - End Set - End Property - - Property GlobalDTEventos() As DataTable - Get - GlobalDTEventos = DirectCast(HttpContext.Current.Application("GlobalDTEventos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEventos") = value - End Set - End Property - - Property GlobalDTOIEventoTarea() As DataTable - Get - GlobalDTOIEventoTarea = DirectCast(HttpContext.Current.Application("GlobalDTOIEventoTarea"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIEventoTarea") = value - End Set - End Property - - Property GlobalDTOIEstatusEventos() As DataTable - Get - GlobalDTOIEstatusEventos = DirectCast(HttpContext.Current.Application("GlobalDTOIEstatusEventos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIEstatusEventos") = value - End Set - End Property -#End Region - -#Region " **********************************************************************DT PROSPECTOS*************************************************************************************" - Property GlobalDTProspectosCaracteristicasClasificaciones() As DataTable - Get - GlobalDTProspectosCaracteristicasClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicasClasificaciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosCaracteristicasClasificaciones") = value - End Set - End Property - Property GlobalDTProspectosTiposCaracteristicas() As DataTable - Get - GlobalDTProspectosTiposCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosTiposCaracteristicas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosTiposCaracteristicas") = value - End Set - End Property - Property GlobalDTProspectosCaracteristicas(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosCaracteristicas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicas"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosCaracteristicas") = value - End Set - End Property - - Property GlobalDTProspectosCaracteristicasOpciones() As DataTable - Get - GlobalDTProspectosCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicasOpciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosCaracteristicasOpciones") = value - End Set - End Property -#End Region - -#Region "***********************************************************************DT ACTIVOS FIJOS**********************************************************************************" - Property GlobalDTActivoFijos(CveEmpresa As Integer, Optional CveSubTipoActivoFijo As Integer = -1, Optional CveActivoFijo As Integer = -1) As DataTable - Get - Dim dt As DataTable = Nothing - 'Dim Str As New StringBuilder - 'Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - 'If CveSubTipoActivoFijo <> -1 Then Str.AppendFormat(" AND CveSubTipoActivoFijo = {0}", CveSubTipoActivoFijo) - - Dim ObjAF As New ClsAF - 'If ObjAF.GetActivosFijos(CveActivoFijo, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, -1, "-1", -1, -1, -1, -1, -1) Then - If ObjAF.GetActivosFijos(CveActivoFijo, CveEmpresa, "-1", "-1", -1, CveSubTipoActivoFijo, "-1", -1, -1, -1, -1, -1, "", -1) Then - dt = ObjAF.DtResultados - End If - - ObjAF.Dispose() - GlobalDTActivoFijos = dt - - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTActivoFijos") = value - End Set - End Property - Property GlobalDTEstadoActivoFijo() As DataTable - Get - GlobalDTEstadoActivoFijo = DirectCast(HttpContext.Current.Application("GlobalDTEstadoActivoFijo"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstadoActivoFijo") = value - End Set - End Property - Property GlobalDTMarcaActivoFijo(CveEmpresa As Integer) As DataTable - Get - Dim dt As DataTable = Nothing - - Dim ObjAF As New ClsAF - - If ObjAF.GetMarcasActivosFijos(CveEmpresa) Then - dt = ObjAF.DtResultados - End If - - ObjAF.Dispose() - GlobalDTMarcaActivoFijo = dt - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMarcaActivoFijo") = value - End Set - End Property - Property GlobalDTModeloActivoFijo(CveEmpresa As Integer, CveMarca As Integer) As DataTable - Get - Dim dt As DataTable = Nothing - - Dim ObjAF As New ClsAF - - If ObjAF.GetModelosActivosFijos(CveEmpresa, CveMarca) Then - dt = ObjAF.DtResultados - End If - - ObjAF.Dispose() - GlobalDTModeloActivoFijo = dt - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTModeloActivoFijo") = value - End Set - End Property - - Property GlobalDTSubTipoActivoFijo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubTipoActivoFijo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTSubTipoActivoFijo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTSubTipoActivoFijo = DirectCast(HttpContext.Current.Application("GlobalDTSubTipoActivoFijo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSubTipoActivoFijo") = value - End Set - End Property - Property GlobalDTTipoActivoFijo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoActivoFijo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoActivoFijo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoActivoFijo = DirectCast(HttpContext.Current.Application("GlobalDTTipoActivoFijo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoActivoFijo") = value - End Set - End Property - -#End Region - -#Region "***********************************************************************DT GENERALES**************************************************************************************" - Property GlobalDTGralPaises() As DataTable - Get - GlobalDTGralPaises = DirectCast(HttpContext.Current.Application("GlobalDTGralPaises"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralPaises") = value - End Set - End Property - Property GlobalDTGralEstados(CvePais As Integer) As DataTable - Get - GlobalDTGralEstados = DirectCast(HttpContext.Current.Application("GlobalDTGralEstados"), DataTable).FiltraParametros(String.Format("CvePais ={0}", CvePais)) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralEstados") = value - End Set - End Property - Property GlobalDTGralMunicipios(CveEstado As Integer) As DataTable - Get - GlobalDTGralMunicipios = DirectCast(HttpContext.Current.Application("GlobalDTGralMunicipios"), DataTable).FiltraParametros(String.Format("CveEstado ={0}", CveEstado)) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralMunicipios") = value - End Set - End Property - - Property GlobalDTGralPoblaciones() As DataTable - Get - GlobalDTGralPoblaciones = DirectCast(HttpContext.Current.Application("GlobalDTGralPoblaciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralPoblaciones") = value - End Set - End Property - Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable - - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTGralCategorias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTGralCategorias = Dv.ToTable - Dv.Dispose() - Else - GlobalDTGralCategorias = DirectCast(HttpContext.Current.Application("GlobalDTGralCategorias"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralCategorias") = value - End Set - End Property - Property GlobalDTGralCategorias2(CveEmpresa As Integer) As DataTable - - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCategorias2"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTGralCategorias2 = Dv.ToTable - Dv.Dispose() - Else - GlobalDTGralCategorias2 = DirectCast(HttpContext.Current.Application("GlobalDTCategorias2"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCategorias2") = value - End Set - End Property - - Property GlobalDTGralEscolaridades() As DataTable - Get - GlobalDTGralEscolaridades = DirectCast(HttpContext.Current.Application("GlobalDTGralEscolaridades"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralEscolaridades") = value - End Set - End Property - - Property GlobalDTGralColectivas(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTGralColectivas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTGralColectivas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTGralColectivas = DirectCast(HttpContext.Current.Application("GlobalDTGralColectivas"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralColectivas") = value - End Set - End Property - -#End Region - -#Region "***********************************************************************DT PROSPECTOS*************************************************************************************" - Property GlobalDTProspectosSupervisores(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSupervisores"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSupervisores = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSupervisores = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSupervisores"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSupervisores") = value - End Set - End Property - Property GlobalDTProspectosCoordinadores(CveSupervisor As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveSupervisor <> -1 Then Str.AppendFormat(" {0} CveSupervisor = {1}", If(Str.Length > 0, "AND", ""), CveSupervisor) - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosCoordinadores"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosCoordinadores = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProspectosCoordinadores = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCoordinadores"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosCoordinadores") = value - End Set - End Property - Property GlobalDTProspectosApoyos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosApoyos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosApoyos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyos"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosApoyos") = value - End Set - End Property - Property GlobalDTProspectosClasificaciones(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosClasificaciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosClasificaciones = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTProspectosClasificaciones"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosClasificaciones") = value - End Set - End Property - Property GlobalDTProspectosEventosTipo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEventosTipo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosEventosTipo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosEventosTipo = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEventosTipo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEventosTipo") = value - End Set - End Property - Property GlobalDTProspectosEvento(CveEventoTipo As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveEventoTipo <> -1 Then Str.AppendFormat(" {0} CveEventoTipo = {1}", If(Str.Length > 0, "AND", ""), CveEventoTipo) - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEvento"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEvento = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosEvento = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEvento"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEvento") = value - End Set - End Property - Property GlobalDTProspectosEstatus(CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEstatus"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEstatus = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosEstatus = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEstatus"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEstatus") = value - End Set - End Property - Property GlobalDTProspectosApoyosTipos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyosTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosApoyosTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosApoyosTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyosTipos"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosApoyosTipos") = value - End Set - End Property - Property GlobalDTProspectosApoyosTipos() As DataTable - Get - GlobalDTProspectosApoyosTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyosTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosApoyosTipos") = value - End Set - End Property - Property GlobalDTProspectosEncuestas(CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEncuestas = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProspectosEncuestas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestas"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEncuestas") = value - End Set - End Property - Property GlobalDTProspectosEncuestasPreguntas(CveEncuesta As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveEncuesta <> -1 Then Str.AppendFormat(" {0} CveEncuesta = {1}", If(Str.Length > 0, "AND", ""), CveEncuesta) - - - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasPreguntas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEncuestasPreguntas = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProspectosEncuestasPreguntas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasPreguntas"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEncuestasPreguntas") = value - End Set - End Property - Property GlobalDTProspectosEncuestasRespuestas(CvePregunta As Integer, CveEncuesta As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveEncuesta <> -1 Then Str.AppendFormat(" {0} CveEncuesta = {1}", If(Str.Length > 0, "AND", ""), CveEncuesta) - If CvePregunta <> -1 Then Str.AppendFormat(" {0} CvePregunta = {1}", If(Str.Length > 0, "AND", ""), CvePregunta) - - - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasRespuestas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEncuestasRespuestas = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProspectosEncuestasRespuestas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasRespuestas"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEncuestasRespuestas") = value - End Set - End Property - Property GlobalDTProspectosTipos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosTipos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosTipos") = value - End Set - End Property - -#Region " DT PROSPECTOS SOLICITUDES" - Property GlobalDTProspectosSolicitudes(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudes"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSolicitudes = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSolicitudes = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudes"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSolicitudes") = value - End Set - End Property - Property GlobalDTProspectosSolicitudesEstatus(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSolicitudesEstatus = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSolicitudesEstatus = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesEstatus"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSolicitudesEstatus") = value - End Set - End Property - Property GlobalDTProspectosSolicitudesTipos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSolicitudesTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSolicitudesTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos") = value - End Set - End Property - 'Property GlobalDTProspectosSolicitudesTipos() As DataTable - ' Get - ' GlobalDTProspectosSolicitudesTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos") = value - ' End Set - 'End Property - Property GlobalDTProspectosSolicitudesApoyos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSolicitudesApoyos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSolicitudesApoyos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos") = value - End Set - End Property - -#End Region -#End Region - -#Region "**********************************************DT AMORTIZACIÓN CONTABLE PLAN DE DESARROLLO********************************************************************************" - -#Region "***********************************************************************DT AMORTIZACIÓN CONTABLE*********************************************************************************************" - - Property GlobalDTAC_RubrosIngreso() As DataTable - Get - GlobalDTAC_RubrosIngreso = DirectCast(HttpContext.Current.Application("GlobalDTAC_RubrosIngreso"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_RubrosIngreso") = value - End Set - End Property - Property GlobalDTAC_FuentesRecaudacion(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(HttpContext.Current.Application("GlobalDTAC_FuentesRecaudacion"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTAC_FuentesRecaudacion = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_FuentesRecaudacion = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesRecaudacion"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_FuentesRecaudacion") = value - End Set - End Property - - Property GlobalDTAC_FuentesFinanciamiento() As DataTable - Get - GlobalDTAC_FuentesFinanciamiento = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento") = value - End Set - End Property - Property GlobalDTAC_OG() As DataTable - Get - GlobalDTAC_OG = DirectCast(HttpContext.Current.Application("GlobalDTAC_OG"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_OG") = value - End Set - End Property - 'Property GlobalDTAC_ClasificadorOG(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(HttpContext.Current.Application("GlobalDTAC_ClasificadorOG"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - ' GlobalDTAC_ClasificadorOG = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTAC_ClasificadorOG = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificadorOG"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTAC_ClasificadorOG") = value - ' End Set - 'End Property - Property GlobalDTAC_Ubicaciones() As DataTable - Get - GlobalDTAC_Ubicaciones = DirectCast(HttpContext.Current.Application("GlobalDTAC_Ubicaciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Ubicaciones") = value - End Set - End Property - Property GlobalDTAC_UnidadesAdministrativas(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(HttpContext.Current.Application("GlobalDTAC_UnidadesAdministrativas"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTAC_UnidadesAdministrativas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_UnidadesAdministrativas = DirectCast(HttpContext.Current.Application("GlobalDTAC_UnidadesAdministrativas"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_UnidadesAdministrativas") = value - End Set - End Property - Property GlobalDTAC_ClasificacionFuncional(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionFuncional"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_ClasificacionFuncional = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_ClasificacionFuncional = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionFuncional"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ClasificacionFuncional") = value - End Set - End Property - Property GlobalDTAC_ClasificacionGeografica(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionGeografica"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_ClasificacionGeografica = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_ClasificacionGeografica = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionGeografica"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ClasificacionGeografica") = value - End Set - End Property - Property GlobalDTAC_Cuentas() As DataTable - Get - GlobalDTAC_Cuentas = DirectCast(HttpContext.Current.Application("GlobalDTAC_Cuentas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Cuentas") = value - End Set - End Property - Property GlobalDTAC_Finalidad() As DataTable - Get - GlobalDTAC_Finalidad = DirectCast(HttpContext.Current.Application("GlobalDTAC_Finalidad"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Finalidad") = value - End Set - End Property - 'Property GlobalDTAC_FuenteFinanciamiento() As DataTable - ' Get - ' GlobalDTAC_FuenteFinanciamiento = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuenteFinanciamiento"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTAC_FuenteFinanciamiento") = value - ' End Set - 'End Property - Property GlobalDTAC_FuentesFinanciamiento(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(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTAC_FuentesFinanciamiento = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_FuentesFinanciamiento = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento") = value - End Set - End Property - Property GlobalDTAC_FuentesFinanciamientoCONAC() As DataTable - Get - GlobalDTAC_FuentesFinanciamientoCONAC = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamientoCONAC"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamientoCONAC") = value - End Set - End Property - Property GlobalDTAC_Funcion() As DataTable - Get - GlobalDTAC_Funcion = DirectCast(HttpContext.Current.Application("GlobalDTAC_Funcion"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Funcion") = value - End Set - End Property - Property GlobalDTAC_Programas() As DataTable - Get - GlobalDTAC_Programas = DirectCast(HttpContext.Current.Application("GlobalDTAC_Programas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Programas") = value - End Set - End Property - Property GlobalDTAC_ProgramasCONAC() As DataTable - Get - GlobalDTAC_ProgramasCONAC = DirectCast(HttpContext.Current.Application("GlobalDTAC_ProgramasCONAC"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ProgramasCONAC") = value - End Set - End Property - Property GlobalDTAC_ProyectosProceso() As DataTable - Get - GlobalDTAC_ProyectosProceso = DirectCast(HttpContext.Current.Application("GlobalDTAC_ProyectosProceso"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ProyectosProceso") = value - End Set - End Property - Property GlobalDTAC_SubFuncion() As DataTable - Get - GlobalDTAC_SubFuncion = DirectCast(HttpContext.Current.Application("GlobalDTAC_SubFuncion"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_SubFuncion") = value - End Set - End Property - Property GlobalDTAC_SubProgramas() As DataTable - Get - GlobalDTAC_SubProgramas = DirectCast(HttpContext.Current.Application("GlobalDTAC_SubProgramas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_SubProgramas") = value - End Set - End Property - Property GlobalDTAC_ClasificacionAdministrativa(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionAdministrativa"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_ClasificacionAdministrativa = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_ClasificacionAdministrativa = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionAdministrativa"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ClasificacionAdministrativa") = value - End Set - End Property - Property GlobalDTAC_TipoGasto() As DataTable - Get - GlobalDTAC_TipoGasto = DirectCast(HttpContext.Current.Application("GlobalDTAC_TipoGasto"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_TipoGasto") = value - End Set - End Property - - Property GlobalDTAC_ProgramaOperativo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ProgramaOperativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_ProgramaOperativo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_ProgramaOperativo = DirectCast(HttpContext.Current.Application("GlobalDTAC_ProgramaOperativo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ProgramaOperativo") = value - End Set - End Property - - Property GlobalDTAC_MatrizIngresos() As DataTable - Get - GlobalDTAC_MatrizIngresos = DirectCast(HttpContext.Current.Application("GlobalDTAC_MatrizIngresos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_MatrizIngresos") = value - End Set - End Property - - Property GlobalDTAC_MatrizEgresos() As DataTable - Get - GlobalDTAC_MatrizEgresos = DirectCast(HttpContext.Current.Application("GlobalDTAC_MatrizEgresos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_MatrizEgresos") = value - End Set - End Property - - -#End Region - - Property GlobalDTAC_PD_EjeRector(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_EjeRector"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_EjeRector = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_EjeRector = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_EjeRector"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_EjeRector") = value - End Set - End Property - - Property GlobalDTAC_PD_Programas(CveEjeRector As Integer) As DataTable - Get - If CveEjeRector <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Programas"), DataTable), String.Format("CveEjeRector = {0}", CveEjeRector), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_Programas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_Programas = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Programas"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_Programas") = value - End Set - End Property - - Property GlobalDTAC_PD_Estrategias(CveProgramas As Integer) As DataTable - Get - If CveProgramas <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Estrategias"), DataTable), String.Format("CvePrograma = {0}", CveProgramas), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_Estrategias = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_Estrategias = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Estrategias"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_Estrategias") = value - End Set - End Property - - Property GlobalDTAC_PD_LineasAccion(CveEstrategias As Integer) As DataTable - Get - If CveEstrategias <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_LineasAccion"), DataTable), String.Format("CveEstrategia = {0}", CveEstrategias), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_LineasAccion = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_LineasAccion = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_LineasAccion"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_LineasAccion") = value - End Set - End Property - - Property GlobalDTAC_PD_Metas(CveLineasAccion As Integer) As DataTable - Get - If CveLineasAccion <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Metas"), DataTable), String.Format("CveLineaAccion = {0}", CveLineasAccion), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_Metas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_Metas = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Metas"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_Metas") = value - End Set - End Property -#End Region - -#Region "***********************************************************************GLOBAL DT ORDENES DE COMPRA***********************************************************************" - - Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable - Get - - Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa) - 'sino existe, recarga los datos - If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then - - Dim ObjOC As New ClsOC - If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, CveEmpresa) Then - HttpContext.Current.Application(AppNombre) = ObjOC.DtResultados - Else - HttpContext.Current.Application(AppNombre) = Nothing - End If - - ObjOC.Dispose() - - End If - - Dim filtro As New StringBuilder - filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa) - If CveUsuario > 0 Then - filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario) - End If - If Tipo <> "" Then - filtro.AppendFormat(" AND Tipo='{0}'", Tipo) - End If - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows) - GlobalDTOCEstatusUsuarios = Dv.ToTable - Dv.Dispose() - - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa) - HttpContext.Current.Application(AppNombre) = value - End Set - End Property - - - Property GlobalDTOCEstatus(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTOCEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTOCEstatus = Dv.ToTable - Dv.Dispose() - Else - GlobalDTOCEstatus = DirectCast(HttpContext.Current.Application("GlobalDTOCEstatus"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOCEstatus") = value - End Set - End Property - - - 'Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim filtro As New StringBuilder - ' filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa) - ' If CveUsuario > 0 Then - ' filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario) - ' End If - ' If Tipo <> "" Then - ' filtro.AppendFormat(" AND Tipo='{0}'", Tipo) - ' End If - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTOCEstatusUsuarios"), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows) - ' GlobalDTOCEstatusUsuarios = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTOCEstatusUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTOCEstatusUsuarios"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTOCEstatusUsuarios") = value - ' End Set - 'End Property - - -#End Region - -#Region "F I N A N Z A S " - Property GlobalDTFinan_RazonesFinancieras() As DataTable - Get - GlobalDTFinan_RazonesFinancieras = DirectCast(HttpContext.Current.Application("GlobalDTFinan_RazonesFinancieras"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTFinan_RazonesFinancieras") = value - End Set - End Property -#End Region #Region "***********************************************************************GLOBAL DT CONTABILIDAD****************************************************************************" @@ -9914,357 +8623,7 @@ Namespace Modelos End Property #End Region -#Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************" - Property GlobalDTAsistenciaDetalle() As DataTable - Get - GlobalDTAsistenciaDetalle = DirectCast(HttpContext.Current.Application("GlobalDTAsistenciaDetalle"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAsistenciaDetalle") = value - End Set - End Property - Property GlobalDTAsistenciasInasistencias() As DataTable - Get - GlobalDTAsistenciasInasistencias = DirectCast(HttpContext.Current.Application("GlobalDTAsistenciasInasistencias"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAsistenciasInasistencias") = value - End Set - End Property - Property GlobalDTEstatusPersonal() As DataTable - Get - GlobalDTEstatusPersonal = DirectCast(HttpContext.Current.Application("GlobalDTEstatusPersonal"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstatusPersonal") = value - End Set - End Property - Property GlobalDTRHPersonal(CveEmpresa As Integer) As DataTable - Get - Dim ObjPersonal As New ClsRH - ObjPersonal.GetPersonal(-1, CveEmpresa) - GlobalDTRHPersonal = ObjPersonal.DtResultados - ObjPersonal.Dispose() - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTRHPersonal") = value - End Set - End Property - - - Property GlobalDTDepartamentos() As DataTable - Get - GlobalDTDepartamentos = DirectCast(HttpContext.Current.Application("GlobalDTDepartamentos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTDepartamentos") = value - End Set - End Property - Property GlobalDTRHPuestos(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(HttpContext.Current.Application("GlobalDTRHPuestos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTRHPuestos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTRHPuestos = DirectCast(HttpContext.Current.Application("GlobalDTRHPuestos"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTRHPuestos") = value - End Set - End Property - Property GlobalDTEscolaridad() As DataTable - Get - GlobalDTEscolaridad = DirectCast(HttpContext.Current.Application("GlobalDTEscolaridad"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEscolaridad") = value - End Set - End Property - Property GlobalDTEstadoCivil() As DataTable - Get - GlobalDTEstadoCivil = DirectCast(HttpContext.Current.Application("GlobalDTEstadoCivil"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstadoCivil") = value - End Set - End Property - Property GlobalDTDocumentos() As DataTable - Get - GlobalDTDocumentos = DirectCast(HttpContext.Current.Application("GlobalDTDocumentos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTDocumentos") = value - End Set - End Property - Property GlobalDTGenero() As DataTable - Get - GlobalDTGenero = DirectCast(HttpContext.Current.Application("GlobalDTGenero"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGenero") = value - End Set - End Property - Property GlobalDTMotivoBaja() As DataTable - Get - GlobalDTMotivoBaja = DirectCast(HttpContext.Current.Application("GlobalDTMotivoBaja"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMotivoBaja") = value - End Set - End Property - Property GlobalDTTiposContrato() As DataTable - Get - GlobalDTTiposContrato = DirectCast(HttpContext.Current.Application("GlobalDTTiposContrato"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTiposContrato") = value - End Set - End Property - Property GlobalDTRutas() As DataTable - Get - GlobalDTRutas = DirectCast(HttpContext.Current.Application("GlobalDTRutas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTRutas") = value - End Set - End Property - Property GlobalDTTurno() As DataTable - Get - GlobalDTTurno = DirectCast(HttpContext.Current.Application("GlobalDTTurno"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTurno") = value - End Set - End Property - Property GlobalDTJornadas() As DataTable - Get - GlobalDTJornadas = DirectCast(HttpContext.Current.Application("GlobalDTJornadas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTJornadas") = value - End Set - End Property - Property GlobalDTMotivosHorasExtras() As DataTable - Get - GlobalDTMotivosHorasExtras = DirectCast(HttpContext.Current.Application("GlobalDTMotivosHorasExtras"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMotivosHorasExtras") = value - End Set - End Property - Property GlobalDTTipoBuzon() As DataTable - Get - GlobalDTTipoBuzon = DirectCast(HttpContext.Current.Application("GlobalDTTipoBuzon"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoBuzon") = value - End Set - End Property -#End Region - -#Region "*********** D T - C O M B U S T I B L E S ***********" - - - - Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As New StringBuilder - StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCombustibles"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTCombustibles = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTCombustibles = DirectCast(HttpContext.Current.Application("GlobalDTCombustibles"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCombustibles") = value - End Set - End Property - - Property GlobalDTCombustiblesTipos(Optional CveCombustibleTipo As Integer = -1) As DataTable - Get - - If CveCombustibleTipo <> -1 Then - - Dim StrSQL As New StringBuilder - If CveCombustibleTipo <> -1 Then StrSQL.AppendFormat("CveCombustibleTipo = {0}", CveCombustibleTipo) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCombustiblesTipos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTCombustiblesTipos = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTCombustiblesTipos = DirectCast(HttpContext.Current.Application("GlobalDTCombustiblesTipos"), DataTable) - End If - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTCombustiblesTipos") = value - End Set - End Property -#End Region - -#Region "*********** D T - M A N T E N I M I E N T O S ***********" - - Property GlobalDTMantenimientosTipos() As DataTable - Get - GlobalDTMantenimientosTipos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMantenimientosTipos") = value - End Set - End Property - - Property GlobalDTMantenimientos() As DataTable - Get - GlobalDTMantenimientos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMantenimientos") = value - End Set - End Property - - Property GlobalDTMantenimientosTipos(Optional CveMantenimientoTipo As Integer = -1) As DataTable - Get - - If CveMantenimientoTipo <> -1 Then - - Dim StrSQL As New StringBuilder - If CveMantenimientoTipo <> -1 Then StrSQL.AppendFormat("CveMantenimientoTipo = {0}", CveMantenimientoTipo) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTMantenimientosTipos = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTMantenimientosTipos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable) - End If - End Get - Set(ByVal value As DataTable) - - HttpContext.Current.Application("GlobalDTMantenimientosTipos") = value - End Set - End Property - -#End Region - - -#Region "*********** D T - T A L L E R E S ***********" - - Property GlobalDTTalleresTipos() As DataTable - Get - GlobalDTTalleresTipos = DirectCast(HttpContext.Current.Application("GlobalDTTalleresTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTalleresTipos") = value - End Set - End Property - - Property GlobalDTTalleres() As DataTable - Get - GlobalDTTalleres = DirectCast(HttpContext.Current.Application("GlobalDTTalleres"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTalleres") = value - End Set - End Property - -#End Region - -#Region "*********** D T - D I S T R I B U I D O R E S ***********" - - Property GlobalDTDistribuidoresTipos() As DataTable - Get - GlobalDTDistribuidoresTipos = DirectCast(HttpContext.Current.Application("GlobalDTDistribuidoresTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTDistribuidoresTipos") = value - End Set - End Property - - Property GlobalDTDistribuidores() As DataTable - Get - GlobalDTDistribuidores = DirectCast(HttpContext.Current.Application("GlobalDTDistribuidores"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTDistribuidores") = value - End Set - End Property - -#End Region - - - 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(HttpContext.Current.Application("GlobalDTOIRevision"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTOIRevision = Dv.ToTable - Dv.Dispose() - Else - GlobalDTOIRevision = DirectCast(HttpContext.Current.Application("GlobalDTOIRevision"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIRevision") = value - End Set - End Property - Property GlobalDTOIAgendaTipo() As DataTable - Get - GlobalDTOIAgendaTipo = DirectCast(HttpContext.Current.Application("GlobalDTOIAgendaTipo"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIAgendaTipo") = value - End Set - End Property - Property GlobalDTOIAgenda() As DataTable - Get - GlobalDTOIAgenda = DirectCast(HttpContext.Current.Application("GlobalDTOIAgenda"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.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(HttpContext.Current.Application("GlobalDTVtaCondicionesEntrega"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTVtaCondicionesEntrega = Dv.ToTable - Dv.Dispose() - Else - GlobalDTVtaCondicionesEntrega = DirectCast(HttpContext.Current.Application("GlobalDTVtaCondicionesEntrega"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaCondicionesEntrega") = value - End Set - End Property - Property GlobalDTPaqueteriaGuiaTipos(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(HttpContext.Current.Application("GlobalDTPaqueteriaGuiaTipos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTPaqueteriaGuiaTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTPaqueteriaGuiaTipos = DirectCast(HttpContext.Current.Application("GlobalDTPaqueteriaGuiaTipos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPaqueteriaGuiaTipos") = value - End Set - End Property Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1, Optional PorcentajeIVA As Double = -1) As DataTable @@ -10286,14 +8645,7 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTClasificacionPorcentaje") = value End Set End Property - Property GlobalDTPaqueterias() As DataTable - Get - GlobalDTPaqueterias = DirectCast(HttpContext.Current.Application("GlobalDTPaqueterias"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPaqueterias") = value - End Set - End Property + Public Property CveContratoSecciones As String Public Property CveEstatus As Integer diff --git a/Ashx/E141.ashx b/Ashx/E141.ashx index 95c0d6c4f..e1a263008 100644 --- a/Ashx/E141.ashx +++ b/Ashx/E141.ashx @@ -383,7 +383,10 @@ Public Class E141 : Implements IHttpHandler 'TAREAS PROGRAMADAS Select Case Metodo Case "CrearActualizarProductos" + + GuardaLogAD("NP-Inicia actualizacion de productos", "LogE141") respuesta = CrearActualizarProductos(If(FiltrarTodos = "1", True, False)) + GuardaLogAD("NP-Finaliza actualizacion de productos", "LogE141") If respuesta Then retorno = "True" Else @@ -392,7 +395,9 @@ Public Class E141 : Implements IHttpHandler Case "CrearActualizarProductosJson" retorno = CrearActualizarProductosJson(If(FiltrarTodos = "1", True, False)) Case "ActualizarPrecios" + GuardaLogAD("AP-Inicia actualizacion de precios", "LogE141") respuesta = ActualizarPrecios(If(FiltrarTodos = "1", True, False)) + GuardaLogAD("AP-Finaliza actualizacion de precios", "LogE141") If respuesta Then retorno = "True" Else @@ -401,7 +406,9 @@ Public Class E141 : Implements IHttpHandler Case "ActualizarPreciosJson" retorno = ActualizarPreciosJson(If(FiltrarTodos = "1", True, False)) Case "ActualizarExistencias" + GuardaLogAD("AE-Inicia actualizacion de existencias", "LogE141") respuesta = ActualizarExistencias() + GuardaLogAD("AE-Finaliza actualizacion de existencias", "LogE141") If respuesta Then retorno = "True" Else @@ -410,7 +417,9 @@ Public Class E141 : Implements IHttpHandler Case "ActualizarExistenciasJson" retorno = ActualizarExistenciasJson(If(FiltrarTodos = "1", True, False)) Case "ActualizarVendedores" + GuardaLogAD("AV-Inicia actualizacion de vendedores", "LogE141") respuesta = ActualizarVendedores(If(FiltrarTodos = "1", True, False)) + GuardaLogAD("AV-Finaliza actualizacion de vendedores", "LogE141") If respuesta Then retorno = "True" Else @@ -1923,7 +1932,12 @@ Public Class E141 : Implements IHttpHandler Dim respuesta = JObject.Parse(resp) If respuesta("status").ToString() = "success" Then CountPeticionesExitosas += 1 + GuardaLogAD("NP-Creacion/actualizacion de productos exitosa", "LogE141") + Else + GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${respuesta.ToString()}", "LogE141") End If + Else + GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${resp}", "LogE141") End If Else @@ -1958,7 +1972,12 @@ Public Class E141 : Implements IHttpHandler Dim respuesta = JObject.Parse(resp) If respuesta("status").ToString() = "success" Then CountPeticionesExitosas += 1 + GuardaLogAD("NP-Creacion/actualizacion de productos exitosa", "LogE141") + Else + GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${respuesta.ToString()}", "LogE141") End If + Else + GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${resp}", "LogE141") End If Threading.Thread.Sleep(1000) @@ -2071,8 +2090,13 @@ Public Class E141 : Implements IHttpHandler If IsValidJson(resp) Then Dim respuesta = JObject.Parse(resp) If respuesta("status").ToString() = "success" Then + GuardaLogAD("AP-Actualizacion de precios exitosa", "LogE141") CountPeticionesExitosas += 1 + Else + GuardaLogAD($"AP-No se pudo actualizar precios ${respuesta.ToString()}", "LogE141") End If + Else + GuardaLogAD($"AP-No se pudo actualizar precios ${resp}", "LogE141") End If Else @@ -2103,7 +2127,12 @@ Public Class E141 : Implements IHttpHandler Dim respuesta = JObject.Parse(resp) If respuesta("status").ToString() = "success" Then CountPeticionesExitosas += 1 + GuardaLogAD("AP-Actualizacion de precios exitosa", "LogE141") + Else + GuardaLogAD($"AP-No se pudo actualizar precios ${respuesta.ToString()}", "LogE141") End If + Else + GuardaLogAD($"AP-No se pudo actualizar precios ${resp}", "LogE141") End If Threading.Thread.Sleep(1000) @@ -2186,7 +2215,12 @@ Public Class E141 : Implements IHttpHandler Dim respuesta = JObject.Parse(resp) If respuesta("status").ToString() = "success" Then CountPeticionesExitosas += 1 + GuardaLogAD("AE-Actualizacion de existencias exitosa", "LogE141") + Else + GuardaLogAD($"AE-No se pudo actualizar existencias ${respuesta.ToString()}", "LogE141") End If + Else + GuardaLogAD($"AE-No se pudo actualizar existencias ${resp}", "LogE141") End If Else @@ -2217,7 +2251,12 @@ Public Class E141 : Implements IHttpHandler Dim respuesta = JObject.Parse(resp) If respuesta("status").ToString() = "success" Then CountPeticionesExitosas += 1 + GuardaLogAD("AE-Actualizacion de existencias exitosa", "LogE141") + Else + GuardaLogAD($"AE-No se pudo actualizar existencias ${respuesta.ToString()}", "LogE141") End If + Else + GuardaLogAD($"AE-No se pudo actualizar existencias ${resp}", "LogE141") End If Threading.Thread.Sleep(1000) End While @@ -2338,7 +2377,12 @@ Public Class E141 : Implements IHttpHandler Dim respuesta = JObject.Parse(resp) If respuesta("status").ToString() = "success" Then CountPeticionesExitosas += 1 + GuardaLogAD("AV-Actualizacion de vendedores exitosa", "LogE141") + Else + GuardaLogAD($"AV-No se pudo actualizar vendedores ${respuesta.ToString()}", "LogE141") End If + Else + GuardaLogAD($"AV-No se pudo actualizar vendedores ${resp}", "LogE141") End If End If diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 7a420e7c8..3dd1135b5 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -1232,14 +1232,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Private Function GETUMSAT(ByVal context As HttpContext) As String Dim retorno As String = "" - - If context.Application("GlobalDTPSATUM") Is Nothing Then - Dim ObjGrales As New ClsGenerales - If ObjGrales.GetSATUnidadMedida Then context.Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else context.Application("GlobalDTPSATUM") = Nothing - ObjGrales.Dispose() - End If - - Dim DTUM = DirectCast(context.Application("GlobalDTPSATUM"), EnumerableRowCollection(Of DataRow)) + Dim DTUM = ClsPaginas.GlobalDTPSATUM 'DirectCast(context.Application("GlobalDTPSATUM"), EnumerableRowCollection(Of DataRow)) Dim DtPSRetorno As DataTable Dim Name = IfNull(context.Request("Name"), "-1").ToString diff --git a/CxC/RepCxC.aspx b/CxC/RepCxC.aspx index d574ce5a0..e66c3446e 100644 --- a/CxC/RepCxC.aspx +++ b/CxC/RepCxC.aspx @@ -362,6 +362,14 @@ +
+ Contrato: +
+
+ + + +
diff --git a/CxC/RepCxC.aspx.vb b/CxC/RepCxC.aspx.vb index 487a913fc..59a32dac7 100644 --- a/CxC/RepCxC.aspx.vb +++ b/CxC/RepCxC.aspx.vb @@ -172,6 +172,20 @@ Partial Class RepCxC ' Next 'End If 'ObjSisUsuarios.Dispose() + If UsuarioActual.CveEmpresa = 13 Then + CargaContratos() + End If + + End Sub + + Private Sub CargaContratos() + Dim ObjContratos As New ClsContratos + If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, CveCliente:=-1) Then + DdlContrato.DataSource = ObjContratos.DtResultados + End If + + ObjContratos.Dispose() + DdlContrato.DataBind() End Sub diff --git a/Global.asax b/Global.asax index e8091ab91..82b26aad6 100644 --- a/Global.asax +++ b/Global.asax @@ -149,7 +149,7 @@ 'C A R G A - N O M Using ObjNom As New ClsNominas() - If ObjNom.GetConceptos(-1) Then Application("GlobalDTNomConceptos") = ObjNom.DtResultados Else Application("GlobalDTNomConceptos") = Nothing + 'If ObjNom.GetConceptos(-1) Then Application("GlobalDTNomConceptos") = ObjNom.DtResultados Else Application("GlobalDTNomConceptos") = Nothing If ObjNom.GetConceptosFunciones() Then Application("GlobalDTNomConceptosFunciones") = ObjNom.DtResultados Else Application("GlobalDTNomConceptosFunciones") = Nothing If ObjNom.GetTiposPeriodos() Then Application("GlobalDTTipoPeriodo") = ObjNom.DtResultados Else Application("GlobalDTTipoPeriodo") = Nothing If ObjNom.GetPeriodos(-1, -1, -1, -1, -1) Then Application("GlobalDTNominasPeriodos") = ObjNom.DtResultados Else Application("GlobalDTNominasPeriodos") = Nothing diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 274092d25..4dbb0e04f 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -3968,6 +3968,7 @@ Partial Class Inventarios_EntradasSalidas End If Else + ObjConta.RollBack() ObjInventario.Dispose() ObjConta.Dispose() End If diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 5081269e9..02167a020 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -492,7 +492,7 @@ Partial Class Inventarios_RecepcionUsados Dim CveTamanio As Integer = 1 Dim CveUM As Integer = -1 Dim PU As Decimal = 0 - Dim RowTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0 AND CvePSCargo={CvePS}") + Dim RowTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CvePSCargo > 0 AND CvePSCargo={CvePS}") Dim CodigoPS As String = "" Dim UnidaMedida As String = "" @@ -1044,8 +1044,8 @@ Partial Class Inventarios_RecepcionUsados End If Dim PU As Decimal = 0 - If GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0 AND CvePSCargo={DdlProducto2.SelectedValue}").Rows.Count > 0 Then - PU = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0 AND CvePSCargo={DdlProducto2.SelectedValue}").Rows(0)("Cargo").ToString.ToDecimal + If GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltraParametros($" CvePSCargo > 0 AND CvePSCargo={DdlProducto2.SelectedValue}").Rows.Count > 0 Then + PU = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltraParametros($" CvePSCargo > 0 AND CvePSCargo={DdlProducto2.SelectedValue}").Rows(0)("Cargo").ToString.ToDecimal End If AddNew(DdlProducto2.SelectedValue.ToEntero, DdlProducto2.SelectedItem.Text, DdlUnidad.SelectedValue.ToEntero, DdlUnidad.SelectedItem.Text, txtCantidad.Text.ToDouble, PU, @@ -1318,7 +1318,7 @@ Partial Class Inventarios_RecepcionUsados If EsDistribuidor AndAlso RBLOpcion.SelectedValue.ToEntero = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}") + Dim DrTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}") If DrTamanio IsNot Nothing Then Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal() Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal() @@ -2815,7 +2815,7 @@ Partial Class Inventarios_RecepcionUsados IVA = SubTotal * PorcentajeIVA Dim Descuento As Decimal = 0 - Dim ImporteCargo As Decimal = GlobalDTAcumTamaños().FiltroPrimeroValor("Cargo", String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa)).ToDecimal() + Dim ImporteCargo As Decimal = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Cargo", String.Format("CveTamaño = {0} ", CveTamaño)).ToDecimal() 'SI ES AJUSTE O GARANTIA SOLO DEBE SUMAR EL IMPORTE DE LA GARANTIA SI NO RECIBIO USADO If RblUsadosAjuste.SelectedValue = "1" AndAlso ImporteCargo <= 0 Then @@ -3207,7 +3207,7 @@ Partial Class Inventarios_RecepcionUsados Protected Sub CargaTipoDeUso() DdlTipoUso.Items.Clear() - DdlTipoUso.DataSource = GlobalDTAcumTiposUso.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") + DdlTipoUso.DataSource = GlobalDTAcumTiposUso(UsuarioActual.CveEmpresa) DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlTipoUso.DataBind() End Sub @@ -3217,7 +3217,7 @@ Partial Class Inventarios_RecepcionUsados End Sub Protected Sub CargaTipoDefecto() - DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") + DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto(UsuarioActual.CveEmpresa) DdlTipoDefecto.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlTipoDefecto.DataBind() End Sub @@ -3259,7 +3259,7 @@ Partial Class Inventarios_RecepcionUsados End If End If - Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}") + Dim DrCargo As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CveTamaño = {CveTamaño}") If DrCargo IsNot Nothing Then CargoVendido = DrCargo("Cargo").ToString.ToDecimal @@ -3386,7 +3386,7 @@ Partial Class Inventarios_RecepcionUsados If ObjPS.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) Then CveTamaño = ObjPS.DtResultados.FiltroPrimeroValor("CveTamaño").ToEntero End If - Dim drDatos As DataRow = GlobalDTAcumTamaños().FiltroPrimero(String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa)) + Dim drDatos As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveTamaño = {0} ", CveTamaño)) Dim Importe As Decimal = 0 Dim drTamañoPS As DataRow = Nothing diff --git a/Sistemas/CatSesiones.aspx b/Sistemas/CatSesiones.aspx index 663e54e63..a311a8d4f 100644 --- a/Sistemas/CatSesiones.aspx +++ b/Sistemas/CatSesiones.aspx @@ -60,6 +60,7 @@ +    diff --git a/Sistemas/CatSesiones.aspx.vb b/Sistemas/CatSesiones.aspx.vb index b75094412..a5cd054d6 100644 --- a/Sistemas/CatSesiones.aspx.vb +++ b/Sistemas/CatSesiones.aspx.vb @@ -99,12 +99,26 @@ Partial Class Sistemas_CatSesiones CargaDTInvPSSeccionesAlmacen() ElseIf DdlVariable.SelectedItem.Value = "GlobalDTTipoTransacciones" Then CargaGlobalDTTipoTransacciones() + ElseIf DdlVariable.SelectedItem.Value = "GlobalSATGenerales" Then + CargaSATGenerales() End If End Sub + Private Sub CargaSATGenerales() + Using ObjGrales As New ClsGenerales + If ObjGrales.GetSATUsosCFDI Then Application("GlobalDTSATUsosCFDI") = ObjGrales.DtResultados + If ObjGrales.GetSATFraccionArancelaria Then Application("GlobalDTFraccionArancelaria") = ObjGrales.DtResultados.AsEnumerable() + If ObjGrales.GetSATIncoterm Then Application("GlobalDTIncoterm") = ObjGrales.DtResultados + If ObjGrales.GetSATTipoOperacion Then Application("GlobalDTTipoOperacion") = ObjGrales.DtResultados + If ObjGrales.GetSATMotivoTraslado Then Application("GlobalDTSATMotivoTraslado") = ObjGrales.DtResultados + If ObjGrales.GetSATUnidadesAduana Then Application("GlobalDTUnidadAduana") = ObjGrales.DtResultados + If ObjGrales.GetSATClavePedimento Then Application("GlobalDTClavePedimento") = ObjGrales.DtResultados + End Using + End Sub + Private Sub CargaGlobalDTTipoTransacciones() Using ObjBancos As New ClsBancos If ObjBancos.GetBancos_TiposTransaccion(-1) Then Application("GlobalDTTipoTransacciones") = ObjBancos.DtResultados Else Application("GlobalDTTipoTransacciones") = Nothing diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 6920fa6c9..f74b628bb 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1644,20 +1644,20 @@
-
+
- Parametros + Parametros
- -
- + +
+
- +
@@ -1675,15 +1675,16 @@
- -
- - - - +
+ +
+ + + + +
-
@@ -1782,7 +1783,7 @@
- +
@@ -1790,7 +1791,7 @@
- +
@@ -1820,7 +1821,7 @@
- +
@@ -1836,25 +1837,25 @@
-
- +
-
-
-
- - -
-
+ +
-
- - +
+ + +
- +
+
+ + +
+
- +
@@ -1877,54 +1878,61 @@
- +
-
- -
- - - - - - +
+
+
+ + + + +
+ +
-
-
- - - - - - +
+
+
+ + + + +
+ +
-
-
- - - - +
+
+ +
+ + + + +
- - +
-
-
- - - - - - +
+
+
+ + + + +
+ +
@@ -1932,7 +1940,7 @@
- + @@ -1940,7 +1948,7 @@
- + @@ -1949,12 +1957,6 @@ - <%-- - - - - - --%>
@@ -1975,13 +1977,13 @@
-
- +
- +
@@ -1992,8 +1994,16 @@
+ Pago múltiples facturas Pagar múltiples facturas +   - + + " + style="display: inline-block; margin-right: -20px; width: 150px;" /> + " + style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"> + @@ -2004,11 +2014,7 @@
-
-
- Pago múltiples facturas Pagar múltiples facturas      - -
+ <%--
-
+
--%>
@@ -2069,7 +2075,7 @@ - + @@ -2087,10 +2093,7 @@
-
- -
@@ -2103,6 +2106,11 @@ + " + style="display: inline-block; margin-right: -20px; width: 150px;" /> + " + style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"> @@ -2112,15 +2120,7 @@
-
-
- " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
- -
-
- +
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index da137665e..1a853f53b 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -513,7 +513,7 @@ Partial Class Clientes Set(value As Integer) ViewState("CveLineaAdicional") = value End Set - End Property + End Property Private Property FechaIngLineaAdicional As DateTime Get If ViewState("FechaIngLineaAdicional") Is Nothing Then @@ -526,13 +526,13 @@ Partial Class Clientes Set(value As DateTime) ViewState("FechaIngLineaAdicional") = value End Set - End Property - - - - + End Property + + + + #End Region - + #Region "Documentacion" Private Property DTDocumentacion As DataTable Get @@ -2958,14 +2958,14 @@ Partial Class Clientes #Region "G R I D V I E W S" Protected Sub GVHistorial_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVHistorial.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - Dim HLSendMail As HtmlAnchor = DirectCast(e.Row.FindControl("HLSendMail"), HtmlAnchor) - 'Dim HLRemision As HtmlAnchor = DirectCast(e.Row.FindControl("HLRemision"), HtmlAnchor) - + Dim HLSendMail As HtmlAnchor = DirectCast(e.Row.FindControl("HLSendMail"), HtmlAnchor) + 'Dim HLRemision As HtmlAnchor = DirectCast(e.Row.FindControl("HLRemision"), HtmlAnchor) + If e.Row.RowIndex = 0 Then e.Row.BackColor = Drawing.Color.LightGray HLSendMail.Visible = False 'HLRemision.Visible = False - End If + End If Dim Liga As String = String.Format("< a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">", e.Row.DBCampo("CveVenta")) HLSendMail.HRef = String.Format("javascript:(function mail(){{$get('HdnTipoDocto').value='{0}';$get('HdnCveVenta').value='{1}';$get('HdnFolioVenta').value='{2}';$get('TxtParaMail').value='{3}';$get('HdnSerieFolio').value='{4}';$get('HdnSubProyecto').value='{5}';$('#ModalDivMail').modal();void(0);}})();", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveVenta"), e.Row.DBCampo("folio"), e.Row.DBCampo("Correo"), e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("SubProyecto")) e.Row.FCLiteral("LtlFactura").Text = String.Format("{1}", e.Row.DBCampo("CveVenta"), e.Row.DBCampo("Folio")) @@ -2986,8 +2986,8 @@ Partial Class Clientes e.Row.Cells(7).Width = Unit.Pixel(90) e.Row.Cells(8).Width = Unit.Pixel(80) e.Row.Cells(9).Width = Unit.Pixel(70) - End If - + End If + If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(6).ForeColor = Drawing.Color.Red If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxC" Then e.Row.Cells(4).ForeColor = Drawing.Color.Red If e.Row.DBCampo("Original").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldoOriginal"), Literal).Text = "" @@ -4238,23 +4238,23 @@ Partial Class Clientes Try Dim File As Byte() If Archivo.Exists Then - Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta)) - If ArchivoSti.Exists Then - Dim listass As New List(Of ReportParameter) - For Each item As CrystalParametro In lista - listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString())) - Next - - Dim lrds As New List(Of ReportDataSource) - Dim rds As New ReportDataSource - rds.Name = "Datos" - rds.Value = DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha") - lrds.Add(rds) - - File = StreamBytesStimulsoft("Facturas", $"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", lrds, listass, NombreArchivo:="Estado de cuenta", Formato:=Formato) - Else - File = ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato) - End If + Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta)) + If ArchivoSti.Exists Then + Dim listass As New List(Of ReportParameter) + For Each item As CrystalParametro In lista + listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString())) + Next + + Dim lrds As New List(Of ReportDataSource) + Dim rds As New ReportDataSource + rds.Name = "Datos" + rds.Value = DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha") + lrds.Add(rds) + + File = StreamBytesStimulsoft("Facturas", $"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", lrds, listass, NombreArchivo:="Estado de cuenta", Formato:=Formato) + Else + File = ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato) + End If Else File = ImprimirPDFCrystal(RutaReporteGrales.FullName, DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato) End If @@ -4299,8 +4299,8 @@ Partial Class Clientes Dim listass As New List(Of ReportParameter) For Each item As CrystalParametro In lista listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString())) - Next - ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) + Next + ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) Else ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) End If @@ -4352,8 +4352,8 @@ Partial Class Clientes Dim listass As New List(Of ReportParameter) For Each item As CrystalParametro In lista listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString())) - Next - ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) + Next + ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) Else ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) End If @@ -4361,56 +4361,6 @@ Partial Class Clientes ImprimirbytesPDF(ImprimirPDFCrystal(RutaReporteGrales.FullName, DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) End If End If - End Sub - - Public Sub ImprimirExcelStimulsoft(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional RDSName As String = "Datos", Optional Content_Disposition As String = "attachment") - Dim lrds As New List(Of ReportDataSource) - Dim rds As New ReportDataSource - rds.Name = RDSName - rds.Value = DtDatos - lrds.Add(rds) - - ImprimirbytesExcel(StreamBytesStimulsoft("Facturas", RutaReporte, lrds, Parametros, NombreArchivo:=NombreArchivo, Formato:="EXCEL"), NombreArchivo, "EXCEL", Content_Disposition:=Content_Disposition) - End Sub - Public Sub ImprimirbytesExcel(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False, Optional Content_Disposition As String = "attachment") - 'limpio ReportViwer - Dim mimeType As String = Nothing - Dim extension As String = Nothing - - 'If Descarga Then - ' Try - ' bytes = bytes - ' File.WriteAllBytes(String.Format("{0}PDF/whatever.gif", UsuarioActual.Empresa.Ruta), img) - ' Catch ex As Exception - ' If UsuarioActual.CveRol = 1 Then - ' Alert(ex.Message, TipoMensaje.MsgAdvertencia) - ' Else - ' Alert("Ocurrió un error al generar la descarga. Favor de contactar a soporte tecnico cod'IMPDFclspag'", TipoMensaje.MsgAdvertencia) - ' End If - ' End Try - 'End If - - Try - bytes = bytes - Response.Buffer = True - Response.Clear() - Response.ContentType = "application/vnd.ms-excel" - Response.ClearHeaders() - Response.AddHeader("content-disposition", String.Format("{0}; filename=""{1}.{2}""", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xlsx"))) - Response.BinaryWrite(bytes) ' create the file - Response.Flush() ' send it to the client to download - bytes = Nothing - HttpContext.Current.Response.SuppressContent = True - HttpContext.Current.ApplicationInstance.CompleteRequest() - 'HttpContext.Current.Response.End() - Catch ex As Exception - - If UsuarioActual.CveRol = 1 Then - Alert($"Error: {ex.Message} | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))}", TipoMensaje.MsgAdvertencia) - Else - Alert("Ocurrió un error al generar la descarga. Favor de contactar a soporte tecnico cod:'IMPDFclspag'", TipoMensaje.MsgAdvertencia) - End If - End Try End Sub Private Sub MandaCorreoEstadoCuenta(CveUsuario As Integer, CveEmpresa As Integer, CveCliente As Integer, File As Byte(), Para As String, Asunto As String, Body As String, Optional GuardarBitacora As Boolean = False) @@ -7123,10 +7073,9 @@ Partial Class Clientes DdlIncoterm.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlIncoterm.DataBind() - DdlClavePedimento.Items.Clear() - DdlClavePedimento.DataSource = GlobalDTClavePedimento() + DdlClavePedimento.Items.Clear() + DdlClavePedimento.DataSource = GlobalDTClavePedimento() DdlClavePedimento.Items.Insert(0, New ListItem("Seleccione", "-1")) - DdlClavePedimento.DataBind() DdlMotivoTraslado.Items.Clear() DdlMotivoTraslado.DataSource = GlobalDTSATMotivoTraslado() @@ -9963,7 +9912,7 @@ Partial Class Clientes Alert("Puntuación Inicializada") End If Acum.Dispose() - End Sub + End Sub #End Region Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs) If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then @@ -10490,11 +10439,16 @@ Partial Class Clientes ' Exit Sub 'End If + If DdlTipoLineaAdicionalModal.SelectedValue.ToEntero() <= 0 Then + Alert("Debe seleccionar el tipo de linea adicional", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + Dim ObjVentas As New ClsVentas - If CveLineaAdicional > 0 Then - - If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then - TxtFechaVencimientoLineaAdicionalModal.Text = FechaIngLineaAdicional.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy") + If CveLineaAdicional > 0 Then + + If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then + TxtFechaVencimientoLineaAdicionalModal.Text = FechaIngLineaAdicional.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy") End If If Not ObjVentas.UpdateLineasAdicionales(CveLineaAdicional, TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal, @@ -10504,9 +10458,9 @@ Partial Class Clientes Else Alert("Linea Adicional Actualizada Correctamente") End If - Else - If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then - TxtFechaVencimientoLineaAdicionalModal.Text = Now.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy") + Else + If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then + TxtFechaVencimientoLineaAdicionalModal.Text = Now.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy") End If If Not ObjVentas.AddLineasAdicionales(TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal, @@ -10535,7 +10489,7 @@ Partial Class Clientes CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToEntero - FechaIngLineaAdicional = GvRow.DataKey("FechaIng").ToDateTime() + FechaIngLineaAdicional = GvRow.DataKey("FechaIng").ToDateTime() TxtLineaAdicionalModal.Text = GvRow.DataKey("LineaAdicional") DdlProveedorLineaAdicionalModal.txtText.Value = GvRow.DataKey("Proveedor") DdlProveedorLineaAdicionalModal.txtValue.Value = GvRow.DataKey("CveProveedor") @@ -10580,7 +10534,7 @@ Partial Class Clientes Protected Sub DdlTipoLineaAdicionalModal_SelectedIndexChanged(sender As Object, e As EventArgs) DvLineaAdicionalDiasVenciemientoModal.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, True, False) - DvFechaVencimiento.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, False, True) + DvFechaVencimiento.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, False, True) UpLineaAdicionalmodal.Update() End Sub diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 84a614416..5a0c04c99 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -913,8 +913,9 @@ Partial Class Ventas_ClientesAbonar End If If TxtPrestamoIntereses.Text.ToDecimal <> 0 AndAlso MsgError = "" Then + tipoCambioPago = If(TxtTCDolares.Visible, TxtTCDolares.Text.ToDecimal, TxtTCDolaresDolares.Text.ToDecimal) Dim ImporteIntereses As Decimal = (TxtPrestamoIntereses.Text.ToDecimal * tipoCambioPago).RoundSQL - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteIntereses, ImporteIntereses, 6, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=CveSubProyecto, TipoCambio:=tipoCambioPago, CveClasificacion:=21927) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteIntereses, ImporteIntereses, 51, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=11881, TipoCambio:=tipoCambioPago, CveClasificacion:=21927) Then MsgError = "No se pudo insertar la póliza" End If End If @@ -950,6 +951,8 @@ Partial Class Ventas_ClientesAbonar VentaActual.PorcentajeIVA = gvr.DataKey("PorcentajeIVA").ToDecimal VentaActual.UsuarioActual = UsuarioActual VentaActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero + VentaActual.IdCtaContableCliente = IIf(VentaActual.CveMoneda = 1, IdCuentaCliente, IdCtaContMonedaExtranjera) + VentaActual.IdCtaContableClienteComplementaria = IdCtaContComplementaria 'Importe de pago Dim Pago As New VentaPago diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 2b53dc42e..818a55fb5 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -5182,7 +5182,7 @@ Partial Class PV ' End If 'Next If DdlRecepcionUsados.SelectedValue.ToEntero() > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo = {DdlRecepcionUsados.SelectedValue}") + Dim DrTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CvePSCargo = {DdlRecepcionUsados.SelectedValue}") Entregado += (1D * DrTamanio("Cargo").ToString().ToDecimal) UltimoEntregado += (DrTamanio("Cargo").ToString().ToDecimal) @@ -7049,13 +7049,13 @@ Partial Class PV DdlFacturas.Items.Insert(0, New ListItem("Sin Factura", "-1")) - DdlTipoUso.DataSource = GlobalDTAcumTiposUso.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") + DdlTipoUso.DataSource = GlobalDTAcumTiposUso(UsuarioActual.CveEmpresa) DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1")) - DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") + DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto(UsuarioActual.CveEmpresa) DdlTipoDefecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - Dim DtTamanios = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0") + Dim DtTamanios = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltraParametros($" CvePSCargo > 0") CargaModelos() CargaBCIAjuste() @@ -7448,7 +7448,7 @@ Partial Class PV End If End If - Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} And CveTamaño = {CveTamaño}") + Dim DrCargo As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CveTamaño = {CveTamaño}") If DrCargo IsNot Nothing Then CargoVendido = DrCargo("Cargo").ToString.ToDecimal @@ -7577,7 +7577,7 @@ Partial Class PV If TmpDT.Select($"Consec={ConsecutivoVenta}").Length > 0 Then Dim Dr As DataRow = TmpDT.Select($"Consec={ConsecutivoVenta}")(0) Dim CvePSCargo As Integer = -1 - Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {Dr("CveTamaño").ToString.ToEntero}").FiltroPrimero("") + Dim DrCargo As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltraParametros($" CveTamaño = {Dr("CveTamaño").ToString.ToEntero}").FiltroPrimero("") If DrCargo IsNot Nothing Then CvePSCargo = DrCargo("CvePSCargo").ToString.ToEntero CargoActual = DrCargo("Cargo").ToString.ToDouble @@ -7875,7 +7875,7 @@ Partial Class PV ' End If 'Next - Dim DrTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo = {DdlRecepcionUsados.SelectedValue}") + Dim DrTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CvePSCargo = {DdlRecepcionUsados.SelectedValue}") If DdlRecepcionUsados.SelectedValue.ToEntero() > 0 Then TotalCargos += CantidadUsado * DrTamanio("Cargo").ToString().ToDecimal @@ -8039,7 +8039,7 @@ Partial Class PV Dim ListaPScargo As New List(Of MConceptoUsado) - Dim DTTamanios As DataTable = GlobalDTAcumTamaños() + Dim DTTamanios As DataTable = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa) Dim DTCvePSCostos = DTTamanios.FiltraParametros("", "", {"CvePSCargo"}) @@ -8470,7 +8470,7 @@ Partial Class PV End Sub Protected Sub DdlRecepcionUsados_SelectedIndexChanged(sender As Object, e As EventArgs) If DdlRecepcionUsados.SelectedValue.ToEntero() > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo = {DdlRecepcionUsados.SelectedValue}") + Dim DrTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CvePSCargo = {DdlRecepcionUsados.SelectedValue}") DdlBCIUsado.DataSource = DTBCIUsados.FiltraParametros(String.Format("CveTamaño = {0}", DrTamanio("CveTamaño"))) Else DdlBCIUsado.Items.Clear() diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index dd685d23e..906b22afb 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -2380,7 +2380,7 @@ Partial Class ProductosyServicios Protected Sub DdlFraccionArancelaria_selectedindexchange(sender As Object, e As EventArgs) If DdlFraccionArancelaria.SelectedValue.ToEntero > 0 Then - LblUnidadAduana.Text = GlobalDTFraccionArancelaria().FiltraParametros($"CveFraccionArancelaria = {DdlFraccionArancelaria.SelectedValue}")(0)("ClaveSATUnidadAduanaDescripcion").ToString + LblUnidadAduana.Text = GlobalDTFraccionArancelaria().CopyToDataTable.FiltraParametros($"CveFraccionArancelaria = {DdlFraccionArancelaria.SelectedValue}")(0)("ClaveSATUnidadAduanaDescripcion").ToString End If End Sub diff --git a/Ventas/RepCancelacionesPorRespuesta.aspx.cs b/Ventas/RepCancelacionesPorRespuesta.aspx.cs index 8269b0937..2811351fd 100644 --- a/Ventas/RepCancelacionesPorRespuesta.aspx.cs +++ b/Ventas/RepCancelacionesPorRespuesta.aspx.cs @@ -599,16 +599,16 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 1 && e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23) { e.Row.FCLinkButton("LnkValidarRefac").Visible = false; - } + } if (e.Row.DBCampo("PuedeRefacturar") == "0" && e.Row.DBCampo("CveEstatusFactura") == "23" && e.Row.DBCampo("CveVentaSustitucion").ToEntero() > 0) { - if (e.Row.FCLinkButton("LnkCancelar")!= null) e.Row.FCLinkButton("LnkCancelar").Visible = true; + if (e.Row.FCLinkButton("LnkCancelar") != null) e.Row.FCLinkButton("LnkCancelar").Visible = true; //SOLO MOSTRAR SI LA FACTURA NUEVA ESTA EMITIDA - if (e.Row.DBCampo("CveEstatusRefacturacion") != "4" && e.Row.DBCampo("CveEstatusFacturaSustitucion") == "3") - { - if (e.Row.FCLinkButton("LnkCancelarFolioSustitucion") != null) e.Row.FCLinkButton("LnkCancelarFolioSustitucion").Visible = true; - } + //if (e.Row.DBCampo("CveEstatusRefacturacion") != "4" && e.Row.DBCampo("CveEstatusFacturaSustitucion") == "3") + //{ + // if (e.Row.FCLinkButton("LnkCancelarFolioSustitucion") != null) e.Row.FCLinkButton("LnkCancelarFolioSustitucion").Visible = true; + //} } } } diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 20d693d46..92084a0bb 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -512,7 +512,7 @@ Empresa:  - Enviar Mail: + Enviar Mail: @@ -907,6 +907,32 @@
+ + + +
+
+ + Descripción +
+
+
+
+
+
+ +
+
+
+ + + + +
+
+
+
+
@@ -2578,7 +2604,7 @@
Destino:
- +
@@ -2615,7 +2641,7 @@
- +
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 6f69118b0..32ecd1137 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2280,6 +2280,14 @@ Partial Class Ventas ViewState("SaldoLineaAdicional") = value End Set End Property + Private Property SaldoIngresosLineaAdicional As Decimal + Get + Return (IfNull(ViewState("SaldoIngresosLineaAdicional"), "0", ViewState("SaldoIngresosLineaAdicional"))).ToString().ToDecimal() + End Get + Set(value As Decimal) + ViewState("SaldoIngresosLineaAdicional") = value + End Set + End Property Private Property CveCategoriaLineaAdicional As Integer Get @@ -2298,6 +2306,14 @@ Partial Class Ventas ViewState("CveMonedaLineaAdicional") = value End Set End Property + Private Property HabilitoFacturacionIngresoLineaAdicional As Boolean + Get + Return If(IsNothing(ViewState("HabilitoFacturacionIngresoLineaAdicional")), False, CType(ViewState("HabilitoFacturacionIngresoLineaAdicional"), Boolean)) + End Get + Set(value As Boolean) + ViewState("HabilitoFacturacionIngresoLineaAdicional") = value + End Set + End Property #End Region @@ -3447,6 +3463,13 @@ Partial Class Ventas UPObservaciones.Update() End If + If UsuarioActual.CveEmpresa = 13 Then + UpDescripcionVenta.Visible = True + If CveVenta <= 0 Then + TxtDescripcionVenta.Enabled = True + End If + End If + End If End Sub @@ -4797,6 +4820,11 @@ Partial Class Ventas End If End If + If UsuarioActual.CveEmpresa = 13 Then + UpDescripcionVenta.Visible = True + TxtDescripcionVenta.Text = DbRowVenta("DescripcionVenta").ToString() + End If + HplDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto")))) Case "Egs" @@ -8839,6 +8867,11 @@ Partial Class Ventas Exit Sub End If + If DdlLineaAdicional.SelectedValue.ToEntero() > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then + Alert("No se puede seleccionar una linea adicional de crédito si no se genera una remisón.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + 'SI TIENE ANTICIPOS Y ESTA AMORTIZADO AL 100% EL DOCUMENTO (SALDO = 0) | NO VALIDA PU DEL CONCEPTO If Not (LblAmortizacion.Text.ToDouble > 0 And TxtTotal.Text.ToDouble <= 0) Then If Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "Ant", "DPe") Then @@ -9057,18 +9090,6 @@ Partial Class Ventas Alert("El saldo de la linea adicional debe ser mayor a cero", TipoMensaje.MsgAdvertencia) Exit Sub End If - - 'VERIFICA QUE LA MONEDA DE LA LINEA ADICIONAL SEA LA MISMA QUE LA VENTA - If Me.CveMonedaLineaAdicional <> DdlMoneda.SelectedValue.ToEntero() Then - Alert("La moneda de la linea adicional de crédito debe ser la misma que la factura.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - 'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE - If Me.SaldoLineaAdicional <= TxtTotal.Text.ToDecimal() Then - Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia) - Exit Sub - End If End If @@ -9406,6 +9427,38 @@ Partial Class Ventas Exit Sub End If + If UsuarioActual.Empresa.Funcionalidad(705) = "1" AndAlso DdlLineaAdicional.SelectedValue.ToEntero() > 0 Then + 'VERIFICA QUE LA MONEDA DE LA LINEA ADICIONAL SEA LA MISMA QUE LA VENTA + If Me.CveMonedaLineaAdicional <> ObjFactura.CveMoneda Then + TmpDT = TmpDTError.Copy() + CalculaTotalesVenta(RecalcularTotalOriginal:=False) + Alert("La moneda de la linea adicional de crédito debe ser la misma que la factura.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + 'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE + If ObjFactura.TipoDocto = "Rem" AndAlso Me.SaldoLineaAdicional <= ObjFactura.Total Then + TmpDT = TmpDTError.Copy() + CalculaTotalesVenta(RecalcularTotalOriginal:=False) + Alert("El saldo de la linea adicional debe ser mayor o igual al de la remisión", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + If ObjFactura.TipoDocto = "Ing" AndAlso (DtRemisionesPS Is Nothing OrElse DtRemisionesPS.Rows.Count = 0) Then + TmpDT = TmpDTError.Copy() + CalculaTotalesVenta(RecalcularTotalOriginal:=False) + Alert("No se puede generar un ingreso con una linea adicional de credito si este no viene de una remisión", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + If ObjFactura.TipoDocto = "Ing" AndAlso Me.SaldoIngresosLineaAdicional <= ObjFactura.Total Then + TmpDT = TmpDTError.Copy() + CalculaTotalesVenta(RecalcularTotalOriginal:=False) + Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + End If + 'If Not CveEmpresaCRM > 0 Then ' If ObjFactura.Cliente.AplicaComercioExterior Then ' If Not ValidaComercioExterior() Then @@ -9742,6 +9795,24 @@ Partial Class Ventas End If + If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso ErrorList.Count = 0 AndAlso ObjFactura.TipoDocto = "Ing" Then + Dim RowVenta As DataRow = Nothing + If ObjVentas.GetVenta(ObjFactura.CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then + RowVenta = ObjVentas.DtResultados.Rows(0) + Else + ErrorList.Add("No se pudieron validar los datos de la venta") + End If + + If RowVenta IsNot Nothing Then + 'SI FUE VENTA DE CONTADO VALIDA QUE SE HAYA PAGADO EN SU TOTALIDAD + If RowVenta("CondicionesPago").ToString().ToEntero() = 0 AndAlso RowVenta("Saldo").ToString().ToDecimal() > 0.01D Then + ErrorList.Add("La venta no fue pagada en su totalidad") + End If + Else + ErrorList.Add("No se pudieron validar los datos de la venta") + End If + End If + 'MARCA PARA NO SURTIR VENTA DE COTNRATO DE CONSIGNACION DE VENTA | [IPP] : PARCHE If ErrorList.Count = 0 Then If ObjFactura.CveVenta > 0 And CveAlmacenExistenciasContrato > 0 And DdlTipoComprobante.SelectedValue = "Ing" Then @@ -13008,6 +13079,11 @@ Partial Class Ventas End If + Dim DescripcionVenta As String = "" + If factura.TipoDocto = "Ing" AndAlso UsuarioActual.CveEmpresa = 13 Then + DescripcionVenta = TxtDescripcionVenta.Text + End If + If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC, factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC, factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento, @@ -13024,7 +13100,7 @@ Partial Class Ventas DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False), Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible, - CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero()) Then + CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta) Then ErrorList.Add("Ocurrió un error al Generar la Venta.
Revise su factura y cualquier detalle comuníquese a Soporte Técnico") Else If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then @@ -18659,28 +18735,40 @@ Partial Class Ventas End Sub Private Sub CalculaLineasAdicionales() - If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") AndAlso UsuarioActual.Empresa.Funcionalidad(705) = "1" Then + If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "PA") AndAlso UsuarioActual.Empresa.Funcionalidad(705) = "1" Then DdlLineaAdicional.DataSource = Nothing Using ObjVentas As New ClsVentas + 'SI ES VENTA EXISTENTE , SI SE VA EDITAR SOLO MOSTRAR LAS CON SALDO, FECHA DE VENCIMIENTO VIGENTE O LA LINEA ACTUAL If CveVenta > 0 Then - If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then + If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then If ObjVentas.DtResultados.Rows.Count > 0 Then TrLineaAdicional.Visible = True DdlLineaAdicional.DataSource = ObjVentas.DtResultados.FiltraParametros($"(Saldo > 0 AND FechaVencimiento <= '{Now.ToString("dd/MM/yyyy")}') OR CveLineaAdicional = {Me.CveLineaAdicionalVenta}") End If End If Else - If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, ConSaldo:=1, FechaVencimientoConsulta:=Now) Then - If ObjVentas.DtResultados.Rows.Count > 0 Then - TrLineaAdicional.Visible = True - DdlLineaAdicional.DataSource = ObjVentas.DtResultados + 'SI SE ESTA FACTURANDO UNA REMISION DEBE SELECCIONAR LA LINEA ADICIONAL DE ESTA + If Me.CveLineaAdicionalVenta > 0 Then + If ObjVentas.GetLineasAdicionalesSaldo(Me.CveLineaAdicionalVenta, CveCliente, -1, -1, UsuarioActual.CveEmpresa, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then + If ObjVentas.DtResultados.Rows.Count > 0 Then + TrLineaAdicional.Visible = True + DdlLineaAdicional.DataSource = ObjVentas.DtResultados + End If + End If + Else + If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, ConSaldo:=1, FechaVencimientoConsulta:=Now) Then + If ObjVentas.DtResultados.Rows.Count > 0 Then + TrLineaAdicional.Visible = True + DdlLineaAdicional.DataSource = ObjVentas.DtResultados + End If End If End If End If End Using DdlLineaAdicional.DataBind() + DdlLineaAdicional.Items.Insert(0, New ListItem("Seleccione", "-1")) If Me.CveLineaAdicionalVenta > 0 Then @@ -22296,9 +22384,9 @@ Partial Class Ventas CargaAnticipos(CveCliente) End If - If CveVenta <= 0 Then - CalculaLineasAdicionales() - End If + 'If CveVenta <= 0 Then + ' CalculaLineasAdicionales() + 'End If End Sub Private Sub btnBuscarPrecio_Click(sender As Object, e As EventArgs) Handles btnBuscarPrecio.Click @@ -31616,6 +31704,13 @@ Partial Class Ventas DdlMoneda.SelectedValue = GlobalDTMonedas.FiltroPrimeroValor("CveMoneda", $"Abreviatura = '{dtSeleccionadas.FiltroPrimeroValor("Abreviatura")}'") DdlMoneda.Enabled = False CambiaMoneda() + + If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then + Me.CveLineaAdicionalVenta = dtSeleccionadas.FiltroPrimeroValor("CveLineaAdicional", "CveLineaAdicional > 0").ToEntero() + CalculaLineasAdicionales() + End If + + DdlUsoCFDI.SelectedValueExist(dtSeleccionadas.FiltroPrimeroValor("CveUsoCFDI")) DdlMetodoPago33.SelectedValueExist(dtSeleccionadas.FiltroPrimeroValor("CveMetodoPago")) CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero()) @@ -36097,42 +36192,76 @@ Partial Class Ventas RBLPago.Enabled = False Using ObjVentas As New ClsVentas - If ObjVentas.GetLineasAdicionalesSaldo(DdlLineaAdicional.SelectedValue.ToEntero(), CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, FechaVencimientoConsulta:=MinFecha) Then + If ObjVentas.GetLineasAdicionalesSaldo(DdlLineaAdicional.SelectedValue.ToEntero(), CveCliente, -1, -1, UsuarioActual.CveEmpresa, FechaVencimientoConsulta:=MinFecha) Then If ObjVentas.DtResultados.Rows.Count > 0 Then Dim RowLinea As DataRow = ObjVentas.DtResultados.Rows(0) If RowLinea IsNot Nothing Then - TxtFechaPago.Text = RowLinea("FechaVencimiento").ToString().ToDateTime().ToString("dd/MM/yyyy") + If CveVenta <= 0 Then + TxtFechaPago.Text = RowLinea("FechaVencimiento").ToString().ToDateTime().ToString("dd/MM/yyyy") - 'AL FACTURAR CON LINEA ADICIONAL TIPO PO, SE SUMARÁN LOS DIAS DE VENCIMIENTO A LA FECHA ACTUAL - If RowLinea("TipoLinea").ToString() = "2" Then - TxtFechaPago.Text = Now.AddDays(RowLinea("DiasVencimiento").ToString().ToEntero()).ToString("dd/MM/yyyy") - TxtFechaPago.Enabled = False - imgCalendario.Visible = False + 'AL FACTURAR CON LINEA ADICIONAL TIPO PO, SE SUMARÁN LOS DIAS DE VENCIMIENTO A LA FECHA ACTUAL + If RowLinea("TipoLinea").ToString() = "2" Then + TxtFechaPago.Text = Now.AddDays(RowLinea("DiasVencimiento").ToString().ToEntero()).ToString("dd/MM/yyyy") + TxtFechaPago.Enabled = False + imgCalendario.Visible = False + End If + + TxtOrdenCompra.Text = RowLinea("LineaAdicionalComercializador").ToString() End If Me.CveCategoriaLineaAdicional = RowLinea("CveCategoria").ToString().ToEntero() Me.CveMonedaLineaAdicional = RowLinea("CveMoneda").ToString().ToEntero() Me.SaldoLineaAdicional = RowLinea("Saldo").ToString().ToDecimal() + Me.SaldoIngresosLineaAdicional = RowLinea("SaldoIngresos").ToString().ToDecimal() + + If CveVenta <= 0 Then + If DdlTipoComprobante.SelectedValue.Contiene("PA") Then + 'SI NO TIENE LA OPCION DE FACTURAR LA PERMITE + If DdlTipoComprobante.Items.FindByValue("Rem") Is Nothing Then + DdlTipoComprobante.Items.Insert(0, New ListItem("Remisión", "Rem")) + HabilitoFacturacionIngresoLineaAdicional = True + End If + DdlTipoComprobante.SelectedValueExist("Rem") + End If + End If + End If Else Alert("No se pudieron obtener datos de la linea adicional", TipoMensaje.MsgAdvertencia) Me.SaldoLineaAdicional = 0 + Me.SaldoIngresosLineaAdicional = 0 Me.CveCategoriaLineaAdicional = 0 End If Else Alert("No se pudieron obtener datos de la linea adicional", TipoMensaje.MsgAdvertencia) Me.SaldoLineaAdicional = 0 + Me.SaldoIngresosLineaAdicional = 0 Me.CveCategoriaLineaAdicional = 0 End If End Using Else Me.SaldoLineaAdicional = 0 + Me.SaldoIngresosLineaAdicional = 0 Me.CveCategoriaLineaAdicional = 0 - TxtFechaPago.Text = Now.ToString("dd/MM/yyyy") + + If CveVenta <= 0 Then + TxtFechaPago.Text = Now.ToString("dd/MM/yyyy") + TxtOrdenCompra.Text = "" + + 'SI SE HABILITO LA FACTURACION DESDE LA LINEA ADICIONAL DEBE QUITARLO + If HabilitoFacturacionIngresoLineaAdicional Then + DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem")) + DdlTipoComprobante.SelectedValueExist("PA") + + UpParametros.Update() + End If + End If + End If UpParametros.Update() UPCondicionesPago.Update() + UPObservaciones.Update() End Sub Protected Sub LnkUpdateLineaAdicional_Click(sender As Object, e As EventArgs) 'VALIDAR LINEAS ADICIONALES