diff --git a/Acumuladores/CatFoliosGarantia.aspx.vb b/Acumuladores/CatFoliosGarantia.aspx.vb
index 795b00dfc..778a6275d 100644
--- a/Acumuladores/CatFoliosGarantia.aspx.vb
+++ b/Acumuladores/CatFoliosGarantia.aspx.vb
@@ -38,7 +38,7 @@ Partial Class Acumuladores_CatFoliosGarantia
If Not Page.IsPostBack Then
CargaSubProyectos()
- CargadatosGvFolioGarantia(-1, "-1")
+ CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, DdlTipoFolio.SelectedValue)
End If
End Sub
@@ -57,7 +57,7 @@ Partial Class Acumuladores_CatFoliosGarantia
Dim objAcum As New ClsAcumuladores
- If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=EstatusValor, TipoFolio:=tipoFolioValor) Then
+ If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=EstatusValor, TipoFolio:=tipoFolioValor, Area:=-1) Then
GvFolioGarantia.DataSource = objAcum.DtResultados
Else
GvFolioGarantia.DataSource = Nothing
@@ -116,7 +116,7 @@ Partial Class Acumuladores_CatFoliosGarantia
If Not Actualizar Then
- If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero) Then
+ If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero, DdlArea.SelectedValue.ToEntero) Then
TxtFolioGarantia.Text = ""
ChkEstatus.Checked = True
diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb
index 75fc8ce98..2d74b5f69 100644
--- a/App_Code/ClsAcumuladores.vb
+++ b/App_Code/ClsAcumuladores.vb
@@ -483,7 +483,7 @@ Public Class ClsAcumuladores
#Region " FOLIOS GARANTÍA "
- Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional TipoFolio As String = "-1") As Boolean
+ Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional TipoFolio As String = "-1", Optional Area As Integer = 1) As Boolean
Dim Retorno As Boolean = False
'Data = New DataTable
@@ -493,7 +493,8 @@ Public Class ClsAcumuladores
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
.Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
- .Add("@tipoFolio", SqlDbType.VarChar).Value = TipoFolio
+ .Add("@tipoFolio", SqlDbType.VarChar).Value = TipoFolio
+ .Add("@Area", SqlDbType.Int).Value = Area
End With
Try
@@ -508,7 +509,7 @@ Public Class ClsAcumuladores
Return Retorno
End Function
- Public Function FoliosGarantiaAdd(FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoFolio As String, Limite As Integer) As Boolean
+ Public Function FoliosGarantiaAdd(FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoFolio As String, Limite As Integer, Area As Integer) As Boolean
Dim Retorno As Boolean = False
'Data = New DataTable
@@ -522,7 +523,8 @@ Public Class ClsAcumuladores
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@TipoFolio", SqlDbType.VarChar).Value = TipoFolio
- .Add("@Limite", SqlDbType.Int).Value = Limite
+ .Add("@Limite", SqlDbType.Int).Value = Limite
+ .Add("@Area", SqlDbType.Int).Value = Area
End With
diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index f5e63f696..39578f6b3 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -149,6 +149,24 @@ Public Class ClsContabilidad
#End Region
+
+ Public Function CuentasContablesSigGet(cveEmpresa As Int32) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Conta_CuentasContablesSigGet", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex1 As SqlException
+ OnError("Ocurrió un error al obtener las Cuentas Contables", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener las Cuentas Contables", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return retorno
+ End Function
+
#Region " C O N T A B I L I D A D - P R E P O L I Z A"
Public Function ObtenerTipoPoliza(Valor1 As String, Valor2 As String, CveEmpresa As Integer) As Integer
Dim Retorno As Integer = -1
diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index dcb5e33bb..0d59da612 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -355,7 +355,7 @@ Public Class ClsInventarios
End Function
- Public Function AddAlmacen(Almacen As String, CveTipoAlmacen As Integer, IdCtaContable As Integer, Modalidad As Integer, CveUsuario As Integer, CveEmpresa As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1) As Boolean
+ Public Function AddAlmacen(Almacen As String, CveTipoAlmacen As Integer, IdCtaContable As Integer, Modalidad As Integer, CveUsuario As Integer, CveEmpresa As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1, Optional CveCuenta As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_AlmacenesAdd")
@@ -370,6 +370,7 @@ Public Class ClsInventarios
.Add("@Inventariable", SqlDbType.Bit).Value = Inventariable
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@Orden", SqlDbType.SmallInt).Value = Orden
+ .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
End With
Try
@@ -388,7 +389,7 @@ Public Class ClsInventarios
Return Retorno
End Function
- Public Function UpdateAlmacen(Almacen As String, CveTipoAlmacen As Integer, IdCtaContable As Integer, Modalidad As Integer, Estatus As Boolean, CveAlmacen As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1) As Boolean
+ Public Function UpdateAlmacen(Almacen As String, CveTipoAlmacen As Integer, IdCtaContable As Integer, Modalidad As Integer, Estatus As Boolean, CveAlmacen As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1, Optional CveCuenta As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_AlmacenesUpdate")
@@ -403,6 +404,7 @@ Public Class ClsInventarios
.Add("@Inventariable", SqlDbType.Bit).Value = Inventariable
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@Orden", SqlDbType.SmallInt).Value = Orden
+ .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
End With
Try
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 023ae689e..7a55ed2b4 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -1,1225 +1,1218 @@
-Option Strict On
-Option Explicit On
-
-Imports System
-Imports System.Data
-Imports System.Security.Cryptography
-Imports Extensiones
-Imports System.Web.Security
-Imports System.Web
-Imports System.IO
-Imports Microsoft.Reporting.WebForms
-Imports iTextSharp.text.pdf
-Imports CrystalDecisions.CrystalReports.Engine
-Imports CrystalDecisions.Shared
-Imports CrystalDecisions.ReportSource
-Imports Stimulsoft.Report
-Imports Stimulsoft.Report.Dictionary
-Imports Stimulsoft.Report.MobileDesign
-Imports System.Linq
-Imports Stimulsoft.Report.Export
-Imports System.Xml
-
-
-'NOTA AD TEAM
-'COLOR PARA ROW TOTAL EN REPORT VIEWER: #67809F (AZULITO)
-
-
-
-Public Class ClsPaginas
- Inherits System.Web.UI.Page
-
- Public Const CveUsuarioAsistencia As Integer = 100
- Public Const ContraseñaPredeterminada = "-acceso-"
- Public Const ContraseñaPredeterminadaEncriptada = "aQDyjiv2NgoTct4c84VnLQ==" ' "-acceso-"
- Private Shared EncryptKey() As Byte = {}
- Private Shared ReadOnly IV() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}
- Private Const SEncryptionKey As String = "__sig__$gj7+5&j__sig__"
- Public Shared UrlParametros As System.Collections.Hashtable
-
- Public Shared Property EmpresaNotificaciones() As Empresa
-
-#Region "Propiedades"
-
- Public Shared ReadOnly Property UrlSitio As String
- Get
- If IsNothing(System.Configuration.ConfigurationManager.AppSettings("UrlSitio")) Then
- Return ""
- Else
- Return System.Configuration.ConfigurationManager.AppSettings("UrlSitio").ToString()
- End If
- End Get
- End Property
- Public Shared ReadOnly Property UrlDirecciones As String
- Get
- If IsNothing(System.Configuration.ConfigurationManager.AppSettings("UrlDirecciones")) Then
- Return ""
- Else
- Return System.Configuration.ConfigurationManager.AppSettings("UrlDirecciones").ToString()
- End If
- End Get
- End Property
- ReadOnly Property UsuarioActual() As Usuario
- Get
- Try
- 'UsuarioActual = DirectCast(Session("UsuarioSIG"), Usuario)
- UsuarioActual = CType(Context.Session("UsuarioSIG"), Usuario)
- Catch ex As Exception
- Usuario.CerrarSession()
- Return Nothing
- End Try
- End Get
- End Property
- Public Property CveModulo As Integer
- Get
- Try
- CveModulo = DirectCast(Master.FindControl("CveModulomasterpage"), Label).Text.ToEntero
- Catch ex As Exception
- CveModulo = 0
- End Try
- End Get
- Set(value As Integer)
- Try
- DirectCast(Master.FindControl("CveModulomasterpage"), Label).Text = value.ToString
- Catch ex As Exception
- End Try
- End Set
- End Property
-
-
- Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double
- Get
- If GlobalTipoCambio <= 0 Then
- 'sino tiene dato lo recargo por si ya esta insertado
- If Fecha = MinFecha Then Fecha = Now
-
- Dim ObjGral As New ClsGenerales
- If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
-
- Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString.ToDouble
- Else
- Application("GlobalTipoCambio") = 0
- End If
- ObjGral.Dispose()
-
- End If
-
- Return Application("GlobalTipoCambio").ToString.ToDouble
- End Get
- Set(value As Double)
- Application("GlobalTipoCambio") = value
- End Set
-
- End Property
- Public Property GlobalTipoCambioEuro(Optional Fecha As Date = MinFecha) As Double
- Get
- If GlobalTipoCambioEuro <= 0 Then
- 'sino tiene dato lo recargo por si ya esta insertado
- If Fecha = MinFecha Then Fecha = Now
-
- Dim ObjGral As New ClsGenerales
- If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
-
- Application("GlobalTipoCambioEuro") = ObjGral.DtResultados.Rows(0)("TipoCambioEuro").ToString.ToDouble
- Else
- Application("GlobalTipoCambioEuro") = 0
- End If
- ObjGral.Dispose()
-
- End If
-
- Return Application("GlobalTipoCambioEuro").ToString.ToDouble
- End Get
- Set(value As Double)
- Application("GlobalTipoCambioEuro") = value
- End Set
-
- End Property
- 'Property GlobalValidarCFDI As Boolean
- ' Get
- ' GlobalValidarCFDI = CBool(Application("GlobalValidarCFDI"))
- ' End Get
- ' Set(value As Boolean)
- ' 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
- If CveUsuario <> -1 Then Str.AppendFormat("CveUsuario = {0}", CveUsuario)
- If CveEmpresa <> -1 Then Str.AppendFormat(" {0} CveEmpresa = {1}", If(Str.Length > 0, "AND", ""), CveEmpresa)
- If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente)
- If CveProveedor <> -1 Then Str.AppendFormat(" {0} CveProveedor = {1}", If(Str.Length > 0, "AND", ""), CveProveedor)
-
- If CveUsuario <> -1 OrElse CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTUsuarios = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTUsuarios = DirectCast(Application("GlobalDTUsuarios"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTNomConceptos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTNomConceptos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTNomConceptos = DirectCast(Application("GlobalDTNomConceptos"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTTiposGastos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTTiposGastos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTTiposGastos = DirectCast(Application("GlobalDTTiposGastos"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- 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)
- 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)
- 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)
- Application("GlobalDTEstatus") = value
- End Set
- End Property
- Property DtFacturaDefault() As DataTable
- Get
- DtFacturaDefault = DirectCast(Application("DtFacturaDefault"), DataTable)
- End Get
- Set(value As DataTable)
- Application("DtFacturaDefault") = value
- End Set
- End Property
- Property Directorio() As String
- Get
- Directorio = DirectCast(Application("Directorio"), String)
- End Get
- Set(value As String)
- Application("Directorio") = value
- End Set
- End Property
- Property GlobalDTPSATPS() As DataTable
- Get
- GlobalDTPSATPS = DirectCast(Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
- End Get
- Set(value As DataTable)
- Application("GlobalDTPSATPS") = value
- End Set
- End Property
-
-#Region "GLOBALES DE SAT COMERCIO EXTERIOR"
-
- Property GlobalDTClavePedimento() As DataTable
- Get
- GlobalDTClavePedimento = DirectCast(Application("GlobalDTClavePedimento"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTClavePedimento") = value
- End Set
- End Property
-
- Property GlobalDTFraccionArancelaria() As DataTable
- Get
- GlobalDTFraccionArancelaria = DirectCast(Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
- End Get
- Set(value As DataTable)
- Application("GlobalDTFraccionArancelaria") = value
- End Set
- End Property
-
- Property GlobalDTIncoterm() As DataTable
- Get
- GlobalDTIncoterm = DirectCast(Application("GlobalDTIncoterm"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTIncoterm") = value
- End Set
- End Property
-
- Property GlobalDTTipoOperacion() As DataTable
- Get
- GlobalDTTipoOperacion = DirectCast(Application("GlobalDTTipoOperacion"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTTipoOperacion") = value
- End Set
- End Property
-
- Property GlobalDTSATMotivoTraslado() As DataTable
- Get
- GlobalDTSATMotivoTraslado = DirectCast(Application("GlobalDTSATMotivoTraslado"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTSATMotivoTraslado") = value
- End Set
- End Property
-
- Property GlobalDTUnidadAduana() As DataTable
- Get
- GlobalDTUnidadAduana = DirectCast(Application("GlobalDTUnidadAduana"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTUnidadAduana") = value
- End Set
- End Property
-
- Property GlobalDTPais() As DataTable
- Get
- GlobalDTPais = DirectCast(Application("GlobalDTPais"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTEstado"), DataTable), String.Format("ClaveSATPais = '{0}'", ClaveSATPais), "", DataViewRowState.CurrentRows)
- GlobalDTEstado = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTEstado = DirectCast(Application("GlobalDTEstado"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTMunicipio"), DataTable), String.Format("ClaveSATEstado = '{0}'", ClaveSATEstado), "", DataViewRowState.CurrentRows)
- GlobalDTMunicipio = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTMunicipio = DirectCast(Application("GlobalDTMunicipio"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTColonia"), DataTable), String.Format("ClaveSATMunicipio = '{0}'", ClaveSATMunicipio), "", DataViewRowState.CurrentRows)
- GlobalDTColonia = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTColonia = DirectCast(Application("GlobalDTColonia"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Application("GlobalDTColonia") = value
- End Set
- End Property
-
-#End Region
-
- Property GlobalDTPSATUM() As DataTable
- Get
-
- '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
- End Get
- Set(value As DataTable)
- Application("GlobalDTPSATUM") = value
- End Set
- End Property
- Property GlobalDTNomConceptosFunciones() As DataTable
- Get
- GlobalDTNomConceptosFunciones = DirectCast(Application("GlobalDTNomConceptosFunciones"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTNomConceptosFunciones") = value
- End Set
- End Property
- Property GlobalDTUsuarioResponsable() As DataTable
- Get
- GlobalDTUsuarioResponsable = DirectCast(Application("GlobalDTUsuarioResponsable"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTUsuarioResponsable") = value
- End Set
- End Property
- Property GlobalDTProveedoresCuentas(CveProveedor As Integer, Estatus As Boolean) As DataTable
- Get
- GlobalDTProveedoresCuentas = DirectCast(Application("GlobalDTProveedoresCuentas"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTProveedoresCuentas") = value
- End Set
- End Property
- Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTProveedorClasificacion{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
- Dim P As New ClsCompProveedores
+Option Strict On
+Option Explicit On
+
+Imports System
+Imports System.Data
+Imports System.Security.Cryptography
+Imports Extensiones
+Imports System.Web.Security
+Imports System.Web
+Imports System.IO
+Imports Microsoft.Reporting.WebForms
+Imports iTextSharp.text.pdf
+Imports CrystalDecisions.CrystalReports.Engine
+Imports CrystalDecisions.Shared
+Imports CrystalDecisions.ReportSource
+Imports Stimulsoft.Report
+Imports Stimulsoft.Report.Dictionary
+Imports Stimulsoft.Report.MobileDesign
+Imports System.Linq
+Imports Stimulsoft.Report.Export
+Imports System.Xml
+
+
+'NOTA AD TEAM
+'COLOR PARA ROW TOTAL EN REPORT VIEWER: #67809F (AZULITO)
+
+
+
+Public Class ClsPaginas
+ Inherits System.Web.UI.Page
+
+ Public Const CveUsuarioAsistencia As Integer = 100
+ Public Const ContraseñaPredeterminada = "-acceso-"
+ Public Const ContraseñaPredeterminadaEncriptada = "aQDyjiv2NgoTct4c84VnLQ==" ' "-acceso-"
+ Private Shared EncryptKey() As Byte = {}
+ Private Shared ReadOnly IV() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}
+ Private Const SEncryptionKey As String = "__sig__$gj7+5&j__sig__"
+ Public Shared UrlParametros As System.Collections.Hashtable
+
+ Public Shared Property EmpresaNotificaciones() As Empresa
+
+#Region "Propiedades"
+
+ Public Shared ReadOnly Property UrlSitio As String
+ Get
+ If IsNothing(System.Configuration.ConfigurationManager.AppSettings("UrlSitio")) Then
+ Return ""
+ Else
+ Return System.Configuration.ConfigurationManager.AppSettings("UrlSitio").ToString()
+ End If
+ End Get
+ End Property
+ Public Shared ReadOnly Property UrlDirecciones As String
+ Get
+ If IsNothing(System.Configuration.ConfigurationManager.AppSettings("UrlDirecciones")) Then
+ Return ""
+ Else
+ Return System.Configuration.ConfigurationManager.AppSettings("UrlDirecciones").ToString()
+ End If
+ End Get
+ End Property
+ ReadOnly Property UsuarioActual() As Usuario
+ Get
+ Try
+ 'UsuarioActual = DirectCast(Session("UsuarioSIG"), Usuario)
+ UsuarioActual = CType(Context.Session("UsuarioSIG"), Usuario)
+ Catch ex As Exception
+ Usuario.CerrarSession()
+ Return Nothing
+ End Try
+ End Get
+ End Property
+ Public Property CveModulo As Integer
+ Get
+ Try
+ CveModulo = DirectCast(Master.FindControl("CveModulomasterpage"), Label).Text.ToEntero
+ Catch ex As Exception
+ CveModulo = 0
+ End Try
+ End Get
+ Set(value As Integer)
+ Try
+ DirectCast(Master.FindControl("CveModulomasterpage"), Label).Text = value.ToString
+ Catch ex As Exception
+ End Try
+ End Set
+ End Property
+
+
+ Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double
+ Get
+ If GlobalTipoCambio <= 0 Then
+ 'sino tiene dato lo recargo por si ya esta insertado
+ If Fecha = MinFecha Then Fecha = Now
+
+ Dim ObjGral As New ClsGenerales
+ If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
+
+ Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString.ToDouble
+ Else
+ Application("GlobalTipoCambio") = 0
+ End If
+ ObjGral.Dispose()
+
+ End If
+
+ Return Application("GlobalTipoCambio").ToString.ToDouble
+ End Get
+ Set(value As Double)
+ Application("GlobalTipoCambio") = value
+ End Set
+
+ End Property
+ Public Property GlobalTipoCambioEuro(Optional Fecha As Date = MinFecha) As Double
+ Get
+ If GlobalTipoCambioEuro <= 0 Then
+ 'sino tiene dato lo recargo por si ya esta insertado
+ If Fecha = MinFecha Then Fecha = Now
+
+ Dim ObjGral As New ClsGenerales
+ If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
+
+ Application("GlobalTipoCambioEuro") = ObjGral.DtResultados.Rows(0)("TipoCambioEuro").ToString.ToDouble
+ Else
+ Application("GlobalTipoCambioEuro") = 0
+ End If
+ ObjGral.Dispose()
+
+ End If
+
+ Return Application("GlobalTipoCambioEuro").ToString.ToDouble
+ End Get
+ Set(value As Double)
+ Application("GlobalTipoCambioEuro") = value
+ End Set
+
+ End Property
+ 'Property GlobalValidarCFDI As Boolean
+ ' Get
+ ' GlobalValidarCFDI = CBool(Application("GlobalValidarCFDI"))
+ ' End Get
+ ' Set(value As Boolean)
+ ' 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
+ If CveUsuario <> -1 Then Str.AppendFormat("CveUsuario = {0}", CveUsuario)
+ If CveEmpresa <> -1 Then Str.AppendFormat(" {0} CveEmpresa = {1}", If(Str.Length > 0, "AND", ""), CveEmpresa)
+ If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente)
+ If CveProveedor <> -1 Then Str.AppendFormat(" {0} CveProveedor = {1}", If(Str.Length > 0, "AND", ""), CveProveedor)
+
+ If CveUsuario <> -1 OrElse CveEmpresa <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTUsuarios = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTUsuarios = DirectCast(Application("GlobalDTUsuarios"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTNomConceptos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTNomConceptos = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTNomConceptos = DirectCast(Application("GlobalDTNomConceptos"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTTiposGastos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTTiposGastos = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTTiposGastos = DirectCast(Application("GlobalDTTiposGastos"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ 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)
+ 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)
+ 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)
+ Application("GlobalDTEstatus") = value
+ End Set
+ End Property
+ Property DtFacturaDefault() As DataTable
+ Get
+ DtFacturaDefault = DirectCast(Application("DtFacturaDefault"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("DtFacturaDefault") = value
+ End Set
+ End Property
+ Property Directorio() As String
+ Get
+ Directorio = DirectCast(Application("Directorio"), String)
+ End Get
+ Set(value As String)
+ Application("Directorio") = value
+ End Set
+ End Property
+ Property GlobalDTPSATPS() As DataTable
+ Get
+ GlobalDTPSATPS = DirectCast(Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTPSATPS") = value
+ End Set
+ End Property
+
+#Region "GLOBALES DE SAT COMERCIO EXTERIOR"
+
+ Property GlobalDTClavePedimento() As DataTable
+ Get
+ GlobalDTClavePedimento = DirectCast(Application("GlobalDTClavePedimento"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTClavePedimento") = value
+ End Set
+ End Property
+
+ Property GlobalDTFraccionArancelaria() As DataTable
+ Get
+ GlobalDTFraccionArancelaria = DirectCast(Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTFraccionArancelaria") = value
+ End Set
+ End Property
+
+ Property GlobalDTIncoterm() As DataTable
+ Get
+ GlobalDTIncoterm = DirectCast(Application("GlobalDTIncoterm"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTIncoterm") = value
+ End Set
+ End Property
+
+ Property GlobalDTTipoOperacion() As DataTable
+ Get
+ GlobalDTTipoOperacion = DirectCast(Application("GlobalDTTipoOperacion"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTTipoOperacion") = value
+ End Set
+ End Property
+
+ Property GlobalDTSATMotivoTraslado() As DataTable
+ Get
+ GlobalDTSATMotivoTraslado = DirectCast(Application("GlobalDTSATMotivoTraslado"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTSATMotivoTraslado") = value
+ End Set
+ End Property
+
+ Property GlobalDTUnidadAduana() As DataTable
+ Get
+ GlobalDTUnidadAduana = DirectCast(Application("GlobalDTUnidadAduana"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTUnidadAduana") = value
+ End Set
+ End Property
+
+ Property GlobalDTPais() As DataTable
+ Get
+ GlobalDTPais = DirectCast(Application("GlobalDTPais"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTEstado"), DataTable), String.Format("ClaveSATPais = '{0}'", ClaveSATPais), "", DataViewRowState.CurrentRows)
+ GlobalDTEstado = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTEstado = DirectCast(Application("GlobalDTEstado"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTMunicipio"), DataTable), String.Format("ClaveSATEstado = '{0}'", ClaveSATEstado), "", DataViewRowState.CurrentRows)
+ GlobalDTMunicipio = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTMunicipio = DirectCast(Application("GlobalDTMunicipio"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTColonia"), DataTable), String.Format("ClaveSATMunicipio = '{0}'", ClaveSATMunicipio), "", DataViewRowState.CurrentRows)
+ GlobalDTColonia = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTColonia = DirectCast(Application("GlobalDTColonia"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTColonia") = value
+ End Set
+ End Property
+
+#End Region
+
+ Property GlobalDTPSATUM() As DataTable
+ Get
+
+ '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
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTPSATUM") = value
+ End Set
+ End Property
+ Property GlobalDTNomConceptosFunciones() As DataTable
+ Get
+ GlobalDTNomConceptosFunciones = DirectCast(Application("GlobalDTNomConceptosFunciones"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTNomConceptosFunciones") = value
+ End Set
+ End Property
+ Property GlobalDTUsuarioResponsable() As DataTable
+ Get
+ GlobalDTUsuarioResponsable = DirectCast(Application("GlobalDTUsuarioResponsable"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTUsuarioResponsable") = value
+ End Set
+ End Property
+ Property GlobalDTProveedoresCuentas(CveProveedor As Integer, Estatus As Boolean) As DataTable
+ Get
+ GlobalDTProveedoresCuentas = DirectCast(Application("GlobalDTProveedoresCuentas"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTProveedoresCuentas") = value
+ End Set
+ End Property
+ Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable
+ Get
+ Dim AppNombre As String = String.Format("GlobalDTProveedorClasificacion{0}", CveEmpresa)
+ 'sino existe, recarga los datos
+ If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
+ Dim P As New ClsCompProveedores
If P.GetProveedorClasificacion(CveEmpresa) Then Application(AppNombre) = P.DtResultados
P.Dispose()
End If
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa ={0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProveedorClasificacion = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProveedorClasificacion = DirectCast(Application(AppNombre), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
+ If CveEmpresa <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa ={0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTProveedorClasificacion = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProveedorClasificacion = DirectCast(Application(AppNombre), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTProveedorClasificacion{0}", CveEmpresa)
Application(AppNombre) = value
- End Set
- End Property
- Property GlobalDTProveedorSucursales(CveProveedor As Integer, CveEmpresa As Integer) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTProveedorSucursales{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
- Dim P As New ClsCompProveedores
+ End Set
+ End Property
+ Property GlobalDTProveedorSucursales(CveProveedor As Integer, CveEmpresa As Integer) As DataTable
+ Get
+ Dim AppNombre As String = String.Format("GlobalDTProveedorSucursales{0}", CveEmpresa)
+ 'sino existe, recarga los datos
+ If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
+ Dim P As New ClsCompProveedores
If P.GetSucursales(-1, CveEmpresa) Then Application(AppNombre) = P.DtResultados
P.Dispose()
End If
-
- If CveProveedor <> -1 Then
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveProveedor = {0}", CveProveedor), "", DataViewRowState.CurrentRows)
- GlobalDTProveedorSucursales = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProveedorSucursales = DirectCast(Application(AppNombre), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
+
+ If CveProveedor <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveProveedor = {0}", CveProveedor), "", DataViewRowState.CurrentRows)
+ GlobalDTProveedorSucursales = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProveedorSucursales = DirectCast(Application(AppNombre), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTProveedorSucursales{0}", CveEmpresa)
Application(AppNombre) = value
- End Set
- End Property
- Property GlobalDTRoles(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTRoles"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTRoles = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTRoles = DirectCast(Application("GlobalDTRoles"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- Application("GlobalDTRoles") = value
- End Set
- End Property
- Property GlobalDTNomSatBancos() As DataTable
- Get
- GlobalDTNomSatBancos = DirectCast(Application("GlobalDTNomSatBancos"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- Application("GlobalDTNomSatBancos") = value
- End Set
- End Property
- Property GlobalDTNomSatConceptos() As DataTable
- Get
- GlobalDTNomSatConceptos = DirectCast(Application("GlobalDTNomSatConceptos"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- Application("GlobalDTNomSatConceptos") = value
- End Set
- End Property
- Property GlobalDTNomSatRegimenContratacion() As DataTable
- Get
- GlobalDTNomSatRegimenContratacion = DirectCast(Application("GlobalDTNomSatRegimenContratacion"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- Application("GlobalDTNomSatRegimenContratacion") = value
- End Set
- End Property
- Property GlobalDTNomSatRiesgoPuesto() As DataTable
- Get
- GlobalDTNomSatRiesgoPuesto = DirectCast(Application("GlobalDTNomSatRiesgoPuesto"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- Application("GlobalDTNomSatRiesgoPuesto") = value
- End Set
- End Property
- Property GlobalDTNomSatTipoIncapacidad() As DataTable
- Get
- GlobalDTNomSatTipoIncapacidad = DirectCast(Application("GlobalDTNomSatTipoIncapacidad"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- Application("GlobalDTNomSatTipoIncapacidad") = value
- End Set
- End Property
- Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable
- Get
-
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTEmpresas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTEmpresas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTEmpresas = DirectCast(Application("GlobalDTEmpresas"), DataTable)
- End If
- End Get
- Set(ByVal value As DataTable)
- Application("GlobalDTEmpresas") = value
- End Set
- End Property
- Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
+ End Set
+ End Property
+ Property GlobalDTRoles(CveEmpresa As Integer) As DataTable
Get
- Dim AppNombre As String = String.Format("GlobalDTClasificaciones{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If Application(AppNombre) Is Nothing Then
- Dim ObjClasificaciones As New ClsClasificaciones
+ If CveEmpresa <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTRoles"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTRoles = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTRoles = DirectCast(Application("GlobalDTRoles"), DataTable)
+ End If
+
+ End Get
+ Set(ByVal value As DataTable)
+ Application("GlobalDTRoles") = value
+ End Set
+ End Property
+ Property GlobalDTNomSatBancos() As DataTable
+ Get
+ GlobalDTNomSatBancos = DirectCast(Application("GlobalDTNomSatBancos"), DataTable)
+ End Get
+ Set(ByVal value As DataTable)
+ Application("GlobalDTNomSatBancos") = value
+ End Set
+ End Property
+ Property GlobalDTNomSatConceptos() As DataTable
+ Get
+ GlobalDTNomSatConceptos = DirectCast(Application("GlobalDTNomSatConceptos"), DataTable)
+ End Get
+ Set(ByVal value As DataTable)
+ Application("GlobalDTNomSatConceptos") = value
+ End Set
+ End Property
+ Property GlobalDTNomSatRegimenContratacion() As DataTable
+ Get
+ GlobalDTNomSatRegimenContratacion = DirectCast(Application("GlobalDTNomSatRegimenContratacion"), DataTable)
+ End Get
+ Set(ByVal value As DataTable)
+ Application("GlobalDTNomSatRegimenContratacion") = value
+ End Set
+ End Property
+ Property GlobalDTNomSatRiesgoPuesto() As DataTable
+ Get
+ GlobalDTNomSatRiesgoPuesto = DirectCast(Application("GlobalDTNomSatRiesgoPuesto"), DataTable)
+ End Get
+ Set(ByVal value As DataTable)
+ Application("GlobalDTNomSatRiesgoPuesto") = value
+ End Set
+ End Property
+ Property GlobalDTNomSatTipoIncapacidad() As DataTable
+ Get
+ GlobalDTNomSatTipoIncapacidad = DirectCast(Application("GlobalDTNomSatTipoIncapacidad"), DataTable)
+ End Get
+ Set(ByVal value As DataTable)
+ Application("GlobalDTNomSatTipoIncapacidad") = value
+ End Set
+ End Property
+ Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable
+ Get
+
+ If CveEmpresa <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTEmpresas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTEmpresas = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTEmpresas = DirectCast(Application("GlobalDTEmpresas"), DataTable)
+ End If
+ End Get
+ Set(ByVal value As DataTable)
+ Application("GlobalDTEmpresas") = value
+ End Set
+ End Property
+ Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
+ Get
+ Dim AppNombre As String = String.Format("GlobalDTClasificaciones{0}", CveEmpresa)
+ 'sino existe, recarga los datos
+ If Application(AppNombre) Is Nothing Then
+ Dim ObjClasificaciones As New ClsClasificaciones
If ObjClasificaciones.GetClasificaciones(CveEmpresa) Then Application(AppNombre) = ObjClasificaciones.DtResultados
ObjClasificaciones.Dispose()
- End If
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
+ End If
+ If CveEmpresa <> -1 Then
+ Dim Str As New StringBuilder
+ Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
+ If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion)
- If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificaciones = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificaciones = DirectCast(Application(AppNombre), DataTable)
- End If
-
-
-
- End Get
+ If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
+ GlobalDTClasificaciones = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTClasificaciones = DirectCast(Application(AppNombre), DataTable)
+ End If
+
+
+
+ End Get
Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTClasificaciones{0}", CveEmpresa)
- Application(AppNombre) = value
- End Set
- End Property
- Property GlobalDTClasificaciones2(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTClasificaciones2"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificaciones2 = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificaciones2 = DirectCast(Application("GlobalDTClasificaciones2"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Application("GlobalDTClasificaciones2") = value
- End Set
- End Property
- Property GlobalDTClasificacionesSubProyectos(Optional CveClasificacion As Integer = -1, Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTClasificacionesSubProyecto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionesSubProyectos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionesSubProyectos = DirectCast(Application("GlobalDTClasificacionesSubProyecto"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Application("GlobalDTClasificacionesSubProyecto") = value
- End Set
- End Property
- Property GlobalDTACClasificadorObjetoGasto(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTACClasificadorObjetoGasto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTACClasificadorObjetoGasto = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTACClasificadorObjetoGasto = DirectCast(Application("GlobalDTACClasificadorObjetoGasto"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Application("GlobalDTACClasificadorObjetoGasto") = value
- End Set
- End Property
- Property GlobalDTClasificacionesDetalle(Optional CveEmpresa As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
- Dim Dv As New DataView(DirectCast(Application("GlobalDTClasificacionesDetalle"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionesDetalle = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionesDetalle = DirectCast(Application("GlobalDTClasificacionesDetalle"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTClasificacionesDetalle") = value
- End Set
- End Property
- Property GlobalDTSubFamilias(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTSubFamilias"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTSubFamilias = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTSubFamilias = DirectCast(Application("GlobalDTSubFamilias"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Application("GlobalDTSubFamilias") = value
- End Set
- End Property
- Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTFamilias"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTFamilias = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTFamilias = DirectCast(Application("GlobalDTFamilias"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Application("GlobalDTFamilias") = value
- End Set
- End Property
- Property GlobalDTClasificacionesPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTClasificacionesPresupuestos"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionesPresupuestos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionesPresupuestos = DirectCast(Application("GlobalDTClasificacionesPresupuestos"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTClasificacionesPresupuestos") = value
- End Set
- End Property
- Property GlobalDTMetodosPago() As DataTable
- Get
- GlobalDTMetodosPago = DirectCast(Application("GlobalDTMetodosPago"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTMetodosPago") = value
- End Set
- End Property
- Property GlobalDTModulos() As DataTable
- Get
- GlobalDTModulos = DirectCast(Application("GlobalDTModulos"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- Application("GlobalDTModulos") = value
- End Set
- End Property
- Property GlobalDTMonedas() As DataTable
- Get
- GlobalDTMonedas = DirectCast(Application("GlobalDTMonedas"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTMonedas") = value
- End Set
- End Property
- Property GlobalDTMonedasAlias() As DataTable
- Get
- GlobalDTMonedasAlias = DirectCast(Application("GlobalDTMonedasAlias"), DataTable)
- End Get
- Set(value As DataTable)
- 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(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) 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(Application("GlobalDTSATUsosCFDI"), DataTable), Tipo, " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
- GlobalDTSATUsosCFDI = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTSATUsosCFDI = DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- Application("GlobalDTSATUsosCFDI") = value
- End Set
- End Property
- Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable
+ Dim AppNombre As String = String.Format("GlobalDTClasificaciones{0}", CveEmpresa)
+ Application(AppNombre) = value
+ End Set
+ End Property
+ Property GlobalDTClasificaciones2(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
Get
- Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida{0}", CveEmpresa)
- 'sino existe, recarga los datos
+ If CveEmpresa <> -1 Then
+ Dim Str As New StringBuilder
+ Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
+ If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
+
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTClasificaciones2"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
+ GlobalDTClasificaciones2 = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTClasificaciones2 = DirectCast(Application("GlobalDTClasificaciones2"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTClasificaciones2") = value
+ End Set
+ End Property
+ Property GlobalDTClasificacionesSubProyectos(Optional CveClasificacion As Integer = -1, Optional CveEmpresa As Integer = -1) As DataTable
+ Get
+ If CveEmpresa <> -1 Then
+ Dim Str As New StringBuilder
+ Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
+
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTClasificacionesSubProyecto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
+ GlobalDTClasificacionesSubProyectos = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTClasificacionesSubProyectos = DirectCast(Application("GlobalDTClasificacionesSubProyecto"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTClasificacionesSubProyecto") = value
+ End Set
+ End Property
+ Property GlobalDTACClasificadorObjetoGasto(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
+ Get
+ If CveEmpresa <> -1 Then
+ Dim Str As New StringBuilder
+ Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
+ If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
+
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTACClasificadorObjetoGasto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
+ GlobalDTACClasificadorObjetoGasto = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTACClasificadorObjetoGasto = DirectCast(Application("GlobalDTACClasificadorObjetoGasto"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTACClasificadorObjetoGasto") = value
+ End Set
+ End Property
+ Property GlobalDTClasificacionesDetalle(Optional CveEmpresa As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
+ Get
+ If CveEmpresa <> -1 Then
+ Dim Str As New StringBuilder
+ Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
+ If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTClasificacionesDetalle"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
+ GlobalDTClasificacionesDetalle = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTClasificacionesDetalle = DirectCast(Application("GlobalDTClasificacionesDetalle"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTClasificacionesDetalle") = value
+ End Set
+ End Property
+ Property GlobalDTSubFamilias(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
+ Get
+ If CveEmpresa <> -1 Then
+ Dim Str As New StringBuilder
+ Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
+ If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
+
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTSubFamilias"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
+ GlobalDTSubFamilias = Dv.ToTable
+ Dv.Dispose()
+
+ Else
+ GlobalDTSubFamilias = DirectCast(Application("GlobalDTSubFamilias"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTSubFamilias") = value
+ End Set
+ End Property
+ Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable
+ Get
+ If CveEmpresa <> -1 Then
+
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTFamilias"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTFamilias = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTFamilias = DirectCast(Application("GlobalDTFamilias"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTFamilias") = value
+ End Set
+ End Property
+ Property GlobalDTClasificacionesPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable
+ Get
+ If CveEmpresa <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTClasificacionesPresupuestos"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTClasificacionesPresupuestos = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTClasificacionesPresupuestos = DirectCast(Application("GlobalDTClasificacionesPresupuestos"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTClasificacionesPresupuestos") = value
+ End Set
+ End Property
+ Property GlobalDTMetodosPago() As DataTable
+ Get
+ GlobalDTMetodosPago = DirectCast(Application("GlobalDTMetodosPago"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTMetodosPago") = value
+ End Set
+ End Property
+ Property GlobalDTModulos() As DataTable
+ Get
+ GlobalDTModulos = DirectCast(Application("GlobalDTModulos"), DataTable)
+ End Get
+ Set(ByVal value As DataTable)
+ Application("GlobalDTModulos") = value
+ End Set
+ End Property
+ Property GlobalDTMonedas() As DataTable
+ Get
+ GlobalDTMonedas = DirectCast(Application("GlobalDTMonedas"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTMonedas") = value
+ End Set
+ End Property
+ Property GlobalDTMonedasAlias() As DataTable
+ Get
+ GlobalDTMonedasAlias = DirectCast(Application("GlobalDTMonedasAlias"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(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) 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(Application("GlobalDTSATUsosCFDI"), DataTable), Tipo, " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
+ GlobalDTSATUsosCFDI = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTSATUsosCFDI = DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable)
+ End If
+
+ End Get
+ Set(ByVal value As DataTable)
+ Application("GlobalDTSATUsosCFDI") = value
+ End Set
+ End Property
+ Public 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
Dim ObjUnidadesMedida As New ClsUnidadesMedida()
If ObjUnidadesMedida.GetUnidadesMedida(CveEmpresa) Then 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)
- GlobalDTUnidadesMedida = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTUnidadesMedida = DirectCast(Application(AppNombre), DataTable)
- End If
- End Get
+ If CveEmpresa <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows)
+ GlobalDTUnidadesMedida = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTUnidadesMedida = DirectCast(Application(AppNombre), DataTable)
+ End If
+ End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida{0}", CveEmpresa)
Application(AppNombre) = value
- End Set
- End Property
- Property GlobalDTUnidadesMedidaAlias(Optional CveEmpresa As Integer = -1) As DataTable
+ End Set
+ End Property
+ Property GlobalDTUnidadesMedidaAlias(Optional CveEmpresa As Integer = -1) As DataTable
Get
- Dim AppNombre As String = String.Format("GlobalDTUnidadesMedidaAlias{0}", CveEmpresa)
- 'sino existe, recarga los datos
+ Dim AppNombre As String = String.Format("GlobalDTUnidadesMedidaAlias{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
Dim ObjUnidadesMedida As New ClsUnidadesMedida()
If ObjUnidadesMedida.GetUnidadesMedidaAlias(CveEmpresa, -1) Then 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), "", DataViewRowState.CurrentRows)
- GlobalDTUnidadesMedidaAlias = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTUnidadesMedidaAlias = DirectCast(Application(AppNombre), DataTable)
- End If
- End Get
- Set(value As DataTable)
+ End If
+ If CveEmpresa <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTUnidadesMedidaAlias = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTUnidadesMedidaAlias = DirectCast(Application(AppNombre), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTUnidadesMedidaAlias{0}", CveEmpresa)
Application(AppNombre) = value
'Dim ObjUnidadesMedida As New ClsUnidadesMedida()
'If ObjUnidadesMedida.GetUnidadesMedidaAlias(CveEmpresa, -1) Then Application(AppNombre) = ObjUnidadesMedida.DtResultados
- 'ObjUnidadesMedida.Dispose()
- End Set
- End Property
- Property GlobalDTEstatusOrdenCompra() As DataTable
- Get
- GlobalDTEstatusOrdenCompra = DirectCast(Application("GlobalDTEstatusOrdenCompra"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- Application("GlobalDTEstatusOrdenCompra") = value
- End Set
- End Property
- Property GlobalDTLeyendasFiscales() As DataTable
- Get
- GlobalDTLeyendasFiscales = DirectCast(Application("GlobalDTLeyendasFiscales"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTLeyendasFiscales") = value
- End Set
- End Property
- Property GlobalDTFolios() As DataTable
- Get
- GlobalDTFolios = DirectCast(Application("GlobalDTFolios"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTFolios") = value
- End Set
- End Property
- Property GlobalDTEstatusFactura() As DataTable
- Get
- GlobalDTEstatusFactura = DirectCast(Application("GlobalDTEstatusFactura"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTEstatusFactura") = value
- End Set
- End Property
- Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable
- Get
-
- If DirectCast(Application("GlobalDTProyectos"), DataTable) Is Nothing Or (DirectCast(Application("GlobalDTProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(Application("GlobalDTProyectos"), DataTable).Rows.Count = 0) Then
- Dim P As New ClsProyectos
- If P.GetProyectos Then
- Application("GlobalDTProyectos") = P.DtResultados
- End If
- P.Dispose()
-
- Dim msg As String = "aqui no se carga proyectos"
- If Request IsNot Nothing Then
- msg = msg & Request.ServerVariables("URL")
- End If
- msg.GuardaLog()
-
- End If
-
- If CveEmpresa <> -1 OrElse Estatus <> -1 Then 'OrElse CveProyecto <> -1
-
- Dim StrSQL As New StringBuilder
- If CveEmpresa <> -1 Then StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- ' If CveProyecto <> -1 Then StrSQL.AppendFormat(" {0} CveProyecto = {1}", If(StrSQL.Length > 0, "AND", ""), CveProyecto)
- If Estatus <> -1 Then StrSQL.AppendFormat(" {0} CveEstatus = {1}", If(StrSQL.Length > 0, "AND", ""), Estatus)
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTProyectos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProyectos = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTProyectos = DirectCast(Application("GlobalDTProyectos"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- If value Is Nothing OrElse value.Rows.Count = 0 Then
- Dim msg As String = "aqui no se carga proyectos"
- If Request IsNot Nothing Then
- msg = msg & Request.ServerVariables("URL")
- End If
- msg.GuardaLog()
-
- End If
- Application("GlobalDTProyectos") = value
- End Set
- End Property
- Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTSubProyectos{0}", CveEmpresa)
- '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
- Dim P As New ClsSubProyectos
+ 'ObjUnidadesMedida.Dispose()
+ End Set
+ End Property
+ Property GlobalDTEstatusOrdenCompra() As DataTable
+ Get
+ GlobalDTEstatusOrdenCompra = DirectCast(Application("GlobalDTEstatusOrdenCompra"), DataTable)
+ End Get
+ Set(ByVal value As DataTable)
+ Application("GlobalDTEstatusOrdenCompra") = value
+ End Set
+ End Property
+ Property GlobalDTLeyendasFiscales() As DataTable
+ Get
+ GlobalDTLeyendasFiscales = DirectCast(Application("GlobalDTLeyendasFiscales"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTLeyendasFiscales") = value
+ End Set
+ End Property
+ Property GlobalDTFolios() As DataTable
+ Get
+ GlobalDTFolios = DirectCast(Application("GlobalDTFolios"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTFolios") = value
+ End Set
+ End Property
+ Property GlobalDTEstatusFactura() As DataTable
+ Get
+ GlobalDTEstatusFactura = DirectCast(Application("GlobalDTEstatusFactura"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTEstatusFactura") = value
+ End Set
+ End Property
+ Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable
+ Get
+
+ If DirectCast(Application("GlobalDTProyectos"), DataTable) Is Nothing Or (DirectCast(Application("GlobalDTProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(Application("GlobalDTProyectos"), DataTable).Rows.Count = 0) Then
+ Dim P As New ClsProyectos
+ If P.GetProyectos Then
+ Application("GlobalDTProyectos") = P.DtResultados
+ End If
+ P.Dispose()
+
+ Dim msg As String = "aqui no se carga proyectos"
+ If Request IsNot Nothing Then
+ msg = msg & Request.ServerVariables("URL")
+ End If
+ msg.GuardaLog()
+
+ End If
+
+ If CveEmpresa <> -1 OrElse Estatus <> -1 Then 'OrElse CveProyecto <> -1
+
+ Dim StrSQL As New StringBuilder
+ If CveEmpresa <> -1 Then StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
+ ' If CveProyecto <> -1 Then StrSQL.AppendFormat(" {0} CveProyecto = {1}", If(StrSQL.Length > 0, "AND", ""), CveProyecto)
+ If Estatus <> -1 Then StrSQL.AppendFormat(" {0} CveEstatus = {1}", If(StrSQL.Length > 0, "AND", ""), Estatus)
+
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTProyectos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTProyectos = Dv.ToTable
+ Dv.Dispose()
+
+ Else
+ GlobalDTProyectos = DirectCast(Application("GlobalDTProyectos"), DataTable)
+ End If
+
+ End Get
+ Set(ByVal value As DataTable)
+ If value Is Nothing OrElse value.Rows.Count = 0 Then
+ Dim msg As String = "aqui no se carga proyectos"
+ If Request IsNot Nothing Then
+ msg = msg & Request.ServerVariables("URL")
+ End If
+ msg.GuardaLog()
+
+ End If
+ Application("GlobalDTProyectos") = value
+ End Set
+ End Property
+ Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
+ Get
+ Dim AppNombre As String = String.Format("GlobalDTSubProyectos{0}", CveEmpresa)
+ '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
+ Dim P As New ClsSubProyectos
If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = P.DtResultados
- P.Dispose()
-
- Dim msg As String = "aqui no se carga subproyectos"
- If Request IsNot Nothing Then
- msg = msg & Request.ServerVariables("URL")
- End If
- msg.GuardaLog()
-
- End If
-
- If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
- Dim StrSQL As New StringBuilder
- If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
- If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
- If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
- If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
-
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
- GlobalDTSubProyectos = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTSubProyectos = DirectCast(Application(AppNombre), DataTable)
- End If
-
- End Get
+ P.Dispose()
+
+ Dim msg As String = "aqui no se carga subproyectos"
+ If Request IsNot Nothing Then
+ msg = msg & Request.ServerVariables("URL")
+ End If
+ msg.GuardaLog()
+
+ End If
+
+ If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
+ Dim StrSQL As New StringBuilder
+ If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
+ If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
+ If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
+ If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
+
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
+ GlobalDTSubProyectos = Dv.ToTable
+ Dv.Dispose()
+
+ Else
+ GlobalDTSubProyectos = DirectCast(Application(AppNombre), DataTable)
+ End If
+
+ End Get
Set(ByVal value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTSubProyectos{0}", CveEmpresa)
- Application(AppNombre) = value
- End Set
- End Property
- Property GlobalDTSubProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
- Get
-
- If Application("GlobalDTSubProyectosUsuarios") Is Nothing Then
- Dim ObjSubProyectos As New ClsSubProyectos()
- If ObjSubProyectos.GetSubProyectosUsuarios Then Application("GlobalDTSubProyectosUsuarios") = ObjSubProyectos.DtResultados Else Alert("Ocurrió un error al cargar los SubProyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
- ObjSubProyectos.Dispose()
- End If
-
- If CveUsuario <> -1 OrElse CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse CveEstatus <> -1 Then
- Dim StrSQL As New StringBuilder
- If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
- If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
- If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
- If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
- If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", CveEstatus)
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTSubProyectosUsuarios"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
- GlobalDTSubProyectosUsuarios = Dv.ToTable
- Dv.Dispose()
-
- Dim ObjSubProyectos As New ClsSubProyectos()
- If ObjSubProyectos.GetSubProyectosUsuarios(CveUsuario:=CveUsuario, CveProyecto:=CveProyecto, CveSubProyecto:=CveSubProyecto, CveEstatus:=CveEstatus, CveEmpresa:=CveEmpresa) Then
- GlobalDTSubProyectosUsuarios = ObjSubProyectos.DtResultados
- Else
- GlobalDTSubProyectosUsuarios = Nothing
- End If
- ObjSubProyectos.Dispose()
-
- Else
- GlobalDTSubProyectosUsuarios = DirectCast(Application("GlobalDTSubProyectosUsuarios"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- If value Is Nothing OrElse value.Rows.Count = 0 Then
- Dim msg As String = "aqui no se carga subproyectos"
- If Request IsNot Nothing Then
- msg = msg & Request.ServerVariables("URL")
- End If
- msg.GuardaLog()
-
- End If
- Application("GlobalDTSubProyectosUsuarios") = value
- End Set
- End Property
- Property GlobalDTProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, CveEstatus As Integer) As DataTable
- Get
-
- If Application("GlobalDTProyectosUsuarios") Is Nothing AndAlso DirectCast(Application("GlobalDTProyectosUsuarios"), DataTable).Rows.Count = 0 Then
- Dim ObjSubProyectos As New ClsSubProyectos()
- If ObjSubProyectos.GetSubProyectosUsuarios Then Application("GlobalDTProyectosUsuarios") = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"}) Else Alert("Ocurrió un error al cargar los Proyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
- ObjSubProyectos.Dispose()
- GuardaLog("Se Cargo GlobalDTProyectosUsuarios")
- End If
-
- If CveUsuario <> -1 OrElse CveProyecto <> -1 OrElse CveEmpresa <> -1 OrElse CveEstatus <> -1 Then
- Dim StrSQL As New StringBuilder
- If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
- If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
- If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
- If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatusProyecto = {0}", CveEstatus)
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTProyectosUsuarios"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
- GlobalDTProyectosUsuarios = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTProyectosUsuarios = DirectCast(Application("GlobalDTProyectosUsuarios"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- If value Is Nothing OrElse value.Rows.Count = 0 Then
- Dim msg As String = "aqui no se carga proyectos"
- If Request IsNot Nothing Then
- msg = msg & Request.ServerVariables("URL")
- End If
- msg.GuardaLog()
-
- End If
- Application("GlobalDTProyectosUsuarios") = value
- End Set
- End Property
- Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable
- Get
- GlobalDTPrecioListas = DirectCast(Application("GlobalDTPrecioListas"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
- End Get
- Set(value As DataTable)
- Application("GlobalDTPrecioListas") = value
- End Set
- End Property
- Property GlobalDTMesas() As DataTable
- Get
- GlobalDTMesas = DirectCast(Application("GlobalDTMesas"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTMesas") = value
- End Set
- End Property
- Property GlobalDTTipoOrdenServicios(CveEmpresa As Integer) As DataTable
- Get
- GlobalDTTipoOrdenServicios = DirectCast(Application("GlobalDTTipoOrdenServicios"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
- End Get
- Set(value As DataTable)
- Application("GlobalDTTipoOrdenServicios") = value
- End Set
- End Property
- Property GlobalDTSubTipoOrdenServicios() As DataTable
- Get
- GlobalDTSubTipoOrdenServicios = DirectCast(Application("GlobalDTSubTipoOrdenServicios"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTSubTipoOrdenServicios") = value
- End Set
- End Property
- Property GlobalDTCaracteristicasOrdenServicios() As DataTable
- Get
- GlobalDTCaracteristicasOrdenServicios = DirectCast(Application("GlobalDTCaracteristicasOrdenServicios"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTCaracteristicasOrdenServicios") = value
- End Set
- End Property
- Property GlobalDTOrdenesServiciosCaracteristicas() As DataTable
- Get
- GlobalDTOrdenesServiciosCaracteristicas = DirectCast(Application("GlobalDTOrdenesServiciosCaracteristicas"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTOrdenesServiciosCaracteristicas") = value
- End Set
- End Property
- Property GlobalDTCaracteristicasOpciones() As DataTable
- Get
- GlobalDTCaracteristicasOpciones = DirectCast(Application("GlobalDTCaracteristicasOpciones"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTTipoCuentasEquipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTTipoCuentasEquipos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTTipoCuentasEquipos = DirectCast(Application("GlobalDTTipoCuentasEquipos"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTTipoCuentasEquiposCaracteristicas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTTipoCuentasEquiposCaracteristicas = DirectCast(Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTTipoCuentasEquiposOpciones = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTTipoCuentasEquiposOpciones = DirectCast(Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTTipoCuentasEquiposOpciones") = value
- End Set
- End Property
- ''Property GlobalDTProductosServicios(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional Estatus As Integer = 1,
- ' Optional CvePS As Integer = -1, Optional AplicaParaVenta As Integer = -1, Optional CveTipoPS As Integer = -1, Optional SATClavePS As String = "-1") As DataTable
- ' Get
-
- ' If CveEmpresa = -1 Then
- ' GlobalDTProductosServicios = DirectCast(Application("GlobalDTProductosServicios"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
- ' Else
-
- ' Dim Cons = DirectCast(Application("GlobalDTProductosServicios"), EnumerableRowCollection(Of DataRow))
- ' Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
- ' If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
- ' If CveClasificacionCosto >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacionCosto) = CveClasificacionCosto))
- ' If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus))
- ' If CvePS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CvePS) = CvePS))
- ' If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta))
- ' If CveTipoPS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveTipoPS) = CveTipoPS))
- ' If SATClavePS <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!SATClavePS) = SATClavePS))
-
- ' 'Try, generado para cuando el resultado no tiene valores(The source contains no DataRows.), no detenga la ejecucion, no se le puso un count previo, porque el costo se duplica, al preguntar y luego ordenar y convertir a datatable
- ' Try
- ' GlobalDTProductosServicios = Cons.OrderBy(Function(a) a!PS).CopyToDataTable
- ' Catch ex As Exception
- ' GlobalDTProductosServicios = New DataTable
- ' End Try
-
- ' 'Cons.CopyToDataTable.FiltraParametros("", "PS") 'Dv.ToTable()
-
-
- ' 'VIEJO AGOSTO 2016
- ' 'Dim StrSQL As New StringBuilder
- ' 'StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- ' 'If CveClasificacion >= 0 Then StrSQL.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
- ' 'If CveClasificacionCosto >= 0 Then StrSQL.AppendFormat(" AND CveClasificacionCosto = {0}", CveClasificacionCosto)
- ' 'If Estatus >= 0 Then StrSQL.AppendFormat(" AND CveEstado = {0} ", Estatus)
- ' 'If CvePS >= 0 Then StrSQL.AppendFormat(" AND CvePS = {0} ", CvePS)
-
- ' ' Dim Dv As New DataView(DirectCast(Application("GlobalDTProductosServicios"), DataTable), StrSQL.ToString, "CveEmpresa,PS", DataViewRowState.CurrentRows)
-
- ' 'Dim Dvr As DataRowView() = Dv.FindRows(StrSQL.ToString)
- ' 'Dim returnRows As New List(Of DataRow)()
- ' 'For Each drv As DataRowView In Dvr
- ' ' returnRows.Add(drv.Row)
- ' 'Next
-
- ' 'GlobalDTProductosServicios = Dv.ToTable()
- ' 'Dv.Dispose()
-
- ' End If
-
- ' End Get
- ' Set(value As DataTable)
- ' Application("GlobalDTProductosServicios") = 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
-
- If ObjPS.GetPS(CvePS, -1, CveEmpresa, SATClavePS:=SATClavePS, pAplicaParaVenta:=AplicaParaVenta) Then
- GlobalDTPS = ObjPS.DtResultados
- Else
- GlobalDTPS = Nothing
- End If
-
- ObjPS.Dispose()
- End Get
- End Property
- Public Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1, Optional AplicaParaVenta As Integer = -1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTPSSimplificado{0}", CveEmpresa)
+ Application(AppNombre) = value
+ End Set
+ End Property
+ Property GlobalDTSubProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
+ Get
+ Dim AppNombre As String = String.Format("GlobalDTSubProyectosUsuarios{0}", CveEmpresa)
+ If Application(AppNombre) Is Nothing Then
+ Dim ObjSubProyectos As New ClsSubProyectos()
+ If ObjSubProyectos.GetSubProyectosUsuarios(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = ObjSubProyectos.DtResultados Else Alert("Ocurrió un error al cargar los SubProyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
+ ObjSubProyectos.Dispose()
+ End If
+
+ If CveUsuario <> -1 OrElse CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse CveEstatus <> -1 Then
+ Dim StrSQL As New StringBuilder
+ If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
+ If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
+ If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
+ If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
+ If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", CveEstatus)
+
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
+ GlobalDTSubProyectosUsuarios = Dv.ToTable
+ Dv.Dispose()
+
+ 'Dim ObjSubProyectos As New ClsSubProyectos()
+ 'If ObjSubProyectos.GetSubProyectosUsuarios(CveUsuario:=CveUsuario, CveProyecto:=CveProyecto, CveSubProyecto:=CveSubProyecto, CveEstatus:=CveEstatus, CveEmpresa:=CveEmpresa) Then
+ ' GlobalDTSubProyectosUsuarios = ObjSubProyectos.DtResultados
+ 'Else
+ ' GlobalDTSubProyectosUsuarios = Nothing
+ 'End If
+ 'ObjSubProyectos.Dispose()
+
+ Else
+ GlobalDTSubProyectosUsuarios = DirectCast(Application(AppNombre), DataTable)
+ End If
+
+ End Get
+ Set(ByVal value As DataTable)
+ Dim AppNombre As String = String.Format("GlobalDTSubProyectosUsuarios{0}", CveEmpresa)
+ Application(AppNombre) = value
+ End Set
+ End Property
+ Property GlobalDTProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, CveEstatus As Integer) As DataTable
+ Get
+
+ If Application("GlobalDTProyectosUsuarios") Is Nothing AndAlso DirectCast(Application("GlobalDTProyectosUsuarios"), DataTable).Rows.Count = 0 Then
+ Dim ObjSubProyectos As New ClsSubProyectos()
+ If ObjSubProyectos.GetSubProyectosUsuarios Then Application("GlobalDTProyectosUsuarios") = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"}) Else Alert("Ocurrió un error al cargar los Proyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
+ ObjSubProyectos.Dispose()
+ GuardaLog("Se Cargo GlobalDTProyectosUsuarios")
+ End If
+
+ If CveUsuario <> -1 OrElse CveProyecto <> -1 OrElse CveEmpresa <> -1 OrElse CveEstatus <> -1 Then
+ Dim StrSQL As New StringBuilder
+ If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
+ If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
+ If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
+ If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatusProyecto = {0}", CveEstatus)
+
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTProyectosUsuarios"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
+ GlobalDTProyectosUsuarios = Dv.ToTable
+ Dv.Dispose()
+
+ Else
+ GlobalDTProyectosUsuarios = DirectCast(Application("GlobalDTProyectosUsuarios"), DataTable)
+ End If
+
+ End Get
+ Set(ByVal value As DataTable)
+ If value Is Nothing OrElse value.Rows.Count = 0 Then
+ Dim msg As String = "aqui no se carga proyectos"
+ If Request IsNot Nothing Then
+ msg = msg & Request.ServerVariables("URL")
+ End If
+ msg.GuardaLog()
+
+ End If
+ Application("GlobalDTProyectosUsuarios") = value
+ End Set
+ End Property
+ Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable
+ Get
+ GlobalDTPrecioListas = DirectCast(Application("GlobalDTPrecioListas"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTPrecioListas") = value
+ End Set
+ End Property
+ Property GlobalDTMesas() As DataTable
+ Get
+ GlobalDTMesas = DirectCast(Application("GlobalDTMesas"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTMesas") = value
+ End Set
+ End Property
+ Property GlobalDTTipoOrdenServicios(CveEmpresa As Integer) As DataTable
+ Get
+ GlobalDTTipoOrdenServicios = DirectCast(Application("GlobalDTTipoOrdenServicios"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTTipoOrdenServicios") = value
+ End Set
+ End Property
+ Property GlobalDTSubTipoOrdenServicios() As DataTable
+ Get
+ GlobalDTSubTipoOrdenServicios = DirectCast(Application("GlobalDTSubTipoOrdenServicios"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTSubTipoOrdenServicios") = value
+ End Set
+ End Property
+ Property GlobalDTCaracteristicasOrdenServicios() As DataTable
+ Get
+ GlobalDTCaracteristicasOrdenServicios = DirectCast(Application("GlobalDTCaracteristicasOrdenServicios"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTCaracteristicasOrdenServicios") = value
+ End Set
+ End Property
+ Property GlobalDTOrdenesServiciosCaracteristicas() As DataTable
+ Get
+ GlobalDTOrdenesServiciosCaracteristicas = DirectCast(Application("GlobalDTOrdenesServiciosCaracteristicas"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTOrdenesServiciosCaracteristicas") = value
+ End Set
+ End Property
+ Property GlobalDTCaracteristicasOpciones() As DataTable
+ Get
+ GlobalDTCaracteristicasOpciones = DirectCast(Application("GlobalDTCaracteristicasOpciones"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTTipoCuentasEquipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTTipoCuentasEquipos = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTTipoCuentasEquipos = DirectCast(Application("GlobalDTTipoCuentasEquipos"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTTipoCuentasEquiposCaracteristicas = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTTipoCuentasEquiposCaracteristicas = DirectCast(Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTTipoCuentasEquiposOpciones = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTTipoCuentasEquiposOpciones = DirectCast(Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTTipoCuentasEquiposOpciones") = value
+ End Set
+ End Property
+ ''Property GlobalDTProductosServicios(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional Estatus As Integer = 1,
+ ' Optional CvePS As Integer = -1, Optional AplicaParaVenta As Integer = -1, Optional CveTipoPS As Integer = -1, Optional SATClavePS As String = "-1") As DataTable
+ ' Get
+
+ ' If CveEmpresa = -1 Then
+ ' GlobalDTProductosServicios = DirectCast(Application("GlobalDTProductosServicios"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
+ ' Else
+
+ ' Dim Cons = DirectCast(Application("GlobalDTProductosServicios"), EnumerableRowCollection(Of DataRow))
+ ' Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
+ ' If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
+ ' If CveClasificacionCosto >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacionCosto) = CveClasificacionCosto))
+ ' If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus))
+ ' If CvePS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CvePS) = CvePS))
+ ' If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta))
+ ' If CveTipoPS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveTipoPS) = CveTipoPS))
+ ' If SATClavePS <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!SATClavePS) = SATClavePS))
+
+ ' 'Try, generado para cuando el resultado no tiene valores(The source contains no DataRows.), no detenga la ejecucion, no se le puso un count previo, porque el costo se duplica, al preguntar y luego ordenar y convertir a datatable
+ ' Try
+ ' GlobalDTProductosServicios = Cons.OrderBy(Function(a) a!PS).CopyToDataTable
+ ' Catch ex As Exception
+ ' GlobalDTProductosServicios = New DataTable
+ ' End Try
+
+ ' 'Cons.CopyToDataTable.FiltraParametros("", "PS") 'Dv.ToTable()
+
+
+ ' 'VIEJO AGOSTO 2016
+ ' 'Dim StrSQL As New StringBuilder
+ ' 'StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
+ ' 'If CveClasificacion >= 0 Then StrSQL.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
+ ' 'If CveClasificacionCosto >= 0 Then StrSQL.AppendFormat(" AND CveClasificacionCosto = {0}", CveClasificacionCosto)
+ ' 'If Estatus >= 0 Then StrSQL.AppendFormat(" AND CveEstado = {0} ", Estatus)
+ ' 'If CvePS >= 0 Then StrSQL.AppendFormat(" AND CvePS = {0} ", CvePS)
+
+ ' ' Dim Dv As New DataView(DirectCast(Application("GlobalDTProductosServicios"), DataTable), StrSQL.ToString, "CveEmpresa,PS", DataViewRowState.CurrentRows)
+
+ ' 'Dim Dvr As DataRowView() = Dv.FindRows(StrSQL.ToString)
+ ' 'Dim returnRows As New List(Of DataRow)()
+ ' 'For Each drv As DataRowView In Dvr
+ ' ' returnRows.Add(drv.Row)
+ ' 'Next
+
+ ' 'GlobalDTProductosServicios = Dv.ToTable()
+ ' 'Dv.Dispose()
+
+ ' End If
+
+ ' End Get
+ ' Set(value As DataTable)
+ ' Application("GlobalDTProductosServicios") = 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
+
+ If ObjPS.GetPS(CvePS, -1, CveEmpresa, SATClavePS:=SATClavePS, pAplicaParaVenta:=AplicaParaVenta) Then
+ GlobalDTPS = ObjPS.DtResultados
+ Else
+ GlobalDTPS = Nothing
+ End If
+
+ ObjPS.Dispose()
+ End Get
+ End Property
+ Public Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1, Optional AplicaParaVenta As Integer = -1) As DataTable
+ Get
+ Dim AppNombre As String = String.Format("GlobalDTPSSimplificado{0}", CveEmpresa)
If CveEmpresa <> -1 Then
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSSimplificado(CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados.AsEnumerable()
- ObjPS.Dispose()
+ ObjPS.Dispose()
End If
-
- Dim Cons = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow))
-
- Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
- If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
- If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo))
- If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus))
- If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta))
-
- Try
- GlobalDTPSSimplificado = Cons.OrderBy(Function(a) a!PSCodigo).CopyToDataTable
- Catch ex As Exception
- GlobalDTPSSimplificado = New DataTable
- End Try
-
- Else
- GlobalDTPSSimplificado = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable
- End If
- End Get
- Set(value As DataTable)
+
+ Dim Cons = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow))
+
+ Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
+ If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
+ If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo))
+ If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus))
+ If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta))
+
+ Try
+ GlobalDTPSSimplificado = Cons.OrderBy(Function(a) a!PSCodigo).CopyToDataTable
+ Catch ex As Exception
+ GlobalDTPSSimplificado = New DataTable
+ End Try
+
+ Else
+ GlobalDTPSSimplificado = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable
+ End If
+ End Get
+ Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado{0}", CveEmpresa)
Application(AppNombre) = value
- End Set
- End Property
- Property GlobalDTProductosServiciosAlias(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable
- Get
+ End Set
+ End Property
+ Property GlobalDTProductosServiciosAlias(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable
+ Get
Dim AppNombre As String = String.Format("GlobalDTProductosServiciosAlias{0}", CveEmpresa)
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
@@ -1229,27 +1222,27 @@ Public Class ClsPaginas
End If
- If CveEmpresa <> -1 Then
-
- Dim StrSQL As New StringBuilder
- StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If Estatus >= 0 Then StrSQL.AppendFormat(" AND CveEstado = {0} ", Estatus)
-
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProductosServiciosAlias = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProductosServiciosAlias = DirectCast(Application(AppNombre), DataTable)
- End If
- End Get
- Set(value As DataTable)
+ If CveEmpresa <> -1 Then
+
+ Dim StrSQL As New StringBuilder
+ StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
+ If Estatus >= 0 Then StrSQL.AppendFormat(" AND CveEstado = {0} ", Estatus)
+
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTProductosServiciosAlias = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProductosServiciosAlias = DirectCast(Application(AppNombre), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTProductosServiciosAlias{0}", CveEmpresa)
Application(AppNombre) = value
- End Set
- End Property
- Public Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias{0}", CveEmpresa)
+ End Set
+ End Property
+ Public Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable
+ Get
+ Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias{0}", CveEmpresa)
If CveEmpresa <> -1 Then
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
@@ -1257,122 +1250,122 @@ Public Class ClsPaginas
If ObjPS.GetPSEquivalencias(-1, CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados
ObjPS.Dispose()
End If
- End If
-
- If CvePS <> -1 OrElse CveUM <> -1 Then
- Dim StrSQL As New StringBuilder
- If CvePS <> -1 Then StrSQL.AppendFormat(" AND CvePS = {0}", CvePS)
+ End If
+
+ If CvePS <> -1 OrElse CveUM <> -1 Then
+ Dim StrSQL As New StringBuilder
+ If CvePS <> -1 Then StrSQL.AppendFormat(" AND CvePS = {0}", CvePS)
If CveUM <> -1 Then StrSQL.AppendFormat(" AND CveUM = {0}", CveUM)
- If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
-
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
- GlobalDTProductosServiciosEquivalencias = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProductosServiciosEquivalencias = DirectCast(Application(AppNombre), DataTable)
- End If
- End Get
- Set(value As DataTable)
+ If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
+
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
+ GlobalDTProductosServiciosEquivalencias = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProductosServiciosEquivalencias = DirectCast(Application(AppNombre), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias{0}", CveEmpresa)
Application(AppNombre) = value
- End Set
- End Property
- Property GlobalDTProductosServiciosCaracteristicas(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTProductosServiciosCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProductosServiciosCaracteristicas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProductosServiciosCaracteristicas = DirectCast(Application("GlobalDTProductosServiciosCaracteristicas"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTProductosServiciosCaracteristicas") = value
- End Set
- End Property
-
- Property GlobalDTPSAdicionales(CvePS As Integer, CveEmpresa As Integer) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTPSAdicionales{0}", CveEmpresa)
+ End Set
+ End Property
+ Property GlobalDTProductosServiciosCaracteristicas(CveEmpresa As Integer) As DataTable
+ Get
+ If CveEmpresa <> -1 Then
+
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTProductosServiciosCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTProductosServiciosCaracteristicas = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProductosServiciosCaracteristicas = DirectCast(Application("GlobalDTProductosServiciosCaracteristicas"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTProductosServiciosCaracteristicas") = value
+ End Set
+ End Property
+
+ Property GlobalDTPSAdicionales(CvePS As Integer, CveEmpresa As Integer) As DataTable
+ Get
+ Dim AppNombre As String = String.Format("GlobalDTPSAdicionales{0}", CveEmpresa)
If CveEmpresa <> -1 Then
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSAdicionales(-1, CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados
- ObjPS.Dispose()
+ ObjPS.Dispose()
End If
End If
- 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(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTPSAdicionales = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTPSAdicionales = DirectCast(Application(AppNombre), DataTable)
- End If
- End 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(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTPSAdicionales = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTPSAdicionales = DirectCast(Application(AppNombre), DataTable)
+ End If
+ End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTPSAdicionales{0}", CveEmpresa)
Application(AppNombre) = value
- End Set
- End Property
- Property GlobalDTProductosServiciosCaracteristicasOpciones(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTProductosServiciosCaracteristicasOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProductosServiciosCaracteristicasOpciones = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProductosServiciosCaracteristicasOpciones = DirectCast(Application("GlobalDTProductosServiciosCaracteristicasOpciones"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTProductosServiciosCaracteristicasOpciones") = value
- End Set
- End Property
- Property GlobalDTInvMetodosInventario() As DataTable
- Get
- GlobalDTInvMetodosInventario = DirectCast(Application("GlobalDTInvMetodosInventario"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTInvMetodosInventario") = value
- End Set
- End Property
- Property GlobalDTAFCaracteristicasOpciones() As DataTable
- Get
- GlobalDTAFCaracteristicasOpciones = DirectCast(Application("GlobalDTAFCaracteristicasOpciones"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTAFCaracteristicasOpciones") = value
- End Set
- End Property
- Property GlobalDTAFCaracteristicas() As DataTable
- Get
- GlobalDTAFCaracteristicas = DirectCast(Application("GlobalDTAFCaracteristicas"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTAFCaracteristicas") = value
- End Set
- End Property
- Property GlobalDTAFCaracteristicasClasificaciones() As DataTable
- Get
- GlobalDTAFCaracteristicasClasificaciones = DirectCast(Application("GlobalDTAFCaracteristicasClasificaciones"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTAFCaracteristicasClasificaciones") = value
- End Set
- End Property
- Property GlobalDTImpuestosLocales(CvePS As Integer, CveEmpresa As Integer) As DataTable
- Get
+ End Set
+ End Property
+ Property GlobalDTProductosServiciosCaracteristicasOpciones(CveEmpresa As Integer) As DataTable
+ Get
+ If CveEmpresa <> -1 Then
+
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTProductosServiciosCaracteristicasOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTProductosServiciosCaracteristicasOpciones = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProductosServiciosCaracteristicasOpciones = DirectCast(Application("GlobalDTProductosServiciosCaracteristicasOpciones"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTProductosServiciosCaracteristicasOpciones") = value
+ End Set
+ End Property
+ Property GlobalDTInvMetodosInventario() As DataTable
+ Get
+ GlobalDTInvMetodosInventario = DirectCast(Application("GlobalDTInvMetodosInventario"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTInvMetodosInventario") = value
+ End Set
+ End Property
+ Property GlobalDTAFCaracteristicasOpciones() As DataTable
+ Get
+ GlobalDTAFCaracteristicasOpciones = DirectCast(Application("GlobalDTAFCaracteristicasOpciones"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAFCaracteristicasOpciones") = value
+ End Set
+ End Property
+ Property GlobalDTAFCaracteristicas() As DataTable
+ Get
+ GlobalDTAFCaracteristicas = DirectCast(Application("GlobalDTAFCaracteristicas"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAFCaracteristicas") = value
+ End Set
+ End Property
+ Property GlobalDTAFCaracteristicasClasificaciones() As DataTable
+ Get
+ GlobalDTAFCaracteristicasClasificaciones = DirectCast(Application("GlobalDTAFCaracteristicasClasificaciones"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAFCaracteristicasClasificaciones") = value
+ End Set
+ End Property
+ Property GlobalDTImpuestosLocales(CvePS As Integer, CveEmpresa As Integer) As DataTable
+ Get
Dim AppNombre As String = String.Format("GlobalDTImpuestosLocales{0}", CveEmpresa)
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
@@ -1380,146 +1373,146 @@ Public Class ClsPaginas
If ObjPS.GetPSImpuestosLocales(-1, CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados
ObjPS.Dispose()
- End If
- 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(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTImpuestosLocales = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTImpuestosLocales = DirectCast(Application(AppNombre), DataTable)
- End If
- End Get
- Set(value As DataTable)
+ End If
+ 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(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTImpuestosLocales = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTImpuestosLocales = DirectCast(Application(AppNombre), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTImpuestosLocales{0}", CveEmpresa)
Application(AppNombre) = value
'Dim ObjPS As New ClsProductosServicios
'If ObjPS.GetPSImpuestosLocales(-1, CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados
- 'ObjPS.Dispose()
- End Set
- End Property
- 'Bancos
- Property GlobalDTBancos() As DataTable
- Get
- GlobalDTBancos = DirectCast(Application("GlobalDTBancos"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTBancos") = value
- End Set
- End Property
- 'Property GlobalDTBancosCuentas(CveUsuario As Integer) As DataTable
- ' Get
- ' Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa)
- ' If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario ={1}", Str, CveUsuario)
-
- ' Dim Dv As New DataView(DirectCast(Application("GlobalDTBancosCuentas"), DataTable), Str, "", DataViewRowState.CurrentRows)
- ' GlobalDTBancosCuentas = Dv.ToTable
- ' Dv.Dispose()
-
- ' End Get
- ' Set(value As DataTable)
- ' Application("GlobalDTBancosCuentas") = value
- ' End Set
- 'End Property
- Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1) As DataTable
- Get
-
- Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa)
- If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario = {1}", Str, CveUsuario)
- If CveCuenta > -1 Then Str = String.Format("{0} AND CveCuenta = {1}", Str, CveCuenta)
- If Estatus > -1 Then Str = String.Format("{0} AND Estatus = '{1}'", Str, If(Estatus = 1, "Activo", "Inactivo"))
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTBancosCuentas"), DataTable), Str, "", DataViewRowState.CurrentRows)
- GlobalDTBancosCuentas = Dv.ToTable
- Dv.Dispose()
- 'GlobalDTBancosCuentas = DirectCast(Application("GlobalDTBancosCuentas"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTBancosCuentas") = value
- End Set
- End Property
- Property GlobalDTTipoTransacciones() As DataTable
- Get
- If UsuarioActual.CveEmpresa = 66 Then
- GlobalDTTipoTransacciones = DirectCast(Application("GlobalDTTipoTransacciones"), DataTable).FiltraParametros("Estatus = 1")
- Else
- GlobalDTTipoTransacciones = DirectCast(Application("GlobalDTTipoTransacciones"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTTipoTransacciones") = value
- End Set
- End Property
- Property GlobalDTBancosEstatusIE() As DataTable
- Get
- GlobalDTBancosEstatusIE = DirectCast(Application("GlobalDTBancosEstatusIE"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTBancosEstatusIE") = value
- End Set
- End Property
- Property GlobalDTBancosIE() As DataTable
- Get
- GlobalDTBancosIE = DirectCast(Application("GlobalDTBancosIE"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTBancosIE") = value
- End Set
- End Property
- Property GlobalDTTipoCuenta() As DataTable
- Get
- GlobalDTTipoCuenta = DirectCast(Application("GlobalDTTipoCuenta"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTTipoCuenta") = value
- End Set
- End Property
- 'Fin Bancos
-
- 'Fin EstadoCIvil
- 'TipoPerioso
- Property GlobalDTTipoPeriodo() As DataTable
- Get
- GlobalDTTipoPeriodo = DirectCast(Application("GlobalDTTipoPeriodo"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTNominasPeriodos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTNominasPeriodos = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTNominasPeriodos = DirectCast(Application("GlobalDTNominasPeriodos"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Application("GlobalDTNominasPeriodos") = value
- End Set
- End Property
- 'Fin Periodos
-
- 'Fin Ruta
- 'Cliente
- Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional CveCliente As Integer = -1) As DataTable
+ 'ObjPS.Dispose()
+ End Set
+ End Property
+ 'Bancos
+ Property GlobalDTBancos() As DataTable
+ Get
+ GlobalDTBancos = DirectCast(Application("GlobalDTBancos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTBancos") = value
+ End Set
+ End Property
+ 'Property GlobalDTBancosCuentas(CveUsuario As Integer) As DataTable
+ ' Get
+ ' Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa)
+ ' If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario ={1}", Str, CveUsuario)
+
+ ' Dim Dv As New DataView(DirectCast(Application("GlobalDTBancosCuentas"), DataTable), Str, "", DataViewRowState.CurrentRows)
+ ' GlobalDTBancosCuentas = Dv.ToTable
+ ' Dv.Dispose()
+
+ ' End Get
+ ' Set(value As DataTable)
+ ' Application("GlobalDTBancosCuentas") = value
+ ' End Set
+ 'End Property
+ Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1) As DataTable
+ Get
+
+ Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa)
+ If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario = {1}", Str, CveUsuario)
+ If CveCuenta > -1 Then Str = String.Format("{0} AND CveCuenta = {1}", Str, CveCuenta)
+ If Estatus > -1 Then Str = String.Format("{0} AND Estatus = '{1}'", Str, If(Estatus = 1, "Activo", "Inactivo"))
+
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTBancosCuentas"), DataTable), Str, "", DataViewRowState.CurrentRows)
+ GlobalDTBancosCuentas = Dv.ToTable
+ Dv.Dispose()
+ 'GlobalDTBancosCuentas = DirectCast(Application("GlobalDTBancosCuentas"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTBancosCuentas") = value
+ End Set
+ End Property
+ Property GlobalDTTipoTransacciones() As DataTable
+ Get
+ If UsuarioActual.CveEmpresa = 66 Then
+ GlobalDTTipoTransacciones = DirectCast(Application("GlobalDTTipoTransacciones"), DataTable).FiltraParametros("Estatus = 1")
+ Else
+ GlobalDTTipoTransacciones = DirectCast(Application("GlobalDTTipoTransacciones"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTTipoTransacciones") = value
+ End Set
+ End Property
+ Property GlobalDTBancosEstatusIE() As DataTable
+ Get
+ GlobalDTBancosEstatusIE = DirectCast(Application("GlobalDTBancosEstatusIE"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTBancosEstatusIE") = value
+ End Set
+ End Property
+ Property GlobalDTBancosIE() As DataTable
+ Get
+ GlobalDTBancosIE = DirectCast(Application("GlobalDTBancosIE"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTBancosIE") = value
+ End Set
+ End Property
+ Property GlobalDTTipoCuenta() As DataTable
+ Get
+ GlobalDTTipoCuenta = DirectCast(Application("GlobalDTTipoCuenta"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTTipoCuenta") = value
+ End Set
+ End Property
+ 'Fin Bancos
+
+ 'Fin EstadoCIvil
+ 'TipoPerioso
+ Property GlobalDTTipoPeriodo() As DataTable
+ Get
+ GlobalDTTipoPeriodo = DirectCast(Application("GlobalDTTipoPeriodo"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTNominasPeriodos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTNominasPeriodos = Dv.ToTable
+ Dv.Dispose()
+
+ Else
+ GlobalDTNominasPeriodos = DirectCast(Application("GlobalDTNominasPeriodos"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTNominasPeriodos") = value
+ End Set
+ End Property
+ 'Fin Periodos
+
+ 'Fin Ruta
+ 'Cliente
+ Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional CveCliente As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTCliente{0}", CveEmpresa)
- 'sino existe, recarga los datos
+ 'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim ObjClientes As New ClsClientes
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then Application(AppNombre) = ObjClientes.DtResultados
@@ -1527,10 +1520,10 @@ Public Class ClsPaginas
End If
- If CveEmpresa <> -1 Then
-
- Dim StrSQL As New StringBuilder
- StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
+ If CveEmpresa <> -1 Then
+
+ Dim StrSQL As New StringBuilder
+ StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus)
If CveCliente >= 0 Then StrSQL.AppendFormat(" AND CveCliente = {0} ", CveCliente)
@@ -1538,143 +1531,143 @@ Public Class ClsPaginas
GlobalDTCliente = Dv.ToTable
Dv.Dispose()
- Else
- GlobalDTCliente = DirectCast(Application(AppNombre), DataTable)
- End If
- End Get
- Set(value As DataTable)
+ Else
+ GlobalDTCliente = DirectCast(Application(AppNombre), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTCliente{0}", CveEmpresa)
Application(AppNombre) = value
- End Set
- End Property
- Property GlobalDTClienteClasificaciones(CveEmpresa As Integer) As DataTable
- Get
+ End Set
+ End Property
+ Property GlobalDTClienteClasificaciones(CveEmpresa As Integer) As DataTable
+ Get
Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones{0}", CveEmpresa)
- 'sino existe, recarga los datos
+ 'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim ObjClientes As New ClsClientes
If ObjClientes.GetClienteClasificacion(CveEmpresa) Then Application(AppNombre) = ObjClientes.DtResultados
ObjClientes.Dispose()
- End If
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTClienteClasificaciones = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClienteClasificaciones = DirectCast(Application(AppNombre), DataTable)
- End If
- End Get
+ End If
+ If CveEmpresa <> -1 Then
+
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTClienteClasificaciones = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTClienteClasificaciones = DirectCast(Application(AppNombre), DataTable)
+ End If
+ End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones{0}", CveEmpresa)
Application(AppNombre) = value
- End Set
- End Property
- Property GlobalDTEstatusOrdenServicios(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTEstatusOrdenServicios"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTEstatusOrdenServicios = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTEstatusOrdenServicios = DirectCast(Application("GlobalDTEstatusOrdenServicios"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTEstatusOrdenServicios") = value
- End Set
- End Property
- 'Variables para Ventas
- Property GlobalDTVendedores(CveEmpresa As Integer, Optional Estatus As Boolean = True, Optional VendedorTipo As Integer = 1) As DataTable
- Get
+ End Set
+ End Property
+ Property GlobalDTEstatusOrdenServicios(CveEmpresa As Integer) As DataTable
+ Get
+ If CveEmpresa <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTEstatusOrdenServicios"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTEstatusOrdenServicios = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTEstatusOrdenServicios = DirectCast(Application("GlobalDTEstatusOrdenServicios"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTEstatusOrdenServicios") = value
+ End Set
+ End Property
+ 'Variables para Ventas
+ Property GlobalDTVendedores(CveEmpresa As Integer, Optional Estatus As Boolean = True, Optional VendedorTipo As Integer = 1) As DataTable
+ Get
Dim AppNombre As String = String.Format("GlobalDTVendedores{0}", CveEmpresa)
- 'sino existe, recarga los datos
+ 'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim ObjVendedores As New ClsVtaVendedores
If ObjVendedores.GetVendedores(-1) Then Application(AppNombre) = ObjVendedores.DtResultados
ObjVendedores.Dispose()
- End If
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0} AND CveEstatus = {1} AND VendedorTipo = {2}", CveEmpresa, If(Estatus, 1, 0), VendedorTipo), "", DataViewRowState.CurrentRows)
- GlobalDTVendedores = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTVendedores = DirectCast(Application(AppNombre), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTVendedores{0}", CveEmpresa)
- Application(AppNombre) = value
- End Set
- End Property
- Property GlobalDTClientesCorporativo(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTClientesCorporativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTClientesCorporativo = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClientesCorporativo = DirectCast(Application("GlobalDTClientesCorporativo"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTClientesCorporativo") = value
- End Set
- End Property
- Property GlobalDTCompProveedores(CveEmpresa As Integer) As DataTable
- Get
+ End If
+ If CveEmpresa <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0} AND CveEstatus = {1} AND VendedorTipo = {2}", CveEmpresa, If(Estatus, 1, 0), VendedorTipo), "", DataViewRowState.CurrentRows)
+ GlobalDTVendedores = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTVendedores = DirectCast(Application(AppNombre), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = String.Format("GlobalDTVendedores{0}", CveEmpresa)
+ Application(AppNombre) = value
+ End Set
+ End Property
+ Property GlobalDTClientesCorporativo(CveEmpresa As Integer) As DataTable
+ Get
+ If CveEmpresa <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTClientesCorporativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTClientesCorporativo = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTClientesCorporativo = DirectCast(Application("GlobalDTClientesCorporativo"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTClientesCorporativo") = value
+ End Set
+ End Property
+ Property GlobalDTCompProveedores(CveEmpresa As Integer) As DataTable
+ Get
Dim AppNombre As String = String.Format("GlobalDTCompProveedores{0}", CveEmpresa)
- 'sino existe, recarga los datos
+ 'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim ObjProveedores As New ClsCompProveedores
If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then Application(AppNombre) = ObjProveedores.DtResultados
ObjProveedores.Dispose()
End If
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTCompProveedores = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTCompProveedores = DirectCast(Application(AppNombre), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
+ If CveEmpresa <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTCompProveedores = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTCompProveedores = DirectCast(Application(AppNombre), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTCompProveedores{0}", CveEmpresa)
Application(AppNombre) = value
'Dim ObjProveedores As New ClsCompProveedores
'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then Application(AppNombre) = ObjProveedores.DtResultados
- 'ObjProveedores.Dispose()
- End Set
- End Property
- 'EstatusFactura
- Property GlobalDTCompEstatusFactura() As DataTable
- Get
- GlobalDTCompEstatusFactura = DirectCast(Application("GlobalDTCompEstatusFactura"), DataTable).FiltraParametros("Estatus = 'Activo'")
- End Get
- Set(value As DataTable)
- Application("GlobalDTCompEstatusFactura") = value
- End Set
- End Property
- Property GlobalDTContratosSecciones() As DataTable
- Get
- GlobalDTContratosSecciones = DirectCast(Application("GlobalDTContratosSecciones"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTContratosSecciones") = value
- End Set
- End Property
- Property GlobalDTContratos() As DataTable
- Get
- GlobalDTContratos = DirectCast(Application("GlobalDTContratos"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTContratos") = value
- End Set
- End Property
- Property GlobalDTContratosTipos(CveEmpresa As Integer) As DataTable
- Get
+ 'ObjProveedores.Dispose()
+ End Set
+ End Property
+ 'EstatusFactura
+ Property GlobalDTCompEstatusFactura() As DataTable
+ Get
+ GlobalDTCompEstatusFactura = DirectCast(Application("GlobalDTCompEstatusFactura"), DataTable).FiltraParametros("Estatus = 'Activo'")
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTCompEstatusFactura") = value
+ End Set
+ End Property
+ Property GlobalDTContratosSecciones() As DataTable
+ Get
+ GlobalDTContratosSecciones = DirectCast(Application("GlobalDTContratosSecciones"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTContratosSecciones") = value
+ End Set
+ End Property
+ Property GlobalDTContratos() As DataTable
+ Get
+ GlobalDTContratos = DirectCast(Application("GlobalDTContratos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTContratos") = value
+ End Set
+ End Property
+ Property GlobalDTContratosTipos(CveEmpresa As Integer) As DataTable
+ Get
Dim AppNombre As String = String.Format("GlobalDTContratosTipos{0}", CveEmpresa)
'sino existe, recarga los datos
@@ -1686,1605 +1679,1605 @@ Public Class ClsPaginas
GlobalDTContratosTipos = DirectCast(Application(AppNombre), DataTable)
- End Get
- Set(value As DataTable)
+ End Get
+ Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTContratosTipos{0}", CveEmpresa)
- Application(AppNombre) = value
- End Set
- End Property
- Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTTipoAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTTipoAlmacen = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTTipoAlmacen = DirectCast(Application("GlobalDTTipoAlmacen"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Application("GlobalDTTipoAlmacen") = value
- End Set
- End Property
- Property GlobalDTInvConceptos() As DataTable
- Get
-
- Return DirectCast(Application("GlobalDTInvConceptos"), DataTable)
-
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTSeccionAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTSeccionAlmacen = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTSeccionAlmacen = DirectCast(Application("GlobalDTSeccionAlmacen"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Application("GlobalDTSeccionAlmacen") = value
- End Set
- End Property
- Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1) As DataTable
- Get
+ Application(AppNombre) = value
+ End Set
+ End Property
+ Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable
+ Get
+ If CveEmpresa <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTTipoAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTTipoAlmacen = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTTipoAlmacen = DirectCast(Application("GlobalDTTipoAlmacen"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTTipoAlmacen") = value
+ End Set
+ End Property
+ Property GlobalDTInvConceptos() As DataTable
+ Get
+
+ Return DirectCast(Application("GlobalDTInvConceptos"), DataTable)
+
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTSeccionAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTSeccionAlmacen = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTSeccionAlmacen = DirectCast(Application("GlobalDTSeccionAlmacen"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTSeccionAlmacen") = value
+ End Set
+ End Property
+ Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1) As DataTable
+ Get
If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
- If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
- If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTAlmacen = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAlmacen = DirectCast(Application("GlobalDTAlmacen"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Application("GlobalDTAlmacen") = value
- End Set
- End Property
- Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1, Optional CveEstatus As Integer = 1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
- If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
- If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacenUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTAlmacenUsuarios = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAlmacenUsuarios = DirectCast(Application("GlobalDTAlmacenUsuarios"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Application("GlobalDTAlmacenUsuarios") = value
- End Set
- End Property
- Property GlobalDTNom_Periodos() As DataTable
- Get
- GlobalDTNom_Periodos = DirectCast(Application("GlobalDTNom_Periodos"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTNom_Periodos") = value
- End Set
- End Property
- Public Property GlobalDTVtaFormaPago() As DataTable
- Get
- GlobalDTVtaFormaPago = DirectCast(Application("GlobalDTVtaFormaPago"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTVtaFormaPago") = value
- End Set
- End Property
- Property GlobalDTVtaMetodoPago() As DataTable
- Get
- GlobalDTVtaMetodoPago = DirectCast(Application("GlobalDTVtaMetodoPago"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTVtaMetodoPago") = value
- End Set
- End Property
- Property GlobalDTVtaTiposRelacion() As DataTable
- Get
- GlobalDTVtaTiposRelacion = DirectCast(Application("GlobalDTVtaTiposRelacion"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTVtaTiposRelacion") = value
- End Set
- End Property
- Property GlobalDTTiposDocumentos() As DataTable
- Get
- GlobalDTTiposDocumentos = DirectCast(Application("GlobalDTTiposDocumentos"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTTiposDocumentos") = value
- End Set
- End Property
- Property GlobalDTCobranzaEstatus(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTVtaCobranzaEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTCobranzaEstatus = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTCobranzaEstatus = DirectCast(Application("GlobalDTVtaCobranzaEstatus"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTVtaCobranzaEstatus") = value
- End Set
- End Property
-
-
-#Region "***********************************************************************DT EVENTOS****************************************************************************************"
- Property GlobalDTTiposEventos() As DataTable
- Get
- GlobalDTTiposEventos = DirectCast(Application("GlobalDTTiposEventos"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTTiposEventos") = value
- End Set
- End Property
-
- Property GlobalDTEventos() As DataTable
- Get
- GlobalDTEventos = DirectCast(Application("GlobalDTEventos"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTEventos") = value
- End Set
- End Property
-
- Property GlobalDTOIEventoTarea() As DataTable
- Get
- GlobalDTOIEventoTarea = DirectCast(Application("GlobalDTOIEventoTarea"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTOIEventoTarea") = value
- End Set
- End Property
-
- Property GlobalDTOIEstatusEventos() As DataTable
- Get
- GlobalDTOIEstatusEventos = DirectCast(Application("GlobalDTOIEstatusEventos"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTOIEstatusEventos") = value
- End Set
- End Property
-#End Region
-
-#Region " **********************************************************************DT PROSPECTOS*************************************************************************************"
- Property GlobalDTProspectosCaracteristicasClasificaciones() As DataTable
- Get
- GlobalDTProspectosCaracteristicasClasificaciones = DirectCast(Application("GlobalDTProspectosCaracteristicasClasificaciones"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTProspectosCaracteristicasClasificaciones") = value
- End Set
- End Property
- Property GlobalDTProspectosTiposCaracteristicas() As DataTable
- Get
- GlobalDTProspectosTiposCaracteristicas = DirectCast(Application("GlobalDTProspectosTiposCaracteristicas"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTProspectosCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosCaracteristicas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosCaracteristicas = DirectCast(Application("GlobalDTProspectosCaracteristicas"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTProspectosCaracteristicas") = value
- End Set
- End Property
-
- Property GlobalDTProspectosCaracteristicasOpciones() As DataTable
- Get
- GlobalDTProspectosCaracteristicasOpciones = DirectCast(Application("GlobalDTProspectosCaracteristicasOpciones"), DataTable)
- End Get
- Set(value As DataTable)
- 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)
- Application("GlobalDTActivoFijos") = value
- End Set
- End Property
- Property GlobalDTEstadoActivoFijo() As DataTable
- Get
- GlobalDTEstadoActivoFijo = DirectCast(Application("GlobalDTEstadoActivoFijo"), DataTable)
- End Get
- Set(value As DataTable)
- 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)
- 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)
- 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(Application("GlobalDTSubTipoActivoFijo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTSubTipoActivoFijo = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTSubTipoActivoFijo = DirectCast(Application("GlobalDTSubTipoActivoFijo"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTTipoActivoFijo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTTipoActivoFijo = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTTipoActivoFijo = DirectCast(Application("GlobalDTTipoActivoFijo"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTTipoActivoFijo") = value
- End Set
- End Property
-
-#End Region
-
-#Region "***********************************************************************DT GENERALES**************************************************************************************"
- Property GlobalDTGralPaises() As DataTable
- Get
- GlobalDTGralPaises = DirectCast(Application("GlobalDTGralPaises"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTGralPaises") = value
- End Set
- End Property
- Property GlobalDTGralEstados(CvePais As Integer) As DataTable
- Get
- GlobalDTGralEstados = DirectCast(Application("GlobalDTGralEstados"), DataTable).FiltraParametros(String.Format("CvePais ={0}", CvePais))
- End Get
- Set(value As DataTable)
- Application("GlobalDTGralEstados") = value
- End Set
- End Property
- Property GlobalDTGralMunicipios(CveEstado As Integer) As DataTable
- Get
- GlobalDTGralMunicipios = DirectCast(Application("GlobalDTGralMunicipios"), DataTable).FiltraParametros(String.Format("CveEstado ={0}", CveEstado))
- End Get
- Set(value As DataTable)
- Application("GlobalDTGralMunicipios") = value
- End Set
- End Property
-
- Property GlobalDTGralPoblaciones() As DataTable
- Get
- GlobalDTGralPoblaciones = DirectCast(Application("GlobalDTGralPoblaciones"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTGralCategorias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTGralCategorias = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTGralCategorias = DirectCast(Application("GlobalDTGralCategorias"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTCategorias2"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTGralCategorias2 = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTGralCategorias2 = DirectCast(Application("GlobalDTCategorias2"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTCategorias2") = value
- End Set
- End Property
-
- Property GlobalDTGralEscolaridades() As DataTable
- Get
- GlobalDTGralEscolaridades = DirectCast(Application("GlobalDTGralEscolaridades"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTGralColectivas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTGralColectivas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTGralColectivas = DirectCast(Application("GlobalDTGralColectivas"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTProspectosSupervisores"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosSupervisores = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosSupervisores = DirectCast(Application("GlobalDTProspectosSupervisores"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTProspectosCoordinadores"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProspectosCoordinadores = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTProspectosCoordinadores = DirectCast(Application("GlobalDTProspectosCoordinadores"), DataTable)
- End If
- End Get
-
- Set(value As DataTable)
- 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(Application("GlobalDTProspectosApoyos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosApoyos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosApoyos = DirectCast(Application("GlobalDTProspectosApoyos"), DataTable)
- End If
- End Get
-
- Set(value As DataTable)
- 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(Application("GlobalDTProspectosClasificaciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosClasificaciones = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosClasificaciones = DirectCast(Application("GlobalDTProspectosClasificaciones"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTProspectosEventosTipo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosEventosTipo = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosEventosTipo = DirectCast(Application("GlobalDTProspectosEventosTipo"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTProspectosEvento"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProspectosEvento = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosEvento = DirectCast(Application("GlobalDTProspectosEvento"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTProspectosEstatus"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProspectosEstatus = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosEstatus = DirectCast(Application("GlobalDTProspectosEstatus"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTProspectosApoyosTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosApoyosTipos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosApoyosTipos = DirectCast(Application("GlobalDTProspectosApoyosTipos"), DataTable)
- End If
- End Get
-
- Set(value As DataTable)
- Application("GlobalDTProspectosApoyosTipos") = value
- End Set
- End Property
- Property GlobalDTProspectosApoyosTipos() As DataTable
- Get
- GlobalDTProspectosApoyosTipos = DirectCast(Application("GlobalDTProspectosApoyosTipos"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTProspectosEncuestas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProspectosEncuestas = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTProspectosEncuestas = DirectCast(Application("GlobalDTProspectosEncuestas"), DataTable)
- End If
- End Get
-
- Set(value As DataTable)
- 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(Application("GlobalDTProspectosEncuestasPreguntas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProspectosEncuestasPreguntas = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTProspectosEncuestasPreguntas = DirectCast(Application("GlobalDTProspectosEncuestasPreguntas"), DataTable)
- End If
- End Get
-
- Set(value As DataTable)
- 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(Application("GlobalDTProspectosEncuestasRespuestas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProspectosEncuestasRespuestas = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTProspectosEncuestasRespuestas = DirectCast(Application("GlobalDTProspectosEncuestasRespuestas"), DataTable)
- End If
- End Get
-
- Set(value As DataTable)
- 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(Application("GlobalDTProspectosTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosTipos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosTipos = DirectCast(Application("GlobalDTProspectosTipos"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTProspectosSolicitudes"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosSolicitudes = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosSolicitudes = DirectCast(Application("GlobalDTProspectosSolicitudes"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTProspectosSolicitudesEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosSolicitudesEstatus = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosSolicitudesEstatus = DirectCast(Application("GlobalDTProspectosSolicitudesEstatus"), DataTable)
- End If
- End Get
-
- Set(value As DataTable)
- 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(Application("GlobalDTProspectosSolicitudesTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosSolicitudesTipos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosSolicitudesTipos = DirectCast(Application("GlobalDTProspectosSolicitudesTipos"), DataTable)
- End If
- End Get
-
- Set(value As DataTable)
- Application("GlobalDTProspectosSolicitudesTipos") = value
- End Set
- End Property
- 'Property GlobalDTProspectosSolicitudesTipos() As DataTable
- ' Get
- ' GlobalDTProspectosSolicitudesTipos = DirectCast(Application("GlobalDTProspectosSolicitudesTipos"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' 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(Application("GlobalDTProspectosSolicitudesApoyos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosSolicitudesApoyos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosSolicitudesApoyos = DirectCast(Application("GlobalDTProspectosSolicitudesApoyos"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTAC_RubrosIngreso"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTAC_FuentesRecaudacion"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTAC_FuentesRecaudacion = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_FuentesRecaudacion = DirectCast(Application("GlobalDTAC_FuentesRecaudacion"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTAC_FuentesRecaudacion") = value
- End Set
- End Property
-
- Property GlobalDTAC_FuentesFinanciamiento() As DataTable
- Get
- GlobalDTAC_FuentesFinanciamiento = DirectCast(Application("GlobalDTAC_FuentesFinanciamiento"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTAC_FuentesFinanciamiento") = value
- End Set
- End Property
- Property GlobalDTAC_OG() As DataTable
- Get
- GlobalDTAC_OG = DirectCast(Application("GlobalDTAC_OG"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTAC_ClasificadorOG"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- ' GlobalDTAC_ClasificadorOG = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTAC_ClasificadorOG = DirectCast(Application("GlobalDTAC_ClasificadorOG"), DataTable)
- ' End If
- ' End Get
- ' Set(value As DataTable)
- ' Application("GlobalDTAC_ClasificadorOG") = value
- ' End Set
- 'End Property
- Property GlobalDTAC_Ubicaciones() As DataTable
- Get
- GlobalDTAC_Ubicaciones = DirectCast(Application("GlobalDTAC_Ubicaciones"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTAC_UnidadesAdministrativas"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTAC_UnidadesAdministrativas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_UnidadesAdministrativas = DirectCast(Application("GlobalDTAC_UnidadesAdministrativas"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTAC_ClasificacionFuncional"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTAC_ClasificacionFuncional = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_ClasificacionFuncional = DirectCast(Application("GlobalDTAC_ClasificacionFuncional"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTAC_ClasificacionGeografica"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTAC_ClasificacionGeografica = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_ClasificacionGeografica = DirectCast(Application("GlobalDTAC_ClasificacionGeografica"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTAC_ClasificacionGeografica") = value
- End Set
- End Property
- Property GlobalDTAC_Cuentas() As DataTable
- Get
- GlobalDTAC_Cuentas = DirectCast(Application("GlobalDTAC_Cuentas"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTAC_Cuentas") = value
- End Set
- End Property
- Property GlobalDTAC_Finalidad() As DataTable
- Get
- GlobalDTAC_Finalidad = DirectCast(Application("GlobalDTAC_Finalidad"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTAC_Finalidad") = value
- End Set
- End Property
- 'Property GlobalDTAC_FuenteFinanciamiento() As DataTable
- ' Get
- ' GlobalDTAC_FuenteFinanciamiento = DirectCast(Application("GlobalDTAC_FuenteFinanciamiento"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' 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(Application("GlobalDTAC_FuentesFinanciamiento"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTAC_FuentesFinanciamiento = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_FuentesFinanciamiento = DirectCast(Application("GlobalDTAC_FuentesFinanciamiento"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTAC_FuentesFinanciamiento") = value
- End Set
- End Property
- Property GlobalDTAC_FuentesFinanciamientoCONAC() As DataTable
- Get
- GlobalDTAC_FuentesFinanciamientoCONAC = DirectCast(Application("GlobalDTAC_FuentesFinanciamientoCONAC"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTAC_FuentesFinanciamientoCONAC") = value
- End Set
- End Property
- Property GlobalDTAC_Funcion() As DataTable
- Get
- GlobalDTAC_Funcion = DirectCast(Application("GlobalDTAC_Funcion"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTAC_Funcion") = value
- End Set
- End Property
- Property GlobalDTAC_Programas() As DataTable
- Get
- GlobalDTAC_Programas = DirectCast(Application("GlobalDTAC_Programas"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTAC_Programas") = value
- End Set
- End Property
- Property GlobalDTAC_ProgramasCONAC() As DataTable
- Get
- GlobalDTAC_ProgramasCONAC = DirectCast(Application("GlobalDTAC_ProgramasCONAC"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTAC_ProgramasCONAC") = value
- End Set
- End Property
- Property GlobalDTAC_ProyectosProceso() As DataTable
- Get
- GlobalDTAC_ProyectosProceso = DirectCast(Application("GlobalDTAC_ProyectosProceso"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTAC_ProyectosProceso") = value
- End Set
- End Property
- Property GlobalDTAC_SubFuncion() As DataTable
- Get
- GlobalDTAC_SubFuncion = DirectCast(Application("GlobalDTAC_SubFuncion"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTAC_SubFuncion") = value
- End Set
- End Property
- Property GlobalDTAC_SubProgramas() As DataTable
- Get
- GlobalDTAC_SubProgramas = DirectCast(Application("GlobalDTAC_SubProgramas"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTAC_ClasificacionAdministrativa"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTAC_ClasificacionAdministrativa = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_ClasificacionAdministrativa = DirectCast(Application("GlobalDTAC_ClasificacionAdministrativa"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTAC_ClasificacionAdministrativa") = value
- End Set
- End Property
- Property GlobalDTAC_TipoGasto() As DataTable
- Get
- GlobalDTAC_TipoGasto = DirectCast(Application("GlobalDTAC_TipoGasto"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTAC_ProgramaOperativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTAC_ProgramaOperativo = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_ProgramaOperativo = DirectCast(Application("GlobalDTAC_ProgramaOperativo"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTAC_ProgramaOperativo") = value
- End Set
- End Property
-
- Property GlobalDTAC_MatrizIngresos() As DataTable
- Get
- GlobalDTAC_MatrizIngresos = DirectCast(Application("GlobalDTAC_MatrizIngresos"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTAC_MatrizIngresos") = value
- End Set
- End Property
-
- Property GlobalDTAC_MatrizEgresos() As DataTable
- Get
- GlobalDTAC_MatrizEgresos = DirectCast(Application("GlobalDTAC_MatrizEgresos"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTAC_PD_EjeRector"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTAC_PD_EjeRector = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_PD_EjeRector = DirectCast(Application("GlobalDTAC_PD_EjeRector"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTAC_PD_Programas"), DataTable), String.Format("CveEjeRector = {0}", CveEjeRector), "", DataViewRowState.CurrentRows)
- GlobalDTAC_PD_Programas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_PD_Programas = DirectCast(Application("GlobalDTAC_PD_Programas"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTAC_PD_Estrategias"), DataTable), String.Format("CvePrograma = {0}", CveProgramas), "", DataViewRowState.CurrentRows)
- GlobalDTAC_PD_Estrategias = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_PD_Estrategias = DirectCast(Application("GlobalDTAC_PD_Estrategias"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTAC_PD_LineasAccion"), DataTable), String.Format("CveEstrategia = {0}", CveEstrategias), "", DataViewRowState.CurrentRows)
- GlobalDTAC_PD_LineasAccion = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_PD_LineasAccion = DirectCast(Application("GlobalDTAC_PD_LineasAccion"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTAC_PD_Metas"), DataTable), String.Format("CveLineaAccion = {0}", CveLineasAccion), "", DataViewRowState.CurrentRows)
- GlobalDTAC_PD_Metas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_PD_Metas = DirectCast(Application("GlobalDTAC_PD_Metas"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Application("GlobalDTAC_PD_Metas") = value
- End Set
- End Property
-#End Region
-
-#Region "***********************************************************************GLOBAL DT ORDENES DE COMPRA***********************************************************************"
- Property GlobalDTOCEstatus(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTOCEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTOCEstatus = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTOCEstatus = DirectCast(Application("GlobalDTOCEstatus"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTOCEstatusUsuarios"), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTOCEstatusUsuarios = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTOCEstatusUsuarios = DirectCast(Application("GlobalDTOCEstatusUsuarios"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTFinan_RazonesFinancieras"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTFinan_RazonesFinancieras") = value
- End Set
- End Property
-#End Region
-
-
-#Region "***********************************************************************GLOBAL DT CONTABILIDAD****************************************************************************"
- Property GlobalDTContaPlantillasPolizas(CveEmpresa As Integer, Optional TipoPlantilla As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Or TipoPlantilla <> -1 Then
- Dim Str As New StringBuilder
- If CveEmpresa <> -1 Then Str.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
- If TipoPlantilla <> -1 Then Str.AppendFormat(" AND TipoPlantilla = {0}", TipoPlantilla)
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTContaPlantillasPolizas"), DataTable), Str.ToString.Substring(5), "", DataViewRowState.CurrentRows)
- GlobalDTContaPlantillasPolizas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTContaPlantillasPolizas = DirectCast(Application("GlobalDTContaPlantillasPolizas"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Application("GlobalDTContaPlantillasPolizas") = value
- End Set
- End Property
-
- Property GlobalDTContaPlantillasPolizasDetalle(CvePlantillaPoliza As Integer) As DataTable
- Get
- If CvePlantillaPoliza <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTContaPlantillasPolizasDetalle"), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "", DataViewRowState.CurrentRows)
- GlobalDTContaPlantillasPolizasDetalle = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTContaPlantillasPolizasDetalle = DirectCast(Application("GlobalDTContaPlantillasPolizasDetalle"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Application("GlobalDTContaPlantillasPolizasDetalle") = value
- End Set
- End Property
-
-
-
- Property GlobalDTContaConceptosContables(CvePlantillaPoliza As Integer) As DataTable
- Get
- If CvePlantillaPoliza <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTContaConceptosContables"), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "", DataViewRowState.CurrentRows)
- GlobalDTContaConceptosContables = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTContaConceptosContables = DirectCast(Application("GlobalDTContaConceptosContables"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Application("GlobalDTContaConceptosContables") = value
- End Set
- End Property
-#End Region
-
-#Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************"
- Property GlobalDTAsistenciaDetalle() As DataTable
- Get
- GlobalDTAsistenciaDetalle = DirectCast(Application("GlobalDTAsistenciaDetalle"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTAsistenciaDetalle") = value
- End Set
- End Property
- Property GlobalDTAsistenciasInasistencias() As DataTable
- Get
- GlobalDTAsistenciasInasistencias = DirectCast(Application("GlobalDTAsistenciasInasistencias"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTAsistenciasInasistencias") = value
- End Set
- End Property
- Property GlobalDTEstatusPersonal() As DataTable
- Get
- GlobalDTEstatusPersonal = DirectCast(Application("GlobalDTEstatusPersonal"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTEstatusPersonal") = value
- End Set
- End Property
-
+ Dim Str As New StringBuilder
+ Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
+ If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
+ If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
+
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTAlmacen = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTAlmacen = DirectCast(Application("GlobalDTAlmacen"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAlmacen") = value
+ End Set
+ End Property
+ Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1, Optional CveEstatus As Integer = 1) As DataTable
+ Get
+ If CveEmpresa <> -1 Then
+ Dim Str As New StringBuilder
+ Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
+ If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
+ If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
+
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacenUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTAlmacenUsuarios = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTAlmacenUsuarios = DirectCast(Application("GlobalDTAlmacenUsuarios"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAlmacenUsuarios") = value
+ End Set
+ End Property
+ Property GlobalDTNom_Periodos() As DataTable
+ Get
+ GlobalDTNom_Periodos = DirectCast(Application("GlobalDTNom_Periodos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTNom_Periodos") = value
+ End Set
+ End Property
+ Public Property GlobalDTVtaFormaPago() As DataTable
+ Get
+ GlobalDTVtaFormaPago = DirectCast(Application("GlobalDTVtaFormaPago"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTVtaFormaPago") = value
+ End Set
+ End Property
+ Property GlobalDTVtaMetodoPago() As DataTable
+ Get
+ GlobalDTVtaMetodoPago = DirectCast(Application("GlobalDTVtaMetodoPago"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTVtaMetodoPago") = value
+ End Set
+ End Property
+ Property GlobalDTVtaTiposRelacion() As DataTable
+ Get
+ GlobalDTVtaTiposRelacion = DirectCast(Application("GlobalDTVtaTiposRelacion"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTVtaTiposRelacion") = value
+ End Set
+ End Property
+ Property GlobalDTTiposDocumentos() As DataTable
+ Get
+ GlobalDTTiposDocumentos = DirectCast(Application("GlobalDTTiposDocumentos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTTiposDocumentos") = value
+ End Set
+ End Property
+ Property GlobalDTCobranzaEstatus(CveEmpresa As Integer) As DataTable
+ Get
+ If CveEmpresa <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTVtaCobranzaEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTCobranzaEstatus = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTCobranzaEstatus = DirectCast(Application("GlobalDTVtaCobranzaEstatus"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTVtaCobranzaEstatus") = value
+ End Set
+ End Property
+
+
+#Region "***********************************************************************DT EVENTOS****************************************************************************************"
+ Property GlobalDTTiposEventos() As DataTable
+ Get
+ GlobalDTTiposEventos = DirectCast(Application("GlobalDTTiposEventos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTTiposEventos") = value
+ End Set
+ End Property
+
+ Property GlobalDTEventos() As DataTable
+ Get
+ GlobalDTEventos = DirectCast(Application("GlobalDTEventos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTEventos") = value
+ End Set
+ End Property
+
+ Property GlobalDTOIEventoTarea() As DataTable
+ Get
+ GlobalDTOIEventoTarea = DirectCast(Application("GlobalDTOIEventoTarea"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTOIEventoTarea") = value
+ End Set
+ End Property
+
+ Property GlobalDTOIEstatusEventos() As DataTable
+ Get
+ GlobalDTOIEstatusEventos = DirectCast(Application("GlobalDTOIEstatusEventos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTOIEstatusEventos") = value
+ End Set
+ End Property
+#End Region
+
+#Region " **********************************************************************DT PROSPECTOS*************************************************************************************"
+ Property GlobalDTProspectosCaracteristicasClasificaciones() As DataTable
+ Get
+ GlobalDTProspectosCaracteristicasClasificaciones = DirectCast(Application("GlobalDTProspectosCaracteristicasClasificaciones"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTProspectosCaracteristicasClasificaciones") = value
+ End Set
+ End Property
+ Property GlobalDTProspectosTiposCaracteristicas() As DataTable
+ Get
+ GlobalDTProspectosTiposCaracteristicas = DirectCast(Application("GlobalDTProspectosTiposCaracteristicas"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTProspectosCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosCaracteristicas = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProspectosCaracteristicas = DirectCast(Application("GlobalDTProspectosCaracteristicas"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTProspectosCaracteristicas") = value
+ End Set
+ End Property
+
+ Property GlobalDTProspectosCaracteristicasOpciones() As DataTable
+ Get
+ GlobalDTProspectosCaracteristicasOpciones = DirectCast(Application("GlobalDTProspectosCaracteristicasOpciones"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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)
+ Application("GlobalDTActivoFijos") = value
+ End Set
+ End Property
+ Property GlobalDTEstadoActivoFijo() As DataTable
+ Get
+ GlobalDTEstadoActivoFijo = DirectCast(Application("GlobalDTEstadoActivoFijo"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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)
+ 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)
+ 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(Application("GlobalDTSubTipoActivoFijo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTSubTipoActivoFijo = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTSubTipoActivoFijo = DirectCast(Application("GlobalDTSubTipoActivoFijo"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTTipoActivoFijo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTTipoActivoFijo = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTTipoActivoFijo = DirectCast(Application("GlobalDTTipoActivoFijo"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTTipoActivoFijo") = value
+ End Set
+ End Property
+
+#End Region
+
+#Region "***********************************************************************DT GENERALES**************************************************************************************"
+ Property GlobalDTGralPaises() As DataTable
+ Get
+ GlobalDTGralPaises = DirectCast(Application("GlobalDTGralPaises"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTGralPaises") = value
+ End Set
+ End Property
+ Property GlobalDTGralEstados(CvePais As Integer) As DataTable
+ Get
+ GlobalDTGralEstados = DirectCast(Application("GlobalDTGralEstados"), DataTable).FiltraParametros(String.Format("CvePais ={0}", CvePais))
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTGralEstados") = value
+ End Set
+ End Property
+ Property GlobalDTGralMunicipios(CveEstado As Integer) As DataTable
+ Get
+ GlobalDTGralMunicipios = DirectCast(Application("GlobalDTGralMunicipios"), DataTable).FiltraParametros(String.Format("CveEstado ={0}", CveEstado))
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTGralMunicipios") = value
+ End Set
+ End Property
+
+ Property GlobalDTGralPoblaciones() As DataTable
+ Get
+ GlobalDTGralPoblaciones = DirectCast(Application("GlobalDTGralPoblaciones"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTGralCategorias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTGralCategorias = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTGralCategorias = DirectCast(Application("GlobalDTGralCategorias"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTCategorias2"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTGralCategorias2 = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTGralCategorias2 = DirectCast(Application("GlobalDTCategorias2"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTCategorias2") = value
+ End Set
+ End Property
+
+ Property GlobalDTGralEscolaridades() As DataTable
+ Get
+ GlobalDTGralEscolaridades = DirectCast(Application("GlobalDTGralEscolaridades"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTGralColectivas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTGralColectivas = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTGralColectivas = DirectCast(Application("GlobalDTGralColectivas"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTProspectosSupervisores"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosSupervisores = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProspectosSupervisores = DirectCast(Application("GlobalDTProspectosSupervisores"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTProspectosCoordinadores"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosCoordinadores = Dv.ToTable
+ Dv.Dispose()
+
+ Else
+ GlobalDTProspectosCoordinadores = DirectCast(Application("GlobalDTProspectosCoordinadores"), DataTable)
+ End If
+ End Get
+
+ Set(value As DataTable)
+ 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(Application("GlobalDTProspectosApoyos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosApoyos = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProspectosApoyos = DirectCast(Application("GlobalDTProspectosApoyos"), DataTable)
+ End If
+ End Get
+
+ Set(value As DataTable)
+ 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(Application("GlobalDTProspectosClasificaciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosClasificaciones = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProspectosClasificaciones = DirectCast(Application("GlobalDTProspectosClasificaciones"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTProspectosEventosTipo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosEventosTipo = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProspectosEventosTipo = DirectCast(Application("GlobalDTProspectosEventosTipo"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTProspectosEvento"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosEvento = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProspectosEvento = DirectCast(Application("GlobalDTProspectosEvento"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTProspectosEstatus"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosEstatus = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProspectosEstatus = DirectCast(Application("GlobalDTProspectosEstatus"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTProspectosApoyosTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosApoyosTipos = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProspectosApoyosTipos = DirectCast(Application("GlobalDTProspectosApoyosTipos"), DataTable)
+ End If
+ End Get
+
+ Set(value As DataTable)
+ Application("GlobalDTProspectosApoyosTipos") = value
+ End Set
+ End Property
+ Property GlobalDTProspectosApoyosTipos() As DataTable
+ Get
+ GlobalDTProspectosApoyosTipos = DirectCast(Application("GlobalDTProspectosApoyosTipos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTProspectosEncuestas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosEncuestas = Dv.ToTable
+ Dv.Dispose()
+
+ Else
+ GlobalDTProspectosEncuestas = DirectCast(Application("GlobalDTProspectosEncuestas"), DataTable)
+ End If
+ End Get
+
+ Set(value As DataTable)
+ 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(Application("GlobalDTProspectosEncuestasPreguntas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosEncuestasPreguntas = Dv.ToTable
+ Dv.Dispose()
+
+ Else
+ GlobalDTProspectosEncuestasPreguntas = DirectCast(Application("GlobalDTProspectosEncuestasPreguntas"), DataTable)
+ End If
+ End Get
+
+ Set(value As DataTable)
+ 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(Application("GlobalDTProspectosEncuestasRespuestas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosEncuestasRespuestas = Dv.ToTable
+ Dv.Dispose()
+
+ Else
+ GlobalDTProspectosEncuestasRespuestas = DirectCast(Application("GlobalDTProspectosEncuestasRespuestas"), DataTable)
+ End If
+ End Get
+
+ Set(value As DataTable)
+ 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(Application("GlobalDTProspectosTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosTipos = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProspectosTipos = DirectCast(Application("GlobalDTProspectosTipos"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTProspectosSolicitudes"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosSolicitudes = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProspectosSolicitudes = DirectCast(Application("GlobalDTProspectosSolicitudes"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTProspectosSolicitudesEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosSolicitudesEstatus = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProspectosSolicitudesEstatus = DirectCast(Application("GlobalDTProspectosSolicitudesEstatus"), DataTable)
+ End If
+ End Get
+
+ Set(value As DataTable)
+ 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(Application("GlobalDTProspectosSolicitudesTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosSolicitudesTipos = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProspectosSolicitudesTipos = DirectCast(Application("GlobalDTProspectosSolicitudesTipos"), DataTable)
+ End If
+ End Get
+
+ Set(value As DataTable)
+ Application("GlobalDTProspectosSolicitudesTipos") = value
+ End Set
+ End Property
+ 'Property GlobalDTProspectosSolicitudesTipos() As DataTable
+ ' Get
+ ' GlobalDTProspectosSolicitudesTipos = DirectCast(Application("GlobalDTProspectosSolicitudesTipos"), DataTable)
+ ' End Get
+ ' Set(value As DataTable)
+ ' 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(Application("GlobalDTProspectosSolicitudesApoyos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTProspectosSolicitudesApoyos = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTProspectosSolicitudesApoyos = DirectCast(Application("GlobalDTProspectosSolicitudesApoyos"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTAC_RubrosIngreso"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTAC_FuentesRecaudacion"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
+ GlobalDTAC_FuentesRecaudacion = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTAC_FuentesRecaudacion = DirectCast(Application("GlobalDTAC_FuentesRecaudacion"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAC_FuentesRecaudacion") = value
+ End Set
+ End Property
+
+ Property GlobalDTAC_FuentesFinanciamiento() As DataTable
+ Get
+ GlobalDTAC_FuentesFinanciamiento = DirectCast(Application("GlobalDTAC_FuentesFinanciamiento"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAC_FuentesFinanciamiento") = value
+ End Set
+ End Property
+ Property GlobalDTAC_OG() As DataTable
+ Get
+ GlobalDTAC_OG = DirectCast(Application("GlobalDTAC_OG"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTAC_ClasificadorOG"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
+ ' GlobalDTAC_ClasificadorOG = Dv.ToTable
+ ' Dv.Dispose()
+ ' Else
+ ' GlobalDTAC_ClasificadorOG = DirectCast(Application("GlobalDTAC_ClasificadorOG"), DataTable)
+ ' End If
+ ' End Get
+ ' Set(value As DataTable)
+ ' Application("GlobalDTAC_ClasificadorOG") = value
+ ' End Set
+ 'End Property
+ Property GlobalDTAC_Ubicaciones() As DataTable
+ Get
+ GlobalDTAC_Ubicaciones = DirectCast(Application("GlobalDTAC_Ubicaciones"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTAC_UnidadesAdministrativas"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
+ GlobalDTAC_UnidadesAdministrativas = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTAC_UnidadesAdministrativas = DirectCast(Application("GlobalDTAC_UnidadesAdministrativas"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTAC_ClasificacionFuncional"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTAC_ClasificacionFuncional = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTAC_ClasificacionFuncional = DirectCast(Application("GlobalDTAC_ClasificacionFuncional"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTAC_ClasificacionGeografica"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTAC_ClasificacionGeografica = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTAC_ClasificacionGeografica = DirectCast(Application("GlobalDTAC_ClasificacionGeografica"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAC_ClasificacionGeografica") = value
+ End Set
+ End Property
+ Property GlobalDTAC_Cuentas() As DataTable
+ Get
+ GlobalDTAC_Cuentas = DirectCast(Application("GlobalDTAC_Cuentas"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAC_Cuentas") = value
+ End Set
+ End Property
+ Property GlobalDTAC_Finalidad() As DataTable
+ Get
+ GlobalDTAC_Finalidad = DirectCast(Application("GlobalDTAC_Finalidad"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAC_Finalidad") = value
+ End Set
+ End Property
+ 'Property GlobalDTAC_FuenteFinanciamiento() As DataTable
+ ' Get
+ ' GlobalDTAC_FuenteFinanciamiento = DirectCast(Application("GlobalDTAC_FuenteFinanciamiento"), DataTable)
+ ' End Get
+ ' Set(value As DataTable)
+ ' 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(Application("GlobalDTAC_FuentesFinanciamiento"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
+ GlobalDTAC_FuentesFinanciamiento = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTAC_FuentesFinanciamiento = DirectCast(Application("GlobalDTAC_FuentesFinanciamiento"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAC_FuentesFinanciamiento") = value
+ End Set
+ End Property
+ Property GlobalDTAC_FuentesFinanciamientoCONAC() As DataTable
+ Get
+ GlobalDTAC_FuentesFinanciamientoCONAC = DirectCast(Application("GlobalDTAC_FuentesFinanciamientoCONAC"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAC_FuentesFinanciamientoCONAC") = value
+ End Set
+ End Property
+ Property GlobalDTAC_Funcion() As DataTable
+ Get
+ GlobalDTAC_Funcion = DirectCast(Application("GlobalDTAC_Funcion"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAC_Funcion") = value
+ End Set
+ End Property
+ Property GlobalDTAC_Programas() As DataTable
+ Get
+ GlobalDTAC_Programas = DirectCast(Application("GlobalDTAC_Programas"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAC_Programas") = value
+ End Set
+ End Property
+ Property GlobalDTAC_ProgramasCONAC() As DataTable
+ Get
+ GlobalDTAC_ProgramasCONAC = DirectCast(Application("GlobalDTAC_ProgramasCONAC"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAC_ProgramasCONAC") = value
+ End Set
+ End Property
+ Property GlobalDTAC_ProyectosProceso() As DataTable
+ Get
+ GlobalDTAC_ProyectosProceso = DirectCast(Application("GlobalDTAC_ProyectosProceso"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAC_ProyectosProceso") = value
+ End Set
+ End Property
+ Property GlobalDTAC_SubFuncion() As DataTable
+ Get
+ GlobalDTAC_SubFuncion = DirectCast(Application("GlobalDTAC_SubFuncion"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAC_SubFuncion") = value
+ End Set
+ End Property
+ Property GlobalDTAC_SubProgramas() As DataTable
+ Get
+ GlobalDTAC_SubProgramas = DirectCast(Application("GlobalDTAC_SubProgramas"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTAC_ClasificacionAdministrativa"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTAC_ClasificacionAdministrativa = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTAC_ClasificacionAdministrativa = DirectCast(Application("GlobalDTAC_ClasificacionAdministrativa"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAC_ClasificacionAdministrativa") = value
+ End Set
+ End Property
+ Property GlobalDTAC_TipoGasto() As DataTable
+ Get
+ GlobalDTAC_TipoGasto = DirectCast(Application("GlobalDTAC_TipoGasto"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTAC_ProgramaOperativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTAC_ProgramaOperativo = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTAC_ProgramaOperativo = DirectCast(Application("GlobalDTAC_ProgramaOperativo"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAC_ProgramaOperativo") = value
+ End Set
+ End Property
+
+ Property GlobalDTAC_MatrizIngresos() As DataTable
+ Get
+ GlobalDTAC_MatrizIngresos = DirectCast(Application("GlobalDTAC_MatrizIngresos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAC_MatrizIngresos") = value
+ End Set
+ End Property
+
+ Property GlobalDTAC_MatrizEgresos() As DataTable
+ Get
+ GlobalDTAC_MatrizEgresos = DirectCast(Application("GlobalDTAC_MatrizEgresos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTAC_PD_EjeRector"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTAC_PD_EjeRector = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTAC_PD_EjeRector = DirectCast(Application("GlobalDTAC_PD_EjeRector"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTAC_PD_Programas"), DataTable), String.Format("CveEjeRector = {0}", CveEjeRector), "", DataViewRowState.CurrentRows)
+ GlobalDTAC_PD_Programas = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTAC_PD_Programas = DirectCast(Application("GlobalDTAC_PD_Programas"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTAC_PD_Estrategias"), DataTable), String.Format("CvePrograma = {0}", CveProgramas), "", DataViewRowState.CurrentRows)
+ GlobalDTAC_PD_Estrategias = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTAC_PD_Estrategias = DirectCast(Application("GlobalDTAC_PD_Estrategias"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTAC_PD_LineasAccion"), DataTable), String.Format("CveEstrategia = {0}", CveEstrategias), "", DataViewRowState.CurrentRows)
+ GlobalDTAC_PD_LineasAccion = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTAC_PD_LineasAccion = DirectCast(Application("GlobalDTAC_PD_LineasAccion"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTAC_PD_Metas"), DataTable), String.Format("CveLineaAccion = {0}", CveLineasAccion), "", DataViewRowState.CurrentRows)
+ GlobalDTAC_PD_Metas = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTAC_PD_Metas = DirectCast(Application("GlobalDTAC_PD_Metas"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAC_PD_Metas") = value
+ End Set
+ End Property
+#End Region
+
+#Region "***********************************************************************GLOBAL DT ORDENES DE COMPRA***********************************************************************"
+ Property GlobalDTOCEstatus(CveEmpresa As Integer) As DataTable
+ Get
+ If CveEmpresa <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTOCEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ GlobalDTOCEstatus = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTOCEstatus = DirectCast(Application("GlobalDTOCEstatus"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTOCEstatusUsuarios"), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTOCEstatusUsuarios = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTOCEstatusUsuarios = DirectCast(Application("GlobalDTOCEstatusUsuarios"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTFinan_RazonesFinancieras"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTFinan_RazonesFinancieras") = value
+ End Set
+ End Property
+#End Region
+
+
+#Region "***********************************************************************GLOBAL DT CONTABILIDAD****************************************************************************"
+ Property GlobalDTContaPlantillasPolizas(CveEmpresa As Integer, Optional TipoPlantilla As Integer = -1) As DataTable
+ Get
+ If CveEmpresa <> -1 Or TipoPlantilla <> -1 Then
+ Dim Str As New StringBuilder
+ If CveEmpresa <> -1 Then Str.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
+ If TipoPlantilla <> -1 Then Str.AppendFormat(" AND TipoPlantilla = {0}", TipoPlantilla)
+
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTContaPlantillasPolizas"), DataTable), Str.ToString.Substring(5), "", DataViewRowState.CurrentRows)
+ GlobalDTContaPlantillasPolizas = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTContaPlantillasPolizas = DirectCast(Application("GlobalDTContaPlantillasPolizas"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTContaPlantillasPolizas") = value
+ End Set
+ End Property
+
+ Property GlobalDTContaPlantillasPolizasDetalle(CvePlantillaPoliza As Integer) As DataTable
+ Get
+ If CvePlantillaPoliza <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTContaPlantillasPolizasDetalle"), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "", DataViewRowState.CurrentRows)
+ GlobalDTContaPlantillasPolizasDetalle = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTContaPlantillasPolizasDetalle = DirectCast(Application("GlobalDTContaPlantillasPolizasDetalle"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTContaPlantillasPolizasDetalle") = value
+ End Set
+ End Property
+
+
+
+ Property GlobalDTContaConceptosContables(CvePlantillaPoliza As Integer) As DataTable
+ Get
+ If CvePlantillaPoliza <> -1 Then
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTContaConceptosContables"), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "", DataViewRowState.CurrentRows)
+ GlobalDTContaConceptosContables = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTContaConceptosContables = DirectCast(Application("GlobalDTContaConceptosContables"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTContaConceptosContables") = value
+ End Set
+ End Property
+#End Region
+
+#Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************"
+ Property GlobalDTAsistenciaDetalle() As DataTable
+ Get
+ GlobalDTAsistenciaDetalle = DirectCast(Application("GlobalDTAsistenciaDetalle"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAsistenciaDetalle") = value
+ End Set
+ End Property
+ Property GlobalDTAsistenciasInasistencias() As DataTable
+ Get
+ GlobalDTAsistenciasInasistencias = DirectCast(Application("GlobalDTAsistenciasInasistencias"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAsistenciasInasistencias") = value
+ End Set
+ End Property
+ Property GlobalDTEstatusPersonal() As DataTable
+ Get
+ GlobalDTEstatusPersonal = DirectCast(Application("GlobalDTEstatusPersonal"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTEstatusPersonal") = value
+ End Set
+ End Property
+
Property GlobalDTRHPersonal(CveEmpresa As Integer, Optional CvePersonal As Integer = -1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTRHPersonal{0}", CveEmpresa)
- 'sino existe, recarga los datos
+ Get
+ Dim AppNombre As String = String.Format("GlobalDTRHPersonal{0}", CveEmpresa)
+ 'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetPersonal(-1, CveEmpresa) Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
- If CveEmpresa <> -1 Or CvePersonal <> -1 Then
+ If CveEmpresa <> -1 Or CvePersonal <> -1 Then
Dim Str As StringBuilder = New StringBuilder()
If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If CvePersonal <> -1 Then Str.AppendFormat(" {0} CvePersonal = {1}", If(Str.Length > 0, "AND", ""), CvePersonal)
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTRHPersonal = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTRHPersonal = DirectCast(Application(AppNombre), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTRHPersonal = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTRHPersonal = DirectCast(Application(AppNombre), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTRHPersonal{0}", CveEmpresa)
Application(AppNombre) = value
End Set
- End Property
-
-
- Property GlobalDTDepartamentos() As DataTable
- Get
- GlobalDTDepartamentos = DirectCast(Application("GlobalDTDepartamentos"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTRHPuestos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTRHPuestos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTRHPuestos = DirectCast(Application("GlobalDTRHPuestos"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Application("GlobalDTRHPuestos") = value
- End Set
- End Property
- Property GlobalDTEscolaridad() As DataTable
- Get
- GlobalDTEscolaridad = DirectCast(Application("GlobalDTEscolaridad"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTEscolaridad") = value
- End Set
- End Property
- Property GlobalDTEstadoCivil() As DataTable
- Get
- GlobalDTEstadoCivil = DirectCast(Application("GlobalDTEstadoCivil"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTEstadoCivil") = value
- End Set
- End Property
- Property GlobalDTDocumentos() As DataTable
- Get
- GlobalDTDocumentos = DirectCast(Application("GlobalDTDocumentos"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTDocumentos") = value
- End Set
- End Property
- Property GlobalDTGenero() As DataTable
- Get
- GlobalDTGenero = DirectCast(Application("GlobalDTGenero"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTGenero") = value
- End Set
- End Property
- Property GlobalDTMotivoBaja() As DataTable
- Get
- GlobalDTMotivoBaja = DirectCast(Application("GlobalDTMotivoBaja"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTMotivoBaja") = value
- End Set
- End Property
- Property GlobalDTTiposContrato() As DataTable
- Get
- GlobalDTTiposContrato = DirectCast(Application("GlobalDTTiposContrato"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTTiposContrato") = value
- End Set
- End Property
- Property GlobalDTRutas() As DataTable
- Get
- GlobalDTRutas = DirectCast(Application("GlobalDTRutas"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTRutas") = value
- End Set
- End Property
- Property GlobalDTTurno() As DataTable
- Get
- GlobalDTTurno = DirectCast(Application("GlobalDTTurno"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTTurno") = value
- End Set
- End Property
- Property GlobalDTJornadas() As DataTable
- Get
- GlobalDTJornadas = DirectCast(Application("GlobalDTJornadas"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTJornadas") = value
- End Set
- End Property
- Property GlobalDTMotivosHorasExtras() As DataTable
- Get
- GlobalDTMotivosHorasExtras = DirectCast(Application("GlobalDTMotivosHorasExtras"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTMotivosHorasExtras") = value
- End Set
- End Property
- Property GlobalDTTipoBuzon() As DataTable
- Get
- GlobalDTTipoBuzon = DirectCast(Application("GlobalDTTipoBuzon"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTCombustibles"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTCombustibles = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTCombustibles = DirectCast(Application("GlobalDTCombustibles"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTCombustiblesTipos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTCombustiblesTipos = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTCombustiblesTipos = DirectCast(Application("GlobalDTCombustiblesTipos"), DataTable)
- End If
- End Get
- Set(ByVal value As DataTable)
- 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(Application("GlobalDTMantenimientosTipos"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTMantenimientosTipos") = value
- End Set
- End Property
-
- Property GlobalDTMantenimientos() As DataTable
- Get
- GlobalDTMantenimientos = DirectCast(Application("GlobalDTMantenimientos"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTMantenimientosTipos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTMantenimientosTipos = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTMantenimientosTipos = DirectCast(Application("GlobalDTMantenimientosTipos"), DataTable)
- End If
- End Get
- Set(ByVal value As DataTable)
-
- 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(Application("GlobalDTTalleresTipos"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTTalleresTipos") = value
- End Set
- End Property
-
- Property GlobalDTTalleres() As DataTable
- Get
- GlobalDTTalleres = DirectCast(Application("GlobalDTTalleres"), DataTable)
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTDistribuidoresTipos"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTDistribuidoresTipos") = value
- End Set
- End Property
-
- Property GlobalDTDistribuidores() As DataTable
- Get
- GlobalDTDistribuidores = DirectCast(Application("GlobalDTDistribuidores"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTDistribuidores") = value
- End Set
- End Property
-
-#End Region
-
- Public Class SisParametro
- Public Property CveParametro As Integer
- Public Property CveModulo As Integer
- Public Property Descripcion As String
- Public Property Cadena1 As String
- Public Property Cadena2 As String
- Public Property Numero1 As Integer
- Public Property Numero2 As Integer
- Public Property Fecha1 As DateTime
- Public Property Fecha2 As DateTime
- Public Property FechaVencimiento As DateTime
- End Class
-
- ReadOnly Property GlobalDTParametros(CveParametro As SisParametros) As SisParametro
- Get
-
- Dim dr As DataRow = DirectCast(Application("GlobalDTParametros"), DataTable).FiltroPrimero("CveParametro =" & CveParametro, "")
-
- If dr IsNot Nothing Then
- Dim Par As New SisParametro
- Par.CveParametro = dr("CveParametro").ToString.ToEntero
- Par.CveModulo = dr("CveModulo").ToString.ToEntero
- Par.Descripcion = dr("Descripcion").ToString
- Par.Cadena1 = dr("StrValor1").ToString
- Par.Cadena2 = dr("StrValor2").ToString
- Par.Numero1 = dr("NumValor1").ToString.ToEntero
- Par.Numero2 = dr("NumValor2").ToString.ToEntero
- Par.Fecha1 = dr("DTValor1").ToString.ToDate
- Par.Fecha2 = dr("DTValor2").ToString.ToDate
- Par.FechaVencimiento = dr("FechaVencimiento").ToString.ToDate
- GlobalDTParametros = Par
- Else
- GlobalDTParametros = Nothing
- End If
-
- End Get
- End Property
-
- Property GlobalDTOIRevision(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(Application("GlobalDTOIRevision"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTOIRevision = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTOIRevision = DirectCast(Application("GlobalDTOIRevision"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTOIRevision") = value
- End Set
- End Property
- Property GlobalDTOIAgendaTipo() As DataTable
- Get
- GlobalDTOIAgendaTipo = DirectCast(Application("GlobalDTOIAgendaTipo"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTOIAgendaTipo") = value
- End Set
- End Property
- Property GlobalDTOIAgenda() As DataTable
- Get
- GlobalDTOIAgenda = DirectCast(Application("GlobalDTOIAgenda"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTOIAgenda") = value
- End Set
- End Property
- Property GlobalDTVtaCondicionesEntrega(Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(Application("GlobalDTVtaCondicionesEntrega"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTVtaCondicionesEntrega = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTVtaCondicionesEntrega = DirectCast(Application("GlobalDTVtaCondicionesEntrega"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(Application("GlobalDTPaqueteriaGuiaTipos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTPaqueteriaGuiaTipos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTPaqueteriaGuiaTipos = DirectCast(Application("GlobalDTPaqueteriaGuiaTipos"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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
-
- Get
- Dim Str As StringBuilder = New StringBuilder()
- If CveEmpresa <> -1 Or CveClasicacionPorcentaje <> -1 Or CveClasicacion <> -1 Or PorcentajeIVA <> -1 Then
- If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveClasicacionPorcentaje <> -1 Then Str.AppendFormat(" {0} CveClasicacionPorcentaje = {1}", If(Str.Length > 0, "AND", ""), CveClasicacionPorcentaje)
- If CveClasicacion <> -1 Then Str.AppendFormat(" {0} CveClasicacion = {1}", If(Str.Length > 0, "AND", ""), CveClasicacion)
- If PorcentajeIVA <> -1 Then Str.AppendFormat(" {0} PorcentajeIVA = {1}", If(Str.Length > 0, "AND", ""), PorcentajeIVA)
- Dim Dv As New DataView(DirectCast(Application("GlobalDTClasificacionPorcentaje"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionPorcentaje = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionPorcentaje = DirectCast(Application("GlobalDTClasificacionPorcentaje"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Application("GlobalDTClasificacionPorcentaje") = value
- End Set
- End Property
- Property GlobalDTPaqueterias() As DataTable
- Get
- GlobalDTPaqueterias = DirectCast(Application("GlobalDTPaqueterias"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTPaqueterias") = value
- End Set
- End Property
- Property GlobalDTAcumTiposDefecto() 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
- Property GlobalDTAcumGarantiasMesesTipoUso(CveEmpresa As Integer, CveMarca As Integer) As DataTable
+
+ Property GlobalDTDepartamentos() As DataTable
+ Get
+ GlobalDTDepartamentos = DirectCast(Application("GlobalDTDepartamentos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTRHPuestos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
+ GlobalDTRHPuestos = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTRHPuestos = DirectCast(Application("GlobalDTRHPuestos"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTRHPuestos") = value
+ End Set
+ End Property
+ Property GlobalDTEscolaridad() As DataTable
+ Get
+ GlobalDTEscolaridad = DirectCast(Application("GlobalDTEscolaridad"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTEscolaridad") = value
+ End Set
+ End Property
+ Property GlobalDTEstadoCivil() As DataTable
+ Get
+ GlobalDTEstadoCivil = DirectCast(Application("GlobalDTEstadoCivil"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTEstadoCivil") = value
+ End Set
+ End Property
+ Property GlobalDTDocumentos() As DataTable
+ Get
+ GlobalDTDocumentos = DirectCast(Application("GlobalDTDocumentos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTDocumentos") = value
+ End Set
+ End Property
+ Property GlobalDTGenero() As DataTable
+ Get
+ GlobalDTGenero = DirectCast(Application("GlobalDTGenero"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTGenero") = value
+ End Set
+ End Property
+ Property GlobalDTMotivoBaja() As DataTable
+ Get
+ GlobalDTMotivoBaja = DirectCast(Application("GlobalDTMotivoBaja"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTMotivoBaja") = value
+ End Set
+ End Property
+ Property GlobalDTTiposContrato() As DataTable
+ Get
+ GlobalDTTiposContrato = DirectCast(Application("GlobalDTTiposContrato"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTTiposContrato") = value
+ End Set
+ End Property
+ Property GlobalDTRutas() As DataTable
+ Get
+ GlobalDTRutas = DirectCast(Application("GlobalDTRutas"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTRutas") = value
+ End Set
+ End Property
+ Property GlobalDTTurno() As DataTable
+ Get
+ GlobalDTTurno = DirectCast(Application("GlobalDTTurno"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTTurno") = value
+ End Set
+ End Property
+ Property GlobalDTJornadas() As DataTable
+ Get
+ GlobalDTJornadas = DirectCast(Application("GlobalDTJornadas"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTJornadas") = value
+ End Set
+ End Property
+ Property GlobalDTMotivosHorasExtras() As DataTable
+ Get
+ GlobalDTMotivosHorasExtras = DirectCast(Application("GlobalDTMotivosHorasExtras"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTMotivosHorasExtras") = value
+ End Set
+ End Property
+ Property GlobalDTTipoBuzon() As DataTable
+ Get
+ GlobalDTTipoBuzon = DirectCast(Application("GlobalDTTipoBuzon"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTCombustibles"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTCombustibles = Dv.ToTable
+ Dv.Dispose()
+
+ Else
+ GlobalDTCombustibles = DirectCast(Application("GlobalDTCombustibles"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTCombustiblesTipos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTCombustiblesTipos = Dv.ToTable
+ Dv.Dispose()
+
+ Else
+ GlobalDTCombustiblesTipos = DirectCast(Application("GlobalDTCombustiblesTipos"), DataTable)
+ End If
+ End Get
+ Set(ByVal value As DataTable)
+ 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(Application("GlobalDTMantenimientosTipos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTMantenimientosTipos") = value
+ End Set
+ End Property
+
+ Property GlobalDTMantenimientos() As DataTable
+ Get
+ GlobalDTMantenimientos = DirectCast(Application("GlobalDTMantenimientos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTMantenimientosTipos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTMantenimientosTipos = Dv.ToTable
+ Dv.Dispose()
+
+ Else
+ GlobalDTMantenimientosTipos = DirectCast(Application("GlobalDTMantenimientosTipos"), DataTable)
+ End If
+ End Get
+ Set(ByVal value As DataTable)
+
+ 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(Application("GlobalDTTalleresTipos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTTalleresTipos") = value
+ End Set
+ End Property
+
+ Property GlobalDTTalleres() As DataTable
+ Get
+ GlobalDTTalleres = DirectCast(Application("GlobalDTTalleres"), DataTable)
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTDistribuidoresTipos"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTDistribuidoresTipos") = value
+ End Set
+ End Property
+
+ Property GlobalDTDistribuidores() As DataTable
+ Get
+ GlobalDTDistribuidores = DirectCast(Application("GlobalDTDistribuidores"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTDistribuidores") = value
+ End Set
+ End Property
+
+#End Region
+
+ Public Class SisParametro
+ Public Property CveParametro As Integer
+ Public Property CveModulo As Integer
+ Public Property Descripcion As String
+ Public Property Cadena1 As String
+ Public Property Cadena2 As String
+ Public Property Numero1 As Integer
+ Public Property Numero2 As Integer
+ Public Property Fecha1 As DateTime
+ Public Property Fecha2 As DateTime
+ Public Property FechaVencimiento As DateTime
+ End Class
+
+ ReadOnly Property GlobalDTParametros(CveParametro As SisParametros) As SisParametro
+ Get
+
+ Dim dr As DataRow = DirectCast(Application("GlobalDTParametros"), DataTable).FiltroPrimero("CveParametro =" & CveParametro, "")
+
+ If dr IsNot Nothing Then
+ Dim Par As New SisParametro
+ Par.CveParametro = dr("CveParametro").ToString.ToEntero
+ Par.CveModulo = dr("CveModulo").ToString.ToEntero
+ Par.Descripcion = dr("Descripcion").ToString
+ Par.Cadena1 = dr("StrValor1").ToString
+ Par.Cadena2 = dr("StrValor2").ToString
+ Par.Numero1 = dr("NumValor1").ToString.ToEntero
+ Par.Numero2 = dr("NumValor2").ToString.ToEntero
+ Par.Fecha1 = dr("DTValor1").ToString.ToDate
+ Par.Fecha2 = dr("DTValor2").ToString.ToDate
+ Par.FechaVencimiento = dr("FechaVencimiento").ToString.ToDate
+ GlobalDTParametros = Par
+ Else
+ GlobalDTParametros = Nothing
+ End If
+
+ End Get
+ End Property
+
+ Property GlobalDTOIRevision(CveEmpresa As Integer) As DataTable
+ Get
+ If CveEmpresa <> -1 Then
+ Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTOIRevision"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
+ GlobalDTOIRevision = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTOIRevision = DirectCast(Application("GlobalDTOIRevision"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTOIRevision") = value
+ End Set
+ End Property
+ Property GlobalDTOIAgendaTipo() As DataTable
+ Get
+ GlobalDTOIAgendaTipo = DirectCast(Application("GlobalDTOIAgendaTipo"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTOIAgendaTipo") = value
+ End Set
+ End Property
+ Property GlobalDTOIAgenda() As DataTable
+ Get
+ GlobalDTOIAgenda = DirectCast(Application("GlobalDTOIAgenda"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTOIAgenda") = value
+ End Set
+ End Property
+ Property GlobalDTVtaCondicionesEntrega(Optional CveEmpresa As Integer = -1) As DataTable
+ Get
+ If CveEmpresa <> -1 Then
+ Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTVtaCondicionesEntrega"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
+ GlobalDTVtaCondicionesEntrega = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTVtaCondicionesEntrega = DirectCast(Application("GlobalDTVtaCondicionesEntrega"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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(Application("GlobalDTPaqueteriaGuiaTipos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
+ GlobalDTPaqueteriaGuiaTipos = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTPaqueteriaGuiaTipos = DirectCast(Application("GlobalDTPaqueteriaGuiaTipos"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ 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
+
+ Get
+ Dim Str As StringBuilder = New StringBuilder()
+ If CveEmpresa <> -1 Or CveClasicacionPorcentaje <> -1 Or CveClasicacion <> -1 Or PorcentajeIVA <> -1 Then
+ If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
+ If CveClasicacionPorcentaje <> -1 Then Str.AppendFormat(" {0} CveClasicacionPorcentaje = {1}", If(Str.Length > 0, "AND", ""), CveClasicacionPorcentaje)
+ If CveClasicacion <> -1 Then Str.AppendFormat(" {0} CveClasicacion = {1}", If(Str.Length > 0, "AND", ""), CveClasicacion)
+ If PorcentajeIVA <> -1 Then Str.AppendFormat(" {0} PorcentajeIVA = {1}", If(Str.Length > 0, "AND", ""), PorcentajeIVA)
+ Dim Dv As New DataView(DirectCast(Application("GlobalDTClasificacionPorcentaje"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTClasificacionPorcentaje = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTClasificacionPorcentaje = DirectCast(Application("GlobalDTClasificacionPorcentaje"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTClasificacionPorcentaje") = value
+ End Set
+ End Property
+ Property GlobalDTPaqueterias() As DataTable
+ Get
+ GlobalDTPaqueterias = DirectCast(Application("GlobalDTPaqueterias"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTPaqueterias") = value
+ End Set
+ End Property
+ Property GlobalDTAcumTiposDefecto() 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
+
+ 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
@@ -3294,668 +3287,674 @@ Public Class ClsPaginas
End If
If CveMarca <> -1 Then
- Dim Str As StringBuilder = New StringBuilder()
+ 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)
- GlobalDTAcumGarantiasMesesTipoUso = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAcumGarantiasMesesTipoUso = DirectCast(Application(AppNombre), DataTable)
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTAcumGarantiasMesesTipoUso = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTAcumGarantiasMesesTipoUso = DirectCast(Application(AppNombre), DataTable)
End If
- End Get
+ End Get
Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTAcumGarantiasMesesTipoUso{0}", CveEmpresa)
- Application(AppNombre) = value
- End Set
+ Dim AppNombre As String = String.Format("GlobalDTAcumGarantiasMesesTipoUso{0}", CveEmpresa)
+ Application(AppNombre) = value
+ End Set
End Property
- Property GlobalDTAcumTamaños() As DataTable
- Get
- GlobalDTAcumTamaños = DirectCast(Application("GlobalDTAcumTamaños"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTAcumTamaños") = 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
-#End Region
-
-
- Public Enum SisParametros As Integer
- URL = 1
- DirectorioSitio = 2
- eFacturasCaptcha = 3
-
-
-
- RutaEmpresasJM = 500
- RutaEmpresasRM = 501
- RutaEmpresasPC = 502
- RutaEmpresasP1 = 503
- RutaEmpresasP2 = 504
- RutaEmpresasP3 = 505
- End Enum
- Private Function IsCurrentDate(Ticks As Long) As Boolean
- Dim FechaRequest As DateTime = New DateTime(Ticks)
- Dim FechaServer As DateTime = DateTime.UtcNow
-
- Return (FechaRequest > (FechaServer).AddMinutes(-5) And FechaRequest < (FechaServer).AddMinutes(5))
- End Function
- Private Function URLRequestParams(Cadena As String) As Hashtable
- Dim P1() As String = Cadena.Split("&"c)
- Dim Tmp As String
- Dim P2() As String
-
- Dim URLParametros As New Hashtable
-
- For Each Tmp In P1
- P2 = Tmp.Replace("%26%", "&").Split("="c)
- URLParametros.Add(P2(0).ToString.ToUpper, P2(1))
- Next
- Return URLParametros
- End Function
- Private Function AuthorizePageWithoutSessions() As List(Of String)
- Dim pages = New List(Of String)
- pages.Add("/Compras/PopUpVerFactura.aspx")
- Return pages
- End Function
- Protected Overridable Sub Page_PreInit(sender As Object, e As EventArgs) Handles Me.PreInit
- If Not User.Identity.IsAuthenticated OrElse UsuarioActual Is Nothing Then
- Dim AuthorizeRequest As Boolean = False
- Dim HuboError = False
- Dim statusCode = 200
-
- If AuthorizePageWithoutSessions().Contains(Request.ServerVariables("URL")) Then
- If Request.Headers("ADSToken") IsNot Nothing AndAlso Request.Headers("Host") IsNot Nothing Then
- Try
- 'If (Not UrlSitio.Contains(Request.Headers("Host").ToString())) Then
- ' AuthorizeRequest = False
- ' statusCode = 401
- ' Usuario.CerrarSession()
- ' Response.End()
- 'End If
-
- Dim UserParams As Hashtable = URLRequestParams(Decripta((Request.Headers("ADSToken").ToString)))
-
- Dim CveEmpresaToken As Integer = UserParams("CVEEMPRESA").ToString().ToEntero()
- Dim Ticks As Long = UserParams("TICKS").ToString().ToLong()
-
- AuthorizeRequest = IsCurrentDate(Ticks) AndAlso CveEmpresaToken > 0
- Catch ex As Exception
- HuboError = True
- AuthorizeRequest = False
- OnError("Ocurrió un error al leer el token de autorización", ex)
- Finally
-
- If HuboError Then
- statusCode = 500
- End If
- If Not AuthorizeRequest Then
- statusCode = 401
- End If
-
- End Try
- Else
- AuthorizeRequest = False
- End If
- Else
- AuthorizeRequest = False
- End If
-
- Response.StatusCode = statusCode
- If Not AuthorizeRequest Then
- Usuario.CerrarSession()
- Response.End()
- End If
-
- Else
- If Not Page.IsPostBack Then
-
- 'If Not CType(Session("UsuarioSIG"), Usuario).SeleccionoEmpresa AndAlso Request.ServerVariables("URL") <> "/Sistemas/PopUpSeleccionarEmpresa.aspx" Then
- ' Response.Redirect("/Sistemas/PopUpSeleccionarEmpresa.aspx")
- ' 'Alert(Request.ServerVariables("URL"))
- 'End If
-
- Dim i As Integer = Obt_ClavePagina(Request.ServerVariables("URL"))
- Dim FailURL As String = $"{FormsAuthentication.DefaultUrl}?ADCod={Encripta($"CveModulo={i}")}"
-
- 'si es <0 la página es sin restricciones
- If i = -1 Then
- CveModulo = -333
- Else
- CveModulo = i
- If i > 0 Then
-
- If Not UsuarioActual.TienePermisoPagina(i) Then
- Response.Redirect(FailURL)
- End If
-
- Else
- Response.Redirect(FailURL)
- End If
- End If
-
- 'Else
- ' If ViewState("TipoPermiso") IsNot Nothing Then TipoPermiso = ViewState("TipoPermiso").ToString
- End If
- If UsuarioActual.CveEmpresa = 42 Then
- Me.MasterPageFile = "~/Masters/Site42.master"
- End If
- 'If Me.Request.ServerVariables("http_user_agent").ToLower.Contains("safari") AndAlso Page.ClientTarget <> "uplevel" Then Page.ClientTarget = "uplevel" 'Código agregado para que muestre bién el menu, en chrome
- End If
- End Sub
-
-
-
- Private Function Obt_ClavePagina(Pagina As String) As Integer
- Dim Retorno As Integer
-
- Dim PaginaDict As System.Collections.Hashtable
-
- If Application("GlobalSIGAppPaginas") Is Nothing Then
- PaginaDict = New System.Collections.Hashtable
-
- PaginaDict.Add("/Inicio.aspx".ToUpper(), -1)
- PaginaDict.Add("/reporteador.aspx".ToUpper(), -1)
- PaginaDict.Add("/General/CATIEPSxEntidadFed.aspx".ToUpper(), 719)
- PaginaDict.Add("/GPS/RepArrastre.aspx".ToUpper(), 718)
- PaginaDict.Add("/Ventas/RepConciliacionEmitidosSat.aspx".ToUpper(), -1)
- PaginaDict.Add("/Ventas/RepConciliacionSat.aspx".ToUpper(), 716)
- PaginaDict.Add("/Ventas/SolicitudesSAT.aspx".ToUpper(), 717)
-
- PaginaDict.Add("/Nomina/CatConceptos2.aspx".ToUpper(), -1)
- PaginaDict.Add("/Nomina/Aguinaldo.aspx".ToUpper(), -1)
- PaginaDict.Add("/Nomina/RepInversiondeNomina.aspx".ToUpper(), 906)
- PaginaDict.Add("/Nomina/FiniquitoB.aspx".ToUpper(), -1)
- ''CONFIGURACIONES GENERALES
- PaginaDict.Add("/Sistemas/SistemaSIG.aspx".ToUpper(), 9999)
-
-
- 'Páginas agregadas recientemente (Implementación Metronic)
- PaginaDict.Add("/Default2.aspx".ToUpper(), -1)
- PaginaDict.Add("/CargaCuentas.aspx".ToUpper(), -1)
- PaginaDict.Add("/OI/Tareas.aspx".ToUpper(), -1)
- PaginaDict.Add("/AdSistemasTeam/ProcedimientosAlmacenados.aspx".ToUpper(), -1)
- PaginaDict.Add("/OS/CatOrdenesServiciosCaracteristicas.aspx".ToUpper(), -1)
- PaginaDict.Add("/OS/CatOSCaracteristicasOpciones.aspx".ToUpper(), -1)
- PaginaDict.Add("/OS/CatSubTiposOrdenesServicios.aspx".ToUpper(), -1)
- PaginaDict.Add("/Prospectos/CatEncuestas.aspx".ToUpper(), -1)
- PaginaDict.Add("/Inventarios/Equivalencia.aspx".ToUpper(), -1)
- PaginaDict.Add("/Compras/PopUpVerFactura.aspx".ToUpper(), -1)
- PaginaDict.Add("/OC/OCPendientes.aspx".ToUpper(), -1)
- PaginaDict.Add("/Sistemas/Registro.aspx".ToUpper(), -1)
- PaginaDict.Add("/Sistemas/WizardRegistro.aspx".ToUpper(), -1)
- PaginaDict.Add("/Ventas/VentasRene.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contratos/Contrato2.aspx".ToUpper(), -1)
- PaginaDict.Add("/Flotillas/CatMantenimientos.aspx".ToUpper(), -1)
- PaginaDict.Add("/Inventarios/PaqueteDetalles.aspx".ToUpper(), -1)
-
-
-
-
- 'Cargo las páginas que NO deben tener restricción
- PaginaDict.Add("/Pruebas.aspx".ToUpper(), -1)
- PaginaDict.Add("/Sistemas/PopUpSeleccionarEmpresa.aspx".ToUpper(), -1)
- PaginaDict.Add("/Sistemas/PopUpPerfil.aspx".ToUpper(), -1)
- PaginaDict.Add("/Sistemas/CatContrasenia.aspx".ToUpper(), -1)
- PaginaDict.Add("/Ventas/PopUpBuscarClientes.aspx".ToUpper(), -1)
- PaginaDict.Add("/Compras/PopUpBuscarProveedor.aspx".ToUpper(), -1)
- PaginaDict.Add("/Ventas/PopUpImprimir.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contabilidad/PopUpAuxiliar.aspx".ToUpper(), -1)
- PaginaDict.Add("/Fiscal/PopUpConfiguracion.aspx".ToUpper(), -1)
- PaginaDict.Add("/Planeacion/PopUpEventos.aspx".ToUpper(), -1)
- PaginaDict.Add("/RH/PopUpBuscarPersonal.aspx".ToUpper(), -1)
- PaginaDict.Add("/UploadFile.aspx".ToUpper(), -1)
- PaginaDict.Add("/Compras/RepProveedorFacturas.aspx".ToUpper(), -1)
- PaginaDict.Add("/Bancos/Reportes.aspx".ToUpper(), -1)
-
- PaginaDict.Add("/Prospectos/PopUpBuscarProspectos.aspx".ToUpper(), -1)
- PaginaDict.Add("/Sistemas/PopUpCambiaUsuario.aspx".ToUpper(), -1)
- PaginaDict.Add("/Sistemas/CatDistribuidores.aspx".ToUpper(), -1)
- PaginaDict.Add("/Sistemas/CatPlataformas.aspx".ToUpper(), -1)
- PaginaDict.Add("/Sistemas/PopUpAddUsuario.aspx".ToUpper(), -1)
- PaginaDict.Add("/General/JAMComparativos.aspx".ToUpper(), 643)
-
- '-------------------------------------------Q U I T A R----------------------------------
-#Region "Q U I T A R"
-
-
- PaginaDict.Add("/Contratos/Estimaciones.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contratos/RepContratos.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contratos/RepContratosDetalle.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contratos/RepContratosAvances.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contratos/RepContratosPresupuesto.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contratos/CatContratosTipos.aspx".ToUpper(), -1)
-
-
- PaginaDict.Add("/SCT/RepGISSucesos.aspx".ToUpper(), -1)
- PaginaDict.Add("/SCT/RepLicencias.aspx".ToUpper(), -1)
- PaginaDict.Add("/SCT/Licencias.aspx".ToUpper(), -1)
- PaginaDict.Add("/SCT/LicenciasDetalle.aspx".ToUpper(), -1)
-
- PaginaDict.Add("/Prospectos/Prospectos.aspx".ToUpper(), -1)
- PaginaDict.Add("/XXXEjemplosPaola/Agenda/page_calendar.aspx".ToUpper(), -1)
- PaginaDict.Add("/Orlando/Default.aspx".ToUpper(), -1)
- PaginaDict.Add("/Orlando/Ventas.aspx".ToUpper(), -1)
-
- PaginaDict.Add("/Armonizacion/RepPresupuesto.aspx".ToUpper(), -1)
- PaginaDict.Add("/Armonizacion/PresupuestoIngreso.aspx".ToUpper(), -1)
- PaginaDict.Add("/Armonizacion/PresupuestoEgresos.aspx".ToUpper(), -1)
- PaginaDict.Add("/Compras/CatProveedoresCuentas.aspx".ToUpper(), -1)
-
- PaginaDict.Add("/123/DefaultGrid.aspx".ToUpper(), -1)
- PaginaDict.Add("/123/Default.aspx".ToUpper(), -1)
- PaginaDict.Add("/Ventas/EnviarCorreosPrueba.aspx".ToUpper(), -1)
-
- PaginaDict.Add("/Daniel/index.aspx".ToUpper(), -1)
- PaginaDict.Add("/Daniel/CatCiudades.aspx".ToUpper(), -1)
- PaginaDict.Add("/Daniel/Rodolfo.aspx".ToUpper(), -1)
- PaginaDict.Add("/MaquinariaFlotillas/CatEstatusMF.aspx".ToUpper(), -1)
- PaginaDict.Add("/TiposGastos/CatGastos.aspx".ToUpper(), -1)
- PaginaDict.Add("/Daniel/ProyectoFinal.aspx".ToUpper(), -1)
- PaginaDict.Add("/Daniel/ProyectoFinalTAP.aspx".ToUpper(), -1)
- PaginaDict.Add("/Daniel/Ejercicio.aspx".ToUpper(), -1)
- PaginaDict.Add("/Ventas/Ventas10.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contabilidad/CatTipoPolizas.aspx".ToUpper(), 571)
- PaginaDict.Add("/Bancos/RepSaldoFianzas.aspx".ToUpper(), -1)
- PaginaDict.Add("/Hiram/Ventas.aspx".ToUpper(), -1)
- PaginaDict.Add("/RH/RepCursos.aspx".ToUpper(), -1)
- PaginaDict.Add("/OS/OrdenesServiciosPrueba.aspx".ToUpper(), -1)
- PaginaDict.Add("/OS/CatTiposCuentasEquiposPrueba.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contabilidad/DIOTChilo.aspx".ToUpper(), -1)
- PaginaDict.Add("/Bancos/SaldarCajaChica.aspx".ToUpper(), -1)
- PaginaDict.Add("/Bancos/IngresosEgresosPorComprobar.aspx".ToUpper(), -1)
- PaginaDict.Add("/Bancos/ClientesAbonar.aspx".ToUpper(), -1)
-
-#End Region
- '-------------------------------------------F I N - Q U I T A R----------------------------------
-
- 'AMORTIZACIÓN CONTABLE
-#Region "AC"
- PaginaDict.Add("/AC/CatFuentesRecaudacion.aspx".ToUpper(), 268)
- PaginaDict.Add("/AC/CatRubrosIngreso.aspx".ToUpper(), 265)
- PaginaDict.Add("/AC/CatDependencias.aspx".ToUpper(), 266)
- PaginaDict.Add("/AC/CatUnidadesAdministrativas.aspx".ToUpper(), 267)
- PaginaDict.Add("/AC/CatOGClasificaciones.aspx".ToUpper(), 269)
- PaginaDict.Add("/AC/CatClasificacionGeografica.aspx".ToUpper(), 271)
- PaginaDict.Add("/AC/CatFinalidad.aspx".ToUpper(), 275)
- PaginaDict.Add("/AC/CatFuncion.aspx".ToUpper(), 278)
- PaginaDict.Add("/AC/CatSubPrograma.aspx".ToUpper(), 282)
- PaginaDict.Add("/AC/CatPrograma.aspx".ToUpper(), 279)
- PaginaDict.Add("/AC/CatProgramaCONAC.aspx".ToUpper(), 280)
- PaginaDict.Add("/AC/CatClasificacionFuncional.aspx".ToUpper(), 274)
- PaginaDict.Add("/AC/CatFuentesFinanciamiento.aspx".ToUpper(), 276)
- PaginaDict.Add("/AC/CatCuentas.aspx".ToUpper(), -1)
- PaginaDict.Add("/AC/CatFuentesFinanciamientoCONAC.aspx".ToUpper(), 277)
- PaginaDict.Add("/AC/ProgramaOperativo.aspx".ToUpper(), 289)
- PaginaDict.Add("/AC/RepProgramaOperativo.aspx".ToUpper(), 289)
- PaginaDict.Add("/AC/RepPresupuestoEgresos.aspx".ToUpper(), 290)
- PaginaDict.Add("/AC/RepPresupuestoEgresosMensual.aspx".ToUpper(), 290)
- PaginaDict.Add("/AC/RepPresupuestoEgresosDetalle.aspx".ToUpper(), 290)
- PaginaDict.Add("/AC/ProyectoProceso.aspx".ToUpper(), 288)
- PaginaDict.Add("/AC/PresupuestoEgresos.aspx".ToUpper(), 291)
- PaginaDict.Add("/AC/CatPresupuestoEgresos.aspx".ToUpper(), 291)
- PaginaDict.Add("/AC/RegEgresosModificaciones.aspx".ToUpper(), 297)
- PaginaDict.Add("/AC/PresupuestoIngresos.aspx".ToUpper(), 299)
- PaginaDict.Add("/AC/CatPresupuestoIngresos.aspx".ToUpper(), 299)
- PaginaDict.Add("/AC/RegIngresosModificaciones.aspx".ToUpper(), 300)
- PaginaDict.Add("/AC/RepMatrizIngresos.aspx".ToUpper(), 301)
- PaginaDict.Add("/AC/RepMatrizEgresos.aspx".ToUpper(), 302)
- PaginaDict.Add("/AC/RegRecaudado.aspx".ToUpper(), 287)
- PaginaDict.Add("/AC/RegDevengadoIngresos.aspx".ToUpper(), 298)
- PaginaDict.Add("/AC/RepPresupuestoIngresos.aspx".ToUpper(), 316)
- PaginaDict.Add("/AC/RepPresupuestoIngresosMensual.aspx".ToUpper(), 316)
- PaginaDict.Add("/AC/RegNomina.aspx".ToUpper(), 317)
- PaginaDict.Add("/AC/RepIngresosMensuales.aspx".ToUpper(), 331)
- PaginaDict.Add("/AC/RepSituacionFinanciera.aspx".ToUpper(), 332)
- PaginaDict.Add("/AC/RepEstadoActividades.aspx".ToUpper(), 334)
- PaginaDict.Add("/AC/RepEstadoAnaliticoActivo.aspx".ToUpper(), 335)
- PaginaDict.Add("/AC/RepAnaliticoDeudaPublica.aspx".ToUpper(), 121)
- PaginaDict.Add("/AC/RepFlujoEfectivo.aspx".ToUpper(), 347)
- PaginaDict.Add("/AC/RepCambiosSituacionFinanciera.aspx".ToUpper(), 348)
- PaginaDict.Add("/AC/RepVariacionHaciendaPublica.aspx".ToUpper(), 349)
- PaginaDict.Add("/AC/RepPresupuestoIngresosDetalle.aspx".ToUpper(), 299)
- PaginaDict.Add("/AC/CatClasificacionAdministrativa.aspx.aspx".ToUpper(), -1) 'ELIMINAR ???
-#End Region
- ' AC2
-#Region "AC2"
- PaginaDict.Add("/AC2/CatPresupuestoEgresos.aspx".ToUpper(), 598)
- PaginaDict.Add("/AC2/CatPresupuestoIngresos.aspx".ToUpper(), 599)
- PaginaDict.Add("/AC2/RegComprometido.aspx".ToUpper(), 600)
- PaginaDict.Add("/AC2/RegComprometido.aspx?Opc=NOM".ToUpper(), 601)
- PaginaDict.Add("/AC2/RegNomina.aspx".ToUpper(), 602)
- PaginaDict.Add("/AC2/RepPresupuesto.aspx".ToUpper(), 603)
- PaginaDict.Add("/AC2/RepPresupuestoEgresos.aspx".ToUpper(), 604)
- PaginaDict.Add("/AC2/RepPresupuestoEgresosMensual.aspx".ToUpper(), 605)
- PaginaDict.Add("/AC2/RepPresupuestoIngresos.aspx".ToUpper(), 606)
- PaginaDict.Add("/AC2/RepPresupuestoIngresosMensual.aspx".ToUpper(), 607)
- PaginaDict.Add("/AC2/RepProgramaOperativo.aspx".ToUpper(), 608)
- PaginaDict.Add("/AC2/RegEgresosModificaciones.aspx".ToUpper(), 609)
- PaginaDict.Add("/AC2/PresupuestoEgresos.aspx".ToUpper(), 610)
- PaginaDict.Add("/AC2/PresupuestoIngresos.aspx".ToUpper(), 611)
- PaginaDict.Add("/AC2/RepPresupuestoEgresosDetalle.aspx".ToUpper(), 604)
- PaginaDict.Add("/AC2/RepPresupuestoIngresosDetalle.aspx".ToUpper(), 613)
- PaginaDict.Add("/AC2/ProgramaOperativo.aspx".ToUpper(), 608)
-#End Region
- 'ACARREOS'
-#Region "Acarreos"
- PaginaDict.Add("/Acarreos/CatChoferes.aspx".ToUpper(), 467)
- PaginaDict.Add("/Acarreos/CatTransportistas.aspx".ToUpper(), 465)
- PaginaDict.Add("/Acarreos/CatUnidades.aspx".ToUpper(), 466)
- PaginaDict.Add("/Acarreos/Acarreos.aspx".ToUpper(), -1)
- PaginaDict.Add("/Acarreos/RepAcarreos.aspx".ToUpper(), 461)
- PaginaDict.Add("/Acarreos/RepAcarreosDetalle.aspx".ToUpper(), 461)
- PaginaDict.Add("/Acarreos/CatMateriales.aspx".ToUpper(), 468)
- PaginaDict.Add("/Acarreos/RegistroAcarreo.aspx".ToUpper(), 462)
- PaginaDict.Add("/Acarreos/AcarreosConcluidos.aspx".ToUpper(), 463)
- PaginaDict.Add("/Acarreos/RepAcarreosUnidades.aspx".ToUpper(), -1)
- PaginaDict.Add("/Acarreos/AcarreosUnidades.aspx".ToUpper(), -1)
- PaginaDict.Add("/Acarreos/CatEstatus.aspx".ToUpper(), -1)
- PaginaDict.Add("/Acarreos/RegistroContratosAcarreos.aspx".ToUpper(), 481)
- PaginaDict.Add("/Acarreos/ContratosAcarreos.aspx".ToUpper(), 481)
- PaginaDict.Add("/Acarreos/AcarreosPreEstimacion.aspx".ToUpper(), 480)
- PaginaDict.Add("/Acarreos/RepContratosAcarreos.aspx".ToUpper(), 482)
- PaginaDict.Add("/Acarreos/RepContratosAcarreosDetalle.aspx".ToUpper(), 482)
- PaginaDict.Add("/Acarreos/RepPreEstimacionDetalle.aspx".ToUpper(), 482)
-#End Region
- 'ACTIVOS FIJOS
-#Region "AF"
- PaginaDict.Add("/AF/ValesCombustible.aspx".ToUpper(), 384)
- PaginaDict.Add("/AF/PopUpBuscarAF.aspx".ToUpper(), 62)
- PaginaDict.Add("/AF/CatAF.aspx".ToUpper(), 63)
- PaginaDict.Add("/AF/AF.aspx".ToUpper(), 63)
- PaginaDict.Add("/AF/RepAF.aspx".ToUpper(), 403)
- PaginaDict.Add("/AF/BitacoraAF.aspx".ToUpper(), 2043)
- '-------------HIJOS DE 57
- PaginaDict.Add("/AF/CatTipos.aspx".ToUpper(), 138)
- PaginaDict.Add("/AF/CatSubTipos.aspx".ToUpper(), 139)
- PaginaDict.Add("/AF/CatModelos.aspx".ToUpper(), 140)
- PaginaDict.Add("/AF/CatMarcas.aspx".ToUpper(), 141)
- PaginaDict.Add("/AF/CatClasificacionesCaracteristicas.aspx".ToUpper(), 252)
- PaginaDict.Add("/AF/CatClasificaciones.aspx".ToUpper(), -1)
- PaginaDict.Add("/AF/CatCaracteristicas.aspx".ToUpper(), -1)
- PaginaDict.Add("/AF/CatOpciones.aspx".ToUpper(), -1)
- PaginaDict.Add("/AF/ResguardoAF.aspx".ToUpper(), 574)
- PaginaDict.Add("/AF/CatOperadores.aspx".ToUpper(), -1)
- PaginaDict.Add("/AF/CatTiposCombustible.aspx".ToUpper(), -1)
- PaginaDict.Add("/AF/CatCombustibles.aspx".ToUpper(), -1)
- PaginaDict.Add("/AF/CatCargasCombustible.aspx".ToUpper(), -1)
- PaginaDict.Add("/AF/RepFlotillas.aspx".ToUpper(), -1)
- PaginaDict.Add("/AF/RepPlacas.aspx".ToUpper(), -1)
- PaginaDict.Add("/AF/RepIncidentes.aspx".ToUpper(), -1)
- PaginaDict.Add("/AF/RepPolizaSeguro.aspx".ToUpper(), -1)
- PaginaDict.Add("/AF/RepLicencias.aspx".ToUpper(), -1)
- PaginaDict.Add("/AF/RepServicios.aspx".ToUpper(), -1)
- PaginaDict.Add("/AF/RepDepreciacion.aspx".ToUpper(), -1)
- PaginaDict.Add("/AF/RepEventosProgramados.aspx".ToUpper(), 656)
-#End Region
- 'AIMMGM
-#Region "AIMMGM"
- PaginaDict.Add("/AIMMGM/Registro.aspx".ToUpper(), -1)
- PaginaDict.Add("/AIMMGM/PopRegistro.aspx".ToUpper(), -1)
- PaginaDict.Add("/AIMMGM/RegistroGIS.aspx".ToUpper(), -1)
- PaginaDict.Add("/AIMMGM/RepVentas.aspx".ToUpper(), 236)
- PaginaDict.Add("/AIMMGM/Pagos.aspx".ToUpper(), 238)
- PaginaDict.Add("/AIMMGM/Saldos.aspx".ToUpper(), 239)
- PaginaDict.Add("/AIMMGM/VentasPS.aspx".ToUpper(), 240)
-#End Region
-
- 'BANCOS
-#Region "Bancos"
- PaginaDict.Add("/Bancos/ProveedoresAbonarH.aspx".ToUpper(), 84)
- PaginaDict.Add("/Bancos/RepProveedoresPagosH.aspx".ToUpper(), 84)
- PaginaDict.Add("/Bancos/PruebaCFDI.aspx".ToUpper(), 2027)
- PaginaDict.Add("/Bancos/CatBancos.aspx".ToUpper(), 150)
- PaginaDict.Add("/Bancos/CuentasBancarias.aspx".ToUpper(), 151)
- PaginaDict.Add("/Bancos/CatEstatusIE.aspx".ToUpper(), 152)
- PaginaDict.Add("/Bancos/CatTiposTransaccion.aspx".ToUpper(), 154)
- PaginaDict.Add("/Bancos/CuentasBancariasDetalle.aspx".ToUpper(), 151)
- PaginaDict.Add("/Bancos/Transferencias.aspx".ToUpper(), 285)
- PaginaDict.Add("/Bancos/OtrosIE.aspx".ToUpper(), 281)
- PaginaDict.Add("/Bancos/IE.aspx?Opcion=EGSSINFACT&Tipo=PRESTAMODEUDOR".ToUpper(), 508)
- PaginaDict.Add("/Bancos/IE.aspx?Opcion=EGSSINFACT&Tipo=PAGOACREEDOR".ToUpper(), 509)
- PaginaDict.Add("/Bancos/IE.aspx?Opcion=INGPC&Tipo=PAGODEUDOR".ToUpper(), 510)
- PaginaDict.Add("/Bancos/IE.aspx?Opcion=INGPC&Tipo=PRESTAMOACREEDOR".ToUpper(), 507)
- PaginaDict.Add("/Bancos/PopUpBuscaPersonal.aspx".ToUpper(), 281)
- PaginaDict.Add("/Bancos/PopUpBuscarColectiva.aspx".ToUpper(), 281)
- PaginaDict.Add("/Bancos/PopUpBuscarProveedor.aspx".ToUpper(), 281)
- PaginaDict.Add("/Bancos/PopUpBuscarFolioC.aspx".ToUpper(), 281)
- PaginaDict.Add("/Bancos/PopUpBuscarClientes.aspx".ToUpper(), 281)
- 'PaginaDict.Add("/Bancos/CatTiposCuenta.aspx".ToUpper(), -1)
- PaginaDict.Add("/Bancos/RepClientesAnticipo.aspx".ToUpper(), 306)
- PaginaDict.Add("/Bancos/CIF.aspx".ToUpper(), 309)
- PaginaDict.Add("/Bancos/Creditos.aspx".ToUpper(), 318)
- PaginaDict.Add("/Bancos/PagoElectronico.aspx".ToUpper(), 324)
- PaginaDict.Add("/Bancos/RepProgramaciones.aspx".ToUpper(), 323)
-
- PaginaDict.Add("/Bancos/PopIE.aspx".ToUpper(), 153)
- PaginaDict.Add("/Bancos/PopIEVentas.aspx".ToUpper(), 153)
- PaginaDict.Add("/Bancos/PopIECompras.aspx".ToUpper(), 153)
- PaginaDict.Add("/Bancos/RepProveedoresPagos.aspx".ToUpper(), 84)
- PaginaDict.Add("/Bancos/ProveedoresAbonar.aspx".ToUpper(), 84)
- PaginaDict.Add("/Bancos/RepSaldos.aspx".ToUpper(), 169)
- PaginaDict.Add("/Bancos/RepSaldosDetalle.aspx".ToUpper(), 169)
- PaginaDict.Add("/Bancos/RepProgramarRecursos.aspx".ToUpper(), 170)
- 'PaginaDict.Add("/Bancos/PolizaCheque.aspx".ToUpper(), 171)
- PaginaDict.Add("/Bancos/RepEgresosSinComprobante.aspx".ToUpper(), 235)
- PaginaDict.Add("/Bancos/RepCxCCliente.aspx".ToUpper(), 321)
- PaginaDict.Add("/Bancos/FluctuacionCambiaria.aspx".ToUpper(), 329)
- PaginaDict.Add("/Bancos/Reembolsos.aspx".ToUpper(), 333)
- PaginaDict.Add("/Bancos/CreditosPagoMultiple.aspx".ToUpper(), 342)
- PaginaDict.Add("/Bancos/NotificacionCheques.aspx".ToUpper(), 345)
- PaginaDict.Add("/Bancos/ProductosFinancieros.aspx".ToUpper(), 351)
- PaginaDict.Add("/Bancos/PopUpBuscarIE.aspx".ToUpper(), -1)
- PaginaDict.Add("/Bancos/RepCobradoPagadoDetalle.aspx".ToUpper(), -1)
- PaginaDict.Add("/Bancos/RepCobradoPagado.aspx".ToUpper(), 368)
- PaginaDict.Add("/Bancos/RepIngresosPorComprobar.aspx".ToUpper(), 381)
- PaginaDict.Add("/Bancos/Documentos.aspx".ToUpper(), 319)
- PaginaDict.Add("/Bancos/RepCreditos.aspx".ToUpper(), 320)
- PaginaDict.Add("/Bancos/RepSaldosDAP.aspx".ToUpper(), 385)
- PaginaDict.Add("/Bancos/DepositosCaja.aspx".ToUpper(), 560)
- PaginaDict.Add("/Bancos/RepCortes.aspx".ToUpper(), 1008)
- PaginaDict.Add("/Bancos/RegistroPagoIntermediario.aspx".ToUpper(), 1013)
- PaginaDict.Add("/Bancos/RepComplementoPago.aspx".ToUpper(), 512)
- PaginaDict.Add("/Bancos/DepositoTerminal.aspx".ToUpper(), 281)
- PaginaDict.Add("/Bancos/FlujoDiario.aspx".ToUpper(), 515)
- PaginaDict.Add("/Bancos/RepComprobaciones.aspx".ToUpper(), 647)
- PaginaDict.Add("/Bancos/RepCobrado.aspx".ToUpper(), 505)
- PaginaDict.Add("/Bancos/RepCobradoDetalle.aspx".ToUpper(), 505)
- PaginaDict.Add("/Bancos/ConciliacionesBancarias.aspx".ToUpper(), 874)
- PaginaDict.Add("/Bancos/CargarConciliacionesBancarias.aspx".ToUpper(), 878)
- PaginaDict.Add("/Bancos/PagoAcreedor.aspx".ToUpper(), 507)
- PaginaDict.Add("/Bancos/PagoDeudor.aspx".ToUpper(), 508)
- PaginaDict.Add("/Bancos/Devoluciones.aspx".ToUpper(), 283)
- PaginaDict.Add("/Bancos/RepProveedoresCreditos.aspx".ToUpper(), 528)
- PaginaDict.Add("/Bancos/ProveedoresCreditos.aspx".ToUpper(), 528)
- PaginaDict.Add("/Bancos/RepSaldosPeriodo.aspx".ToUpper(), 884)
- PaginaDict.Add("/Bancos/PrestamoPersonal.aspx".ToUpper(), 890)
-#End Region
-
-#Region "CGame"
- PaginaDict.Add("/CGame/OrdenProduccion.aspx".ToUpper(), 815)
- PaginaDict.Add("/CGame/PopUpBuscarOrdenProduccion.aspx".ToUpper(), 816)
- PaginaDict.Add("/CGame/RepOrdenProduccion.aspx".ToUpper(), 824)
- PaginaDict.Add("/CGame/RepAvance.aspx".ToUpper(), 844)
-
- 'Reportes de Gastos
- PaginaDict.Add("/CGame/RepPreEnfriado.aspx".ToUpper(), 855)
- PaginaDict.Add("/CGame/RepCorte.aspx".ToUpper(), 857)
- PaginaDict.Add("/CGame/RepFletes.aspx".ToUpper(), 858)
- PaginaDict.Add("/CGame/RepOtrosGastos.aspx".ToUpper(), 859)
- PaginaDict.Add("/CGame/RepMateriales.aspx".ToUpper(), 860)
- PaginaDict.Add("/CGame/RepMaquila.aspx".ToUpper(), 862)
-
- 'Reportes de Ingresos
- PaginaDict.Add("/CGame/RepIngresos.aspx".ToUpper(), 861)
-
- 'Estado de Cuenta
- PaginaDict.Add("/CGame/EstadoCuenta.aspx".ToUpper(), 851)
- PaginaDict.Add("/CGame/EstadoCuentaDetalle.aspx".ToUpper(), 851)
-
- 'Liquidacion
- PaginaDict.Add("/CGame/Liquidacion.aspx".ToUpper(), 853)
-
- 'Orden Corte'
- PaginaDict.Add("/CGame/EntradaMateriaPrima.aspx".ToUpper(), 820)
- PaginaDict.Add("/CGame/RepOrdenCorte.aspx".ToUpper(), 842)
- PaginaDict.Add("/CGame/RepOrdenCorteDetalle.aspx".ToUpper(), 842)
- PaginaDict.Add("/CGame/GenerarOrdenCorte.aspx".ToUpper(), 845)
- PaginaDict.Add("/CGame/CorteGasto.aspx".ToUpper(), 835)
- PaginaDict.Add("/CGame/PopUpBuscarCorteGasto.aspx".ToUpper(), 836)
- PaginaDict.Add("/CGame/RepCorteGasto.aspx".ToUpper(), 850)
- PaginaDict.Add("/CGame/RepOrdenProduccionXHuerta.aspx".ToUpper(), 856)
-
- 'Empaque'
- PaginaDict.Add("/CGame/Empaque.aspx".ToUpper(), 822)
- PaginaDict.Add("/CGame/PopUpBuscarEmpaque.aspx".ToUpper(), 823)
- PaginaDict.Add("/CGame/RepEmpaque.aspx".ToUpper(), 825)
- PaginaDict.Add("/CGame/AsignacionEmpaque.aspx".ToUpper(), 826)
- PaginaDict.Add("/CGame/RepEmpaqueDetalle.aspx".ToUpper(), 825)
- PaginaDict.Add("/CGame/AsignacionEmpaque2.aspx".ToUpper(), 826)
-
- 'Fletes'
- PaginaDict.Add("/CGame/Fletes.aspx".ToUpper(), 830)
- PaginaDict.Add("/CGame/RepFletesPendientes.aspx".ToUpper(), 847)
- 'Configuración
- PaginaDict.Add("/CGame/CatEstatus.aspx".ToUpper(), 811)
- PaginaDict.Add("/CGame/CatTamaños.aspx".ToUpper(), 812)
- PaginaDict.Add("/CGame/CatEmpaque.aspx".ToUpper(), 814)
- PaginaDict.Add("/CGame/CatCalidad.aspx".ToUpper(), 810)
- PaginaDict.Add("/CGame/CatTipoCaja.aspx".ToUpper(), 813)
- PaginaDict.Add("/CGame/CatProductos.aspx".ToUpper(), 834)
- PaginaDict.Add("/CGame/CatCGameClientes.aspx".ToUpper(), 8301)
- PaginaDict.Add("/CGame/CatTipoEmpaque.aspx".ToUpper(), 832)
- PaginaDict.Add("/CGame/CatTipoMaduracion.aspx".ToUpper(), 833)
- PaginaDict.Add("/CGame/CatTipoProducto.aspx".ToUpper(), 837)
- PaginaDict.Add("/CGame/CatHuerta.aspx".ToUpper(), 818)
- PaginaDict.Add("/CGame/CatMotivosMerma.aspx".ToUpper(), 819)
- PaginaDict.Add("/CGame/CatScat.aspx".ToUpper(), 846)
- PaginaDict.Add("/Acarreos/CatTransportistas.aspx?Op=Cor".ToUpper(), 828)
- PaginaDict.Add("/Acarreos/CatChoferes.aspx?Op=Cor".ToUpper(), 829)
- PaginaDict.Add("/CGame/CatConceptoGastoCorte.aspx".ToUpper(), 848)
- PaginaDict.Add("/CGame/CatCargosFijos.aspx".ToUpper(), 852)
-#End Region
- 'COMPRAS
-#Region "Compras"
- PaginaDict.Add("/Compras/RepTopCompras.aspx".ToUpper(), -1)
- PaginaDict.Add("/Compras/CatProveedores.aspx".ToUpper(), 37)
- PaginaDict.Add("/Compras/Proveedores.aspx".ToUpper(), 37)
- PaginaDict.Add("/Compras/Compras.aspx".ToUpper(), 38)
- 'PaginaDict.Add("/Compras/ComprasJaneth.aspx".ToUpper(), -1)
- PaginaDict.Add("/Compras/PopUpBuscarFolioC.aspx".ToUpper(), 38)
- 'PaginaDict.Add("/Compras/RecepcionFacturas.aspx".ToUpper(), 38)
- PaginaDict.Add("/Compras/RepCompras.aspx".ToUpper(), 95)
- PaginaDict.Add("/Compras/RepComprasPeriodo.aspx".ToUpper(), 96)
- PaginaDict.Add("/Compras/RepComprasDetalle.aspx".ToUpper(), 95)
- PaginaDict.Add("/Compras/eFacturas.aspx".ToUpper(), 137)
- PaginaDict.Add("/Compras/CatEstatusFactura.aspx".ToUpper(), 145)
- PaginaDict.Add("/Compras/RepCxP.aspx".ToUpper(), 168)
- PaginaDict.Add("/Compras/RepCxPDetalle.aspx".ToUpper(), 168)
- PaginaDict.Add("/Compras/CatProveedoresClasificaciones.aspx".ToUpper(), 186)
- PaginaDict.Add("/Compras/CatAcreedores.aspx".ToUpper(), 303)
- PaginaDict.Add("/Compras/Acreedores.aspx".ToUpper(), 303)
- PaginaDict.Add("/Compras/RepComprasG.aspx".ToUpper(), 286)
- PaginaDict.Add("/Compras/Compras2.aspx".ToUpper(), -1)
- PaginaDict.Add("/Compras/Compras3.aspx".ToUpper(), -1)
- PaginaDict.Add("/Compras/Compras5.aspx".ToUpper(), -1)
- PaginaDict.Add("/Compras/Importaciones.aspx".ToUpper(), 319)
- PaginaDict.Add("/Compras/RepImportaciones.aspx".ToUpper(), 326)
- PaginaDict.Add("/Compras/RegGastos.aspx".ToUpper(), 328)
- PaginaDict.Add("/Compras/RepBeneficiarios.aspx".ToUpper(), 336)
- PaginaDict.Add("/Compras/RepBeneficiariosDetalle.aspx".ToUpper(), -1)
- PaginaDict.Add("/Compras/RepProductosServiciosDetalle.aspx".ToUpper(), -1)
- PaginaDict.Add("/Compras/RepNotasCredito.aspx".ToUpper(), 337)
- PaginaDict.Add("/Compras/ReembolsosComprobaciones.aspx".ToUpper(), 350)
- PaginaDict.Add("/Compras/RepProductosServicios.aspx".ToUpper(), 97)
- PaginaDict.Add("/Compras/RepPerioricidad.aspx".ToUpper(), 126)
- PaginaDict.Add("/Compras/PopUpFacturasPendientesAutorizar.aspx".ToUpper(), 559)
- PaginaDict.Add("/Compras/RepEvaluacionProveedor.aspx".ToUpper(), 564)
- PaginaDict.Add("/Compras/RepRembolsoComprobaciones.aspx".ToUpper(), 591)
- PaginaDict.Add("/Compras/ComprasO.aspx".ToUpper(), -1)
- PaginaDict.Add("/Compras/ComprasH.aspx".ToUpper(), -1)
- PaginaDict.Add("/Compras/RembolsosSinAsignar.aspx".ToUpper(), 635)
- PaginaDict.Add("/Compras/RepGastos.aspx".ToUpper(), 2051)
- PaginaDict.Add("/Compras/RepGastosDetalle.aspx".ToUpper(), 2051)
- PaginaDict.Add("/Compras/RepComprasAF.aspx".ToUpper(), 636)
- PaginaDict.Add("/Compras/RepComprasAFDetalle.aspx".ToUpper(), 636)
- PaginaDict.Add("/Compras/RepComprasPersonal.aspx".ToUpper(), 637)
- PaginaDict.Add("/Compras/RepComprasPersonalDetalle.aspx".ToUpper(), 637)
- PaginaDict.Add("/Compras/RepComplementoPago.aspx".ToUpper(), 657)
- PaginaDict.Add("/Compras/RepPromociones.aspx".ToUpper(), 638)
- PaginaDict.Add("/Compras/RepProductosServiciosPeriodo.aspx".ToUpper(), 866)
- PaginaDict.Add("/Compras/RepGastosFijos.aspx".ToUpper(), 661)
- PaginaDict.Add("/Compras/RepPagado.aspx".ToUpper(), 872)
- PaginaDict.Add("/Compras/RepPagadoDetalle.aspx".ToUpper(), 872)
- PaginaDict.Add("/Compras/RepPagadoPeriodo.aspx".ToUpper(), 886)
- PaginaDict.Add("/Compras/RepCxPPeriodo.aspx".ToUpper(), 888)
- PaginaDict.Add("/Compras/RepGastosSemanal.aspx".ToUpper(), 534)
- PaginaDict.Add("/Compras/ProveedoresAuxiliar.aspx".ToUpper(), 536)
- PaginaDict.Add("/Compras/RepComprasInventarios.aspx".ToUpper(), 537)
- PaginaDict.Add("/Compras/RepAnt-NC-EXC.aspx".ToUpper(), 538)
+ Property GlobalDTAcumTamaños() As DataTable
+ Get
+ GlobalDTAcumTamaños = DirectCast(Application("GlobalDTAcumTamaños"), DataTable)
+ End Get
+ Set(value As DataTable)
+ Application("GlobalDTAcumTamaños") = 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
+#End Region
+
+
+ Public Enum SisParametros As Integer
+ URL = 1
+ DirectorioSitio = 2
+ eFacturasCaptcha = 3
+
+
+
+ RutaEmpresasJM = 500
+ RutaEmpresasRM = 501
+ RutaEmpresasPC = 502
+ RutaEmpresasP1 = 503
+ RutaEmpresasP2 = 504
+ RutaEmpresasP3 = 505
+ End Enum
+ Private Function IsCurrentDate(Ticks As Long) As Boolean
+ Dim FechaRequest As DateTime = New DateTime(Ticks)
+ Dim FechaServer As DateTime = DateTime.UtcNow
+
+ Return (FechaRequest > (FechaServer).AddMinutes(-5) And FechaRequest < (FechaServer).AddMinutes(5))
+ End Function
+ Private Function URLRequestParams(Cadena As String) As Hashtable
+ Dim P1() As String = Cadena.Split("&"c)
+ Dim Tmp As String
+ Dim P2() As String
+
+ Dim URLParametros As New Hashtable
+
+ For Each Tmp In P1
+ P2 = Tmp.Replace("%26%", "&").Split("="c)
+ URLParametros.Add(P2(0).ToString.ToUpper, P2(1))
+ Next
+ Return URLParametros
+ End Function
+ Private Function AuthorizePageWithoutSessions() As List(Of String)
+ Dim pages = New List(Of String)
+ pages.Add("/Compras/PopUpVerFactura.aspx")
+ Return pages
+ End Function
+ Dim sw As Diagnostics.Stopwatch
+ Protected Overridable Sub Page_PreInit(sender As Object, e As EventArgs) Handles Me.PreInit
+
+ sw = New Diagnostics.Stopwatch
+ sw.Start()
+ If Not User.Identity.IsAuthenticated OrElse UsuarioActual Is Nothing Then
+ Dim AuthorizeRequest As Boolean = False
+ Dim HuboError = False
+ Dim statusCode = 200
+
+ If AuthorizePageWithoutSessions().Contains(Request.ServerVariables("URL")) Then
+ If Request.Headers("ADSToken") IsNot Nothing AndAlso Request.Headers("Host") IsNot Nothing Then
+ Try
+ 'If (Not UrlSitio.Contains(Request.Headers("Host").ToString())) Then
+ ' AuthorizeRequest = False
+ ' statusCode = 401
+ ' Usuario.CerrarSession()
+ ' Response.End()
+ 'End If
+
+ Dim UserParams As Hashtable = URLRequestParams(Decripta((Request.Headers("ADSToken").ToString)))
+
+ Dim CveEmpresaToken As Integer = UserParams("CVEEMPRESA").ToString().ToEntero()
+ Dim Ticks As Long = UserParams("TICKS").ToString().ToLong()
+
+ AuthorizeRequest = IsCurrentDate(Ticks) AndAlso CveEmpresaToken > 0
+ Catch ex As Exception
+ HuboError = True
+ AuthorizeRequest = False
+ OnError("Ocurrió un error al leer el token de autorización", ex)
+ Finally
+
+ If HuboError Then
+ statusCode = 500
+ End If
+ If Not AuthorizeRequest Then
+ statusCode = 401
+ End If
+
+ End Try
+ Else
+ AuthorizeRequest = False
+ End If
+ Else
+ AuthorizeRequest = False
+ End If
+
+ Response.StatusCode = statusCode
+ If Not AuthorizeRequest Then
+ Usuario.CerrarSession()
+ Response.End()
+ End If
+
+ Else
+ If Not Page.IsPostBack Then
+
+ 'If Not CType(Session("UsuarioSIG"), Usuario).SeleccionoEmpresa AndAlso Request.ServerVariables("URL") <> "/Sistemas/PopUpSeleccionarEmpresa.aspx" Then
+ ' Response.Redirect("/Sistemas/PopUpSeleccionarEmpresa.aspx")
+ ' 'Alert(Request.ServerVariables("URL"))
+ 'End If
+
+ Dim i As Integer = Obt_ClavePagina(Request.ServerVariables("URL"))
+ Dim FailURL As String = $"{FormsAuthentication.DefaultUrl}?ADCod={Encripta($"CveModulo={i}")}"
+
+ 'si es <0 la página es sin restricciones
+ If i = -1 Then
+ CveModulo = -333
+ Else
+ CveModulo = i
+ If i > 0 Then
+
+ If Not UsuarioActual.TienePermisoPagina(i) Then
+ Response.Redirect(FailURL)
+ End If
+
+ Else
+ Response.Redirect(FailURL)
+ End If
+ End If
+
+ 'Else
+ ' If ViewState("TipoPermiso") IsNot Nothing Then TipoPermiso = ViewState("TipoPermiso").ToString
+ End If
+ If UsuarioActual.CveEmpresa = 42 Then
+ Me.MasterPageFile = "~/Masters/Site42.master"
+ End If
+
+ ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarModulo, Nothing, -1, "", Request.Url.ToString())
+ 'If Me.Request.ServerVariables("http_user_agent").ToLower.Contains("safari") AndAlso Page.ClientTarget <> "uplevel" Then Page.ClientTarget = "uplevel" 'Código agregado para que muestre bién el menu, en chrome
+ End If
+ End Sub
+
+
+
+ Private Function Obt_ClavePagina(Pagina As String) As Integer
+ Dim Retorno As Integer
+
+ Dim PaginaDict As System.Collections.Hashtable
+
+ If Application("GlobalSIGAppPaginas") Is Nothing Then
+ PaginaDict = New System.Collections.Hashtable
+
+ PaginaDict.Add("/Inicio.aspx".ToUpper(), -1)
+ PaginaDict.Add("/reporteador.aspx".ToUpper(), -1)
+ PaginaDict.Add("/General/CATIEPSxEntidadFed.aspx".ToUpper(), 719)
+ PaginaDict.Add("/GPS/RepArrastre.aspx".ToUpper(), 718)
+ PaginaDict.Add("/Ventas/RepConciliacionEmitidosSat.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Ventas/RepConciliacionSat.aspx".ToUpper(), 716)
+ PaginaDict.Add("/Ventas/SolicitudesSAT.aspx".ToUpper(), 717)
+
+ PaginaDict.Add("/Nomina/CatConceptos2.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Nomina/Aguinaldo.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Nomina/RepInversiondeNomina.aspx".ToUpper(), 906)
+ PaginaDict.Add("/Nomina/FiniquitoB.aspx".ToUpper(), -1)
+ ''CONFIGURACIONES GENERALES
+ PaginaDict.Add("/Sistemas/SistemaSIG.aspx".ToUpper(), 9999)
+
+
+ 'Páginas agregadas recientemente (Implementación Metronic)
+ PaginaDict.Add("/Default2.aspx".ToUpper(), -1)
+ PaginaDict.Add("/CargaCuentas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OI/Tareas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AdSistemasTeam/ProcedimientosAlmacenados.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OS/CatOrdenesServiciosCaracteristicas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OS/CatOSCaracteristicasOpciones.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OS/CatSubTiposOrdenesServicios.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Prospectos/CatEncuestas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Inventarios/Equivalencia.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Compras/PopUpVerFactura.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OC/OCPendientes.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Sistemas/Registro.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Sistemas/WizardRegistro.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Ventas/VentasRene.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contratos/Contrato2.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Flotillas/CatMantenimientos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Inventarios/PaqueteDetalles.aspx".ToUpper(), -1)
+
+
+
+
+ 'Cargo las páginas que NO deben tener restricción
+ PaginaDict.Add("/Pruebas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Sistemas/PopUpSeleccionarEmpresa.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Sistemas/PopUpPerfil.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Sistemas/CatContrasenia.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Ventas/PopUpBuscarClientes.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Compras/PopUpBuscarProveedor.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Ventas/PopUpImprimir.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contabilidad/PopUpAuxiliar.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Fiscal/PopUpConfiguracion.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Planeacion/PopUpEventos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/RH/PopUpBuscarPersonal.aspx".ToUpper(), -1)
+ PaginaDict.Add("/UploadFile.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Compras/RepProveedorFacturas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Bancos/Reportes.aspx".ToUpper(), -1)
+
+ PaginaDict.Add("/Prospectos/PopUpBuscarProspectos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Sistemas/PopUpCambiaUsuario.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Sistemas/CatDistribuidores.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Sistemas/CatPlataformas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Sistemas/PopUpAddUsuario.aspx".ToUpper(), -1)
+ PaginaDict.Add("/General/JAMComparativos.aspx".ToUpper(), 643)
+
+ '-------------------------------------------Q U I T A R----------------------------------
+#Region "Q U I T A R"
+
+
+ PaginaDict.Add("/Contratos/Estimaciones.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contratos/RepContratos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contratos/RepContratosDetalle.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contratos/RepContratosAvances.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contratos/RepContratosPresupuesto.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contratos/CatContratosTipos.aspx".ToUpper(), -1)
+
+
+ PaginaDict.Add("/SCT/RepGISSucesos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/SCT/RepLicencias.aspx".ToUpper(), -1)
+ PaginaDict.Add("/SCT/Licencias.aspx".ToUpper(), -1)
+ PaginaDict.Add("/SCT/LicenciasDetalle.aspx".ToUpper(), -1)
+
+ PaginaDict.Add("/Prospectos/Prospectos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/XXXEjemplosPaola/Agenda/page_calendar.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Orlando/Default.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Orlando/Ventas.aspx".ToUpper(), -1)
+
+ PaginaDict.Add("/Armonizacion/RepPresupuesto.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Armonizacion/PresupuestoIngreso.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Armonizacion/PresupuestoEgresos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Compras/CatProveedoresCuentas.aspx".ToUpper(), -1)
+
+ PaginaDict.Add("/123/DefaultGrid.aspx".ToUpper(), -1)
+ PaginaDict.Add("/123/Default.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Ventas/EnviarCorreosPrueba.aspx".ToUpper(), -1)
+
+ PaginaDict.Add("/Daniel/index.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Daniel/CatCiudades.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Daniel/Rodolfo.aspx".ToUpper(), -1)
+ PaginaDict.Add("/MaquinariaFlotillas/CatEstatusMF.aspx".ToUpper(), -1)
+ PaginaDict.Add("/TiposGastos/CatGastos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Daniel/ProyectoFinal.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Daniel/ProyectoFinalTAP.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Daniel/Ejercicio.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Ventas/Ventas10.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contabilidad/CatTipoPolizas.aspx".ToUpper(), 571)
+ PaginaDict.Add("/Bancos/RepSaldoFianzas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Hiram/Ventas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/RH/RepCursos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OS/OrdenesServiciosPrueba.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OS/CatTiposCuentasEquiposPrueba.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contabilidad/DIOTChilo.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Bancos/SaldarCajaChica.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Bancos/IngresosEgresosPorComprobar.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Bancos/ClientesAbonar.aspx".ToUpper(), -1)
+
+#End Region
+ '-------------------------------------------F I N - Q U I T A R----------------------------------
+
+ 'AMORTIZACIÓN CONTABLE
+#Region "AC"
+ PaginaDict.Add("/AC/CatFuentesRecaudacion.aspx".ToUpper(), 268)
+ PaginaDict.Add("/AC/CatRubrosIngreso.aspx".ToUpper(), 265)
+ PaginaDict.Add("/AC/CatDependencias.aspx".ToUpper(), 266)
+ PaginaDict.Add("/AC/CatUnidadesAdministrativas.aspx".ToUpper(), 267)
+ PaginaDict.Add("/AC/CatOGClasificaciones.aspx".ToUpper(), 269)
+ PaginaDict.Add("/AC/CatClasificacionGeografica.aspx".ToUpper(), 271)
+ PaginaDict.Add("/AC/CatFinalidad.aspx".ToUpper(), 275)
+ PaginaDict.Add("/AC/CatFuncion.aspx".ToUpper(), 278)
+ PaginaDict.Add("/AC/CatSubPrograma.aspx".ToUpper(), 282)
+ PaginaDict.Add("/AC/CatPrograma.aspx".ToUpper(), 279)
+ PaginaDict.Add("/AC/CatProgramaCONAC.aspx".ToUpper(), 280)
+ PaginaDict.Add("/AC/CatClasificacionFuncional.aspx".ToUpper(), 274)
+ PaginaDict.Add("/AC/CatFuentesFinanciamiento.aspx".ToUpper(), 276)
+ PaginaDict.Add("/AC/CatCuentas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AC/CatFuentesFinanciamientoCONAC.aspx".ToUpper(), 277)
+ PaginaDict.Add("/AC/ProgramaOperativo.aspx".ToUpper(), 289)
+ PaginaDict.Add("/AC/RepProgramaOperativo.aspx".ToUpper(), 289)
+ PaginaDict.Add("/AC/RepPresupuestoEgresos.aspx".ToUpper(), 290)
+ PaginaDict.Add("/AC/RepPresupuestoEgresosMensual.aspx".ToUpper(), 290)
+ PaginaDict.Add("/AC/RepPresupuestoEgresosDetalle.aspx".ToUpper(), 290)
+ PaginaDict.Add("/AC/ProyectoProceso.aspx".ToUpper(), 288)
+ PaginaDict.Add("/AC/PresupuestoEgresos.aspx".ToUpper(), 291)
+ PaginaDict.Add("/AC/CatPresupuestoEgresos.aspx".ToUpper(), 291)
+ PaginaDict.Add("/AC/RegEgresosModificaciones.aspx".ToUpper(), 297)
+ PaginaDict.Add("/AC/PresupuestoIngresos.aspx".ToUpper(), 299)
+ PaginaDict.Add("/AC/CatPresupuestoIngresos.aspx".ToUpper(), 299)
+ PaginaDict.Add("/AC/RegIngresosModificaciones.aspx".ToUpper(), 300)
+ PaginaDict.Add("/AC/RepMatrizIngresos.aspx".ToUpper(), 301)
+ PaginaDict.Add("/AC/RepMatrizEgresos.aspx".ToUpper(), 302)
+ PaginaDict.Add("/AC/RegRecaudado.aspx".ToUpper(), 287)
+ PaginaDict.Add("/AC/RegDevengadoIngresos.aspx".ToUpper(), 298)
+ PaginaDict.Add("/AC/RepPresupuestoIngresos.aspx".ToUpper(), 316)
+ PaginaDict.Add("/AC/RepPresupuestoIngresosMensual.aspx".ToUpper(), 316)
+ PaginaDict.Add("/AC/RegNomina.aspx".ToUpper(), 317)
+ PaginaDict.Add("/AC/RepIngresosMensuales.aspx".ToUpper(), 331)
+ PaginaDict.Add("/AC/RepSituacionFinanciera.aspx".ToUpper(), 332)
+ PaginaDict.Add("/AC/RepEstadoActividades.aspx".ToUpper(), 334)
+ PaginaDict.Add("/AC/RepEstadoAnaliticoActivo.aspx".ToUpper(), 335)
+ PaginaDict.Add("/AC/RepAnaliticoDeudaPublica.aspx".ToUpper(), 121)
+ PaginaDict.Add("/AC/RepFlujoEfectivo.aspx".ToUpper(), 347)
+ PaginaDict.Add("/AC/RepCambiosSituacionFinanciera.aspx".ToUpper(), 348)
+ PaginaDict.Add("/AC/RepVariacionHaciendaPublica.aspx".ToUpper(), 349)
+ PaginaDict.Add("/AC/RepPresupuestoIngresosDetalle.aspx".ToUpper(), 299)
+ PaginaDict.Add("/AC/CatClasificacionAdministrativa.aspx.aspx".ToUpper(), -1) 'ELIMINAR ???
+#End Region
+ ' AC2
+#Region "AC2"
+ PaginaDict.Add("/AC2/CatPresupuestoEgresos.aspx".ToUpper(), 598)
+ PaginaDict.Add("/AC2/CatPresupuestoIngresos.aspx".ToUpper(), 599)
+ PaginaDict.Add("/AC2/RegComprometido.aspx".ToUpper(), 600)
+ PaginaDict.Add("/AC2/RegComprometido.aspx?Opc=NOM".ToUpper(), 601)
+ PaginaDict.Add("/AC2/RegNomina.aspx".ToUpper(), 602)
+ PaginaDict.Add("/AC2/RepPresupuesto.aspx".ToUpper(), 603)
+ PaginaDict.Add("/AC2/RepPresupuestoEgresos.aspx".ToUpper(), 604)
+ PaginaDict.Add("/AC2/RepPresupuestoEgresosMensual.aspx".ToUpper(), 605)
+ PaginaDict.Add("/AC2/RepPresupuestoIngresos.aspx".ToUpper(), 606)
+ PaginaDict.Add("/AC2/RepPresupuestoIngresosMensual.aspx".ToUpper(), 607)
+ PaginaDict.Add("/AC2/RepProgramaOperativo.aspx".ToUpper(), 608)
+ PaginaDict.Add("/AC2/RegEgresosModificaciones.aspx".ToUpper(), 609)
+ PaginaDict.Add("/AC2/PresupuestoEgresos.aspx".ToUpper(), 610)
+ PaginaDict.Add("/AC2/PresupuestoIngresos.aspx".ToUpper(), 611)
+ PaginaDict.Add("/AC2/RepPresupuestoEgresosDetalle.aspx".ToUpper(), 604)
+ PaginaDict.Add("/AC2/RepPresupuestoIngresosDetalle.aspx".ToUpper(), 613)
+ PaginaDict.Add("/AC2/ProgramaOperativo.aspx".ToUpper(), 608)
+#End Region
+ 'ACARREOS'
+#Region "Acarreos"
+ PaginaDict.Add("/Acarreos/CatChoferes.aspx".ToUpper(), 467)
+ PaginaDict.Add("/Acarreos/CatTransportistas.aspx".ToUpper(), 465)
+ PaginaDict.Add("/Acarreos/CatUnidades.aspx".ToUpper(), 466)
+ PaginaDict.Add("/Acarreos/Acarreos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Acarreos/RepAcarreos.aspx".ToUpper(), 461)
+ PaginaDict.Add("/Acarreos/RepAcarreosDetalle.aspx".ToUpper(), 461)
+ PaginaDict.Add("/Acarreos/CatMateriales.aspx".ToUpper(), 468)
+ PaginaDict.Add("/Acarreos/RegistroAcarreo.aspx".ToUpper(), 462)
+ PaginaDict.Add("/Acarreos/AcarreosConcluidos.aspx".ToUpper(), 463)
+ PaginaDict.Add("/Acarreos/RepAcarreosUnidades.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Acarreos/AcarreosUnidades.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Acarreos/CatEstatus.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Acarreos/RegistroContratosAcarreos.aspx".ToUpper(), 481)
+ PaginaDict.Add("/Acarreos/ContratosAcarreos.aspx".ToUpper(), 481)
+ PaginaDict.Add("/Acarreos/AcarreosPreEstimacion.aspx".ToUpper(), 480)
+ PaginaDict.Add("/Acarreos/RepContratosAcarreos.aspx".ToUpper(), 482)
+ PaginaDict.Add("/Acarreos/RepContratosAcarreosDetalle.aspx".ToUpper(), 482)
+ PaginaDict.Add("/Acarreos/RepPreEstimacionDetalle.aspx".ToUpper(), 482)
+#End Region
+ 'ACTIVOS FIJOS
+#Region "AF"
+ PaginaDict.Add("/AF/ValesCombustible.aspx".ToUpper(), 384)
+ PaginaDict.Add("/AF/PopUpBuscarAF.aspx".ToUpper(), 62)
+ PaginaDict.Add("/AF/CatAF.aspx".ToUpper(), 63)
+ PaginaDict.Add("/AF/AF.aspx".ToUpper(), 63)
+ PaginaDict.Add("/AF/RepAF.aspx".ToUpper(), 403)
+ PaginaDict.Add("/AF/BitacoraAF.aspx".ToUpper(), 2043)
+ '-------------HIJOS DE 57
+ PaginaDict.Add("/AF/CatTipos.aspx".ToUpper(), 138)
+ PaginaDict.Add("/AF/CatSubTipos.aspx".ToUpper(), 139)
+ PaginaDict.Add("/AF/CatModelos.aspx".ToUpper(), 140)
+ PaginaDict.Add("/AF/CatMarcas.aspx".ToUpper(), 141)
+ PaginaDict.Add("/AF/CatClasificacionesCaracteristicas.aspx".ToUpper(), 252)
+ PaginaDict.Add("/AF/CatClasificaciones.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AF/CatCaracteristicas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AF/CatOpciones.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AF/ResguardoAF.aspx".ToUpper(), 574)
+ PaginaDict.Add("/AF/CatOperadores.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AF/CatTiposCombustible.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AF/CatCombustibles.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AF/CatCargasCombustible.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AF/RepFlotillas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AF/RepPlacas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AF/RepIncidentes.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AF/RepPolizaSeguro.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AF/RepLicencias.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AF/RepServicios.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AF/RepDepreciacion.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AF/RepEventosProgramados.aspx".ToUpper(), 656)
+#End Region
+ 'AIMMGM
+#Region "AIMMGM"
+ PaginaDict.Add("/AIMMGM/Registro.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AIMMGM/PopRegistro.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AIMMGM/RegistroGIS.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AIMMGM/RepVentas.aspx".ToUpper(), 236)
+ PaginaDict.Add("/AIMMGM/Pagos.aspx".ToUpper(), 238)
+ PaginaDict.Add("/AIMMGM/Saldos.aspx".ToUpper(), 239)
+ PaginaDict.Add("/AIMMGM/VentasPS.aspx".ToUpper(), 240)
+#End Region
+
+ 'BANCOS
+#Region "Bancos"
+ PaginaDict.Add("/Bancos/ProveedoresAbonarH.aspx".ToUpper(), 84)
+ PaginaDict.Add("/Bancos/RepProveedoresPagosH.aspx".ToUpper(), 84)
+ PaginaDict.Add("/Bancos/PruebaCFDI.aspx".ToUpper(), 2027)
+ PaginaDict.Add("/Bancos/CatBancos.aspx".ToUpper(), 150)
+ PaginaDict.Add("/Bancos/CuentasBancarias.aspx".ToUpper(), 151)
+ PaginaDict.Add("/Bancos/CatEstatusIE.aspx".ToUpper(), 152)
+ PaginaDict.Add("/Bancos/CatTiposTransaccion.aspx".ToUpper(), 154)
+ PaginaDict.Add("/Bancos/CuentasBancariasDetalle.aspx".ToUpper(), 151)
+ PaginaDict.Add("/Bancos/Transferencias.aspx".ToUpper(), 285)
+ PaginaDict.Add("/Bancos/OtrosIE.aspx".ToUpper(), 281)
+ PaginaDict.Add("/Bancos/IE.aspx?Opcion=EGSSINFACT&Tipo=PRESTAMODEUDOR".ToUpper(), 508)
+ PaginaDict.Add("/Bancos/IE.aspx?Opcion=EGSSINFACT&Tipo=PAGOACREEDOR".ToUpper(), 509)
+ PaginaDict.Add("/Bancos/IE.aspx?Opcion=INGPC&Tipo=PAGODEUDOR".ToUpper(), 510)
+ PaginaDict.Add("/Bancos/IE.aspx?Opcion=INGPC&Tipo=PRESTAMOACREEDOR".ToUpper(), 507)
+ PaginaDict.Add("/Bancos/PopUpBuscaPersonal.aspx".ToUpper(), 281)
+ PaginaDict.Add("/Bancos/PopUpBuscarColectiva.aspx".ToUpper(), 281)
+ PaginaDict.Add("/Bancos/PopUpBuscarProveedor.aspx".ToUpper(), 281)
+ PaginaDict.Add("/Bancos/PopUpBuscarFolioC.aspx".ToUpper(), 281)
+ PaginaDict.Add("/Bancos/PopUpBuscarClientes.aspx".ToUpper(), 281)
+ 'PaginaDict.Add("/Bancos/CatTiposCuenta.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Bancos/RepClientesAnticipo.aspx".ToUpper(), 306)
+ PaginaDict.Add("/Bancos/CIF.aspx".ToUpper(), 309)
+ PaginaDict.Add("/Bancos/Creditos.aspx".ToUpper(), 318)
+ PaginaDict.Add("/Bancos/PagoElectronico.aspx".ToUpper(), 324)
+ PaginaDict.Add("/Bancos/RepProgramaciones.aspx".ToUpper(), 323)
+
+ PaginaDict.Add("/Bancos/PopIE.aspx".ToUpper(), 153)
+ PaginaDict.Add("/Bancos/PopIEVentas.aspx".ToUpper(), 153)
+ PaginaDict.Add("/Bancos/PopIECompras.aspx".ToUpper(), 153)
+ PaginaDict.Add("/Bancos/RepProveedoresPagos.aspx".ToUpper(), 84)
+ PaginaDict.Add("/Bancos/ProveedoresAbonar.aspx".ToUpper(), 84)
+ PaginaDict.Add("/Bancos/RepSaldos.aspx".ToUpper(), 169)
+ PaginaDict.Add("/Bancos/RepSaldosDetalle.aspx".ToUpper(), 169)
+ PaginaDict.Add("/Bancos/RepProgramarRecursos.aspx".ToUpper(), 170)
+ 'PaginaDict.Add("/Bancos/PolizaCheque.aspx".ToUpper(), 171)
+ PaginaDict.Add("/Bancos/RepEgresosSinComprobante.aspx".ToUpper(), 235)
+ PaginaDict.Add("/Bancos/RepCxCCliente.aspx".ToUpper(), 321)
+ PaginaDict.Add("/Bancos/FluctuacionCambiaria.aspx".ToUpper(), 329)
+ PaginaDict.Add("/Bancos/Reembolsos.aspx".ToUpper(), 333)
+ PaginaDict.Add("/Bancos/CreditosPagoMultiple.aspx".ToUpper(), 342)
+ PaginaDict.Add("/Bancos/NotificacionCheques.aspx".ToUpper(), 345)
+ PaginaDict.Add("/Bancos/ProductosFinancieros.aspx".ToUpper(), 351)
+ PaginaDict.Add("/Bancos/PopUpBuscarIE.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Bancos/RepCobradoPagadoDetalle.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Bancos/RepCobradoPagado.aspx".ToUpper(), 368)
+ PaginaDict.Add("/Bancos/RepIngresosPorComprobar.aspx".ToUpper(), 381)
+ PaginaDict.Add("/Bancos/Documentos.aspx".ToUpper(), 319)
+ PaginaDict.Add("/Bancos/RepCreditos.aspx".ToUpper(), 320)
+ PaginaDict.Add("/Bancos/RepSaldosDAP.aspx".ToUpper(), 385)
+ PaginaDict.Add("/Bancos/DepositosCaja.aspx".ToUpper(), 560)
+ PaginaDict.Add("/Bancos/RepCortes.aspx".ToUpper(), 1008)
+ PaginaDict.Add("/Bancos/RegistroPagoIntermediario.aspx".ToUpper(), 1013)
+ PaginaDict.Add("/Bancos/RepComplementoPago.aspx".ToUpper(), 512)
+ PaginaDict.Add("/Bancos/DepositoTerminal.aspx".ToUpper(), 281)
+ PaginaDict.Add("/Bancos/FlujoDiario.aspx".ToUpper(), 515)
+ PaginaDict.Add("/Bancos/RepComprobaciones.aspx".ToUpper(), 647)
+ PaginaDict.Add("/Bancos/RepCobrado.aspx".ToUpper(), 505)
+ PaginaDict.Add("/Bancos/RepCobradoDetalle.aspx".ToUpper(), 505)
+ PaginaDict.Add("/Bancos/ConciliacionesBancarias.aspx".ToUpper(), 874)
+ PaginaDict.Add("/Bancos/CargarConciliacionesBancarias.aspx".ToUpper(), 878)
+ PaginaDict.Add("/Bancos/PagoAcreedor.aspx".ToUpper(), 507)
+ PaginaDict.Add("/Bancos/PagoDeudor.aspx".ToUpper(), 508)
+ PaginaDict.Add("/Bancos/Devoluciones.aspx".ToUpper(), 283)
+ PaginaDict.Add("/Bancos/RepProveedoresCreditos.aspx".ToUpper(), 528)
+ PaginaDict.Add("/Bancos/ProveedoresCreditos.aspx".ToUpper(), 528)
+ PaginaDict.Add("/Bancos/RepSaldosPeriodo.aspx".ToUpper(), 884)
+ PaginaDict.Add("/Bancos/PrestamoPersonal.aspx".ToUpper(), 890)
+#End Region
+
+#Region "CGame"
+ PaginaDict.Add("/CGame/OrdenProduccion.aspx".ToUpper(), 815)
+ PaginaDict.Add("/CGame/PopUpBuscarOrdenProduccion.aspx".ToUpper(), 816)
+ PaginaDict.Add("/CGame/RepOrdenProduccion.aspx".ToUpper(), 824)
+ PaginaDict.Add("/CGame/RepAvance.aspx".ToUpper(), 844)
+
+ 'Reportes de Gastos
+ PaginaDict.Add("/CGame/RepPreEnfriado.aspx".ToUpper(), 855)
+ PaginaDict.Add("/CGame/RepCorte.aspx".ToUpper(), 857)
+ PaginaDict.Add("/CGame/RepFletes.aspx".ToUpper(), 858)
+ PaginaDict.Add("/CGame/RepOtrosGastos.aspx".ToUpper(), 859)
+ PaginaDict.Add("/CGame/RepMateriales.aspx".ToUpper(), 860)
+ PaginaDict.Add("/CGame/RepMaquila.aspx".ToUpper(), 862)
+
+ 'Reportes de Ingresos
+ PaginaDict.Add("/CGame/RepIngresos.aspx".ToUpper(), 861)
+
+ 'Estado de Cuenta
+ PaginaDict.Add("/CGame/EstadoCuenta.aspx".ToUpper(), 851)
+ PaginaDict.Add("/CGame/EstadoCuentaDetalle.aspx".ToUpper(), 851)
+
+ 'Liquidacion
+ PaginaDict.Add("/CGame/Liquidacion.aspx".ToUpper(), 853)
+
+ 'Orden Corte'
+ PaginaDict.Add("/CGame/EntradaMateriaPrima.aspx".ToUpper(), 820)
+ PaginaDict.Add("/CGame/RepOrdenCorte.aspx".ToUpper(), 842)
+ PaginaDict.Add("/CGame/RepOrdenCorteDetalle.aspx".ToUpper(), 842)
+ PaginaDict.Add("/CGame/GenerarOrdenCorte.aspx".ToUpper(), 845)
+ PaginaDict.Add("/CGame/CorteGasto.aspx".ToUpper(), 835)
+ PaginaDict.Add("/CGame/PopUpBuscarCorteGasto.aspx".ToUpper(), 836)
+ PaginaDict.Add("/CGame/RepCorteGasto.aspx".ToUpper(), 850)
+ PaginaDict.Add("/CGame/RepOrdenProduccionXHuerta.aspx".ToUpper(), 856)
+
+ 'Empaque'
+ PaginaDict.Add("/CGame/Empaque.aspx".ToUpper(), 822)
+ PaginaDict.Add("/CGame/PopUpBuscarEmpaque.aspx".ToUpper(), 823)
+ PaginaDict.Add("/CGame/RepEmpaque.aspx".ToUpper(), 825)
+ PaginaDict.Add("/CGame/AsignacionEmpaque.aspx".ToUpper(), 826)
+ PaginaDict.Add("/CGame/RepEmpaqueDetalle.aspx".ToUpper(), 825)
+ PaginaDict.Add("/CGame/AsignacionEmpaque2.aspx".ToUpper(), 826)
+
+ 'Fletes'
+ PaginaDict.Add("/CGame/Fletes.aspx".ToUpper(), 830)
+ PaginaDict.Add("/CGame/RepFletesPendientes.aspx".ToUpper(), 847)
+ 'Configuración
+ PaginaDict.Add("/CGame/CatEstatus.aspx".ToUpper(), 811)
+ PaginaDict.Add("/CGame/CatTamaños.aspx".ToUpper(), 812)
+ PaginaDict.Add("/CGame/CatEmpaque.aspx".ToUpper(), 814)
+ PaginaDict.Add("/CGame/CatCalidad.aspx".ToUpper(), 810)
+ PaginaDict.Add("/CGame/CatTipoCaja.aspx".ToUpper(), 813)
+ PaginaDict.Add("/CGame/CatProductos.aspx".ToUpper(), 834)
+ PaginaDict.Add("/CGame/CatCGameClientes.aspx".ToUpper(), 8301)
+ PaginaDict.Add("/CGame/CatTipoEmpaque.aspx".ToUpper(), 832)
+ PaginaDict.Add("/CGame/CatTipoMaduracion.aspx".ToUpper(), 833)
+ PaginaDict.Add("/CGame/CatTipoProducto.aspx".ToUpper(), 837)
+ PaginaDict.Add("/CGame/CatHuerta.aspx".ToUpper(), 818)
+ PaginaDict.Add("/CGame/CatMotivosMerma.aspx".ToUpper(), 819)
+ PaginaDict.Add("/CGame/CatScat.aspx".ToUpper(), 846)
+ PaginaDict.Add("/Acarreos/CatTransportistas.aspx?Op=Cor".ToUpper(), 828)
+ PaginaDict.Add("/Acarreos/CatChoferes.aspx?Op=Cor".ToUpper(), 829)
+ PaginaDict.Add("/CGame/CatConceptoGastoCorte.aspx".ToUpper(), 848)
+ PaginaDict.Add("/CGame/CatCargosFijos.aspx".ToUpper(), 852)
+#End Region
+ 'COMPRAS
+#Region "Compras"
+ PaginaDict.Add("/Compras/RepTopCompras.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Compras/CatProveedores.aspx".ToUpper(), 37)
+ PaginaDict.Add("/Compras/Proveedores.aspx".ToUpper(), 37)
+ PaginaDict.Add("/Compras/Compras.aspx".ToUpper(), 38)
+ 'PaginaDict.Add("/Compras/ComprasJaneth.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Compras/PopUpBuscarFolioC.aspx".ToUpper(), 38)
+ 'PaginaDict.Add("/Compras/RecepcionFacturas.aspx".ToUpper(), 38)
+ PaginaDict.Add("/Compras/RepCompras.aspx".ToUpper(), 95)
+ PaginaDict.Add("/Compras/RepComprasPeriodo.aspx".ToUpper(), 96)
+ PaginaDict.Add("/Compras/RepComprasDetalle.aspx".ToUpper(), 95)
+ PaginaDict.Add("/Compras/eFacturas.aspx".ToUpper(), 137)
+ PaginaDict.Add("/Compras/CatEstatusFactura.aspx".ToUpper(), 145)
+ PaginaDict.Add("/Compras/RepCxP.aspx".ToUpper(), 168)
+ PaginaDict.Add("/Compras/RepCxPDetalle.aspx".ToUpper(), 168)
+ PaginaDict.Add("/Compras/CatProveedoresClasificaciones.aspx".ToUpper(), 186)
+ PaginaDict.Add("/Compras/CatAcreedores.aspx".ToUpper(), 303)
+ PaginaDict.Add("/Compras/Acreedores.aspx".ToUpper(), 303)
+ PaginaDict.Add("/Compras/RepComprasG.aspx".ToUpper(), 286)
+ PaginaDict.Add("/Compras/Compras2.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Compras/Compras3.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Compras/Compras5.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Compras/Importaciones.aspx".ToUpper(), 319)
+ PaginaDict.Add("/Compras/RepImportaciones.aspx".ToUpper(), 326)
+ PaginaDict.Add("/Compras/RegGastos.aspx".ToUpper(), 328)
+ PaginaDict.Add("/Compras/RepBeneficiarios.aspx".ToUpper(), 336)
+ PaginaDict.Add("/Compras/RepBeneficiariosDetalle.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Compras/RepProductosServiciosDetalle.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Compras/RepNotasCredito.aspx".ToUpper(), 337)
+ PaginaDict.Add("/Compras/ReembolsosComprobaciones.aspx".ToUpper(), 350)
+ PaginaDict.Add("/Compras/RepProductosServicios.aspx".ToUpper(), 97)
+ PaginaDict.Add("/Compras/RepPerioricidad.aspx".ToUpper(), 126)
+ PaginaDict.Add("/Compras/PopUpFacturasPendientesAutorizar.aspx".ToUpper(), 559)
+ PaginaDict.Add("/Compras/RepEvaluacionProveedor.aspx".ToUpper(), 564)
+ PaginaDict.Add("/Compras/RepRembolsoComprobaciones.aspx".ToUpper(), 591)
+ PaginaDict.Add("/Compras/ComprasO.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Compras/ComprasH.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Compras/RembolsosSinAsignar.aspx".ToUpper(), 635)
+ PaginaDict.Add("/Compras/RepGastos.aspx".ToUpper(), 2051)
+ PaginaDict.Add("/Compras/RepGastosDetalle.aspx".ToUpper(), 2051)
+ PaginaDict.Add("/Compras/RepComprasAF.aspx".ToUpper(), 636)
+ PaginaDict.Add("/Compras/RepComprasAFDetalle.aspx".ToUpper(), 636)
+ PaginaDict.Add("/Compras/RepComprasPersonal.aspx".ToUpper(), 637)
+ PaginaDict.Add("/Compras/RepComprasPersonalDetalle.aspx".ToUpper(), 637)
+ PaginaDict.Add("/Compras/RepComplementoPago.aspx".ToUpper(), 657)
+ PaginaDict.Add("/Compras/RepPromociones.aspx".ToUpper(), 638)
+ PaginaDict.Add("/Compras/RepProductosServiciosPeriodo.aspx".ToUpper(), 866)
+ PaginaDict.Add("/Compras/RepGastosFijos.aspx".ToUpper(), 661)
+ PaginaDict.Add("/Compras/RepPagado.aspx".ToUpper(), 872)
+ PaginaDict.Add("/Compras/RepPagadoDetalle.aspx".ToUpper(), 872)
+ PaginaDict.Add("/Compras/RepPagadoPeriodo.aspx".ToUpper(), 886)
+ PaginaDict.Add("/Compras/RepCxPPeriodo.aspx".ToUpper(), 888)
+ PaginaDict.Add("/Compras/RepGastosSemanal.aspx".ToUpper(), 534)
+ PaginaDict.Add("/Compras/ProveedoresAuxiliar.aspx".ToUpper(), 536)
+ PaginaDict.Add("/Compras/RepComprasInventarios.aspx".ToUpper(), 537)
+ PaginaDict.Add("/Compras/RepAnt-NC-EXC.aspx".ToUpper(), 538)
PaginaDict.Add("/Compras/RepAnt-NC-EXCDetalle.aspx".ToUpper(), 538)
- PaginaDict.Add("/Compras/EvaluacionProveedor.aspx".ToUpper(), 715) 'EvaluacionProveedor.aspx
+ PaginaDict.Add("/Compras/EvaluacionProveedor.aspx".ToUpper(), 715) 'EvaluacionProveedor.aspx
PaginaDict.Add("/Compras/RepPUESinPago.aspx".ToUpper(), 675)
PaginaDict.Add("/Compras/RepReqOCCompraInv.aspx".ToUpper(), 689)
PaginaDict.Add("/Compras/RepComprasPrecios.aspx".ToUpper(), 690)
@@ -3963,706 +3962,706 @@ Public Class ClsPaginas
PaginaDict.Add("/Compras/CatPaqueteriasGuiasTipo.aspx".ToUpper(), 753)
PaginaDict.Add("/Compras/RepEvaluacionesProveedores.aspx".ToUpper(), 754)
-#End Region
+#End Region
'CONTABILIDAD
-#Region "Contabilidad"
+#Region "Contabilidad"
'CONTABILIDAD ELECTRONICA
- PaginaDict.Add("/Contabilidad/ContabilidadElectronica.aspx".ToUpper(), 566)
- PaginaDict.Add("/Contabilidad/RepGastosCC.aspx".ToUpper(), 535)
- PaginaDict.Add("/Contabilidad/ContabilizarPagosCliente.aspx".ToUpper(), 52)
- PaginaDict.Add("/Contabilidad/DiarioVentas.aspx".ToUpper(), 53)
- PaginaDict.Add("/Contabilidad/ContabilizacionVentas.aspx".ToUpper(), 53)
- PaginaDict.Add("/Contabilidad/ContabilizacionCompras.aspx".ToUpper(), 555)
- PaginaDict.Add("/Contabilidad/ContabilizacionComprasRefinada.aspx".ToUpper(), 53)
- PaginaDict.Add("/Contabilidad/DiarioCompras.aspx".ToUpper(), 130)
- PaginaDict.Add("/Contabilidad/DiarioPagos.aspx".ToUpper(), 52)
- PaginaDict.Add("/Contabilidad/DiarioAmortizaciones.aspx".ToUpper(), 119)
- PaginaDict.Add("/Contabilidad/Poliza.aspx".ToUpper(), 54)
- PaginaDict.Add("/Contabilidad/RegPoliza.aspx".ToUpper(), 54)
-
- PaginaDict.Add("/Contabilidad/TiposPoliza.aspx".ToUpper(), 165)
- PaginaDict.Add("/Contabilidad/PlantillasPolizas.aspx".ToUpper(), 304)
- PaginaDict.Add("/Contabilidad/PlantillasPolizasDetalle.aspx".ToUpper(), 304)
- PaginaDict.Add("/Contabilidad/ConceptosContables.aspx".ToUpper(), 166)
- PaginaDict.Add("/Contabilidad/RepAuxiliar.aspx".ToUpper(), 133)
- PaginaDict.Add("/Contabilidad/RepPolizasCuadre.aspx".ToUpper(), 386)
-
- PaginaDict.Add("/Contabilidad/RepBalanceGeneralMensual.aspx".ToUpper(), 123)
- PaginaDict.Add("/Contabilidad/RepEstadoResultadosMensual.aspx".ToUpper(), 124)
- 'PaginaDict.Add("/Contabilidad/RepBalanceGeneralAnual.aspx".ToUpper(), 126)
- PaginaDict.Add("/Contabilidad/RepEstadoResultadosAnual.aspx".ToUpper(), 127)
- PaginaDict.Add("/Contabilidad/FiltraPolizas.aspx".ToUpper(), 128)
- PaginaDict.Add("/Contabilidad/RepContabilidadDiaria.aspx".ToUpper(), 504)
- PaginaDict.Add("/Contabilidad/CatCuentas.aspx".ToUpper(), 178)
- PaginaDict.Add("/Contabilidad/RepOrigenAplicacion.aspx".ToUpper(), 354)
- PaginaDict.Add("/Contabilidad/RepBalanceGeneralProForma.aspx".ToUpper(), 358)
- PaginaDict.Add("/Contabilidad/RepEstadoResultadosProForma.aspx".ToUpper(), 359)
- PaginaDict.Add("/Contabilidad/RepBalanceGeneral.aspx".ToUpper(), 362)
- PaginaDict.Add("/Contabilidad/RepEstadoResultados.aspx".ToUpper(), 363)
- PaginaDict.Add("/Contabilidad/RepIVADiferencias.aspx".ToUpper(), 127)
- PaginaDict.Add("/Contabilidad/PolizasImpresion.aspx".ToUpper(), 380)
- PaginaDict.Add("/Contabilidad/RegPrePoliza.aspx".ToUpper(), 398)
+ PaginaDict.Add("/Contabilidad/ContabilidadElectronica.aspx".ToUpper(), 566)
+ PaginaDict.Add("/Contabilidad/RepGastosCC.aspx".ToUpper(), 535)
+ PaginaDict.Add("/Contabilidad/ContabilizarPagosCliente.aspx".ToUpper(), 52)
+ PaginaDict.Add("/Contabilidad/DiarioVentas.aspx".ToUpper(), 53)
+ PaginaDict.Add("/Contabilidad/ContabilizacionVentas.aspx".ToUpper(), 53)
+ PaginaDict.Add("/Contabilidad/ContabilizacionCompras.aspx".ToUpper(), 555)
+ PaginaDict.Add("/Contabilidad/ContabilizacionComprasRefinada.aspx".ToUpper(), 53)
+ PaginaDict.Add("/Contabilidad/DiarioCompras.aspx".ToUpper(), 130)
+ PaginaDict.Add("/Contabilidad/DiarioPagos.aspx".ToUpper(), 52)
+ PaginaDict.Add("/Contabilidad/DiarioAmortizaciones.aspx".ToUpper(), 119)
+ PaginaDict.Add("/Contabilidad/Poliza.aspx".ToUpper(), 54)
+ PaginaDict.Add("/Contabilidad/RegPoliza.aspx".ToUpper(), 54)
+
+ PaginaDict.Add("/Contabilidad/TiposPoliza.aspx".ToUpper(), 165)
+ PaginaDict.Add("/Contabilidad/PlantillasPolizas.aspx".ToUpper(), 304)
+ PaginaDict.Add("/Contabilidad/PlantillasPolizasDetalle.aspx".ToUpper(), 304)
+ PaginaDict.Add("/Contabilidad/ConceptosContables.aspx".ToUpper(), 166)
+ PaginaDict.Add("/Contabilidad/RepAuxiliar.aspx".ToUpper(), 133)
+ PaginaDict.Add("/Contabilidad/RepPolizasCuadre.aspx".ToUpper(), 386)
+
+ PaginaDict.Add("/Contabilidad/RepBalanceGeneralMensual.aspx".ToUpper(), 123)
+ PaginaDict.Add("/Contabilidad/RepEstadoResultadosMensual.aspx".ToUpper(), 124)
+ 'PaginaDict.Add("/Contabilidad/RepBalanceGeneralAnual.aspx".ToUpper(), 126)
+ PaginaDict.Add("/Contabilidad/RepEstadoResultadosAnual.aspx".ToUpper(), 127)
+ PaginaDict.Add("/Contabilidad/FiltraPolizas.aspx".ToUpper(), 128)
+ PaginaDict.Add("/Contabilidad/RepContabilidadDiaria.aspx".ToUpper(), 504)
+ PaginaDict.Add("/Contabilidad/CatCuentas.aspx".ToUpper(), 178)
+ PaginaDict.Add("/Contabilidad/RepOrigenAplicacion.aspx".ToUpper(), 354)
+ PaginaDict.Add("/Contabilidad/RepBalanceGeneralProForma.aspx".ToUpper(), 358)
+ PaginaDict.Add("/Contabilidad/RepEstadoResultadosProForma.aspx".ToUpper(), 359)
+ PaginaDict.Add("/Contabilidad/RepBalanceGeneral.aspx".ToUpper(), 362)
+ PaginaDict.Add("/Contabilidad/RepEstadoResultados.aspx".ToUpper(), 363)
+ PaginaDict.Add("/Contabilidad/RepIVADiferencias.aspx".ToUpper(), 127)
+ PaginaDict.Add("/Contabilidad/PolizasImpresion.aspx".ToUpper(), 380)
+ PaginaDict.Add("/Contabilidad/RegPrePoliza.aspx".ToUpper(), 398)
PaginaDict.Add("/Contabilidad/RegPrePoliza1.aspx".ToUpper(), 398)
- PaginaDict.Add("/Contabilidad/RegPrePolizaS.aspx".ToUpper(), 398)
- PaginaDict.Add("/Contabilidad/DescargaRespaldos.aspx".ToUpper(), 400)
- PaginaDict.Add("/Contabilidad/RepBalanceGeneral2.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contabilidad/CatEjercicios.aspx".ToUpper(), 570)
- PaginaDict.Add("/Contabilidad/AnalisisVertical.aspx".ToUpper(), 416)
- PaginaDict.Add("/Contabilidad/FisImpuestos.aspx".ToUpper(), 431)
- PaginaDict.Add("/Contabilidad/RepFisImpuestos.aspx".ToUpper(), 432)
- PaginaDict.Add("/Contabilidad/LibroDiario.aspx".ToUpper(), 620)
- PaginaDict.Add("/Contabilidad/LibroMayor.aspx".ToUpper(), 619)
- PaginaDict.Add("/Contabilidad/Reportes/RepCuadreContaAdmon.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contabilidad/Reportes/RepCuadreContaAdmonDetalle.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contabilidad/ComparacionesContabilidad.aspx".ToUpper(), 330)
- PaginaDict.Add("/Contabilidad/RepEdoResultados2.aspx".ToUpper(), 89)
- PaginaDict.Add("/Contabilidad/RepEdoResultados2Detalle.aspx".ToUpper(), 89)
- PaginaDict.Add("/Contabilidad/RepIVA.aspx".ToUpper(), 658)
- PaginaDict.Add("/Contabilidad/AuxiliarPrePolizas.aspx".ToUpper(), 871)
- PaginaDict.Add("/Contabilidad/RepEstadoResultadosPorSegmento.aspx".ToUpper(), 1317)
-
- PaginaDict.Add("/Contabilidad/RepAnexoCatalogoMes.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contabilidad/RepAnexoCatalogoSegmento.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contabilidad/RepAnexoCatalogo.aspx".ToUpper(), 341)
- PaginaDict.Add("/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx".ToUpper(), 340)
- PaginaDict.Add("/Contabilidad/RepBalanzaComprobacion.aspx".ToUpper(), 344)
- PaginaDict.Add("/Contabilidad/CatCuentasSIG.aspx".ToUpper(), 405)
- PaginaDict.Add("/Contabilidad/RepIEPS.aspx".ToUpper(), 714)
+ PaginaDict.Add("/Contabilidad/RegPrePolizaS.aspx".ToUpper(), 398)
+ PaginaDict.Add("/Contabilidad/DescargaRespaldos.aspx".ToUpper(), 400)
+ PaginaDict.Add("/Contabilidad/RepBalanceGeneral2.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contabilidad/CatEjercicios.aspx".ToUpper(), 570)
+ PaginaDict.Add("/Contabilidad/AnalisisVertical.aspx".ToUpper(), 416)
+ PaginaDict.Add("/Contabilidad/FisImpuestos.aspx".ToUpper(), 431)
+ PaginaDict.Add("/Contabilidad/RepFisImpuestos.aspx".ToUpper(), 432)
+ PaginaDict.Add("/Contabilidad/LibroDiario.aspx".ToUpper(), 620)
+ PaginaDict.Add("/Contabilidad/LibroMayor.aspx".ToUpper(), 619)
+ PaginaDict.Add("/Contabilidad/Reportes/RepCuadreContaAdmon.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contabilidad/Reportes/RepCuadreContaAdmonDetalle.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contabilidad/ComparacionesContabilidad.aspx".ToUpper(), 330)
+ PaginaDict.Add("/Contabilidad/RepEdoResultados2.aspx".ToUpper(), 89)
+ PaginaDict.Add("/Contabilidad/RepEdoResultados2Detalle.aspx".ToUpper(), 89)
+ PaginaDict.Add("/Contabilidad/RepIVA.aspx".ToUpper(), 658)
+ PaginaDict.Add("/Contabilidad/AuxiliarPrePolizas.aspx".ToUpper(), 871)
+ PaginaDict.Add("/Contabilidad/RepEstadoResultadosPorSegmento.aspx".ToUpper(), 1317)
+
+ PaginaDict.Add("/Contabilidad/RepAnexoCatalogoMes.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contabilidad/RepAnexoCatalogoSegmento.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contabilidad/RepAnexoCatalogo.aspx".ToUpper(), 341)
+ PaginaDict.Add("/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx".ToUpper(), 340)
+ PaginaDict.Add("/Contabilidad/RepBalanzaComprobacion.aspx".ToUpper(), 344)
+ PaginaDict.Add("/Contabilidad/CatCuentasSIG.aspx".ToUpper(), 405)
+ PaginaDict.Add("/Contabilidad/RepIEPS.aspx".ToUpper(), 714)
PaginaDict.Add("/Contabilidad/CatPeriodosBloqueo.aspx".ToUpper(), 677)
PaginaDict.Add("/Contabilidad/CatClasificacionPorcentaje.aspx".ToUpper(), 752)
-#End Region
+#End Region
'CONTABILIDAD2
-#Region "Contabilidad2"
- PaginaDict.Add("/Contabilidad2/RepAnexoCatalogo.aspx".ToUpper(), 580)
- PaginaDict.Add("/Contabilidad2/RepBalanzaComprobacion.aspx".ToUpper(), 582)
- PaginaDict.Add("/Contabilidad2/RepEstadoActividades.aspx".ToUpper(), 583)
- PaginaDict.Add("/Contabilidad2/RepFlujoEfectivo.aspx".ToUpper(), 584)
- PaginaDict.Add("/Contabilidad2/RepCambiosSituacionFinanciera.aspx".ToUpper(), 585)
- PaginaDict.Add("/Contabilidad2/RepSituacionFinanciera.aspx".ToUpper(), 586)
- PaginaDict.Add("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx".ToUpper(), 587)
- PaginaDict.Add("/Contabilidad2/RegPoliza.aspx".ToUpper(), 588)
- PaginaDict.Add("/Contabilidad2/PymeRegPoliza.aspx".ToUpper(), 588)
- PaginaDict.Add("/Contabilidad2/RepAlmacenConta.aspx".ToUpper(), 539)
-
- PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoMensual.aspx".ToUpper(), 589)
- PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoAnual.aspx".ToUpper(), 593)
- PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoCC.aspx".ToUpper(), 594)
- PaginaDict.Add("/Contabilidad2/RepVariacionHaciendaPublica.aspx".ToUpper(), 595)
- PaginaDict.Add("/Contabilidad2/CatCuentas.aspx".ToUpper(), 596)
-
- PaginaDict.Add("/Contabilidad2/RepSituacionFinancieraSAT.aspx".ToUpper(), 615)
- PaginaDict.Add("/Contabilidad2/RepEstadoActividadesSAT.aspx".ToUpper(), 616)
- PaginaDict.Add("/Contabilidad2/RepBalanzaComprobacionSAT.aspx".ToUpper(), 617)
- PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoSAT.aspx".ToUpper(), 618)
- PaginaDict.Add("/Contabilidad2/MovimientosConProveedores.aspx".ToUpper(), 619)
- PaginaDict.Add("/Contabilidad2/RepBalanceGeneral.aspx".ToUpper(), 530)
-#End Region
- 'CONTRATOS
-#Region "Contratos"
-
- '------------------------------ C O N T R A T O S - P R E S U P U E S T O S ---------------------
- PaginaDict.Add("/Contratos/Presupuestos.aspx".ToUpper(), 901)
- PaginaDict.Add("/Contratos/ModificarPresupuesto.aspx".ToUpper(), 902)
- PaginaDict.Add("/Contratos/CatPresupuestos.aspx".ToUpper(), 903)
- PaginaDict.Add("/Contratos/RepPresupuestos.aspx".ToUpper(), 905)
- PaginaDict.Add("/Contratos/RepPresupuestosDetalle.aspx".ToUpper(), 905)
- PaginaDict.Add("/Contratos/RepPresupuestosDetalleCompras.aspx".ToUpper(), 905)
- PaginaDict.Add("/Contratos/FacturacionMasiva.aspx".ToUpper(), 454)
- PaginaDict.Add("/Contratos/CatContratosPlantillas.aspx".ToUpper(), 455)
-
-
- PaginaDict.Add("/Contratos/CatSecciones.aspx".ToUpper(), -1) '152
- PaginaDict.Add("/Contratos/ContratosSecciones.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contratos/Contratos.aspx".ToUpper(), -1) '154
- PaginaDict.Add("/Contratos/ContratosDetalle.aspx".ToUpper(), -1) '154
- PaginaDict.Add("/Contratos/CatEstimaciones.aspx".ToUpper(), 155)
- PaginaDict.Add("/Contratos/Contrato.aspx".ToUpper(), 313)
- PaginaDict.Add("/Contratos/PopUpBuscarContrato.aspx".ToUpper(), 315)
- PaginaDict.Add("/Contratos/ContratoAvance.aspx".ToUpper(), 377)
- PaginaDict.Add("/Contratos/RepContratosAvancesCP.aspx".ToUpper(), 410)
- PaginaDict.Add("/Contratos/CatPeriodosFacturacion.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contratos/CatTarifas.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contratos/RepContratosSuministros.aspx".ToUpper(), 496)
- PaginaDict.Add("/Contratos/RepContratosCostos.aspx".ToUpper(), 670)
- 'PaginaDict.Add("/Contratos/CatReferendos.aspx".ToUpper(), 644)
- PaginaDict.Add("/Contratos/CatRefrendos.aspx".ToUpper(), 644)
- PaginaDict.Add("/Contratos/RepContratosFianzas.aspx".ToUpper(), 646)
- PaginaDict.Add("/Contratos/RepPedidosDevolucionesXContrato.aspx".ToUpper(), 705)
-#End Region
- 'CONTABILIDAD2 - Finanzas
-#Region "CrM"
- 'CRM
- PaginaDict.Add("/CRM/CatTipoProceso.aspx".ToUpper(), 1301)
- PaginaDict.Add("/CRM/CatMediosCaptacion.aspx".ToUpper(), 1302)
- PaginaDict.Add("/CRM/CatRechazoMotivo.aspx".ToUpper(), 1303)
- PaginaDict.Add("/CRM/CatEtapasProceso.aspx".ToUpper(), 1304)
- PaginaDict.Add("/CRM/CatEmpresasCRM.aspx".ToUpper(), 1305)
- PaginaDict.Add("/CRM/EmpresaCRM.aspx".ToUpper(), 1305)
- PaginaDict.Add("/CRM/CatProbabilidadAcercamiento.aspx".ToUpper(), 1306)
- 'PaginaDict.Add("/CRM/Acercamiento.aspx".ToUpper(), 1308)
- PaginaDict.Add("/CRM/Acercamiento.aspx".ToUpper(), 1305)
- PaginaDict.Add("/CRM/RepAcercamientosEtapas.aspx".ToUpper(), 1310)
- PaginaDict.Add("/CRM/RepAcercamientos.aspx".ToUpper(), 1311)
- PaginaDict.Add("/CRM/PopUpBuscarAcercamiento.aspx".ToUpper(), 1312)
- PaginaDict.Add("/CRM/RepAcercamientosProcesos.aspx".ToUpper(), -1)
- PaginaDict.Add("/CRM/RepAcercamientosRechazos.aspx".ToUpper(), -1)
- PaginaDict.Add("/CRM/RepAcercamientosProcesosDetalle.aspx".ToUpper(), -1)
- PaginaDict.Add("/CRM/CatMetas.aspx".ToUpper(), 684)
-#End Region
-#Region "CxC"
-
- 'CxC
- PaginaDict.Add("/CxC/RepCxC.aspx".ToUpper(), 8)
- PaginaDict.Add("/CxC/RepCxCDetalle.aspx".ToUpper(), 565)
- PaginaDict.Add("/CxC/RepCxCSemanal.aspx".ToUpper(), 31)
- PaginaDict.Add("/CxC/GestionCobranza.aspx".ToUpper(), 490)
- PaginaDict.Add("/CxC/RepCxCPeriodo.aspx".ToUpper(), 887)
-#End Region
-#Region "Finanzas"
- 'Finanzas
- PaginaDict.Add("/Finanzas/RepRazonesFinancieras.aspx".ToUpper(), 592)
- PaginaDict.Add("/Finanzas/FinanMetas.aspx".ToUpper(), 361)
- PaginaDict.Add("/Finanzas/FinanVentasProyecciones.aspx".ToUpper(), 360)
- PaginaDict.Add("/Finanzas/AnalisisCreditoCliente.aspx".ToUpper(), 879)
- PaginaDict.Add("/Finanzas/AnalisisCreditoProveedor.aspx".ToUpper(), 880)
- PaginaDict.Add("/Finanzas/RepBalanceGeneral.aspx".ToUpper(), 578)
- PaginaDict.Add("/Finanzas/RepBalanceGeneralVertical.aspx".ToUpper(), 418)
- PaginaDict.Add("/Finanzas/RepBalanceGeneralHorizontal.aspx".ToUpper(), 419)
- PaginaDict.Add("/Finanzas/RepEstadoResultados.aspx".ToUpper(), 579)
- PaginaDict.Add("/Finanzas/RepEstadoResultadosHorizontal.aspx".ToUpper(), 420)
- PaginaDict.Add("/Finanzas/RepEstadoResultadosVertical.aspx".ToUpper(), 424)
- PaginaDict.Add("/Finanzas/RepOrigenAplicacion.aspx".ToUpper(), 581)
- PaginaDict.Add("/Finanzas/RazonesFinancierasCuentas.aspx".ToUpper(), -1)
- PaginaDict.Add("/Finanzas/RepRotacionCartera.aspx".ToUpper(), 649)
- PaginaDict.Add("/Finanzas/RepRotacionCarteraDetalle.aspx".ToUpper(), 649)
-#End Region
-#Region "Flotillas"
-
- 'FLOTILLAS
- PaginaDict.Add("/Flotillas/CatCombustibles.aspx".ToUpper(), 284)
- PaginaDict.Add("/Flotillas/RepIncidentes.aspx".ToUpper(), 497)
- PaginaDict.Add("/Flotillas/RepLicencias.aspx".ToUpper(), 498)
- PaginaDict.Add("/Flotillas/RepPlacas.aspx".ToUpper(), 499)
- PaginaDict.Add("/Flotillas/RepPolizaSeguro.aspx".ToUpper(), 500)
- PaginaDict.Add("/Flotillas/RepServicios.aspx".ToUpper(), 501)
-#End Region
- 'GENERAL
-#Region "General"
- PaginaDict.Add("/General/CatClasificaciones.aspx".ToUpper(), 425)
- PaginaDict.Add("/General/CatPSCaracteristicas.aspx".ToUpper(), 101)
- PaginaDict.Add("/General/CatCategorias.aspx".ToUpper(), 233)
- PaginaDict.Add("/General/SaldosIniciales.aspx".ToUpper(), 526)
- PaginaDict.Add("/General/Colectivas.aspx".ToUpper(), 307)
- PaginaDict.Add("/General/ColectivasDetalle.aspx".ToUpper(), 307)
- PaginaDict.Add("/Planeacion/CatFolios.aspx".ToUpper(), 15)
- PaginaDict.Add("/General/CatMarcas.aspx".ToUpper(), 402)
- PaginaDict.Add("/General/CatCompuestos.aspx".ToUpper(), 470)
- PaginaDict.Add("/Encuestas/Encuestas.aspx".ToUpper(), 1021)
- PaginaDict.Add("/General/CatDiasInhabiles.aspx".ToUpper(), 429)
- PaginaDict.Add("/General/CatTipoCambio.aspx".ToUpper(), 642)
- PaginaDict.Add("/General/PopUpPaqueteriasGuias.aspx".ToUpper(), 659)
- PaginaDict.Add("/General/CatPaqueterias.aspx".ToUpper(), 665)
- PaginaDict.Add("/General/CatDocumentacionTipo.aspx".ToUpper(), -1)
- PaginaDict.Add("/General/CatModelos.aspx".ToUpper(), 710)
- PaginaDict.Add("/General/CatRinTamanios.aspx".ToUpper(), 711)
- PaginaDict.Add("/General/CatMedidas.aspx".ToUpper(), 712)
+#Region "Contabilidad2"
+ PaginaDict.Add("/Contabilidad2/RepAnexoCatalogo.aspx".ToUpper(), 580)
+ PaginaDict.Add("/Contabilidad2/RepBalanzaComprobacion.aspx".ToUpper(), 582)
+ PaginaDict.Add("/Contabilidad2/RepEstadoActividades.aspx".ToUpper(), 583)
+ PaginaDict.Add("/Contabilidad2/RepFlujoEfectivo.aspx".ToUpper(), 584)
+ PaginaDict.Add("/Contabilidad2/RepCambiosSituacionFinanciera.aspx".ToUpper(), 585)
+ PaginaDict.Add("/Contabilidad2/RepSituacionFinanciera.aspx".ToUpper(), 586)
+ PaginaDict.Add("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx".ToUpper(), 587)
+ PaginaDict.Add("/Contabilidad2/RegPoliza.aspx".ToUpper(), 588)
+ PaginaDict.Add("/Contabilidad2/PymeRegPoliza.aspx".ToUpper(), 588)
+ PaginaDict.Add("/Contabilidad2/RepAlmacenConta.aspx".ToUpper(), 539)
+
+ PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoMensual.aspx".ToUpper(), 589)
+ PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoAnual.aspx".ToUpper(), 593)
+ PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoCC.aspx".ToUpper(), 594)
+ PaginaDict.Add("/Contabilidad2/RepVariacionHaciendaPublica.aspx".ToUpper(), 595)
+ PaginaDict.Add("/Contabilidad2/CatCuentas.aspx".ToUpper(), 596)
+
+ PaginaDict.Add("/Contabilidad2/RepSituacionFinancieraSAT.aspx".ToUpper(), 615)
+ PaginaDict.Add("/Contabilidad2/RepEstadoActividadesSAT.aspx".ToUpper(), 616)
+ PaginaDict.Add("/Contabilidad2/RepBalanzaComprobacionSAT.aspx".ToUpper(), 617)
+ PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoSAT.aspx".ToUpper(), 618)
+ PaginaDict.Add("/Contabilidad2/MovimientosConProveedores.aspx".ToUpper(), 619)
+ PaginaDict.Add("/Contabilidad2/RepBalanceGeneral.aspx".ToUpper(), 530)
+#End Region
+ 'CONTRATOS
+#Region "Contratos"
+
+ '------------------------------ C O N T R A T O S - P R E S U P U E S T O S ---------------------
+ PaginaDict.Add("/Contratos/Presupuestos.aspx".ToUpper(), 901)
+ PaginaDict.Add("/Contratos/ModificarPresupuesto.aspx".ToUpper(), 902)
+ PaginaDict.Add("/Contratos/CatPresupuestos.aspx".ToUpper(), 903)
+ PaginaDict.Add("/Contratos/RepPresupuestos.aspx".ToUpper(), 905)
+ PaginaDict.Add("/Contratos/RepPresupuestosDetalle.aspx".ToUpper(), 905)
+ PaginaDict.Add("/Contratos/RepPresupuestosDetalleCompras.aspx".ToUpper(), 905)
+ PaginaDict.Add("/Contratos/FacturacionMasiva.aspx".ToUpper(), 454)
+ PaginaDict.Add("/Contratos/CatContratosPlantillas.aspx".ToUpper(), 455)
+
+
+ PaginaDict.Add("/Contratos/CatSecciones.aspx".ToUpper(), -1) '152
+ PaginaDict.Add("/Contratos/ContratosSecciones.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contratos/Contratos.aspx".ToUpper(), -1) '154
+ PaginaDict.Add("/Contratos/ContratosDetalle.aspx".ToUpper(), -1) '154
+ PaginaDict.Add("/Contratos/CatEstimaciones.aspx".ToUpper(), 155)
+ PaginaDict.Add("/Contratos/Contrato.aspx".ToUpper(), 313)
+ PaginaDict.Add("/Contratos/PopUpBuscarContrato.aspx".ToUpper(), 315)
+ PaginaDict.Add("/Contratos/ContratoAvance.aspx".ToUpper(), 377)
+ PaginaDict.Add("/Contratos/RepContratosAvancesCP.aspx".ToUpper(), 410)
+ PaginaDict.Add("/Contratos/CatPeriodosFacturacion.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contratos/CatTarifas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contratos/RepContratosSuministros.aspx".ToUpper(), 496)
+ PaginaDict.Add("/Contratos/RepContratosCostos.aspx".ToUpper(), 670)
+ 'PaginaDict.Add("/Contratos/CatReferendos.aspx".ToUpper(), 644)
+ PaginaDict.Add("/Contratos/CatRefrendos.aspx".ToUpper(), 644)
+ PaginaDict.Add("/Contratos/RepContratosFianzas.aspx".ToUpper(), 646)
+ PaginaDict.Add("/Contratos/RepPedidosDevolucionesXContrato.aspx".ToUpper(), 705)
+#End Region
+ 'CONTABILIDAD2 - Finanzas
+#Region "CrM"
+ 'CRM
+ PaginaDict.Add("/CRM/CatTipoProceso.aspx".ToUpper(), 1301)
+ PaginaDict.Add("/CRM/CatMediosCaptacion.aspx".ToUpper(), 1302)
+ PaginaDict.Add("/CRM/CatRechazoMotivo.aspx".ToUpper(), 1303)
+ PaginaDict.Add("/CRM/CatEtapasProceso.aspx".ToUpper(), 1304)
+ PaginaDict.Add("/CRM/CatEmpresasCRM.aspx".ToUpper(), 1305)
+ PaginaDict.Add("/CRM/EmpresaCRM.aspx".ToUpper(), 1305)
+ PaginaDict.Add("/CRM/CatProbabilidadAcercamiento.aspx".ToUpper(), 1306)
+ 'PaginaDict.Add("/CRM/Acercamiento.aspx".ToUpper(), 1308)
+ PaginaDict.Add("/CRM/Acercamiento.aspx".ToUpper(), 1305)
+ PaginaDict.Add("/CRM/RepAcercamientosEtapas.aspx".ToUpper(), 1310)
+ PaginaDict.Add("/CRM/RepAcercamientos.aspx".ToUpper(), 1311)
+ PaginaDict.Add("/CRM/PopUpBuscarAcercamiento.aspx".ToUpper(), 1312)
+ PaginaDict.Add("/CRM/RepAcercamientosProcesos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/CRM/RepAcercamientosRechazos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/CRM/RepAcercamientosProcesosDetalle.aspx".ToUpper(), -1)
+ PaginaDict.Add("/CRM/CatMetas.aspx".ToUpper(), 684)
+#End Region
+#Region "CxC"
+
+ 'CxC
+ PaginaDict.Add("/CxC/RepCxC.aspx".ToUpper(), 8)
+ PaginaDict.Add("/CxC/RepCxCDetalle.aspx".ToUpper(), 565)
+ PaginaDict.Add("/CxC/RepCxCSemanal.aspx".ToUpper(), 31)
+ PaginaDict.Add("/CxC/GestionCobranza.aspx".ToUpper(), 490)
+ PaginaDict.Add("/CxC/RepCxCPeriodo.aspx".ToUpper(), 887)
+#End Region
+#Region "Finanzas"
+ 'Finanzas
+ PaginaDict.Add("/Finanzas/RepRazonesFinancieras.aspx".ToUpper(), 592)
+ PaginaDict.Add("/Finanzas/FinanMetas.aspx".ToUpper(), 361)
+ PaginaDict.Add("/Finanzas/FinanVentasProyecciones.aspx".ToUpper(), 360)
+ PaginaDict.Add("/Finanzas/AnalisisCreditoCliente.aspx".ToUpper(), 879)
+ PaginaDict.Add("/Finanzas/AnalisisCreditoProveedor.aspx".ToUpper(), 880)
+ PaginaDict.Add("/Finanzas/RepBalanceGeneral.aspx".ToUpper(), 578)
+ PaginaDict.Add("/Finanzas/RepBalanceGeneralVertical.aspx".ToUpper(), 418)
+ PaginaDict.Add("/Finanzas/RepBalanceGeneralHorizontal.aspx".ToUpper(), 419)
+ PaginaDict.Add("/Finanzas/RepEstadoResultados.aspx".ToUpper(), 579)
+ PaginaDict.Add("/Finanzas/RepEstadoResultadosHorizontal.aspx".ToUpper(), 420)
+ PaginaDict.Add("/Finanzas/RepEstadoResultadosVertical.aspx".ToUpper(), 424)
+ PaginaDict.Add("/Finanzas/RepOrigenAplicacion.aspx".ToUpper(), 581)
+ PaginaDict.Add("/Finanzas/RazonesFinancierasCuentas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Finanzas/RepRotacionCartera.aspx".ToUpper(), 649)
+ PaginaDict.Add("/Finanzas/RepRotacionCarteraDetalle.aspx".ToUpper(), 649)
+#End Region
+#Region "Flotillas"
+
+ 'FLOTILLAS
+ PaginaDict.Add("/Flotillas/CatCombustibles.aspx".ToUpper(), 284)
+ PaginaDict.Add("/Flotillas/RepIncidentes.aspx".ToUpper(), 497)
+ PaginaDict.Add("/Flotillas/RepLicencias.aspx".ToUpper(), 498)
+ PaginaDict.Add("/Flotillas/RepPlacas.aspx".ToUpper(), 499)
+ PaginaDict.Add("/Flotillas/RepPolizaSeguro.aspx".ToUpper(), 500)
+ PaginaDict.Add("/Flotillas/RepServicios.aspx".ToUpper(), 501)
+#End Region
+ 'GENERAL
+#Region "General"
+ PaginaDict.Add("/General/CatClasificaciones.aspx".ToUpper(), 425)
+ PaginaDict.Add("/General/CatPSCaracteristicas.aspx".ToUpper(), 101)
+ PaginaDict.Add("/General/CatCategorias.aspx".ToUpper(), 233)
+ PaginaDict.Add("/General/SaldosIniciales.aspx".ToUpper(), 526)
+ PaginaDict.Add("/General/Colectivas.aspx".ToUpper(), 307)
+ PaginaDict.Add("/General/ColectivasDetalle.aspx".ToUpper(), 307)
+ PaginaDict.Add("/Planeacion/CatFolios.aspx".ToUpper(), 15)
+ PaginaDict.Add("/General/CatMarcas.aspx".ToUpper(), 402)
+ PaginaDict.Add("/General/CatCompuestos.aspx".ToUpper(), 470)
+ PaginaDict.Add("/Encuestas/Encuestas.aspx".ToUpper(), 1021)
+ PaginaDict.Add("/General/CatDiasInhabiles.aspx".ToUpper(), 429)
+ PaginaDict.Add("/General/CatTipoCambio.aspx".ToUpper(), 642)
+ PaginaDict.Add("/General/PopUpPaqueteriasGuias.aspx".ToUpper(), 659)
+ PaginaDict.Add("/General/CatPaqueterias.aspx".ToUpper(), 665)
+ PaginaDict.Add("/General/CatDocumentacionTipo.aspx".ToUpper(), -1)
+ PaginaDict.Add("/General/CatModelos.aspx".ToUpper(), 710)
+ PaginaDict.Add("/General/CatRinTamanios.aspx".ToUpper(), 711)
+ PaginaDict.Add("/General/CatMedidas.aspx".ToUpper(), 712)
PaginaDict.Add("/General/CatSatListado69B.aspx".ToUpper, 1038)
-#End Region
-#Region "GPS"
- PaginaDict.Add("/GPS/RepTemperatura.aspx".ToUpper(), 681)
- PaginaDict.Add("/GPS/FacturasSims.aspx".ToUpper(), 8401)
- PaginaDict.Add("/GPS/VehiculoTrama.aspx".ToUpper(), 682)
- PaginaDict.Add("/GPS/DashboardGPS.aspx".ToUpper(), -1)
- PaginaDict.Add("/GPS/WizardModelo.aspx".ToUpper(), 458)
- PaginaDict.Add("/GPS/CatConductores.aspx".ToUpper(), 448)
- PaginaDict.Add("/GPS/Conductores.aspx".ToUpper(), 502)
- PaginaDict.Add("/GPS/CatVehiculos.aspx".ToUpper(), 449)
- PaginaDict.Add("/GPS/CatProveedoresComunicacionCuentas.aspx".ToUpper(), 442)
- PaginaDict.Add("/GPS/CatPlanesDatos.aspx".ToUpper(), 443)
- PaginaDict.Add("/GPS/WizardDispositivos.aspx".ToUpper(), -1)
- PaginaDict.Add("/GPS/CatDispositivos.aspx".ToUpper(), -1)
- PaginaDict.Add("/GPS/CatModelos.aspx".ToUpper(), 434)
- PaginaDict.Add("/GPS/CatEventosTipos.aspx".ToUpper(), 435)
- PaginaDict.Add("/GPS/CatEventos.aspx".ToUpper(), 436)
- PaginaDict.Add("/GPS/CatTipoComunicacion.aspx".ToUpper(), 438)
- PaginaDict.Add("/GPS/CatProveedorComunicacion.aspx".ToUpper(), 439)
- PaginaDict.Add("/GPS/CatDistribuidoresMaster.aspx".ToUpper(), 441)
- PaginaDict.Add("/GPS/Rastreo.aspx".ToUpper(), 444)
- PaginaDict.Add("/GPS/GeoReferencias.aspx".ToUpper(), 471)
- PaginaDict.Add("/GPS/RepGeoReferencias.aspx".ToUpper(), 472)
- PaginaDict.Add("/GPS/PuntosDeInteres.aspx".ToUpper(), 487)
- PaginaDict.Add("/GPS/RepPuntosDeInteres.aspx".ToUpper(), 488)
- PaginaDict.Add("/GPS/CatControlesGraficos.aspx".ToUpper(), 451)
- PaginaDict.Add("/GPS/Dashboard.aspx".ToUpper(), -1)
- PaginaDict.Add("/PortalGPS/InicioGPS.aspx".ToUpper(), 447)
- PaginaDict.Add("/GPS/Soporte.aspx".ToUpper(), -1)
- PaginaDict.Add("/GPS/Vehiculos.aspx".ToUpper(), -1)
- PaginaDict.Add("/GPS/DispositivosControles.aspx".ToUpper(), 495)
- PaginaDict.Add("/GPS/CatUMControles.aspx".ToUpper(), 503)
- PaginaDict.Add("/GPS/Busqueda.aspx".ToUpper(), 459)
- PaginaDict.Add("/GPS/ConfiguradorVehiculos.aspx".ToUpper(), 485)
- PaginaDict.Add("/GPS/CatReportesProgramados.aspx".ToUpper(), 479)
- PaginaDict.Add("/GPS/EntradasSalidasGR.aspx".ToUpper(), 483)
- PaginaDict.Add("/GPS/ConfiguracionUsuarios.aspx".ToUpper(), 489)
- PaginaDict.Add("/GPS/CatUsuarios.aspx".ToUpper(), -1)
- PaginaDict.Add("/GPS/CatRemisionesVehiculos.aspx".ToUpper(), 484)
- PaginaDict.Add("/GPS/ConfiguracionEventos.aspx".ToUpper(), -1)
- PaginaDict.Add("/GPS/UsuariosRastreo.aspx".ToUpper(), 492)
- PaginaDict.Add("/GPS/ReporteAccesos.aspx".ToUpper(), -1)
- PaginaDict.Add("/GPS/RepCombustible.aspx".ToUpper(), 513)
- PaginaDict.Add("/GPS/RepTemperaturas.aspx".ToUpper(), 516)
- PaginaDict.Add("/GPS/RepPasajeros.aspx".ToUpper(), 517)
- PaginaDict.Add("/GPS/RepParadas.aspx".ToUpper(), 518)
- PaginaDict.Add("/GPS/RepPasajero.aspx".ToUpper(), 520)
- PaginaDict.Add("/GPS/RepEventos.aspx".ToUpper(), 521)
- PaginaDict.Add("/GPS/RepIgnicion.aspx".ToUpper(), 522)
- PaginaDict.Add("/GPS/Trayectos.aspx".ToUpper(), 523)
- PaginaDict.Add("/GPS/TrayectoDetalle.aspx".ToUpper(), -1)
- PaginaDict.Add("/GPS/CatEstatusTrayectos.aspx".ToUpper(), 527)
- PaginaDict.Add("/GPS/CatRutas.aspx".ToUpper(), 640)
- PaginaDict.Add("/GPS/CatGrupos.aspx".ToUpper(), 641)
- PaginaDict.Add("/GPS/Notificaciones.aspx".ToUpper(), -1)
+#End Region
+#Region "GPS"
+ PaginaDict.Add("/GPS/RepTemperatura.aspx".ToUpper(), 681)
+ PaginaDict.Add("/GPS/FacturasSims.aspx".ToUpper(), 8401)
+ PaginaDict.Add("/GPS/VehiculoTrama.aspx".ToUpper(), 682)
+ PaginaDict.Add("/GPS/DashboardGPS.aspx".ToUpper(), -1)
+ PaginaDict.Add("/GPS/WizardModelo.aspx".ToUpper(), 458)
+ PaginaDict.Add("/GPS/CatConductores.aspx".ToUpper(), 448)
+ PaginaDict.Add("/GPS/Conductores.aspx".ToUpper(), 502)
+ PaginaDict.Add("/GPS/CatVehiculos.aspx".ToUpper(), 449)
+ PaginaDict.Add("/GPS/CatProveedoresComunicacionCuentas.aspx".ToUpper(), 442)
+ PaginaDict.Add("/GPS/CatPlanesDatos.aspx".ToUpper(), 443)
+ PaginaDict.Add("/GPS/WizardDispositivos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/GPS/CatDispositivos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/GPS/CatModelos.aspx".ToUpper(), 434)
+ PaginaDict.Add("/GPS/CatEventosTipos.aspx".ToUpper(), 435)
+ PaginaDict.Add("/GPS/CatEventos.aspx".ToUpper(), 436)
+ PaginaDict.Add("/GPS/CatTipoComunicacion.aspx".ToUpper(), 438)
+ PaginaDict.Add("/GPS/CatProveedorComunicacion.aspx".ToUpper(), 439)
+ PaginaDict.Add("/GPS/CatDistribuidoresMaster.aspx".ToUpper(), 441)
+ PaginaDict.Add("/GPS/Rastreo.aspx".ToUpper(), 444)
+ PaginaDict.Add("/GPS/GeoReferencias.aspx".ToUpper(), 471)
+ PaginaDict.Add("/GPS/RepGeoReferencias.aspx".ToUpper(), 472)
+ PaginaDict.Add("/GPS/PuntosDeInteres.aspx".ToUpper(), 487)
+ PaginaDict.Add("/GPS/RepPuntosDeInteres.aspx".ToUpper(), 488)
+ PaginaDict.Add("/GPS/CatControlesGraficos.aspx".ToUpper(), 451)
+ PaginaDict.Add("/GPS/Dashboard.aspx".ToUpper(), -1)
+ PaginaDict.Add("/PortalGPS/InicioGPS.aspx".ToUpper(), 447)
+ PaginaDict.Add("/GPS/Soporte.aspx".ToUpper(), -1)
+ PaginaDict.Add("/GPS/Vehiculos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/GPS/DispositivosControles.aspx".ToUpper(), 495)
+ PaginaDict.Add("/GPS/CatUMControles.aspx".ToUpper(), 503)
+ PaginaDict.Add("/GPS/Busqueda.aspx".ToUpper(), 459)
+ PaginaDict.Add("/GPS/ConfiguradorVehiculos.aspx".ToUpper(), 485)
+ PaginaDict.Add("/GPS/CatReportesProgramados.aspx".ToUpper(), 479)
+ PaginaDict.Add("/GPS/EntradasSalidasGR.aspx".ToUpper(), 483)
+ PaginaDict.Add("/GPS/ConfiguracionUsuarios.aspx".ToUpper(), 489)
+ PaginaDict.Add("/GPS/CatUsuarios.aspx".ToUpper(), -1)
+ PaginaDict.Add("/GPS/CatRemisionesVehiculos.aspx".ToUpper(), 484)
+ PaginaDict.Add("/GPS/ConfiguracionEventos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/GPS/UsuariosRastreo.aspx".ToUpper(), 492)
+ PaginaDict.Add("/GPS/ReporteAccesos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/GPS/RepCombustible.aspx".ToUpper(), 513)
+ PaginaDict.Add("/GPS/RepTemperaturas.aspx".ToUpper(), 516)
+ PaginaDict.Add("/GPS/RepPasajeros.aspx".ToUpper(), 517)
+ PaginaDict.Add("/GPS/RepParadas.aspx".ToUpper(), 518)
+ PaginaDict.Add("/GPS/RepPasajero.aspx".ToUpper(), 520)
+ PaginaDict.Add("/GPS/RepEventos.aspx".ToUpper(), 521)
+ PaginaDict.Add("/GPS/RepIgnicion.aspx".ToUpper(), 522)
+ PaginaDict.Add("/GPS/Trayectos.aspx".ToUpper(), 523)
+ PaginaDict.Add("/GPS/TrayectoDetalle.aspx".ToUpper(), -1)
+ PaginaDict.Add("/GPS/CatEstatusTrayectos.aspx".ToUpper(), 527)
+ PaginaDict.Add("/GPS/CatRutas.aspx".ToUpper(), 640)
+ PaginaDict.Add("/GPS/CatGrupos.aspx".ToUpper(), 641)
+ PaginaDict.Add("/GPS/Notificaciones.aspx".ToUpper(), -1)
PaginaDict.Add("/GPS/Shipments.aspx".ToUpper(), 673)
PaginaDict.Add("/GPS/RepGastos.aspx".ToUpper(), 685)
-#End Region
+#End Region
'INVENTARIOS
-#Region "Inventarios"
- PaginaDict.Add("/Inventarios/Fletes.aspx".ToUpper(), 550)
- PaginaDict.Add("/Inventarios/RepFletes.aspx".ToUpper(), 551)
- PaginaDict.Add("/Inventarios/CatTiposAlmacenes.aspx".ToUpper(), 222)
- PaginaDict.Add("/Inventarios/CatSeccionesAlmacenes.aspx".ToUpper(), 221)
- PaginaDict.Add("/Inventarios/CatAlmacenes.aspx".ToUpper(), 220)
- PaginaDict.Add("/Inventarios/EntradasSalidas.aspx".ToUpper(), 219)
- PaginaDict.Add("/Inventarios/Kardex.aspx".ToUpper(), 224)
- PaginaDict.Add("/Inventarios/Equivalencias.aspx".ToUpper(), 225)
- PaginaDict.Add("/Inventarios/RepEntradasSalidas.aspx".ToUpper(), 227)
- PaginaDict.Add("/Inventarios/RepExistenciasCostos.aspx".ToUpper(), 228)
- PaginaDict.Add("/Inventarios/PopUpExistenciasAlmacen.aspx".ToUpper(), 228)
- PaginaDict.Add("/Inventarios/InventarioFisico.aspx".ToUpper(), 229)
- PaginaDict.Add("/Inventarios/InventarioFisicoDetalle.aspx".ToUpper(), 229)
- PaginaDict.Add("/Inventarios/RepAnomalias.aspx".ToUpper(), 230)
- PaginaDict.Add("/Inventarios/PaquetesArmadoDesarmado.aspx".ToUpper(), 226)
- PaginaDict.Add("/Inventarios/ConsignacionesMaterial.aspx".ToUpper(), 227)
- PaginaDict.Add("/Inventarios/RecepcionAlmacen.aspx".ToUpper(), 241)
- PaginaDict.Add("/Inventarios/TraspasoAlmacen.aspx".ToUpper(), 343)
- PaginaDict.Add("/Inventarios/Consignaciones.aspx".ToUpper(), 356)
- PaginaDict.Add("/Inventarios/RepConsignaciones.aspx".ToUpper(), 364)
- PaginaDict.Add("/Inventarios/RepAlmacenCompras.aspx".ToUpper(), 375)
- PaginaDict.Add("/Inventarios/RepAlmacen.aspx".ToUpper(), 376)
- PaginaDict.Add("/Inventarios/RecepcionEntrega.aspx".ToUpper(), 387)
- PaginaDict.Add("/Inventarios/RepUMEquivalencia.aspx".ToUpper(), 399)
- PaginaDict.Add("/Inventarios/ResguardoMaterial.aspx".ToUpper(), 562)
- PaginaDict.Add("/Inventarios/RepMaximoMinimo.aspx".ToUpper(), 389)
- PaginaDict.Add("/Inventarios/RepMovimientos.aspx".ToUpper(), 1009)
- PaginaDict.Add("/Inventarios/RepNotasSinAlmacen.aspx".ToUpper(), 1010)
- PaginaDict.Add("/Inventarios/RepOcInv.aspx".ToUpper(), 1011)
- PaginaDict.Add("/Inventarios/RepOcInvMoto.aspx".ToUpper(), 1012)
- 'PaginaDict.Add("/Inventarios/RepEntregasForaneas.aspx".ToUpper(), 450)
- PaginaDict.Add("/General/RepPaqueteriasGuias.aspx".ToUpper(), 450)
- PaginaDict.Add("/Inventarios/Apartados.aspx".ToUpper(), 622)
- PaginaDict.Add("/Inventarios/RepApartados.aspx".ToUpper(), 623)
- PaginaDict.Add("/Inventarios/RepApartados2.aspx".ToUpper(), 671)
- PaginaDict.Add("/Inventarios/RepVentasXSurtir.aspx".ToUpper(), 624)
- PaginaDict.Add("/Inventarios/PopUpExistenciasAlmacenDT.aspx".ToUpper(), -1)
- PaginaDict.Add("/Inventarios/PopUpBuscarMovto.aspx".ToUpper(), 219)
- PaginaDict.Add("/Inventarios/RepMaterialResguardo.aspx".ToUpper(), 493)
- PaginaDict.Add("/Inventarios/TrasladoSolicitud.aspx".ToUpper(), 524)
- PaginaDict.Add("/Inventarios/RepTrasladoSolicitud.aspx".ToUpper(), 514)
- PaginaDict.Add("/Inventarios/CatGrupoPS.aspx".ToUpper(), 849)
- PaginaDict.Add("/Inventarios/KardexAlmacen.aspx".ToUpper(), 639)
- PaginaDict.Add("/Inventarios/KardexAlmacenHorizontal.aspx".ToUpper(), 645)
- PaginaDict.Add("/Inventarios/RepConsumoInterno.aspx".ToUpper(), 660)
- PaginaDict.Add("/Inventarios/RepMovimientosProveedor.aspx".ToUpper(), 867)
- PaginaDict.Add("/Inventarios/RepReciclaje.aspx".ToUpper(), 873)
- PaginaDict.Add("/Inventarios/Remanufactura.aspx".ToUpper(), 873)
- PaginaDict.Add("/Inventarios/RepEntradasSalidasXContrato.aspx".ToUpper(), 876)
- PaginaDict.Add("/Inventarios/RepAlmacenPeriodo.aspx".ToUpper(), 883)
- PaginaDict.Add("/Inventarios/PrestamosdeProveedor.aspx".ToUpper(), 668)
- PaginaDict.Add("/Inventarios/RepMovimientosSalida.aspx".ToUpper(), 541)
- 'PaginaDict.Add("/Inventarios/RecepcionAlmacen.aspx".ToUpper(), 2022)
- 'PaginaDict.Add("/Inventarios/RecepcionEntrega.aspx".ToUpper(), 2023)
- 'PaginaDict.Add("/Inventarios/CatAlmacenes.aspx".ToUpper(), 2024)
- 'PaginaDict.Add("/Inventarios/EntradasSalidas.aspx".ToUpper(), 2025)
- 'PaginaDict.Add("/Inventarios/TraspasoAlmacen.aspx".ToUpper(), 2026)
- PaginaDict.Add("/Inventarios/EntradasSalidas.aspx?CI=1".ToUpper(), 2027)
- 'PaginaDict.Add("/Inventarios/RepMovimientos.aspx".ToUpper(), 2028)
- 'PaginaDict.Add("/Inventarios/RepAlmacen.aspx".ToUpper(), 2029)
- 'PaginaDict.Add("/Inventarios/RepEntradasSalidas.aspx".ToUpper(), 2030)
- 'PaginaDict.Add("/Inventarios/Kardex.aspx".ToUpper(), 2031)
- PaginaDict.Add("/Inventarios/RepEntradasSalidas2.aspx".ToUpper(), -1)
- ' PaginaDict.Add("/Inventarios/RecepcionUsados.aspx".ToUpper(), 1202)
- PaginaDict.Add("/Inventarios/RepTraspasoEmitido.aspx".ToUpper(), 891)
- PaginaDict.Add("/Inventarios/KardexSeccionAlmacen.aspx".ToUpper(), 892)
+#Region "Inventarios"
+ PaginaDict.Add("/Inventarios/Fletes.aspx".ToUpper(), 550)
+ PaginaDict.Add("/Inventarios/RepFletes.aspx".ToUpper(), 551)
+ PaginaDict.Add("/Inventarios/CatTiposAlmacenes.aspx".ToUpper(), 222)
+ PaginaDict.Add("/Inventarios/CatSeccionesAlmacenes.aspx".ToUpper(), 221)
+ PaginaDict.Add("/Inventarios/CatAlmacenes.aspx".ToUpper(), 220)
+ PaginaDict.Add("/Inventarios/EntradasSalidas.aspx".ToUpper(), 219)
+ PaginaDict.Add("/Inventarios/Kardex.aspx".ToUpper(), 224)
+ PaginaDict.Add("/Inventarios/Equivalencias.aspx".ToUpper(), 225)
+ PaginaDict.Add("/Inventarios/RepEntradasSalidas.aspx".ToUpper(), 227)
+ PaginaDict.Add("/Inventarios/RepExistenciasCostos.aspx".ToUpper(), 228)
+ PaginaDict.Add("/Inventarios/PopUpExistenciasAlmacen.aspx".ToUpper(), 228)
+ PaginaDict.Add("/Inventarios/InventarioFisico.aspx".ToUpper(), 229)
+ PaginaDict.Add("/Inventarios/InventarioFisicoDetalle.aspx".ToUpper(), 229)
+ PaginaDict.Add("/Inventarios/RepAnomalias.aspx".ToUpper(), 230)
+ PaginaDict.Add("/Inventarios/PaquetesArmadoDesarmado.aspx".ToUpper(), 226)
+ PaginaDict.Add("/Inventarios/ConsignacionesMaterial.aspx".ToUpper(), 227)
+ PaginaDict.Add("/Inventarios/RecepcionAlmacen.aspx".ToUpper(), 241)
+ PaginaDict.Add("/Inventarios/TraspasoAlmacen.aspx".ToUpper(), 343)
+ PaginaDict.Add("/Inventarios/Consignaciones.aspx".ToUpper(), 356)
+ PaginaDict.Add("/Inventarios/RepConsignaciones.aspx".ToUpper(), 364)
+ PaginaDict.Add("/Inventarios/RepAlmacenCompras.aspx".ToUpper(), 375)
+ PaginaDict.Add("/Inventarios/RepAlmacen.aspx".ToUpper(), 376)
+ PaginaDict.Add("/Inventarios/RecepcionEntrega.aspx".ToUpper(), 387)
+ PaginaDict.Add("/Inventarios/RepUMEquivalencia.aspx".ToUpper(), 399)
+ PaginaDict.Add("/Inventarios/ResguardoMaterial.aspx".ToUpper(), 562)
+ PaginaDict.Add("/Inventarios/RepMaximoMinimo.aspx".ToUpper(), 389)
+ PaginaDict.Add("/Inventarios/RepMovimientos.aspx".ToUpper(), 1009)
+ PaginaDict.Add("/Inventarios/RepNotasSinAlmacen.aspx".ToUpper(), 1010)
+ PaginaDict.Add("/Inventarios/RepOcInv.aspx".ToUpper(), 1011)
+ PaginaDict.Add("/Inventarios/RepOcInvMoto.aspx".ToUpper(), 1012)
+ 'PaginaDict.Add("/Inventarios/RepEntregasForaneas.aspx".ToUpper(), 450)
+ PaginaDict.Add("/General/RepPaqueteriasGuias.aspx".ToUpper(), 450)
+ PaginaDict.Add("/Inventarios/Apartados.aspx".ToUpper(), 622)
+ PaginaDict.Add("/Inventarios/RepApartados.aspx".ToUpper(), 623)
+ PaginaDict.Add("/Inventarios/RepApartados2.aspx".ToUpper(), 671)
+ PaginaDict.Add("/Inventarios/RepVentasXSurtir.aspx".ToUpper(), 624)
+ PaginaDict.Add("/Inventarios/PopUpExistenciasAlmacenDT.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Inventarios/PopUpBuscarMovto.aspx".ToUpper(), 219)
+ PaginaDict.Add("/Inventarios/RepMaterialResguardo.aspx".ToUpper(), 493)
+ PaginaDict.Add("/Inventarios/TrasladoSolicitud.aspx".ToUpper(), 524)
+ PaginaDict.Add("/Inventarios/RepTrasladoSolicitud.aspx".ToUpper(), 514)
+ PaginaDict.Add("/Inventarios/CatGrupoPS.aspx".ToUpper(), 849)
+ PaginaDict.Add("/Inventarios/KardexAlmacen.aspx".ToUpper(), 639)
+ PaginaDict.Add("/Inventarios/KardexAlmacenHorizontal.aspx".ToUpper(), 645)
+ PaginaDict.Add("/Inventarios/RepConsumoInterno.aspx".ToUpper(), 660)
+ PaginaDict.Add("/Inventarios/RepMovimientosProveedor.aspx".ToUpper(), 867)
+ PaginaDict.Add("/Inventarios/RepReciclaje.aspx".ToUpper(), 873)
+ PaginaDict.Add("/Inventarios/Remanufactura.aspx".ToUpper(), 873)
+ PaginaDict.Add("/Inventarios/RepEntradasSalidasXContrato.aspx".ToUpper(), 876)
+ PaginaDict.Add("/Inventarios/RepAlmacenPeriodo.aspx".ToUpper(), 883)
+ PaginaDict.Add("/Inventarios/PrestamosdeProveedor.aspx".ToUpper(), 668)
+ PaginaDict.Add("/Inventarios/RepMovimientosSalida.aspx".ToUpper(), 541)
+ 'PaginaDict.Add("/Inventarios/RecepcionAlmacen.aspx".ToUpper(), 2022)
+ 'PaginaDict.Add("/Inventarios/RecepcionEntrega.aspx".ToUpper(), 2023)
+ 'PaginaDict.Add("/Inventarios/CatAlmacenes.aspx".ToUpper(), 2024)
+ 'PaginaDict.Add("/Inventarios/EntradasSalidas.aspx".ToUpper(), 2025)
+ 'PaginaDict.Add("/Inventarios/TraspasoAlmacen.aspx".ToUpper(), 2026)
+ PaginaDict.Add("/Inventarios/EntradasSalidas.aspx?CI=1".ToUpper(), 2027)
+ 'PaginaDict.Add("/Inventarios/RepMovimientos.aspx".ToUpper(), 2028)
+ 'PaginaDict.Add("/Inventarios/RepAlmacen.aspx".ToUpper(), 2029)
+ 'PaginaDict.Add("/Inventarios/RepEntradasSalidas.aspx".ToUpper(), 2030)
+ 'PaginaDict.Add("/Inventarios/Kardex.aspx".ToUpper(), 2031)
+ PaginaDict.Add("/Inventarios/RepEntradasSalidas2.aspx".ToUpper(), -1)
+ ' PaginaDict.Add("/Inventarios/RecepcionUsados.aspx".ToUpper(), 1202)
+ PaginaDict.Add("/Inventarios/RepTraspasoEmitido.aspx".ToUpper(), 891)
+ PaginaDict.Add("/Inventarios/KardexSeccionAlmacen.aspx".ToUpper(), 892)
PaginaDict.Add("/Inventarios/RepTraspasoAlmacen.aspx".ToUpper(), 688)
-#End Region
-#Region "MF"
- PaginaDict.Add("/MF/BitacoraDiaria.aspx".ToUpper(), 801)
- PaginaDict.Add("/MF/CatActividades.aspx".ToUpper(), 803)
- PaginaDict.Add("/MF/CatOperadores.aspx".ToUpper(), 804)
- PaginaDict.Add("/MF/CatEstatus.aspx".ToUpper(), 805)
- PaginaDict.Add("/MF/CargaLayout.aspx".ToUpper(), 863)
- PaginaDict.Add("/MF/RepConsumoCombustible.aspx".ToUpper(), 864)
-#End Region
-#Region "Nomina"
-
- 'NÓMINA
- PaginaDict.Add("/Nomina/Calculo.aspx".ToUpper(), -1)
- PaginaDict.Add("/Nomina/SobreRecibo.aspx".ToUpper(), -1)
- PaginaDict.Add("/Nomina/SobreReciboCharlie.aspx".ToUpper(), -1)
- PaginaDict.Add("/Nomina/CatTiposPeriodos.aspx".ToUpper(), 60)
- PaginaDict.Add("/Nomina/PreNomina.aspx".ToUpper(), 74)
- PaginaDict.Add("/Nomina/PreNominaHistorial.aspx".ToUpper(), 148)
- PaginaDict.Add("/Nomina/RepPreNomina.aspx".ToUpper(), 74)
- PaginaDict.Add("/Nomina/Nomina.aspx".ToUpper(), 75)
- PaginaDict.Add("/Nomina/NominaB.aspx".ToUpper(), 75)
- PaginaDict.Add("/Nomina/Nomina2.aspx".ToUpper(), 75)
- PaginaDict.Add("/Nomina/ListaAsistencias.aspx".ToUpper(), 91)
- PaginaDict.Add("/Nomina/ConceptosEspeciales.aspx".ToUpper(), 136)
- PaginaDict.Add("/Nomina/CatConceptos.aspx".ToUpper(), 172)
- PaginaDict.Add("/Nomina/ConceptoNomina.aspx".ToUpper(), 172)
- PaginaDict.Add("/Nomina/RegistroNomina.aspx".ToUpper(), 173)
- PaginaDict.Add("/Nomina/RepConceptosAcumulados.aspx".ToUpper(), 174)
- PaginaDict.Add("/Nomina/RepPersonalAcumulados.aspx".ToUpper(), 393)
- PaginaDict.Add("/Nomina/CatPeriodos.aspx".ToUpper(), 177)
- PaginaDict.Add("/Nomina/Finiquito.aspx".ToUpper(), 197)
- PaginaDict.Add("/Nomina/CatSatBancos.aspx".ToUpper(), 255)
- PaginaDict.Add("/Nomina/CatSatConceptos.aspx".ToUpper(), 256)
- PaginaDict.Add("/Nomina/CatSatRegimenContratacion.aspx".ToUpper(), 257)
- PaginaDict.Add("/Nomina/CatSatTipoIncapacidad.aspx".ToUpper(), 258)
- PaginaDict.Add("/Nomina/CatSatRiesgoPuesto.aspx".ToUpper(), 259)
- PaginaDict.Add("/Nomina/ReportePTU.aspx".ToUpper(), 870)
-#End Region
- 'Ordenes de Servicios
-#Region "OS"
- PaginaDict.Add("/OS/PopUpBuscarOS.aspx".ToUpper(), 80)
- PaginaDict.Add("/OS/CatEstatusOrdenServicio.aspx".ToUpper(), 99)
- PaginaDict.Add("/OS/PopUpBuscarCuentasEquipos.aspx".ToUpper(), 100)
- PaginaDict.Add("/OS/PopUpCuentasEquipos.aspx".ToUpper(), -1)
- 'PaginaDict.Add("/OS/CatSubTiposOrdenesServicios.aspx".ToUpper(), 101)
-
- 'PaginaDict.Add("/OS/CatCaracteristicasOrdenServicio.aspx".ToUpper(), 131)
- 'PaginaDict.Add("/OS/CatOSCaracteristicasOpciones.aspx".ToUpper(), 132)
- PaginaDict.Add("/OS/RepOrdenesServicios.aspx".ToUpper(), 134)
- PaginaDict.Add("/OS/OrdenesServicios.aspx".ToUpper(), 135)
- PaginaDict.Add("/OS/CatTipoCuentasEquipos.aspx".ToUpper(), 159)
- PaginaDict.Add("/OS/CatTiposOrdenesServicios.aspx".ToUpper(), 167)
- PaginaDict.Add("/OS/PopUpOS_PS_Especificaciones.aspx".ToUpper(), 135)
- PaginaDict.Add("/OS/PopUpMateriales.aspx".ToUpper(), 135)
- PaginaDict.Add("/OS/Asignaciones.aspx".ToUpper(), 125)
-#End Region
- 'OC
-#Region "OC"
- PaginaDict.Add("/OC/OC.aspx".ToUpper(), 155)
- PaginaDict.Add("/OC/OC2.aspx".ToUpper(), -1)
-
- PaginaDict.Add("/OC/OCCompras.aspx".ToUpper(), 158)
- 'PaginaDict.Add("/OC/CatEstatusOrdenCompra.aspx".ToUpper(), 156)
- 'PaginaDict.Add("/OC/CatEstatusUsuarios.aspx".ToUpper(), 156)
- PaginaDict.Add("/OC/RepOC.aspx".ToUpper(), 157)
- PaginaDict.Add("/OC/CatEstatus.aspx".ToUpper(), 162)
- PaginaDict.Add("/OC/RepRequisiciones.aspx".ToUpper(), 249)
- 'PaginaDict.Add("/OC/PopOCCotizaciones.aspx".ToUpper(), 155)
- PaginaDict.Add("/OC/PopUpBuscarReq.aspx".ToUpper(), 305)
- PaginaDict.Add("/OC/RepCotizaciones.aspx".ToUpper(), 158)
- PaginaDict.Add("/OC/RepCotizacionesDetalle.aspx".ToUpper(), 158)
- PaginaDict.Add("/OC/PopUpBuscarCot.aspx".ToUpper(), 160)
- PaginaDict.Add("/OC/Cotizaciones.aspx".ToUpper(), 132)
- PaginaDict.Add("/OC/CotizacionEnLinea.aspx".ToUpper(), -1)
- PaginaDict.Add("/OC/CotizacionEnvio.aspx".ToUpper(), -1)
- PaginaDict.Add("/OC/OC.aspx?Tipo= REQ", 250)
- PaginaDict.Add("/OC/RepOCSinFactura.aspx".ToUpper(), 388)
- PaginaDict.Add("/OC/RepOCxSurtir.aspx".ToUpper(), 469)
- PaginaDict.Add("/OC/RepReqXOC.aspx".ToUpper(), 634)
- PaginaDict.Add("/OC/RepOCGuias.aspx".ToUpper(), 494)
- PaginaDict.Add("/OC/ListaRequisicion.aspx".ToUpper(), 667)
- PaginaDict.Add("/OC/RepOCAnticiposPtes.aspx".ToUpper(), 506)
- PaginaDict.Add("/OC/RepSolicitudesAnticipo.aspx".ToUpper(), 529)
-#End Region
- 'OI
-#Region "OI"
- PaginaDict.Add("/OI/EventoDetalle.aspx".ToUpper(), -1)
- PaginaDict.Add("/OI/Normatividad.aspx".ToUpper(), 669)
- PaginaDict.Add("/OI/RepNormatividad.aspx".ToUpper(), 669)
- PaginaDict.Add("/OI/Minutas.aspx".ToUpper(), -1)
- PaginaDict.Add("/OI/RepDocumentos.aspx".ToUpper(), -1)
- PaginaDict.Add("/OI/EventoComentario.aspx".ToUpper(), -1)
-
- PaginaDict.Add("/OI/RepEventos.aspx".ToUpper(), -1)
- PaginaDict.Add("/OI/RepTareas.aspx".ToUpper(), 293)
- PaginaDict.Add("/OI/RepMinutas.aspx".ToUpper(), 338)
- PaginaDict.Add("/OI/PopUpAgenda.aspx".ToUpper(), -1)
- PaginaDict.Add("/OI/RepSoporteADS.aspx".ToUpper(), 456)
- PaginaDict.Add("/OI/SoporteADS.aspx".ToUpper(), 457)
- PaginaDict.Add("/OI/Desarrollo.aspx".ToUpper(), 473)
- PaginaDict.Add("/OI/RepDesarrollo.aspx".ToUpper(), 475)
- PaginaDict.Add("/OI/DesarrolloWizard.aspx".ToUpper(), 474)
- PaginaDict.Add("/OI/SubidasADS.aspx".ToUpper(), 476)
-#End Region
-#Region "Planeacion"
- 'PLANEACIÓN
- PaginaDict.Add("/Planeacion/CatSucursales.aspx".ToUpper(), 17)
- PaginaDict.Add("/Planeacion/Sucursal.aspx".ToUpper(), 17)
- PaginaDict.Add("/Planeacion/CatProyectos.aspx".ToUpper(), 34)
- PaginaDict.Add("/Planeacion/CatSubProyectos.aspx".ToUpper(), 35)
- PaginaDict.Add("/Planeacion/CatTiposEventos.aspx".ToUpper(), 66)
- PaginaDict.Add("/Planeacion/Notificaciones.aspx".ToUpper(), -1)
- 'PRUEBA CON Metronic
- PaginaDict.Add("/Planeacion/CatProyectos2.aspx".ToUpper(), -1)
- 'PaginaDict.Add("/123/TablaBD.aspx".ToUpper(), 5)
- 'PaginaDict.Add("/123/CatClientes.aspx".ToUpper(), 5)
-#End Region
- 'PRESUPUESTOS
-#Region "Presupuestos"
- PaginaDict.Add("/Presupuestos/GenerarPresupuestos.aspx".ToUpper(), 242)
- PaginaDict.Add("/Presupuestos/GenerarPresupuestos2.aspx".ToUpper(), 247)
- PaginaDict.Add("/Presupuestos/RepPresupuestos.aspx".ToUpper(), 118)
- PaginaDict.Add("/Presupuestos/Presupuesto.aspx".ToUpper(), 369)
-#End Region
- 'Prospeccion
-#Region "Prospeccion"
- PaginaDict.Add("/Prospeccion/Prospectos.aspx".ToUpper(), 392)
- PaginaDict.Add("/Prospeccion/PopUpBuscarProspectos.aspx".ToUpper(), 392)
- PaginaDict.Add("/Prospeccion/RepProspeccion.aspx".ToUpper(), 395)
- PaginaDict.Add("/Prospeccion/RepProspeccionDetalle.aspx".ToUpper(), 395)
- PaginaDict.Add("/Prospeccion/RepProspectosGIS.aspx".ToUpper(), 390)
-
-#End Region
-#Region "Prospectos"
- 'PROSPECTOS
- PaginaDict.Add("/Prospectos/CatClasificacionesCaracteristicas.aspx".ToUpper(), 180)
- PaginaDict.Add("/Prospectos/ProspectoExpediente.aspx".ToUpper(), 181)
- PaginaDict.Add("/Prospectos/CatProspectos.aspx".ToUpper(), 182)
- PaginaDict.Add("/Prospectos/CatProspectosRedes.aspx".ToUpper(), 183)
- PaginaDict.Add("/Prospectos/CatCoordinadores.aspx".ToUpper(), 184)
- PaginaDict.Add("/Prospectos/CatSupervisores.aspx".ToUpper(), 185)
- PaginaDict.Add("/Prospectos/ProspectosG15.aspx".ToUpper(), 187)
- PaginaDict.Add("/Prospectos/CatProspectosG15.aspx".ToUpper(), 188)
- PaginaDict.Add("/Prospectos/CatEventos.aspx".ToUpper(), 189)
- PaginaDict.Add("/Prospectos/CatResponsables.aspx".ToUpper(), 190)
- PaginaDict.Add("/Prospectos/CatPromotores.aspx".ToUpper(), 191)
- PaginaDict.Add("/Prospectos/CatAnfitriones.aspx".ToUpper(), 192)
- PaginaDict.Add("/Prospectos/CatProspectosApoyos.aspx".ToUpper(), 193)
- PaginaDict.Add("/Prospectos/CatProspectosClasificaciones.aspx".ToUpper(), 194)
- PaginaDict.Add("/Prospectos/CatProspectosSeguimiento.aspx".ToUpper(), 195)
- PaginaDict.Add("/Prospectos/Solicitudes/CatSolicitudesG15.aspx".ToUpper(), 246)
- PaginaDict.Add("/Prospectos/Solicitudes/CatProspectosSolicitudesEstatus.aspx".ToUpper(), 198)
- PaginaDict.Add("/Prospectos/Solicitudes/CatProspectosSolicitudesTipos.aspx".ToUpper(), 199)
- PaginaDict.Add("/Prospectos/RedesIndicadores.aspx".ToUpper(), 202)
- PaginaDict.Add("/Prospectos/RepRedesEstructuras.aspx".ToUpper(), 202)
- PaginaDict.Add("/Prospectos/RedesArbol.aspx".ToUpper(), 203)
- PaginaDict.Add("/Prospectos/CatProspectosRedesMetas.aspx".ToUpper(), 204)
- PaginaDict.Add("/Prospectos/RepProspectosRedes.aspx".ToUpper(), 205)
- PaginaDict.Add("/Prospectos/ProspectosRedes.aspx".ToUpper(), 206)
- PaginaDict.Add("/Prospectos/ProspectosSIP.aspx".ToUpper(), 207)
- PaginaDict.Add("/Prospectos/RedesCallCenter.aspx".ToUpper(), 209)
- PaginaDict.Add("/Prospectos/BuscadorBD.aspx".ToUpper(), 210)
- PaginaDict.Add("/Prospectos/ProspectosEstructuras.aspx".ToUpper(), 211)
- PaginaDict.Add("/Prospectos/CatEventosEstructuras.aspx".ToUpper(), 212)
- PaginaDict.Add("/Prospectos/RepPadron.aspx".ToUpper(), 213)
- PaginaDict.Add("/Prospectos/RepPadronDetalle.aspx".ToUpper(), 213)
- PaginaDict.Add("/Prospectos/RepEventos.aspx".ToUpper(), 213)
- PaginaDict.Add("/Prospectos/RepEventosDetalle.aspx".ToUpper(), 213)
- PaginaDict.Add("/Prospectos/RedesEncuestas.aspx".ToUpper(), 214)
- PaginaDict.Add("/Prospectos/RepEncuestas.aspx".ToUpper(), 217)
- PaginaDict.Add("/Prospectos/RepEncuestasDetalle.aspx".ToUpper(), 217)
- PaginaDict.Add("/Prospectos/RepEncuestasDetalleTabla.aspx".ToUpper(), 217)
- PaginaDict.Add("/Prospectos/CatProspectosDetalle.aspx".ToUpper(), -1)
- PaginaDict.Add("/Prospectos/CatProspectosEstatus.aspx".ToUpper(), 200)
- PaginaDict.Add("/Prospectos/CatProspectosTipos.aspx".ToUpper(), 215)
- PaginaDict.Add("/Prospectos/Encuestas/CatEncuestas.aspx".ToUpper(), 218)
- PaginaDict.Add("/Prospectos/RepEncuestasAvances.aspx".ToUpper(), 231)
- PaginaDict.Add("/Prospectos/ProspectosValidar.aspx".ToUpper(), 232)
- PaginaDict.Add("/Prospectos/RepAgendasBitacoras.aspx".ToUpper(), 234)
- PaginaDict.Add("/Prospectos/RepSolicitudes.aspx".ToUpper(), 243)
- PaginaDict.Add("/Prospectos/CatProspectosApoyosTipos.aspx".ToUpper(), 216)
- PaginaDict.Add("/Prospectos/CatEventosTipos.aspx".ToUpper(), 245)
- PaginaDict.Add("/Prospectos/RepProspectos.aspx".ToUpper(), 208)
-#End Region
- 'RECURSOS HUMANOS
-#Region "RH"
- PaginaDict.Add("/RH/CatDepartamentos.aspx".ToUpper(), 40)
- PaginaDict.Add("/RH/CatEscolaridad.aspx".ToUpper(), 41)
- PaginaDict.Add("/RH/CatEstadoCivil.aspx".ToUpper(), 42)
- PaginaDict.Add("/RH/CatEstatusPersonal.aspx".ToUpper(), 43)
- PaginaDict.Add("/RH/CatGenero.aspx".ToUpper(), 44)
- PaginaDict.Add("/RH/CatMotivoBaja.aspx".ToUpper(), 45)
- PaginaDict.Add("/RH/Personal.aspx".ToUpper(), 46)
- PaginaDict.Add("/RH/CatPersonal.aspx".ToUpper(), 46)
- PaginaDict.Add("/RH/CatPuesto.aspx".ToUpper(), 47)
- PaginaDict.Add("/RH/CatRuta.aspx".ToUpper(), 48)
- PaginaDict.Add("/RH/CatTiposContratos.aspx".ToUpper(), 49)
- PaginaDict.Add("/RH/CatTurno.aspx".ToUpper(), 50)
- PaginaDict.Add("/RH/Asistencias.aspx".ToUpper(), 67)
- PaginaDict.Add("/RH/BuzonCalidad.aspx".ToUpper(), 67)
- PaginaDict.Add("/RH/CatAsistenciasInasistencias.aspx".ToUpper(), 71)
- PaginaDict.Add("/RH/CatMotivosHorasExtras.aspx".ToUpper(), 72)
- PaginaDict.Add("/RH/CatTipoBuzon.aspx".ToUpper(), 86)
- PaginaDict.Add("/RH/ActualizacionMasiva.aspx".ToUpper(), 92)
- PaginaDict.Add("/RH/RepBuzonCalidad.aspx".ToUpper(), 102)
- PaginaDict.Add("/RH/CatDocumentos.aspx".ToUpper(), 253)
- PaginaDict.Add("/RH/CatJornadas.aspx".ToUpper(), 254)
- PaginaDict.Add("/RH/AsistenciaDetalle.aspx".ToUpper(), -1)
- PaginaDict.Add("/RH/ComparativoNomina.aspx".ToUpper(), 311)
- PaginaDict.Add("/RH/RepPersonalInconsistencias.aspx".ToUpper(), 314)
- PaginaDict.Add("/RH/CatPuestosSueldos.aspx".ToUpper(), 370)
- PaginaDict.Add("/RH/CatPersonalRequerido.aspx".ToUpper(), 401)
- PaginaDict.Add("/RH/RepPersonalNecesidades.aspx".ToUpper(), 556)
- PaginaDict.Add("/RH/RepIndiceRotacionPersonal.aspx".ToUpper(), 557)
- PaginaDict.Add("/RH/RepAusentismoLaboral.aspx".ToUpper(), 558)
- PaginaDict.Add("/RH/Organigrama.aspx".ToUpper(), 407)
- PaginaDict.Add("/RH/CatCaracteristicas.aspx".ToUpper(), 411)
- PaginaDict.Add("/RH/CatCursosTemas.aspx".ToUpper(), 1015)
- PaginaDict.Add("/RH/CatCursosCapacitadores.aspx".ToUpper(), 1016)
- PaginaDict.Add("/RH/CatCursos.aspx".ToUpper(), 1017)
- PaginaDict.Add("/RH/Reclutamiento.aspx".ToUpper(), 1022)
- PaginaDict.Add("/RH/RepDocumentacionVencida.aspx".ToUpper(), 412)
- PaginaDict.Add("/RH/CatSubProyectosZonas.aspx".ToUpper(), 421)
- PaginaDict.Add("/RH/RepVacaciones.aspx".ToUpper(), 422)
- PaginaDict.Add("/RH/CatChecadorTipo.aspx".ToUpper(), 427)
- PaginaDict.Add("/RH/CatChecadorHorarios.aspx".ToUpper(), 428)
- PaginaDict.Add("/RH/CatChecadorEstaciones.aspx".ToUpper(), 627)
- PaginaDict.Add("/RH/RepChecadorPreAsistencia.aspx".ToUpper(), 628)
- PaginaDict.Add("/RH/CatCaptaciones.aspx".ToUpper(), 629)
- PaginaDict.Add("/RH/RepUniformes.aspx".ToUpper(), 630)
- PaginaDict.Add("/RH/RepUniformesResguardo.aspx".ToUpper(), 666)
-
- PaginaDict.Add("/RH/ListaAsistenciaRH.aspx".ToUpper(), 631)
- PaginaDict.Add("/RH/CatUniformes.aspx".ToUpper(), 632)
- PaginaDict.Add("/RH/CatUniformesDetalle.aspx".ToUpper(), 633)
- PaginaDict.Add("/RH/CatConceptosViaticos.aspx".ToUpper(), 662)
- PaginaDict.Add("/RH/SolicitudViaticos.aspx".ToUpper(), 663)
- PaginaDict.Add("/RH/ReporteViaticos.aspx".ToUpper(), 664)
- PaginaDict.Add("/RH/MiPerfil.aspx".ToUpper(), -1) ' se dejará libre el módulo para que cualquier que tenga cvepersonal, pueda acceder
-#End Region
-#Region "Sistema"
- 'Cargo las páginas que deben tener restricción
- PaginaDict.Add("/Sistemas/CatEmpresas.aspx".ToUpper(), 2)
- PaginaDict.Add("/Sistemas/Empresa.aspx".ToUpper(), 2)
- PaginaDict.Add("/Sistemas/CatUsuarios.aspx".ToUpper(), 20)
- PaginaDict.Add("/Sistemas/Usuarios.aspx".ToUpper(), 20)
- PaginaDict.Add("/Sistemas/UsuarioDetalle.aspx".ToUpper(), 20)
- PaginaDict.Add("/Sistemas/CatRoles.aspx".ToUpper(), 21)
- PaginaDict.Add("/Sistemas/RolesDetalle.aspx".ToUpper(), 21)
- PaginaDict.Add("/Sistemas/CatModulos.aspx".ToUpper(), 22)
- PaginaDict.Add("/Sistemas/CatProcesos.aspx".ToUpper(), 69)
- PaginaDict.Add("/Sistemas/CatParametros.aspx".ToUpper(), 143)
- PaginaDict.Add("/Sistemas/PopUpCargaCertificados.aspx".ToUpper(), 144)
- PaginaDict.Add("/Sistemas/CatNotificaciones.aspx".ToUpper(), 146)
- PaginaDict.Add("/Sistemas/EmpresasModulos.aspx".ToUpper(), 346)
- PaginaDict.Add("/Sistemas/CatSesiones.aspx".ToUpper(), 374)
- PaginaDict.Add("/Sistemas/CatFuncionalidades.aspx".ToUpper(), 568)
- PaginaDict.Add("/Sistemas/CatIndicadores.aspx".ToUpper(), 573)
- PaginaDict.Add("/Sistemas/CatIndicadoresUsuarios.aspx".ToUpper(), 572)
- PaginaDict.Add("/Sistemas/CatPAC.aspx".ToUpper(), 409)
- PaginaDict.Add("/Sistemas/PermisosPorUsuario.aspx".ToUpper(), 700)
- PaginaDict.Add("/Sistemas/Cierre.aspx".ToUpper(), 713)
- PaginaDict.Add("/Sistemas/CatTareasProgramadas.aspx".ToUpper(), -1)
- PaginaDict.Add("/Sistemas/ConfiguracionEmpresa.aspx".ToUpper(), 683)
-#End Region
-#Region "Ventas"
- 'VENTAS
- PaginaDict.Add("/Ventas/RepIngresosDetalle.aspx".ToUpper(), 540)
- PaginaDict.Add("/Ventas/Clientes.aspx".ToUpper(), 5)
- PaginaDict.Add("/Ventas/CatClientes.aspx".ToUpper(), 5)
- PaginaDict.Add("/Ventas/CatClientesClasificaciones.aspx".ToUpper(), 408)
+#End Region
+#Region "MF"
+ PaginaDict.Add("/MF/BitacoraDiaria.aspx".ToUpper(), 801)
+ PaginaDict.Add("/MF/CatActividades.aspx".ToUpper(), 803)
+ PaginaDict.Add("/MF/CatOperadores.aspx".ToUpper(), 804)
+ PaginaDict.Add("/MF/CatEstatus.aspx".ToUpper(), 805)
+ PaginaDict.Add("/MF/CargaLayout.aspx".ToUpper(), 863)
+ PaginaDict.Add("/MF/RepConsumoCombustible.aspx".ToUpper(), 864)
+#End Region
+#Region "Nomina"
+
+ 'NÓMINA
+ PaginaDict.Add("/Nomina/Calculo.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Nomina/SobreRecibo.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Nomina/SobreReciboCharlie.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Nomina/CatTiposPeriodos.aspx".ToUpper(), 60)
+ PaginaDict.Add("/Nomina/PreNomina.aspx".ToUpper(), 74)
+ PaginaDict.Add("/Nomina/PreNominaHistorial.aspx".ToUpper(), 148)
+ PaginaDict.Add("/Nomina/RepPreNomina.aspx".ToUpper(), 74)
+ PaginaDict.Add("/Nomina/Nomina.aspx".ToUpper(), 75)
+ PaginaDict.Add("/Nomina/NominaB.aspx".ToUpper(), 75)
+ PaginaDict.Add("/Nomina/Nomina2.aspx".ToUpper(), 75)
+ PaginaDict.Add("/Nomina/ListaAsistencias.aspx".ToUpper(), 91)
+ PaginaDict.Add("/Nomina/ConceptosEspeciales.aspx".ToUpper(), 136)
+ PaginaDict.Add("/Nomina/CatConceptos.aspx".ToUpper(), 172)
+ PaginaDict.Add("/Nomina/ConceptoNomina.aspx".ToUpper(), 172)
+ PaginaDict.Add("/Nomina/RegistroNomina.aspx".ToUpper(), 173)
+ PaginaDict.Add("/Nomina/RepConceptosAcumulados.aspx".ToUpper(), 174)
+ PaginaDict.Add("/Nomina/RepPersonalAcumulados.aspx".ToUpper(), 393)
+ PaginaDict.Add("/Nomina/CatPeriodos.aspx".ToUpper(), 177)
+ PaginaDict.Add("/Nomina/Finiquito.aspx".ToUpper(), 197)
+ PaginaDict.Add("/Nomina/CatSatBancos.aspx".ToUpper(), 255)
+ PaginaDict.Add("/Nomina/CatSatConceptos.aspx".ToUpper(), 256)
+ PaginaDict.Add("/Nomina/CatSatRegimenContratacion.aspx".ToUpper(), 257)
+ PaginaDict.Add("/Nomina/CatSatTipoIncapacidad.aspx".ToUpper(), 258)
+ PaginaDict.Add("/Nomina/CatSatRiesgoPuesto.aspx".ToUpper(), 259)
+ PaginaDict.Add("/Nomina/ReportePTU.aspx".ToUpper(), 870)
+#End Region
+ 'Ordenes de Servicios
+#Region "OS"
+ PaginaDict.Add("/OS/PopUpBuscarOS.aspx".ToUpper(), 80)
+ PaginaDict.Add("/OS/CatEstatusOrdenServicio.aspx".ToUpper(), 99)
+ PaginaDict.Add("/OS/PopUpBuscarCuentasEquipos.aspx".ToUpper(), 100)
+ PaginaDict.Add("/OS/PopUpCuentasEquipos.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/OS/CatSubTiposOrdenesServicios.aspx".ToUpper(), 101)
+
+ 'PaginaDict.Add("/OS/CatCaracteristicasOrdenServicio.aspx".ToUpper(), 131)
+ 'PaginaDict.Add("/OS/CatOSCaracteristicasOpciones.aspx".ToUpper(), 132)
+ PaginaDict.Add("/OS/RepOrdenesServicios.aspx".ToUpper(), 134)
+ PaginaDict.Add("/OS/OrdenesServicios.aspx".ToUpper(), 135)
+ PaginaDict.Add("/OS/CatTipoCuentasEquipos.aspx".ToUpper(), 159)
+ PaginaDict.Add("/OS/CatTiposOrdenesServicios.aspx".ToUpper(), 167)
+ PaginaDict.Add("/OS/PopUpOS_PS_Especificaciones.aspx".ToUpper(), 135)
+ PaginaDict.Add("/OS/PopUpMateriales.aspx".ToUpper(), 135)
+ PaginaDict.Add("/OS/Asignaciones.aspx".ToUpper(), 125)
+#End Region
+ 'OC
+#Region "OC"
+ PaginaDict.Add("/OC/OC.aspx".ToUpper(), 155)
+ PaginaDict.Add("/OC/OC2.aspx".ToUpper(), -1)
+
+ PaginaDict.Add("/OC/OCCompras.aspx".ToUpper(), 158)
+ 'PaginaDict.Add("/OC/CatEstatusOrdenCompra.aspx".ToUpper(), 156)
+ 'PaginaDict.Add("/OC/CatEstatusUsuarios.aspx".ToUpper(), 156)
+ PaginaDict.Add("/OC/RepOC.aspx".ToUpper(), 157)
+ PaginaDict.Add("/OC/CatEstatus.aspx".ToUpper(), 162)
+ PaginaDict.Add("/OC/RepRequisiciones.aspx".ToUpper(), 249)
+ 'PaginaDict.Add("/OC/PopOCCotizaciones.aspx".ToUpper(), 155)
+ PaginaDict.Add("/OC/PopUpBuscarReq.aspx".ToUpper(), 305)
+ PaginaDict.Add("/OC/RepCotizaciones.aspx".ToUpper(), 158)
+ PaginaDict.Add("/OC/RepCotizacionesDetalle.aspx".ToUpper(), 158)
+ PaginaDict.Add("/OC/PopUpBuscarCot.aspx".ToUpper(), 160)
+ PaginaDict.Add("/OC/Cotizaciones.aspx".ToUpper(), 132)
+ PaginaDict.Add("/OC/CotizacionEnLinea.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OC/CotizacionEnvio.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OC/OC.aspx?Tipo= REQ", 250)
+ PaginaDict.Add("/OC/RepOCSinFactura.aspx".ToUpper(), 388)
+ PaginaDict.Add("/OC/RepOCxSurtir.aspx".ToUpper(), 469)
+ PaginaDict.Add("/OC/RepReqXOC.aspx".ToUpper(), 634)
+ PaginaDict.Add("/OC/RepOCGuias.aspx".ToUpper(), 494)
+ PaginaDict.Add("/OC/ListaRequisicion.aspx".ToUpper(), 667)
+ PaginaDict.Add("/OC/RepOCAnticiposPtes.aspx".ToUpper(), 506)
+ PaginaDict.Add("/OC/RepSolicitudesAnticipo.aspx".ToUpper(), 529)
+#End Region
+ 'OI
+#Region "OI"
+ PaginaDict.Add("/OI/EventoDetalle.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OI/Normatividad.aspx".ToUpper(), 669)
+ PaginaDict.Add("/OI/RepNormatividad.aspx".ToUpper(), 669)
+ PaginaDict.Add("/OI/Minutas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OI/RepDocumentos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OI/EventoComentario.aspx".ToUpper(), -1)
+
+ PaginaDict.Add("/OI/RepEventos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OI/RepTareas.aspx".ToUpper(), 293)
+ PaginaDict.Add("/OI/RepMinutas.aspx".ToUpper(), 338)
+ PaginaDict.Add("/OI/PopUpAgenda.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OI/RepSoporteADS.aspx".ToUpper(), 456)
+ PaginaDict.Add("/OI/SoporteADS.aspx".ToUpper(), 457)
+ PaginaDict.Add("/OI/Desarrollo.aspx".ToUpper(), 473)
+ PaginaDict.Add("/OI/RepDesarrollo.aspx".ToUpper(), 475)
+ PaginaDict.Add("/OI/DesarrolloWizard.aspx".ToUpper(), 474)
+ PaginaDict.Add("/OI/SubidasADS.aspx".ToUpper(), 476)
+#End Region
+#Region "Planeacion"
+ 'PLANEACIÓN
+ PaginaDict.Add("/Planeacion/CatSucursales.aspx".ToUpper(), 17)
+ PaginaDict.Add("/Planeacion/Sucursal.aspx".ToUpper(), 17)
+ PaginaDict.Add("/Planeacion/CatProyectos.aspx".ToUpper(), 34)
+ PaginaDict.Add("/Planeacion/CatSubProyectos.aspx".ToUpper(), 35)
+ PaginaDict.Add("/Planeacion/CatTiposEventos.aspx".ToUpper(), 66)
+ PaginaDict.Add("/Planeacion/Notificaciones.aspx".ToUpper(), -1)
+ 'PRUEBA CON Metronic
+ PaginaDict.Add("/Planeacion/CatProyectos2.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/123/TablaBD.aspx".ToUpper(), 5)
+ 'PaginaDict.Add("/123/CatClientes.aspx".ToUpper(), 5)
+#End Region
+ 'PRESUPUESTOS
+#Region "Presupuestos"
+ PaginaDict.Add("/Presupuestos/GenerarPresupuestos.aspx".ToUpper(), 242)
+ PaginaDict.Add("/Presupuestos/GenerarPresupuestos2.aspx".ToUpper(), 247)
+ PaginaDict.Add("/Presupuestos/RepPresupuestos.aspx".ToUpper(), 118)
+ PaginaDict.Add("/Presupuestos/Presupuesto.aspx".ToUpper(), 369)
+#End Region
+ 'Prospeccion
+#Region "Prospeccion"
+ PaginaDict.Add("/Prospeccion/Prospectos.aspx".ToUpper(), 392)
+ PaginaDict.Add("/Prospeccion/PopUpBuscarProspectos.aspx".ToUpper(), 392)
+ PaginaDict.Add("/Prospeccion/RepProspeccion.aspx".ToUpper(), 395)
+ PaginaDict.Add("/Prospeccion/RepProspeccionDetalle.aspx".ToUpper(), 395)
+ PaginaDict.Add("/Prospeccion/RepProspectosGIS.aspx".ToUpper(), 390)
+
+#End Region
+#Region "Prospectos"
+ 'PROSPECTOS
+ PaginaDict.Add("/Prospectos/CatClasificacionesCaracteristicas.aspx".ToUpper(), 180)
+ PaginaDict.Add("/Prospectos/ProspectoExpediente.aspx".ToUpper(), 181)
+ PaginaDict.Add("/Prospectos/CatProspectos.aspx".ToUpper(), 182)
+ PaginaDict.Add("/Prospectos/CatProspectosRedes.aspx".ToUpper(), 183)
+ PaginaDict.Add("/Prospectos/CatCoordinadores.aspx".ToUpper(), 184)
+ PaginaDict.Add("/Prospectos/CatSupervisores.aspx".ToUpper(), 185)
+ PaginaDict.Add("/Prospectos/ProspectosG15.aspx".ToUpper(), 187)
+ PaginaDict.Add("/Prospectos/CatProspectosG15.aspx".ToUpper(), 188)
+ PaginaDict.Add("/Prospectos/CatEventos.aspx".ToUpper(), 189)
+ PaginaDict.Add("/Prospectos/CatResponsables.aspx".ToUpper(), 190)
+ PaginaDict.Add("/Prospectos/CatPromotores.aspx".ToUpper(), 191)
+ PaginaDict.Add("/Prospectos/CatAnfitriones.aspx".ToUpper(), 192)
+ PaginaDict.Add("/Prospectos/CatProspectosApoyos.aspx".ToUpper(), 193)
+ PaginaDict.Add("/Prospectos/CatProspectosClasificaciones.aspx".ToUpper(), 194)
+ PaginaDict.Add("/Prospectos/CatProspectosSeguimiento.aspx".ToUpper(), 195)
+ PaginaDict.Add("/Prospectos/Solicitudes/CatSolicitudesG15.aspx".ToUpper(), 246)
+ PaginaDict.Add("/Prospectos/Solicitudes/CatProspectosSolicitudesEstatus.aspx".ToUpper(), 198)
+ PaginaDict.Add("/Prospectos/Solicitudes/CatProspectosSolicitudesTipos.aspx".ToUpper(), 199)
+ PaginaDict.Add("/Prospectos/RedesIndicadores.aspx".ToUpper(), 202)
+ PaginaDict.Add("/Prospectos/RepRedesEstructuras.aspx".ToUpper(), 202)
+ PaginaDict.Add("/Prospectos/RedesArbol.aspx".ToUpper(), 203)
+ PaginaDict.Add("/Prospectos/CatProspectosRedesMetas.aspx".ToUpper(), 204)
+ PaginaDict.Add("/Prospectos/RepProspectosRedes.aspx".ToUpper(), 205)
+ PaginaDict.Add("/Prospectos/ProspectosRedes.aspx".ToUpper(), 206)
+ PaginaDict.Add("/Prospectos/ProspectosSIP.aspx".ToUpper(), 207)
+ PaginaDict.Add("/Prospectos/RedesCallCenter.aspx".ToUpper(), 209)
+ PaginaDict.Add("/Prospectos/BuscadorBD.aspx".ToUpper(), 210)
+ PaginaDict.Add("/Prospectos/ProspectosEstructuras.aspx".ToUpper(), 211)
+ PaginaDict.Add("/Prospectos/CatEventosEstructuras.aspx".ToUpper(), 212)
+ PaginaDict.Add("/Prospectos/RepPadron.aspx".ToUpper(), 213)
+ PaginaDict.Add("/Prospectos/RepPadronDetalle.aspx".ToUpper(), 213)
+ PaginaDict.Add("/Prospectos/RepEventos.aspx".ToUpper(), 213)
+ PaginaDict.Add("/Prospectos/RepEventosDetalle.aspx".ToUpper(), 213)
+ PaginaDict.Add("/Prospectos/RedesEncuestas.aspx".ToUpper(), 214)
+ PaginaDict.Add("/Prospectos/RepEncuestas.aspx".ToUpper(), 217)
+ PaginaDict.Add("/Prospectos/RepEncuestasDetalle.aspx".ToUpper(), 217)
+ PaginaDict.Add("/Prospectos/RepEncuestasDetalleTabla.aspx".ToUpper(), 217)
+ PaginaDict.Add("/Prospectos/CatProspectosDetalle.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Prospectos/CatProspectosEstatus.aspx".ToUpper(), 200)
+ PaginaDict.Add("/Prospectos/CatProspectosTipos.aspx".ToUpper(), 215)
+ PaginaDict.Add("/Prospectos/Encuestas/CatEncuestas.aspx".ToUpper(), 218)
+ PaginaDict.Add("/Prospectos/RepEncuestasAvances.aspx".ToUpper(), 231)
+ PaginaDict.Add("/Prospectos/ProspectosValidar.aspx".ToUpper(), 232)
+ PaginaDict.Add("/Prospectos/RepAgendasBitacoras.aspx".ToUpper(), 234)
+ PaginaDict.Add("/Prospectos/RepSolicitudes.aspx".ToUpper(), 243)
+ PaginaDict.Add("/Prospectos/CatProspectosApoyosTipos.aspx".ToUpper(), 216)
+ PaginaDict.Add("/Prospectos/CatEventosTipos.aspx".ToUpper(), 245)
+ PaginaDict.Add("/Prospectos/RepProspectos.aspx".ToUpper(), 208)
+#End Region
+ 'RECURSOS HUMANOS
+#Region "RH"
+ PaginaDict.Add("/RH/CatDepartamentos.aspx".ToUpper(), 40)
+ PaginaDict.Add("/RH/CatEscolaridad.aspx".ToUpper(), 41)
+ PaginaDict.Add("/RH/CatEstadoCivil.aspx".ToUpper(), 42)
+ PaginaDict.Add("/RH/CatEstatusPersonal.aspx".ToUpper(), 43)
+ PaginaDict.Add("/RH/CatGenero.aspx".ToUpper(), 44)
+ PaginaDict.Add("/RH/CatMotivoBaja.aspx".ToUpper(), 45)
+ PaginaDict.Add("/RH/Personal.aspx".ToUpper(), 46)
+ PaginaDict.Add("/RH/CatPersonal.aspx".ToUpper(), 46)
+ PaginaDict.Add("/RH/CatPuesto.aspx".ToUpper(), 47)
+ PaginaDict.Add("/RH/CatRuta.aspx".ToUpper(), 48)
+ PaginaDict.Add("/RH/CatTiposContratos.aspx".ToUpper(), 49)
+ PaginaDict.Add("/RH/CatTurno.aspx".ToUpper(), 50)
+ PaginaDict.Add("/RH/Asistencias.aspx".ToUpper(), 67)
+ PaginaDict.Add("/RH/BuzonCalidad.aspx".ToUpper(), 67)
+ PaginaDict.Add("/RH/CatAsistenciasInasistencias.aspx".ToUpper(), 71)
+ PaginaDict.Add("/RH/CatMotivosHorasExtras.aspx".ToUpper(), 72)
+ PaginaDict.Add("/RH/CatTipoBuzon.aspx".ToUpper(), 86)
+ PaginaDict.Add("/RH/ActualizacionMasiva.aspx".ToUpper(), 92)
+ PaginaDict.Add("/RH/RepBuzonCalidad.aspx".ToUpper(), 102)
+ PaginaDict.Add("/RH/CatDocumentos.aspx".ToUpper(), 253)
+ PaginaDict.Add("/RH/CatJornadas.aspx".ToUpper(), 254)
+ PaginaDict.Add("/RH/AsistenciaDetalle.aspx".ToUpper(), -1)
+ PaginaDict.Add("/RH/ComparativoNomina.aspx".ToUpper(), 311)
+ PaginaDict.Add("/RH/RepPersonalInconsistencias.aspx".ToUpper(), 314)
+ PaginaDict.Add("/RH/CatPuestosSueldos.aspx".ToUpper(), 370)
+ PaginaDict.Add("/RH/CatPersonalRequerido.aspx".ToUpper(), 401)
+ PaginaDict.Add("/RH/RepPersonalNecesidades.aspx".ToUpper(), 556)
+ PaginaDict.Add("/RH/RepIndiceRotacionPersonal.aspx".ToUpper(), 557)
+ PaginaDict.Add("/RH/RepAusentismoLaboral.aspx".ToUpper(), 558)
+ PaginaDict.Add("/RH/Organigrama.aspx".ToUpper(), 407)
+ PaginaDict.Add("/RH/CatCaracteristicas.aspx".ToUpper(), 411)
+ PaginaDict.Add("/RH/CatCursosTemas.aspx".ToUpper(), 1015)
+ PaginaDict.Add("/RH/CatCursosCapacitadores.aspx".ToUpper(), 1016)
+ PaginaDict.Add("/RH/CatCursos.aspx".ToUpper(), 1017)
+ PaginaDict.Add("/RH/Reclutamiento.aspx".ToUpper(), 1022)
+ PaginaDict.Add("/RH/RepDocumentacionVencida.aspx".ToUpper(), 412)
+ PaginaDict.Add("/RH/CatSubProyectosZonas.aspx".ToUpper(), 421)
+ PaginaDict.Add("/RH/RepVacaciones.aspx".ToUpper(), 422)
+ PaginaDict.Add("/RH/CatChecadorTipo.aspx".ToUpper(), 427)
+ PaginaDict.Add("/RH/CatChecadorHorarios.aspx".ToUpper(), 428)
+ PaginaDict.Add("/RH/CatChecadorEstaciones.aspx".ToUpper(), 627)
+ PaginaDict.Add("/RH/RepChecadorPreAsistencia.aspx".ToUpper(), 628)
+ PaginaDict.Add("/RH/CatCaptaciones.aspx".ToUpper(), 629)
+ PaginaDict.Add("/RH/RepUniformes.aspx".ToUpper(), 630)
+ PaginaDict.Add("/RH/RepUniformesResguardo.aspx".ToUpper(), 666)
+
+ PaginaDict.Add("/RH/ListaAsistenciaRH.aspx".ToUpper(), 631)
+ PaginaDict.Add("/RH/CatUniformes.aspx".ToUpper(), 632)
+ PaginaDict.Add("/RH/CatUniformesDetalle.aspx".ToUpper(), 633)
+ PaginaDict.Add("/RH/CatConceptosViaticos.aspx".ToUpper(), 662)
+ PaginaDict.Add("/RH/SolicitudViaticos.aspx".ToUpper(), 663)
+ PaginaDict.Add("/RH/ReporteViaticos.aspx".ToUpper(), 664)
+ PaginaDict.Add("/RH/MiPerfil.aspx".ToUpper(), -1) ' se dejará libre el módulo para que cualquier que tenga cvepersonal, pueda acceder
+#End Region
+#Region "Sistema"
+ 'Cargo las páginas que deben tener restricción
+ PaginaDict.Add("/Sistemas/CatEmpresas.aspx".ToUpper(), 2)
+ PaginaDict.Add("/Sistemas/Empresa.aspx".ToUpper(), 2)
+ PaginaDict.Add("/Sistemas/CatUsuarios.aspx".ToUpper(), 20)
+ PaginaDict.Add("/Sistemas/Usuarios.aspx".ToUpper(), 20)
+ PaginaDict.Add("/Sistemas/UsuarioDetalle.aspx".ToUpper(), 20)
+ PaginaDict.Add("/Sistemas/CatRoles.aspx".ToUpper(), 21)
+ PaginaDict.Add("/Sistemas/RolesDetalle.aspx".ToUpper(), 21)
+ PaginaDict.Add("/Sistemas/CatModulos.aspx".ToUpper(), 22)
+ PaginaDict.Add("/Sistemas/CatProcesos.aspx".ToUpper(), 69)
+ PaginaDict.Add("/Sistemas/CatParametros.aspx".ToUpper(), 143)
+ PaginaDict.Add("/Sistemas/PopUpCargaCertificados.aspx".ToUpper(), 144)
+ PaginaDict.Add("/Sistemas/CatNotificaciones.aspx".ToUpper(), 146)
+ PaginaDict.Add("/Sistemas/EmpresasModulos.aspx".ToUpper(), 346)
+ PaginaDict.Add("/Sistemas/CatSesiones.aspx".ToUpper(), 374)
+ PaginaDict.Add("/Sistemas/CatFuncionalidades.aspx".ToUpper(), 568)
+ PaginaDict.Add("/Sistemas/CatIndicadores.aspx".ToUpper(), 573)
+ PaginaDict.Add("/Sistemas/CatIndicadoresUsuarios.aspx".ToUpper(), 572)
+ PaginaDict.Add("/Sistemas/CatPAC.aspx".ToUpper(), 409)
+ PaginaDict.Add("/Sistemas/PermisosPorUsuario.aspx".ToUpper(), 700)
+ PaginaDict.Add("/Sistemas/Cierre.aspx".ToUpper(), 713)
+ PaginaDict.Add("/Sistemas/CatTareasProgramadas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Sistemas/ConfiguracionEmpresa.aspx".ToUpper(), 683)
+#End Region
+#Region "Ventas"
+ 'VENTAS
+ PaginaDict.Add("/Ventas/RepIngresosDetalle.aspx".ToUpper(), 540)
+ PaginaDict.Add("/Ventas/Clientes.aspx".ToUpper(), 5)
+ PaginaDict.Add("/Ventas/CatClientes.aspx".ToUpper(), 5)
+ PaginaDict.Add("/Ventas/CatClientesClasificaciones.aspx".ToUpper(), 408)
PaginaDict.Add("/Ventas/Ventas.aspx".ToUpper(), 6)
- PaginaDict.Add("/Ventas/Ventas.aspx?Op=Cot".ToUpper(), 366)
+ PaginaDict.Add("/Ventas/Ventas.aspx?Op=Cot".ToUpper(), 366)
PaginaDict.Add("/Ventas/RepVentas.aspx".ToUpper(), 9)
- PaginaDict.Add("/Ventas/RepVentas.aspx?Op=Cot".ToUpper(), 367)
- PaginaDict.Add("/Ventas/RepRemisiones.aspx".ToUpper(), 430)
- PaginaDict.Add("/Ventas/RepRemisionesDetalle.aspx".ToUpper(), 430)
- PaginaDict.Add("/Ventas/RepCotizaciones.aspx".ToUpper(), 430)
- PaginaDict.Add("/Ventas/RepCotizacionesDetalle.aspx".ToUpper(), 430)
- PaginaDict.Add("/Ventas/RepVentasPV.aspx".ToUpper(), 9)
- PaginaDict.Add("/Ventas/RepVentaDetalle.aspx".ToUpper(), 9)
- PaginaDict.Add("/Ventas/CatClasificaciones.aspx".ToUpper(), 12)
- PaginaDict.Add("/Ventas/CatClasificaciones2.aspx".ToUpper(), 396)
- PaginaDict.Add("/Ventas/CatClasificacionesDetalle.aspx".ToUpper(), 12)
- PaginaDict.Add("/Ventas/ProductosServicios.aspx".ToUpper(), 13)
- PaginaDict.Add("/Ventas/CatPS.aspx".ToUpper(), 13)
- PaginaDict.Add("/Ventas/CatEstatusFactura.aspx".ToUpper(), 14)
- PaginaDict.Add("/Ventas/CatLeyendasFiscales.aspx".ToUpper(), 16)
- PaginaDict.Add("/Ventas/CatUnidadesMedida.aspx".ToUpper(), 18)
- PaginaDict.Add("/Ventas/RepVentasPeriodo.aspx".ToUpper(), 27)
- PaginaDict.Add("/Ventas/PopUpBuscarFolio.aspx".ToUpper(), 28)
- PaginaDict.Add("/Ventas/RepProductos.aspx".ToUpper(), 32)
- PaginaDict.Add("/Ventas/CatVendedores.aspx".ToUpper(), 142)
- PaginaDict.Add("/Ventas/PuntoVenta.aspx".ToUpper(), 163)
- PaginaDict.Add("/Ventas/CatMesas.aspx".ToUpper(), 244)
- PaginaDict.Add("/Ventas/CatPreciosLista.aspx".ToUpper(), 378)
- PaginaDict.Add("/Ventas/RepProductosServicios.aspx".ToUpper(), 352)
- PaginaDict.Add("/Ventas/RepProductosServiciosDetalle.aspx".ToUpper(), 352)
- PaginaDict.Add("/Ventas/RepPS.aspx".ToUpper(), 701)
- PaginaDict.Add("/Ventas/RepABT.aspx".ToUpper(), 353)
- PaginaDict.Add("/Ventas/CatPromociones.aspx".ToUpper(), 123)
- PaginaDict.Add("/Ventas/Promociones.aspx".ToUpper(), 124)
- PaginaDict.Add("/Ventas/CatFamiliaSubFamilia.aspx".ToUpper(), 372)
- PaginaDict.Add("/Ventas/RepComisiones.aspx".ToUpper(), 382)
- PaginaDict.Add("/Ventas/RepComisionesDetalle.aspx".ToUpper(), 382)
- PaginaDict.Add("/Ventas/RepComisionesDetallePS.aspx".ToUpper(), 382)
- PaginaDict.Add("/Ventas/CatEsquemaComisiones.aspx".ToUpper(), 379)
- PaginaDict.Add("/Ventas/CatImpuestosLocales.aspx".ToUpper(), 394)
- PaginaDict.Add("/Ventas/ActualizarPrecios.aspx".ToUpper(), 397)
- PaginaDict.Add("/Ventas/ClientesAbonar.aspx".ToUpper(), 321)
- PaginaDict.Add("/Ventas/Reportes.aspx".ToUpper(), 567)
- PaginaDict.Add("/Ventas/DiseñadorReportes.aspx".ToUpper(), 569)
- PaginaDict.Add("/Ventas/ReporteDetalle.aspx".ToUpper(), 576)
- PaginaDict.Add("/Ventas/PopUpBuscarPs.aspx".ToUpper(), 13)
- PaginaDict.Add("/Ventas/RepVentasUtilidadPadre.aspx".ToUpper(), 590)
- PaginaDict.Add("/Ventas/RepVentasUtilidad.aspx".ToUpper(), 590)
- PaginaDict.Add("/Ventas/RepVentasUtilidadDetalle.aspx".ToUpper(), 590)
- PaginaDict.Add("/Ventas/eFacturas.aspx".ToUpper(), 413)
- PaginaDict.Add("/Ventas/PV.aspx".ToUpper(), 163)
- PaginaDict.Add("/Ventas/PVRene.aspx".ToUpper(), 163)
- PaginaDict.Add("/Ventas/Corporativo.aspx".ToUpper(), 807)
- PaginaDict.Add("/Ventas/RepRecuperacion.aspx".ToUpper(), 88)
- PaginaDict.Add("/Ventas/RepRecuperacionDetalle.aspx".ToUpper(), 88)
- PaginaDict.Add("/Ventas/RepComisionesJAM.aspx".ToUpper(), 650)
- PaginaDict.Add("/Ventas/RepNCxAplicar.aspx".ToUpper(), 648)
- PaginaDict.Add("/Ventas/CatDocumentosClientes.aspx".ToUpper(), -1)
- PaginaDict.Add("/Ventas/RepDocumentacionVencidaClientes.aspx".ToUpper(), -1)
- PaginaDict.Add("/Ventas/RepProductosServiciosPeriodo.aspx".ToUpper(), 865)
- PaginaDict.Add("/Ventas/ClasificacionesDetalle.aspx".ToUpper(), 875)
- PaginaDict.Add("/Ventas/RepPedidos2.aspx".ToUpper(), 881)
- PaginaDict.Add("/Ventas/RepPedidos2Detalle.aspx".ToUpper(), 881)
- PaginaDict.Add("/Ventas/RepRecuperacionPeriodo.aspx".ToUpper(), 885)
- PaginaDict.Add("/Ventas/RepVentasAutorizaciones.aspx".ToUpper(), 531)
- PaginaDict.Add("/Ventas/RepComisionesJAM2.aspx".ToUpper(), 889)
- PaginaDict.Add("/Ventas/RepComisionesJAM2Detalle.aspx".ToUpper(), 889)
- PaginaDict.Add("/Ventas/AuxiliarCliente.aspx".ToUpper(), 1316)
- PaginaDict.Add("/Ventas/AuxiliarClienteVentas.aspx".ToUpper(), 542)
- PaginaDict.Add("/Ventas/RepCostoPromedioVenta.aspx".ToUpper(), 532)
- PaginaDict.Add("/Ventas/RepVentasNetasResumen.aspx".ToUpper(), 533)
- PaginaDict.Add("/Ventas/RepTopVentas.aspx".ToUpper(), -1)
- PaginaDict.Add("/Ventas/RepSolicitudesCancelacion.aspx".ToUpper(), -1)
- PaginaDict.Add("/Ventas/RepCanceladasPendientes.aspx".ToUpper(), -1)
-
- PaginaDict.Add("/Ventas/RepCancelacionesPorAtender.aspx".ToUpper(), 750)
- PaginaDict.Add("/Ventas/RepCancelacionesPorRespuesta.aspx".ToUpper(), 751)
- PaginaDict.Add("/Ventas/RepIngresos.aspx".ToUpper(), 540)
- 'Reportes de Anticipos-NC-IXC'
- PaginaDict.Add("/Ventas/RepAnticipo-NC-IXC.aspx".ToUpper(), 869)
- PaginaDict.Add("/Ventas/RepAnticipo-NC-IXCDetalle.aspx".ToUpper(), 869)
- 'PaginaDict.Add("/Ventas/Efacturas.aspx".ToUpper(), 2015)
- 'PaginaDict.Add("/Ventas/Ventas.aspx".ToUpper(), 2016)
- 'PaginaDict.Add("/Ventas/Clientes.aspx".ToUpper(), 2017)
- PaginaDict.Add("/Ventas/Ventas.aspx?Op=Rem".ToUpper(), 2018)
- 'PaginaDict.Add("/Ventas/Ventas.aspx?Op=Cot".ToUpper(), 2019)
- PaginaDict.Add("/Ventas/VentasH.aspx".ToUpper(), -1)
- PaginaDict.Add("/Ventas/ClientesAbonarH.aspx".ToUpper(), -1)
- PaginaDict.Add("/Ventas/PVRaul.aspx".ToUpper(), -1)
- PaginaDict.Add("/Ventas/CatAutorizacionDescuentos.aspx".ToUpper(), 1037)
- PaginaDict.Add("/Ventas/RepPUESinPago.aspx".ToUpper(), 672)
- PaginaDict.Add("/Ventas/RepVentasResumen.aspx".ToUpper(), 674)
- PaginaDict.Add("/Ventas/RepAnticiposEspeciales.aspx".ToUpper(), 678)
- PaginaDict.Add("/Ventas/RepArqueos.aspx".ToUpper(), 679)
- PaginaDict.Add("/Ventas/RepArqueosDetalle.aspx".ToUpper(), 680)
- PaginaDict.Add("/Ventas/RepCotizacionesxFacturar.aspx".ToUpper(), 686)
+ PaginaDict.Add("/Ventas/RepVentas.aspx?Op=Cot".ToUpper(), 367)
+ PaginaDict.Add("/Ventas/RepRemisiones.aspx".ToUpper(), 430)
+ PaginaDict.Add("/Ventas/RepRemisionesDetalle.aspx".ToUpper(), 430)
+ PaginaDict.Add("/Ventas/RepCotizaciones.aspx".ToUpper(), 430)
+ PaginaDict.Add("/Ventas/RepCotizacionesDetalle.aspx".ToUpper(), 430)
+ PaginaDict.Add("/Ventas/RepVentasPV.aspx".ToUpper(), 9)
+ PaginaDict.Add("/Ventas/RepVentaDetalle.aspx".ToUpper(), 9)
+ PaginaDict.Add("/Ventas/CatClasificaciones.aspx".ToUpper(), 12)
+ PaginaDict.Add("/Ventas/CatClasificaciones2.aspx".ToUpper(), 396)
+ PaginaDict.Add("/Ventas/CatClasificacionesDetalle.aspx".ToUpper(), 12)
+ PaginaDict.Add("/Ventas/ProductosServicios.aspx".ToUpper(), 13)
+ PaginaDict.Add("/Ventas/CatPS.aspx".ToUpper(), 13)
+ PaginaDict.Add("/Ventas/CatEstatusFactura.aspx".ToUpper(), 14)
+ PaginaDict.Add("/Ventas/CatLeyendasFiscales.aspx".ToUpper(), 16)
+ PaginaDict.Add("/Ventas/CatUnidadesMedida.aspx".ToUpper(), 18)
+ PaginaDict.Add("/Ventas/RepVentasPeriodo.aspx".ToUpper(), 27)
+ PaginaDict.Add("/Ventas/PopUpBuscarFolio.aspx".ToUpper(), 28)
+ PaginaDict.Add("/Ventas/RepProductos.aspx".ToUpper(), 32)
+ PaginaDict.Add("/Ventas/CatVendedores.aspx".ToUpper(), 142)
+ PaginaDict.Add("/Ventas/PuntoVenta.aspx".ToUpper(), 163)
+ PaginaDict.Add("/Ventas/CatMesas.aspx".ToUpper(), 244)
+ PaginaDict.Add("/Ventas/CatPreciosLista.aspx".ToUpper(), 378)
+ PaginaDict.Add("/Ventas/RepProductosServicios.aspx".ToUpper(), 352)
+ PaginaDict.Add("/Ventas/RepProductosServiciosDetalle.aspx".ToUpper(), 352)
+ PaginaDict.Add("/Ventas/RepPS.aspx".ToUpper(), 701)
+ PaginaDict.Add("/Ventas/RepABT.aspx".ToUpper(), 353)
+ PaginaDict.Add("/Ventas/CatPromociones.aspx".ToUpper(), 123)
+ PaginaDict.Add("/Ventas/Promociones.aspx".ToUpper(), 124)
+ PaginaDict.Add("/Ventas/CatFamiliaSubFamilia.aspx".ToUpper(), 372)
+ PaginaDict.Add("/Ventas/RepComisiones.aspx".ToUpper(), 382)
+ PaginaDict.Add("/Ventas/RepComisionesDetalle.aspx".ToUpper(), 382)
+ PaginaDict.Add("/Ventas/RepComisionesDetallePS.aspx".ToUpper(), 382)
+ PaginaDict.Add("/Ventas/CatEsquemaComisiones.aspx".ToUpper(), 379)
+ PaginaDict.Add("/Ventas/CatImpuestosLocales.aspx".ToUpper(), 394)
+ PaginaDict.Add("/Ventas/ActualizarPrecios.aspx".ToUpper(), 397)
+ PaginaDict.Add("/Ventas/ClientesAbonar.aspx".ToUpper(), 321)
+ PaginaDict.Add("/Ventas/Reportes.aspx".ToUpper(), 567)
+ PaginaDict.Add("/Ventas/DiseñadorReportes.aspx".ToUpper(), 569)
+ PaginaDict.Add("/Ventas/ReporteDetalle.aspx".ToUpper(), 576)
+ PaginaDict.Add("/Ventas/PopUpBuscarPs.aspx".ToUpper(), 13)
+ PaginaDict.Add("/Ventas/RepVentasUtilidadPadre.aspx".ToUpper(), 590)
+ PaginaDict.Add("/Ventas/RepVentasUtilidad.aspx".ToUpper(), 590)
+ PaginaDict.Add("/Ventas/RepVentasUtilidadDetalle.aspx".ToUpper(), 590)
+ PaginaDict.Add("/Ventas/eFacturas.aspx".ToUpper(), 413)
+ PaginaDict.Add("/Ventas/PV.aspx".ToUpper(), 163)
+ PaginaDict.Add("/Ventas/PVRene.aspx".ToUpper(), 163)
+ PaginaDict.Add("/Ventas/Corporativo.aspx".ToUpper(), 807)
+ PaginaDict.Add("/Ventas/RepRecuperacion.aspx".ToUpper(), 88)
+ PaginaDict.Add("/Ventas/RepRecuperacionDetalle.aspx".ToUpper(), 88)
+ PaginaDict.Add("/Ventas/RepComisionesJAM.aspx".ToUpper(), 650)
+ PaginaDict.Add("/Ventas/RepNCxAplicar.aspx".ToUpper(), 648)
+ PaginaDict.Add("/Ventas/CatDocumentosClientes.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Ventas/RepDocumentacionVencidaClientes.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Ventas/RepProductosServiciosPeriodo.aspx".ToUpper(), 865)
+ PaginaDict.Add("/Ventas/ClasificacionesDetalle.aspx".ToUpper(), 875)
+ PaginaDict.Add("/Ventas/RepPedidos2.aspx".ToUpper(), 881)
+ PaginaDict.Add("/Ventas/RepPedidos2Detalle.aspx".ToUpper(), 881)
+ PaginaDict.Add("/Ventas/RepRecuperacionPeriodo.aspx".ToUpper(), 885)
+ PaginaDict.Add("/Ventas/RepVentasAutorizaciones.aspx".ToUpper(), 531)
+ PaginaDict.Add("/Ventas/RepComisionesJAM2.aspx".ToUpper(), 889)
+ PaginaDict.Add("/Ventas/RepComisionesJAM2Detalle.aspx".ToUpper(), 889)
+ PaginaDict.Add("/Ventas/AuxiliarCliente.aspx".ToUpper(), 1316)
+ PaginaDict.Add("/Ventas/AuxiliarClienteVentas.aspx".ToUpper(), 542)
+ PaginaDict.Add("/Ventas/RepCostoPromedioVenta.aspx".ToUpper(), 532)
+ PaginaDict.Add("/Ventas/RepVentasNetasResumen.aspx".ToUpper(), 533)
+ PaginaDict.Add("/Ventas/RepTopVentas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Ventas/RepSolicitudesCancelacion.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Ventas/RepCanceladasPendientes.aspx".ToUpper(), -1)
+
+ PaginaDict.Add("/Ventas/RepCancelacionesPorAtender.aspx".ToUpper(), 750)
+ PaginaDict.Add("/Ventas/RepCancelacionesPorRespuesta.aspx".ToUpper(), 751)
+ PaginaDict.Add("/Ventas/RepIngresos.aspx".ToUpper(), 540)
+ 'Reportes de Anticipos-NC-IXC'
+ PaginaDict.Add("/Ventas/RepAnticipo-NC-IXC.aspx".ToUpper(), 869)
+ PaginaDict.Add("/Ventas/RepAnticipo-NC-IXCDetalle.aspx".ToUpper(), 869)
+ 'PaginaDict.Add("/Ventas/Efacturas.aspx".ToUpper(), 2015)
+ 'PaginaDict.Add("/Ventas/Ventas.aspx".ToUpper(), 2016)
+ 'PaginaDict.Add("/Ventas/Clientes.aspx".ToUpper(), 2017)
+ PaginaDict.Add("/Ventas/Ventas.aspx?Op=Rem".ToUpper(), 2018)
+ 'PaginaDict.Add("/Ventas/Ventas.aspx?Op=Cot".ToUpper(), 2019)
+ PaginaDict.Add("/Ventas/VentasH.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Ventas/ClientesAbonarH.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Ventas/PVRaul.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Ventas/CatAutorizacionDescuentos.aspx".ToUpper(), 1037)
+ PaginaDict.Add("/Ventas/RepPUESinPago.aspx".ToUpper(), 672)
+ PaginaDict.Add("/Ventas/RepVentasResumen.aspx".ToUpper(), 674)
+ PaginaDict.Add("/Ventas/RepAnticiposEspeciales.aspx".ToUpper(), 678)
+ PaginaDict.Add("/Ventas/RepArqueos.aspx".ToUpper(), 679)
+ PaginaDict.Add("/Ventas/RepArqueosDetalle.aspx".ToUpper(), 680)
+ PaginaDict.Add("/Ventas/RepCotizacionesxFacturar.aspx".ToUpper(), 686)
PaginaDict.Add("/Ventas/RepRemisionesNC.aspx".ToUpper(), 687)
PaginaDict.Add("/Ventas/CatCobranzaEstatus.aspx".ToUpper(), 7003)
PaginaDict.Add("/Ventas/CatCobranzaEstatusTurno.aspx".ToUpper(), 7004)
@@ -4670,12 +4669,12 @@ Public Class ClsPaginas
PaginaDict.Add("/Ventas/RepVentasMensualesDetalle.aspx".ToUpper(), 721)
PaginaDict.Add("/Ventas/MetasVendedores.aspx".ToUpper(), 722)
PaginaDict.Add("/Ventas/CatMetasVendedores.aspx".ToUpper(), 723)
-#End Region
+#End Region
'Portal Cliente/Proveedor
- PaginaDict.Add("/PortalCliente/PortalCliente.aspx".ToUpper(), 1101)
+ PaginaDict.Add("/PortalCliente/PortalCliente.aspx".ToUpper(), 1101)
PaginaDict.Add("/PortalProveedor/PortalProveedor.aspx".ToUpper(), 1201)
PaginaDict.Add("/Edoc/CatDocumentos.aspx".ToUpper(), 1205)
@@ -4684,79 +4683,79 @@ Public Class ClsPaginas
PaginaDict.Add("/Edoc/Contratos.aspx".ToUpper(), 1209)
'Portal
- PaginaDict.Add("/AIMMGM/ConsultaCliente.aspx".ToUpper(), -1)
- PaginaDict.Add("/Portal/ConsultaCliente.aspx".ToUpper(), -1)
- PaginaDict.Add("/Proveedores/PortalProveedor.aspx".ToUpper(), -1)
- PaginaDict.Add("/Proveedores/LogInProveedores.aspx".ToUpper(), -1)
-
- 'Punto de Venta
- PaginaDict.Add("/PV/PVRepVentas.aspx".ToUpper(), 270)
- PaginaDict.Add("/PV/PVRepCompras.aspx".ToUpper(), 272)
- PaginaDict.Add("/PV/PVRepVentasCompras.aspx".ToUpper(), 273)
-
- PaginaDict.Add("/Bancos/PagoElectronicoGrupos.aspx".ToUpper(), -1)
-
-
-
-
-
-
-
- 'Orden Produccion'
-
- 'RMA
- PaginaDict.Add("/RMA/Garantias.aspx".ToUpper(), 175)
-
-
-
-
-
-
- 'IMPUESTOS
- PaginaDict.Add("/Impuestos/RepIVAACreditable.aspx".ToUpper(), 563)
-
-
-
-
-
- 'Votos
- 'PaginaDict.Add("/Temporal/RegBoletas.aspx".ToUpper(), 1026)
- 'PaginaDict.Add("/Temporal/RepVotos.aspx".ToUpper(), 1027)
-
-
- 'DG2016
- PaginaDict.Add("/ZDG/RepGeneral.aspx".ToUpper(), -1)
- PaginaDict.Add("/ZDG/RepMunicipios.aspx".ToUpper(), -1)
- PaginaDict.Add("/ZDG/RepMunicipiosCoordinadores.aspx".ToUpper(), -1)
- PaginaDict.Add("/ZDG/RepMunicipiosLideres.aspx".ToUpper(), -1)
- PaginaDict.Add("/ZDG/RepMunicipiosMovilizadores.aspx".ToUpper(), -1)
- PaginaDict.Add("/ZDG/RepMunicipiosMilitantes.aspx".ToUpper(), -1)
- PaginaDict.Add("/ZDG/PopUpBuscarMilitante.aspx".ToUpper(), -1)
- PaginaDict.Add("/ZDG/ActualizaPadron.aspx".ToUpper(), -1)
- PaginaDict.Add("/ZDG/CapturaManual.aspx".ToUpper(), -1)
- PaginaDict.Add("/ZDG/MensajeManual.aspx".ToUpper(), -1)
- PaginaDict.Add("/ZDG/MensajeAutomatico.aspx".ToUpper(), -1)
-
- 'PymeCharlie
- PaginaDict.Add("/PyME/Contabilidad/CatCuentas.aspx".ToUpper(), -1)
- PaginaDict.Add("/PyME/Contabilidad/TiposPoliza.aspx".ToUpper(), -1)
- PaginaDict.Add("/PyME/Contabilidad/PlantillasPolizas.aspx".ToUpper(), -1)
- PaginaDict.Add("/PyME/Contabilidad/PlantillasPolizasDetalle.aspx".ToUpper(), -1)
- PaginaDict.Add("/PyME/Contabilidad/RegPoliza.aspx".ToUpper(), -1)
- PaginaDict.Add("/PyME/Contabilidad/RegPrePoliza.aspx".ToUpper(), -1)
- PaginaDict.Add("/PyME/Contabilidad/ContabilizacionVentas.aspx".ToUpper(), -1)
- PaginaDict.Add("/PyME/Contabilidad/ContabilizacionCompras.aspx".ToUpper(), -1)
- PaginaDict.Add("/PyME/Contabilidad/ContabilidadElectronica.aspx".ToUpper(), -1)
- PaginaDict.Add("/PyME/Contabilidad/CierreEjercicio.aspx".ToUpper(), -1)
- PaginaDict.Add("/PyME/Contabilidad/RepBalanceGeneral.aspx".ToUpper(), -1)
- PaginaDict.Add("/PyME/Contabilidad/RepAnexoCatalogo.aspx".ToUpper(), -1)
- PaginaDict.Add("/PyME/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx".ToUpper(), -1)
- PaginaDict.Add("/PyME/Contabilidad/RepBalanzaComprobacion.aspx".ToUpper(), -1)
- PaginaDict.Add("/PyME/Contabilidad/RepEstadoResultados.aspx".ToUpper(), -1)
- PaginaDict.Add("/Planeacion/Presupuestos.aspx".ToUpper(), -1)
-
- 'Pyme 2017
- PaginaDict.Add("/PyME/Sistemas/RegistroEmpresa.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AIMMGM/ConsultaCliente.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Portal/ConsultaCliente.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Proveedores/PortalProveedor.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Proveedores/LogInProveedores.aspx".ToUpper(), -1)
+
+ 'Punto de Venta
+ PaginaDict.Add("/PV/PVRepVentas.aspx".ToUpper(), 270)
+ PaginaDict.Add("/PV/PVRepCompras.aspx".ToUpper(), 272)
+ PaginaDict.Add("/PV/PVRepVentasCompras.aspx".ToUpper(), 273)
+
+ PaginaDict.Add("/Bancos/PagoElectronicoGrupos.aspx".ToUpper(), -1)
+
+
+
+
+
+
+
+ 'Orden Produccion'
+
+ 'RMA
+ PaginaDict.Add("/RMA/Garantias.aspx".ToUpper(), 175)
+
+
+
+
+
+
+ 'IMPUESTOS
+ PaginaDict.Add("/Impuestos/RepIVAACreditable.aspx".ToUpper(), 563)
+
+
+
+
+
+ 'Votos
+ 'PaginaDict.Add("/Temporal/RegBoletas.aspx".ToUpper(), 1026)
+ 'PaginaDict.Add("/Temporal/RepVotos.aspx".ToUpper(), 1027)
+
+
+ 'DG2016
+ PaginaDict.Add("/ZDG/RepGeneral.aspx".ToUpper(), -1)
+ PaginaDict.Add("/ZDG/RepMunicipios.aspx".ToUpper(), -1)
+ PaginaDict.Add("/ZDG/RepMunicipiosCoordinadores.aspx".ToUpper(), -1)
+ PaginaDict.Add("/ZDG/RepMunicipiosLideres.aspx".ToUpper(), -1)
+ PaginaDict.Add("/ZDG/RepMunicipiosMovilizadores.aspx".ToUpper(), -1)
+ PaginaDict.Add("/ZDG/RepMunicipiosMilitantes.aspx".ToUpper(), -1)
+ PaginaDict.Add("/ZDG/PopUpBuscarMilitante.aspx".ToUpper(), -1)
+ PaginaDict.Add("/ZDG/ActualizaPadron.aspx".ToUpper(), -1)
+ PaginaDict.Add("/ZDG/CapturaManual.aspx".ToUpper(), -1)
+ PaginaDict.Add("/ZDG/MensajeManual.aspx".ToUpper(), -1)
+ PaginaDict.Add("/ZDG/MensajeAutomatico.aspx".ToUpper(), -1)
+
+ 'PymeCharlie
+ PaginaDict.Add("/PyME/Contabilidad/CatCuentas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/PyME/Contabilidad/TiposPoliza.aspx".ToUpper(), -1)
+ PaginaDict.Add("/PyME/Contabilidad/PlantillasPolizas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/PyME/Contabilidad/PlantillasPolizasDetalle.aspx".ToUpper(), -1)
+ PaginaDict.Add("/PyME/Contabilidad/RegPoliza.aspx".ToUpper(), -1)
+ PaginaDict.Add("/PyME/Contabilidad/RegPrePoliza.aspx".ToUpper(), -1)
+ PaginaDict.Add("/PyME/Contabilidad/ContabilizacionVentas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/PyME/Contabilidad/ContabilizacionCompras.aspx".ToUpper(), -1)
+ PaginaDict.Add("/PyME/Contabilidad/ContabilidadElectronica.aspx".ToUpper(), -1)
+ PaginaDict.Add("/PyME/Contabilidad/CierreEjercicio.aspx".ToUpper(), -1)
+ PaginaDict.Add("/PyME/Contabilidad/RepBalanceGeneral.aspx".ToUpper(), -1)
+ PaginaDict.Add("/PyME/Contabilidad/RepAnexoCatalogo.aspx".ToUpper(), -1)
+ PaginaDict.Add("/PyME/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx".ToUpper(), -1)
+ PaginaDict.Add("/PyME/Contabilidad/RepBalanzaComprobacion.aspx".ToUpper(), -1)
+ PaginaDict.Add("/PyME/Contabilidad/RepEstadoResultados.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Planeacion/Presupuestos.aspx".ToUpper(), -1)
+
+ 'Pyme 2017
+ PaginaDict.Add("/PyME/Sistemas/RegistroEmpresa.aspx".ToUpper(), -1)
PaginaDict.Add("/PyME/Sistemas/WizardRegistro.aspx".ToUpper(), -1)
@@ -4789,2949 +4788,2956 @@ Public Class ClsPaginas
- PaginaDict.Add("/Compras/RepCxPCaudillo.aspx".ToUpper(), -1)
-
-
- 'ECOMMERCE
- PaginaDict.Add("/Ecommerce/Insignias.aspx".ToUpper(), 7002)
-
- PaginaDict.Add("/Acumuladores/Tamaños.aspx".ToUpper(), 1031)
- PaginaDict.Add("/Acumuladores/RepUsados.aspx".ToUpper(), 1032)
- PaginaDict.Add("/Acumuladores/CatTiposDefecto.aspx".ToUpper(), 1033)
- PaginaDict.Add("/Acumuladores/CatTiposUso.aspx".ToUpper(), 1034)
- PaginaDict.Add("/Acumuladores/CatFoliosGarantia.aspx".ToUpper(), 1035)
+ PaginaDict.Add("/Compras/RepCxPCaudillo.aspx".ToUpper(), -1)
+
+
+ 'ECOMMERCE
+ PaginaDict.Add("/Ecommerce/Insignias.aspx".ToUpper(), 7002)
+
+ PaginaDict.Add("/Acumuladores/Tamaños.aspx".ToUpper(), 1031)
+ PaginaDict.Add("/Acumuladores/RepUsados.aspx".ToUpper(), 1032)
+ PaginaDict.Add("/Acumuladores/CatTiposDefecto.aspx".ToUpper(), 1033)
+ PaginaDict.Add("/Acumuladores/CatTiposUso.aspx".ToUpper(), 1034)
+ PaginaDict.Add("/Acumuladores/CatFoliosGarantia.aspx".ToUpper(), 1035)
PaginaDict.Add("/Acumuladores/CatGarantiasMeses.aspx".ToUpper(), 1036)
PaginaDict.Add("/Acumuladores/RepIndicadorDiario.aspx".ToUpper(), 2055)
- PaginaDict.Add("/Acumuladores/RepEntradasUsadosClientes.aspx".ToUpper(), 543)
- PaginaDict.Add("/Acumuladores/EntradasUsadosResumenRep.aspx".ToUpper(), 1032)
-
-
- 'Antes de aquí.
- Application("GlobalSIGAppPaginas") = PaginaDict
-
- Else
- PaginaDict = DirectCast(Application("GlobalSIGAppPaginas"), Hashtable)
- End If
-
- Retorno = Convert.ToInt32(PaginaDict.Item(Pagina.ToUpper()))
-
- ' If Retorno = 0 Then 'No lo encontró en la lista General de Página y busca en los que son temporales
- 'Dim PaginaDictTemp As New HybridDictionary
- '
- If Pagina.ToUpper() = ("/Bancos/IE.aspx").ToUpper() Then
- Select Case Request("Opcion")
- Case "EGSSINFACT" : Retorno = 176
- Case "DEV" : Retorno = 283
- Case "ANTC" : Retorno = 266
- Case "INGPC" : Retorno = 156
- Case Else : Retorno = 153
- End Select
- End If
-
- If Pagina.ToUpper() = ("/Bancos/IE2.aspx").ToUpper() Then
- Select Case Request("Opcion")
- Case "EGSSINFACT" : Retorno = 176
- Case "DEV" : Retorno = 283
- Case "ANTC" : Retorno = 266
- Case Else : Retorno = 153
- End Select
- End If
-
- If Pagina.ToUpper() = ("/Bancos/RepIE.aspx").ToUpper() Then
- Select Case Request("Tipo")
- Case "Conciliaciones" : Retorno = 83
- Case Else : Retorno = 82
- End Select
- End If
-
-
- If Pagina.ToUpper() = ("/Bancos/PolizaCheque.aspx").ToUpper() Then
- Select Case Request("Tipo")
- Case "Ing" : Retorno = 161
- Case Else : Retorno = 171
- End Select
- End If
- '
- If Pagina.ToUpper() = "/AC/RegComprometido.aspx".ToUpper() Then
- Select Case Request("Opc")
- Case "NOM" : Retorno = 295
- Case Else : Retorno = 296
- End Select
- End If
-
- If Pagina.ToUpper() = ("/Temporal/RegBoletas.aspx").ToUpper() Then
- Select Case Request("Tipo")
- Case "E" : Retorno = 1026
- Case "N" : Retorno = 1028
- End Select
- End If
-
- If Pagina.ToUpper() = ("/Temporal/RepVotos.aspx").ToUpper() Then
- Select Case Request("Tipo")
- Case "E" : Retorno = 1027
- Case "N" : Retorno = 1029
- End Select
- End If
-
- If Pagina.ToUpper() = ("/Inventarios/EntradasSalidas.aspx").ToUpper() Then
- Select Case Request("CI")
- Case "1" : Retorno = 452
- Case Else : Retorno = 219
- End Select
- End If
-
- If Pagina.ToUpper() = ("/Inventarios/RecepcionUsados.aspx").ToUpper() Then
- Select Case Request("Opc")
- Case "S" : Retorno = 1203
- Case Else : Retorno = 1202
- End Select
+ PaginaDict.Add("/Acumuladores/RepEntradasUsadosClientes.aspx".ToUpper(), 543)
+ PaginaDict.Add("/Acumuladores/EntradasUsadosResumenRep.aspx".ToUpper(), 1032)
+
+
+ 'Antes de aquí.
+ Application("GlobalSIGAppPaginas") = PaginaDict
+
+ Else
+ PaginaDict = DirectCast(Application("GlobalSIGAppPaginas"), Hashtable)
End If
- If Pagina.ToUpper() = ("/Ventas/Ventas.aspx").ToUpper() Then
- Select Case Request("Op")
+ Retorno = Convert.ToInt32(PaginaDict.Item(Pagina.ToUpper()))
+
+ ' If Retorno = 0 Then 'No lo encontró en la lista General de Página y busca en los que son temporales
+ 'Dim PaginaDictTemp As New HybridDictionary
+ '
+ If Pagina.ToUpper() = ("/Bancos/IE.aspx").ToUpper() Then
+ Select Case Request("Opcion")
+ Case "EGSSINFACT" : Retorno = 176
+ Case "DEV" : Retorno = 283
+ Case "ANTC" : Retorno = 266
+ Case "INGPC" : Retorno = 156
+ Case Else : Retorno = 153
+ End Select
+ End If
+
+ If Pagina.ToUpper() = ("/Bancos/IE2.aspx").ToUpper() Then
+ Select Case Request("Opcion")
+ Case "EGSSINFACT" : Retorno = 176
+ Case "DEV" : Retorno = 283
+ Case "ANTC" : Retorno = 266
+ Case Else : Retorno = 153
+ End Select
+ End If
+
+ If Pagina.ToUpper() = ("/Bancos/RepIE.aspx").ToUpper() Then
+ Select Case Request("Tipo")
+ Case "Conciliaciones" : Retorno = 83
+ Case Else : Retorno = 82
+ End Select
+ End If
+
+
+ If Pagina.ToUpper() = ("/Bancos/PolizaCheque.aspx").ToUpper() Then
+ Select Case Request("Tipo")
+ Case "Ing" : Retorno = 161
+ Case Else : Retorno = 171
+ End Select
+ End If
+ '
+ If Pagina.ToUpper() = "/AC/RegComprometido.aspx".ToUpper() Then
+ Select Case Request("Opc")
+ Case "NOM" : Retorno = 295
+ Case Else : Retorno = 296
+ End Select
+ End If
+
+ If Pagina.ToUpper() = ("/Temporal/RegBoletas.aspx").ToUpper() Then
+ Select Case Request("Tipo")
+ Case "E" : Retorno = 1026
+ Case "N" : Retorno = 1028
+ End Select
+ End If
+
+ If Pagina.ToUpper() = ("/Temporal/RepVotos.aspx").ToUpper() Then
+ Select Case Request("Tipo")
+ Case "E" : Retorno = 1027
+ Case "N" : Retorno = 1029
+ End Select
+ End If
+
+ If Pagina.ToUpper() = ("/Inventarios/EntradasSalidas.aspx").ToUpper() Then
+ Select Case Request("CI")
+ Case "1" : Retorno = 452
+ Case Else : Retorno = 219
+ End Select
+ End If
+
+ If Pagina.ToUpper() = ("/Inventarios/RecepcionUsados.aspx").ToUpper() Then
+ Select Case Request("Opc")
+ Case "S" : Retorno = 1203
+ Case Else : Retorno = 1202
+ End Select
+ End If
+
+ If Pagina.ToUpper() = ("/Ventas/Ventas.aspx").ToUpper() Then
+ Select Case Request("Op")
Case "Cot" : Retorno = 366
- Case "Rem" : Retorno = 2018
- Case Else : Retorno = 6
- End Select
+ Case "Rem" : Retorno = 2018
+ Case Else : Retorno = 6
+ End Select
End If
- If Pagina.ToUpper() = ("/Ventas/RepVentas.aspx").ToUpper() Then
- Select Case Request("Op")
- Case "Cot" : Retorno = 367
- Case Else : Retorno = 9
- End Select
- End If
-
- Return Retorno
-
- End Function
- Public Sub CerrarSession()
-
- Usuario.CerrarSession()
- End Sub
- Public Sub Alert(Mensaje As String, Optional pOpcion As TipoMensaje = TipoMensaje.MsgInformacion, Optional JSBtnAceptar As String = "", Optional timeout As Integer = 5)
- If DirectCast(pOpcion, Integer) >= 5 Then
- Mensaje = Mensaje.Replace("'"c, "\'").Replace(vbCrLf, "").Replace("""", "\'").Replace(vbLf, " ")
- JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'")
- Dim toastscript As String = String.Format("alertatoast({3},'{0}',function(){{{1}}},{2});", Mensaje, JSBtnAceptar, timeout, DirectCast(pOpcion, Integer))
- ViewState("strToastMsglargonoreplace") = String.Format("{0}{1}", If(Not IsNothing(ViewState("strToastMsglargonoreplace")) AndAlso ViewState("strToastMsglargonoreplace").ToString().Length > 0, ViewState("strToastMsglargonoreplace").ToString(), ""), toastscript)
- Else
- Mensaje.Alert(Mensaje, pOpcion, JSBtnAceptar, TimeoutToast:=timeout)
- End If
- End Sub
- Protected Overridable Sub Page_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
- If Not IsNothing(ViewState("strToastMsglargonoreplace")) AndAlso ViewState("strToastMsglargonoreplace").ToString.Length > 0 Then
- RegistraScript(ViewState("strToastMsglargonoreplace").ToString(), "esteseraunticklargoparaquenosesobrescribaconotro")
- ViewState("strToastMsglargonoreplace") = Nothing
- End If
-
- End Sub
- Protected Overrides Sub SavePageStateToPersistenceMedium(pviewState As Object)
- 'If Request.Form("__VIEWSTATE_KEY") IsNot Nothing Then Cache.Remove(Request.Form("__VIEWSTATE_KEY")) 'elimino la cachado anteriormente
- Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, Date.Now.Ticks)
- 'Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache
- Session.Add(VSKey, pviewState) 'Store the ViewState on Cache
- ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", VSKey)
-
- End Sub
- Protected Overrides Function LoadPageStateFromPersistenceMedium() As Object
-
- Dim VSKey As String = Request.Form("__VIEWSTATE_KEY")
- If Not VSKey.StartsWith("VIEWSTATE_") Then 'Request the Key from the page and validade it.
- Throw New Exception(String.Format("Invalid VIEWSTATE Key: {0}", VSKey))
- End If
- If Session(VSKey) Is Nothing Then 'si por algún motivo, el caché expiró, le dice a la página que se recargue y obtenga los datos de nuevo, y así evitar errores al obtener el viewstate vacío
- Response.Redirect(Request.RawUrl)
- Return Nothing
- Else
- Return Session(VSKey)
- End If
-
- End Function
- Public Shared Sub CargaParametros(Parametros As String)
- Dim P1() As String = Parametros.Split("&"c)
- Dim Tmp As String
- Dim P2() As String
-
- UrlParametros = New Hashtable
-
- For Each Tmp In P1
- P2 = Tmp.Split("="c)
- UrlParametros.Add(P2(0).ToString.ToUpper(), P2(1))
- Next
-
- End Sub
- Shared Sub RegeneraImagen(ByVal Ruta As String)
-
- Dim BM As New Drawing.Bitmap(Ruta)
- Dim Width As Integer = BM.Width
- Dim Height As Integer = BM.Height
- Dim Thumb As New Drawing.Bitmap(Width, Height)
- Dim G As Drawing.Graphics = Drawing.Graphics.FromImage(Thumb)
-
-
- G.InterpolationMode = Drawing.Drawing2D.InterpolationMode.HighQualityBicubic
- G.DrawImage(BM, New Drawing.Rectangle(0, 0, Width, Height), New Drawing.Rectangle(0, 0, BM.Width, BM.Height), Drawing.GraphicsUnit.Pixel)
-
- BM.Dispose()
- G.Dispose()
-
- 'image path.
- Thumb.Save(Ruta, Drawing.Imaging.ImageFormat.Jpeg) 'can use any image format
- Thumb.Dispose()
- End Sub
- Public Sub RegistraScript(Script As String, Optional valuetick As String = "")
- Dim Rdm As Random = New Random()
- ScriptManager.RegisterStartupScript(Page, Me.GetType(), String.Format("{0}{1}{2}", (DateTime.Now.Ticks + 1), Rdm.Next(), valuetick), String.Format("", Script), False)
- End Sub
- Public Sub TabEnabled(Tab As System.Web.UI.HtmlControls.HtmlAnchor, Valor As Boolean)
- If Valor Then
- 'RegistraScript(String.Format("$( ""#{0}"" ).removeClass( ""linkdesactive"" );", tab.ClientID))
- Try
- Tab.Attributes("class") = Tab.Attributes("class").Replace("linkdesactive", "")
- Catch ex As Exception
- Tab.Attributes("class") = ""
- End Try
- Else
- Tab.Attributes.Add("class", "linkdesactive")
- End If
- End Sub
- Public Sub TabActive(Tab As System.Web.UI.HtmlControls.HtmlAnchor)
- RegistraScript(String.Format("$( ""#{0}"" ).Click( );", Tab.ClientID))
- End Sub
- '''
- '''
- '''
- Public Sub Alerta(Mensaje As String, Tipo As String, Funcion As String)
- RegistraScript(String.Format("bootbox.alert('{0}', function() {{{2}}} );", Mensaje, Tipo, Funcion))
- End Sub
- Public Sub NotificacionesPendientes(Nota As String)
- 'incremento el contador de alertas
- Dim Type = Master.GetType
- Dim Prop = Type.GetProperty("countNotificaciones")
- Prop.SetValue(Master, 1 + CInt(Prop.GetValue(Master)))
- 'end incremento contador de alertas
-
- Dim ltl = DirectCast(Master.FindControl("LtlMNotificaciones"), Literal)
-
- ltl.Text = String.Format(" {0} {1}", ltl.Text, Nota)
- End Sub
- Public Sub Confirmacion(Mensaje As String, Tipo As String, FuncionOK As String, FuncionCancel As String)
- RegistraScript(String.Format("bootbox.confirm('{0}', function(result) {{if (result){{ {2} }}else{{ {3} }} }}); ", Mensaje, Tipo, FuncionOK, FuncionCancel))
- End Sub
- Public Function AddBitacoraUsuario(CveModulo As Integer, Accion As String, Resultado As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
- Dim Retorno As Boolean = False
- Dim ObjUsuario As New ClsSisUsuarios
- Retorno = ObjUsuario.AddBitacora(CveModulo, Accion, Resultado, CveUsuario, CveEmpresa)
- ObjUsuario.Dispose()
- Return Retorno
- End Function
-
-#Region " IMPRIMIR PDF "
- '''
- ''' Genera documento PDF o Excel
- '''
- '''
Directorio donde se ubica el archivo
- '''
Datatable
- '''
Listado de parametros para el reporte
- '''
Opcional Nombre del archivo que se descarga
- '''
Optional, Formato de Generacion PDF o Excel
- '''
- Public Sub ImprimirPDF(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing)
- Dim lrds As New List(Of ReportDataSource)
- Dim rds As New ReportDataSource
- rds.Name = RDSName
- rds.Value = DtDatos
- lrds.Add(rds)
- ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR)
- End Sub
- Public Sub ImprimirPDFMultiDS(RutaReporte As String, lrds As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing)
- ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR)
- End Sub
-
- '''
- ''' Genera documento PDF o Excel
- '''
- '''
Directorio donde se ubica el archivo
- '''
Contenedor de Datatables
- '''
Listado de parametros para el reporte
- '''
Opcional Nombre del archivo que se descarga
- '''
Optional, Formato de Generacion PDF o Excel
- '''
- Public Sub ImprimirPDF(RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing)
- 'limpio ReportViwer
- ImprimirbytesPDF(StreamPDF(RutaReporte, DataSource, Parametros, NombreArchivo, Formato, MR), NombreArchivo, Formato)
- End Sub
- Public Function StreamPDF(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing) As Byte()
- Dim lrds As New List(Of ReportDataSource)
- Dim rds As New ReportDataSource
- rds.Name = RDSName
- rds.Value = DtDatos
- lrds.Add(rds)
- Return StreamPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR)
- End Function
- Public Function StreamPDF(RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing) As Byte()
- 'limpio ReportViwer
- Dim sw As New System.Diagnostics.Stopwatch()
- sw.Start()
-
- If IsNothing(MR) Then MR = New ReportViewer
- Dim Bytes As Byte() = Nothing
- Try
- ' MasterReporteador.LocalReport.DataSources.Clear()
- For Each RDS As ReportDataSource In DataSource
- MR.LocalReport.DataSources.Add(RDS)
- Next
-
- MR.LocalReport.ReportPath = RutaReporte
- MR.ProcessingMode = ProcessingMode.Local
- MR.LocalReport.EnableExternalImages = True
- MR.LocalReport.SetParameters(Parametros)
- MR.LocalReport.Refresh()
- Dim Warnings As Warning() = Nothing
- Dim StreamIds As String() = Nothing
- Dim MimeType As String = Nothing
- Dim Encoding As String = Nothing
- Dim Extension As String = Nothing
- Bytes = MR.LocalReport.Render(Formato, Nothing, MimeType, Encoding, Extension, StreamIds, Warnings)
- Catch ex As Microsoft.Reporting.WebForms.ScriptManagerNotFoundException
- GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, 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"))} - Ruta {RutaReporte}")
- 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
- 'GuardaLog($"Error: {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
- Catch ex As Exception
- GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, 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"))} - Ruta {RutaReporte}")
- 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
- 'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
- End Try
-
- sw.Stop()
- If sw.Elapsed.TotalSeconds > 10 Then
- GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ")
- End If
-
- Return Bytes
- End Function
- Public Function ImprimirPDFCrystal(RutaReporte As String, DataSource As DataTable, Parametros As List(Of CrystalParametro), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportDocument = Nothing) As Byte()
- 'limpio ReportViwer
- Dim sw As New System.Diagnostics.Stopwatch()
- sw.Start()
- If IsNothing(MR) Then MR = New ReportDocument()
- Dim Bytes As Byte() = Nothing
- Dim formatType As ExportFormatType = ExportFormatType.NoFormat
- Try
- MR.Load(RutaReporte)
- MR.SetDataSource(DataSource)
-
- For Each item As CrystalParametro In Parametros
- MR.SetParameterValue(item.Nombre, item.Valor)
- Next
-
- Select Case Formato
- Case "PDF"
- formatType = ExportFormatType.PortableDocFormat
- 'Format = "Application/pdf"
- Case "EXCEL"
- formatType = ExportFormatType.Excel
- 'Format = "application/ms-excel"
- End Select
- Dim Stream As IO.Stream = MR.ExportToStream(formatType)
- Dim BD As New BinaryReader(MR.ExportToStream(formatType))
- Bytes = BD.ReadBytes(CInt(MR.ExportToStream(formatType).Length))
- BD.Dispose()
- Stream.Dispose()
- 'Dim Buffer(CInt(Stream.Length)) As Byte
- 'Bytes = Buffer
- 'MR.ExportToHttpResponse(formatType, Response, True, NombreArchivo)
- Catch ex As CrystalReportsException
- GuardaLog(If(ex.InnerException IsNot Nothing AndAlso ex.Message IsNot Nothing,
- $"Error: {If(ex.InnerException.Message, 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"))} Ruta {RutaReporte}", $"Sin descripción - Ruta {RutaReporte}"))
- 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
- 'GuardaLog($"Error: {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
- Catch ex As Exception
- GuardaLog(If(ex.InnerException IsNot Nothing AndAlso ex.Message IsNot Nothing,
- $"Error: {If(ex.InnerException.Message, 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"))} Ruta {RutaReporte}", $"Sin descripción - Ruta {RutaReporte}"))
-
- 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
- 'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
- End Try
- sw.Stop()
- If sw.Elapsed.TotalSeconds > 10 Then
- GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ")
- End If
- If MR IsNot Nothing Then MR.Dispose()
- Return Bytes
- End Function
-
- Public Function ImprimirSubRepPDFCrystal(RutaReporte As String, DataSource As DataTable, Parametros As List(Of CrystalParametro), DataSource1 As DataTable, DataSource2 As DataTable, SubRep1 As String, SubRep2 As String, Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportDocument = Nothing) As Byte()
- 'limpio ReportViwer
- Dim sw As New System.Diagnostics.Stopwatch()
-
- sw.Start()
- If IsNothing(MR) Then MR = New ReportDocument()
-
- Dim SR1 As New ReportDocument
- Dim SR2 As New ReportDocument
-
- Dim Bytes As Byte() = Nothing
- Dim formatType As ExportFormatType = ExportFormatType.NoFormat
- Try
-
- MR.Load(RutaReporte)
-
- SR1 = MR.OpenSubreport(SubRep1)
- SR2 = MR.OpenSubreport(SubRep2)
-
- MR.SetDataSource(DataSource)
-
- SR1.SetDataSource(DataSource1)
- SR2.SetDataSource(DataSource2)
-
- For Each item As CrystalParametro In Parametros
- MR.SetParameterValue(item.Nombre, item.Valor)
- Next
-
- Select Case Formato
- Case "PDF"
- formatType = ExportFormatType.PortableDocFormat
- 'Format = "Application/pdf"
- Case "EXCEL"
- formatType = ExportFormatType.Excel
- 'Format = "application/ms-excel"
- End Select
- Dim Stream As IO.Stream = MR.ExportToStream(formatType)
- Dim BD As New BinaryReader(MR.ExportToStream(formatType))
- Bytes = BD.ReadBytes(CInt(MR.ExportToStream(formatType).Length))
- BD.Dispose()
- Stream.Dispose()
- 'Dim Buffer(CInt(Stream.Length)) As Byte
- 'Bytes = Buffer
- 'MR.ExportToHttpResponse(formatType, Response, True, NombreArchivo)
- Catch ex As CrystalReportsException
- GuardaLog(If(ex.InnerException IsNot Nothing AndAlso ex.Message IsNot Nothing,
- $"Error: {If(ex.InnerException.Message, 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"))} Ruta {RutaReporte}", $"Sin descripción - Ruta {RutaReporte}"))
- 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
- 'GuardaLog($"Error: {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
- Catch ex As Exception
- GuardaLog(If(ex.InnerException IsNot Nothing AndAlso ex.Message IsNot Nothing,
- $"Error: {If(ex.InnerException.Message, 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"))} Ruta {RutaReporte}", $"Sin descripción - Ruta {RutaReporte}"))
-
- 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
- 'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
- End Try
- sw.Stop()
- If sw.Elapsed.TotalSeconds > 10 Then
- GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ")
- End If
- If MR IsNot Nothing Then MR.Dispose()
- Return Bytes
- End Function
-
- Public Function ImprimirPDFPyME(RutaReporte As String, DataSource As DataSet, Parametros As List(Of CrystalParametro), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As StiReport = Nothing) As Byte()
-
- If IsNothing(MR) Then MR = New StiReport()
- Dim Bytes As Byte() = Nothing
- Try
- MR.Load(RutaReporte)
- MR.Dictionary.DataSources.Clear()
- MR.RegData(DataSource)
- Dim Lista = MR.Dictionary.Variables.ToList()
- For Each item As CrystalParametro In Parametros
- If Lista.Exists(Function(a) a.Name = item.Nombre) Then
- MR.Dictionary.Variables(item.Nombre).Value = item.Valor.ToString
- End If
- Next
-
- MR.Dictionary.Synchronize()
- MR.IsRendered = False
- MR.Render(False)
- Dim pdfSettings As New StiPdfExportSettings()
- Dim MemoryStream As New MemoryStream
- Select Case Formato
- Case "PDF"
- MR.ExportDocument(StiExportFormat.Pdf, MemoryStream, pdfSettings)
- Case "EXCEL"
- MR.ExportDocument(StiExportFormat.Excel2007, MemoryStream, pdfSettings)
- End Select
- Bytes = MemoryStream.ToArray
- Catch ex As Exception
- GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, 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"))} - Ruta {RutaReporte}")
- 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
- 'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
- End Try
- Return Bytes
- End Function
-
- Public Function StreamPDFTest(RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing) As Byte()
- 'limpio ReportViwer
-
- Dim sw As New System.Diagnostics.Stopwatch()
- sw.Start()
-
- If IsNothing(MR) Then MR = New ReportViewer
- Dim Bytes As Byte() = Nothing
- Try
-
- ' MR.LocalReport.ReportPath = RutaReporte
- MR.ProcessingMode = ProcessingMode.Local
-
- Using rdlcR As New StreamReader(RutaReporte)
- MR.LocalReport.LoadReportDefinition(rdlcR)
- MR.LocalReport.EnableExternalImages = True
- MR.LocalReport.SetParameters(Parametros)
- MR.LocalReport.Refresh()
- End Using
-
- For Each RDS As ReportDataSource In DataSource
- MR.LocalReport.DataSources.Add(RDS)
- Next
-
- Dim Warnings As Warning() = Nothing
- Dim StreamIds As String() = Nothing
- Dim MimeType As String = Nothing
- Dim Encoding As String = Nothing
- Dim Extension As String = Nothing
-
- Bytes = MR.LocalReport.Render(Formato, Nothing, MimeType, Encoding, Extension, StreamIds, Warnings)
- Catch ex As Microsoft.Reporting.WebForms.ScriptManagerNotFoundException
- GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, 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"))} - Ruta {RutaReporte}")
- 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
- 'GuardaLog($"Error: {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
- Catch ex As Exception
- GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, 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"))} - Ruta {RutaReporte}")
- 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
- 'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
- End Try
-
- sw.Stop()
- If sw.Elapsed.TotalSeconds > 10 Then
- GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ")
- 'GuardaLog($"Tiempo Renderizado Milisegundos {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ")
- End If
-
- Return Bytes
- End Function
-
-
- '''
- ''' Genera documento PDF o Excel
- '''
- '''
- '''
- '''
- '''
- Public Sub ImprimirbytesPDF(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False)
- '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 = mimeType
- Response.AddHeader("content-disposition", String.Format("attachment; filename={0}.{1}", NombreArchivo, If(Formato = "PDF", "pdf", "xls")))
- Response.BinaryWrite(bytes) ' create the file
- Response.Flush() ' send it to the client to download
- 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
- Public Sub ImprimirPDFview(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing)
- Dim lrds As New List(Of ReportDataSource)
- Dim rds As New ReportDataSource
- rds.Name = RDSName
- rds.Value = DtDatos
- lrds.Add(rds)
- ImprimirPDFview(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR)
- End Sub
- Public Sub ImprimirPDFview(RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing)
- 'limpio ReportViwer
- If IsNothing(MR) Then
- MR = New ReportViewer
- End If
- ' MasterReporteador.LocalReport.DataSources.Clear()
- For Each rds As ReportDataSource In DataSource
- MR.LocalReport.DataSources.Add(rds)
- Next
- MR.LocalReport.ReportPath = RutaReporte
- MR.ProcessingMode = ProcessingMode.Local
- MR.LocalReport.EnableExternalImages = True
- MR.LocalReport.SetParameters(Parametros)
- MR.LocalReport.Refresh()
-
- End Sub
-#End Region
-
-#Region "IMPRIMIR FACTURA"
- Public Sub PdfFacturaPyME(ByRef Vta As Modelos.Factura, DT As DataTable)
- Dim retorno As Byte() = Nothing
-
- 'DATOS GENERALES
- Dim Ruta As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{UsuarioActual.CveEmpresa}\"
- Dim PathXML As String = $"{Ruta}XML\{Vta.TipoDocto}\{Vta.SerieFolio}.xml"
- Dim NombreArchivo As String = ""
- Dim NombreArchivoDescarga As String = ""
- Dim TipoDocumento As String = ""
- Dim TipoDocumentoRef As String = ""
- Dim AplicaPagare As String = "1"
-
- Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
- Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
- Dim ImgCBB As String '= String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
-
- Dim ImagenPath = String.Format("{0}Formatos\Suc{1}\logo.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
- Dim Logo As New System.IO.FileInfo(ImagenPath)
- Dim ImgLogo = New Uri(String.Format("{0}Empresas/{1}/Formatos/Suc{2}.png", UrlSitio, UsuarioActual.CveEmpresa, Vta.CveSucursal)).AbsoluteUri
-
- Dim SBDomicilioSucursal As New StringBuilder()
- Dim CiudadSucursal As String = String.Format("{0},{1}", Vta.SubProyecto.Municipio, Vta.SubProyecto.Estado)
- Dim DomicilioSucursal As String = ""
-
- SBDomicilioSucursal.AppendFormat("{0}", Vta.SubProyecto.Calle)
- If Vta.SubProyecto.NoExt.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", Vta.SubProyecto.NoExt)
- If Vta.SubProyecto.NoInt.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", Vta.SubProyecto.NoInt)
- If Vta.SubProyecto.Colonia.Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", Vta.SubProyecto.Colonia)
- If Vta.SubProyecto.CP.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", Vta.SubProyecto.CP)
- If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
- If Vta.SubProyecto.Pais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", Vta.SubProyecto.Pais)
-
- DomicilioSucursal = SBDomicilioSucursal.ToString
-
- Dim Fecha As String = Vta.Fecha.ToShortDateString
-
- Dim SBDireccion As New StringBuilder()
- Dim SBLugar As New StringBuilder()
- Dim ClienteDireccion As String
- Dim ClienteLugar As String
-
- 'SI ESTA TIMBRADA - CON XML
- If File.Exists(PathXML) AndAlso Vta.Serie <> "VistaPrevia" Then 'Cuando es vista previe y coincide la serie y folio se ponen los datos fiscales
- Dim XmlDoc As New System.Xml.XmlDocument
- XmlDoc.Load(PathXML)
-
- Dim TC As Decimal = 1
- Try
- TC = XmlDoc.DocumentElement.Attributes("TipoCambio").InnerText.ToDecimal
- Catch ex As Exception
- TC = 1
- End Try
-
- Vta.FechaEmision = XmlDoc.DocumentElement.Attributes("fecha").InnerText.ToDate
- Vta.NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("noCertificado").InnerText
-
- Dim validaElemento = XmlDoc.DocumentElement("cfdi:Complemento")
-
- If Not IsNothing(validaElemento) Then
- For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1
- If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
- Vta.FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
- Vta.NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("noCertificadoSAT").InnerText
- Vta.FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
- Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloCFD").InnerText
- Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloSAT").InnerText
-
- End If
- Next
- Else
- Vta.FolioFiscal = "Sin Timbrar"
- Vta.NoSerieCertificado = "Sin Timbrar"
- Vta.SelloCFDi = "Sin Timbrar"
- Vta.SelloSAT = "Sin Timbrar"
- End If
-
- 'SIN TIMBRAR - SIN XML
- Else
- Vta.FolioFiscal = "Sin Timbrar"
- Vta.NoSerieCertificado = "Sin Timbrar"
- Vta.SelloCFDi = "Sin Timbrar"
- Vta.SelloSAT = "Sin Timbrar"
- End If
-
- 'DIRECCION CLIENTE
- If Vta.CveClienteSucursal.ToEntero > 0 Then
- 'Si cliente tiene Noint, NoExt, CP
- SBDireccion.AppendFormat("{0}", Vta.ClienteSucursal.Direccion)
- If Vta.ClienteSucursal.NoExt.Length > 0 Then SBDireccion.AppendFormat(", No.Ext: {0}", Vta.ClienteSucursal.NoExt)
- If Vta.ClienteSucursal.NoInt.Length > 0 Then SBDireccion.AppendFormat(", No.Int: {0}", Vta.ClienteSucursal.NoInt)
- If UsuarioActual.CveEmpresa <> 66 Then SBDireccion.AppendFormat(", Col: {0}", Vta.ClienteSucursal.Colonia)
-
- If Not (UsuarioActual.CveEmpresa.Contiene(66, 81, 109) AndAlso Vta.TipoDocto = "Cot") Then
- If Vta.ClienteSucursal.CP.Length > 0 Then SBDireccion.AppendFormat(", CP: {0} ", Vta.ClienteSucursal.CP.Trim)
- End If
-
- 'Si cliente tiene Local, CD, Edo, Pais
- If Vta.ClienteSucursal.Localidad IsNot Nothing AndAlso Vta.ClienteSucursal.Localidad.Length > 0 Then SBLugar.AppendFormat("Loc: {0}, ", Vta.ClienteSucursal.Localidad)
- If Vta.ClienteSucursal.Municipio IsNot Nothing AndAlso Vta.ClienteSucursal.Municipio.Length > 0 Then SBLugar.AppendFormat("Cd: {0}, ", Vta.ClienteSucursal.Municipio)
- If Vta.ClienteSucursal.Estado IsNot Nothing AndAlso Vta.ClienteSucursal.Estado.Length > 0 Then SBLugar.AppendFormat(" Edo: {0}, ", Vta.ClienteSucursal.Estado)
- If Vta.ClienteSucursal.Pais IsNot Nothing AndAlso Vta.ClienteSucursal.Pais.Length > 0 Then SBLugar.AppendFormat(" País: {0} ", Vta.ClienteSucursal.Pais)
- Else
- SBDireccion.AppendFormat("{0}", Vta.Cliente.Direccion)
- If Vta.Cliente.NoExt.Length > 0 Then SBDireccion.AppendFormat(", No.Ext: {0}", Vta.Cliente.NoExt)
- If Vta.Cliente.NoInt.Length > 0 Then SBDireccion.AppendFormat(", No.Int: {0}", Vta.Cliente.NoInt)
- If UsuarioActual.CveEmpresa <> 66 Then SBDireccion.AppendFormat(", Col: {0}", Vta.Cliente.Colonia)
-
- If Not (UsuarioActual.CveEmpresa.Contiene(66, 81, 109) AndAlso Vta.TipoDocto = "Cot") Then
- If Vta.Cliente.CP.Length > 0 Then SBDireccion.AppendFormat(", CP: {0} ", Vta.Cliente.CP.Trim)
- End If
-
- 'Si cliente tiene Local, CD, Edo, Pais
- If Vta.Cliente.Localidad IsNot Nothing AndAlso Vta.Cliente.Localidad.Length > 0 Then SBLugar.AppendFormat("Loc: {0}, ", Vta.Cliente.Localidad)
- If Vta.Cliente.Ciudad IsNot Nothing AndAlso Vta.Cliente.Ciudad.Length > 0 Then SBLugar.AppendFormat("Cd: {0}, ", Vta.Cliente.Ciudad)
- If Vta.Cliente.Estado IsNot Nothing AndAlso Vta.Cliente.Estado.Length > 0 Then SBLugar.AppendFormat(" Edo: {0}, ", Vta.Cliente.Estado)
- If Vta.Cliente.Pais IsNot Nothing AndAlso Vta.Cliente.Pais.Length > 0 Then SBLugar.AppendFormat(" País: {0} ", Vta.Cliente.Pais)
-
- End If
-
- ClienteDireccion = SBDireccion.ToString
- ClienteLugar = SBLugar.ToString
- SBDireccion.Clear()
- SBLugar.Clear()
-
- 'LOGO
- Dim LogoRuta As String = ""
- 'POR SUCURSAL
- LogoRuta = String.Format("{0}Formatos\Suc{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
- If File.Exists(LogoRuta) Then
- LogoRuta = String.Format("file://{0}Formatos\Suc{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
- 'POR EMPRESA
- Else
- LogoRuta = String.Format("{0}Formatos\Logo.png", UsuarioActual.Empresa.Ruta)
- If File.Exists(LogoRuta) Then
- LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
- End If
- End If
- LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
- 'Si no tiene CBB, SE GENERA
- If Not ImagenCBB.Exists Then
- Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
- CBB.GenerarCBB(UsuarioActual.Empresa.RFC, Vta.Cliente.RFC, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
- End If
- ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
-
- Dim CadenaOriginals As String = "||1.0|" + Vta.FolioFiscal + "|" + Vta.FechaCertificacion.ToString("yyyy-MM-dd") + "T" + Vta.FechaCertificacion.ToString("HH:mm:ss") + "|" + Vta.SelloCFDi + "|" + Vta.NoSerieCertificado + "||"
- If Not ImagenCBB.Exists Then ImgCBB = ""
- Dim RutaFormato As String = ""
-
-
- 'AQUI EMPIEZA LOS PARAMETROS
- Try
- Dim params = New List(Of CrystalParametro)
-
- 'CLIENTE
- params.Add(New CrystalParametro("ClienteCodigo", Vta.Cliente.Codigo))
- params.Add(New CrystalParametro("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
- params.Add(New CrystalParametro("ClienteDireccion", ClienteDireccion))
- params.Add(New CrystalParametro("ClienteLugar", ClienteLugar))
-
-
- 'TOTALES
- params.Add(New CrystalParametro("SubTotal", Vta.SubTotal.ToString.FormatoNumero(2)))
- params.Add(New CrystalParametro("Descuento", Vta.Descuento.ToString.FormatoNumero(2)))
- params.Add(New CrystalParametro("Amortizacion", Vta.Amortizacion.ToString.FormatoNumero(2)))
- params.Add(New CrystalParametro("SubTotal2", (Vta.SubTotal - Vta.Descuento - Vta.Amortizacion).ToString.FormatoNumero(2)))
- params.Add(New CrystalParametro("IVA", Vta.IVA.ToString.FormatoNumero(2)))
- params.Add(New CrystalParametro("RetIVA", Vta.RetIVA.ToString.FormatoNumero(2)))
- params.Add(New CrystalParametro("RetISR", Vta.RetISR.ToString.FormatoNumero(2)))
- params.Add(New CrystalParametro("Total", Vta.Total.ToString.FormatoNumero(2)))
- params.Add(New CrystalParametro("ImporteLetra", Vta.Total.ToString.ToDouble.Texto2Letras(Vta.CveMoneda)))
-
- 'DATOS GENERALES
- params.Add(New CrystalParametro("Observaciones", Vta.Observaciones))
- params.Add(New CrystalParametro("CveVendedor", Vta.CveVendedor.ToString))
- 'params.Add(New CrystalParametro("Status", Vta.EstatusFactura))
- params.Add(New CrystalParametro("FechaSolicitud", Vta.Fecha.ToString("dd/MMMM/yyyy"))) ' se puede omitir
- params.Add(New CrystalParametro("Serie", Vta.Serie))
- params.Add(New CrystalParametro("Folio", Vta.Folio.ToString))
- params.Add(New CrystalParametro("DomicilioSucursal", DomicilioSucursal))
- params.Add(New CrystalParametro("Vencimiento", Vta.FechaVencimiento.ToString("dd/MM/yyyy")))
- params.Add(New CrystalParametro("FolioFiscal", Vta.FolioFiscal))
- params.Add(New CrystalParametro("FechaCertificacion", String.Format("{0}T{1}", Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"))))
- params.Add(New CrystalParametro("SelloCFDI", Vta.SelloCFDi))
- params.Add(New CrystalParametro("CadenaSAT", CadenaOriginals))
- params.Add(New CrystalParametro("SelloSAT", Vta.SelloSAT))
-
- params.Add(New CrystalParametro("QR", ImgCBB))
- params.Add(New CrystalParametro("ClienteRFC", Vta.Cliente.RFC))
- params.Add(New CrystalParametro("FormaPago", Vta.FormaPagoText))
- params.Add(New CrystalParametro("Moneda", Vta.Moneda))
- params.Add(New CrystalParametro("TipoCambio", Vta.TipoCambio.ToString))
- params.Add(New CrystalParametro("CondicionPago", Vta.CondicionesPagoText))
- params.Add(New CrystalParametro("CadenaOriginal", CadenaOriginals))
- params.Add(New CrystalParametro("SerieCertificadoSAT", Vta.NoSerieCertificado))
- params.Add(New CrystalParametro("CertificadoContribuyente", Vta.NoSerieCertificadoContribuyente))
- params.Add(New CrystalParametro("NumCta", Vta.NumeroCuenta))
- params.Add(New CrystalParametro("LogoPath", LogoRuta))
-
- 'VENDEDOR
- Dim RowVendedor As DataRow = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
- If Not IsNothing(RowVendedor) Then
- params.Add(New CrystalParametro("VendedorNombre", RowVendedor("Vendedor").ToString))
- params.Add(New CrystalParametro("VendedorMail", RowVendedor("Correo").ToString))
- params.Add(New CrystalParametro("VendedorTelefono", RowVendedor("Telefono").ToString))
- params.Add(New CrystalParametro("VendedorCelular", RowVendedor("Celular").ToString))
-
- End If
-
- params.Add(New CrystalParametro("CiudadSucursal", CiudadSucursal))
- params.Add(New CrystalParametro("OC", Vta.Det_OrdenCompra.ToString))
-
- If UsuarioActual.Empresa.Funcionalidad(508) = "1" Then
- params.Add(New CrystalParametro("IEPS", Vta.IEPS.ToString.FormatoNumero(2)))
- End If
-
- If Vta.CveClienteSucursal > 0 Then
- params.Add(New CrystalParametro("ClienteContactoMail", Vta.ClienteSucursal.CorreoSucursal))
- params.Add(New CrystalParametro("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal))
- Else
- params.Add(New CrystalParametro("ClienteContactoMail", Vta.Cliente.MailCotizacion))
- params.Add(New CrystalParametro("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", Vta.TelefonoGenerico, Vta.Cliente.Telefono)))
- End If
-
- If UsuarioActual.CveEmpresa.Contiene(17) Then
- params.Add(New CrystalParametro("MetodoPago", Vta.ClaveMetodoPagoSAT.ToString))
- Else
- params.Add(New CrystalParametro("MetodoPago", Vta.MetodoPago.ToString))
- End If
-
-
- Select Case Vta.TipoDocto
- Case "Ing"
- NombreArchivo = "Factura"
- NombreArchivoDescarga = "Factura"
- TipoDocumento = "INGRESO"
-
- 'GENERAL
- params.Add(New CrystalParametro("TipoDocumento", NombreArchivoDescarga))
- params.Add(New CrystalParametro("Tipo", TipoDocumento))
- params.Add(New CrystalParametro("Ref", TipoDocumentoRef))
- params.Add(New CrystalParametro("AplicaPagare", AplicaPagare))
-
- 'VSH
- If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122, 145) Then
- 'DATOS CLIENTES
- Dim ClienteRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", Vta.CveCliente.ToString))
- Dim DatosCliente = ""
- If ClienteRow IsNot Nothing Then
- DatosCliente = String.Format("{0} | {1} | {2}", Vta.SubProyecto.Municipio, ClienteRow("CuentaContable"), ClienteRow("Codigo"))
- End If
- params.Add(New CrystalParametro("DatosClientes", DatosCliente))
- params.Add(New CrystalParametro("Sucursal", Vta.SubProyecto.SubProyecto))
- End If
-
- 'COMPU, DN DIFUSA
- If UsuarioActual.CveEmpresa.Contiene(72, 80, 119) Then
- params.Add(New CrystalParametro("EstatusFactura", If(Vta.TipoEstatus = 5, Vta.EstatusFactura, "")))
- params.Add(New CrystalParametro("EstatusEntrega", If(Vta.Inv_CveEstatusEntrega = 1, Vta.Inv_EstatusEntrega, "")))
- params.Add(New CrystalParametro("PedidoContrato", Vta.PedidoContrato))
- params.Add(New CrystalParametro("DescripcionContrato", Vta.NumeroDescripcionContrato))
-
- params.Add(New CrystalParametro("MonedaAbreviatura", If(Vta.MonedaAbreviatura.ToString IsNot Nothing, Vta.MonedaAbreviatura.ToString, "")))
- params.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
- params.Add(New CrystalParametro("FechaImpresion", Now.ToDateTime.ToString))
- params.Add(New CrystalParametro("Sucursal", Vta.SubProyecto.SubProyecto))
-
- 'INE COMPLEMENTOS
- If UsuarioActual.CveEmpresa.Contiene(72) Then
- Dim INETipoProceso As String = ""
- Dim INETipoComite As String = ""
- Dim INEIdContabilidad As Integer = 0
- If Vta.ComplementoINE IsNot Nothing Then
- INETipoProceso = Vta.ComplementoINE.INETipoProceso
- INETipoComite = Vta.ComplementoINE.INETipoComite
- INEIdContabilidad = Vta.ComplementoINE.INEIdContabilidad
- End If
- params.Add(New CrystalParametro("INETipoProceso", INETipoProceso))
- params.Add(New CrystalParametro("INETipoComite", INETipoComite))
- params.Add(New CrystalParametro("INEIdContabilidad", INEIdContabilidad))
- params.Add(New CrystalParametro("Referencia", Vta.Cliente.ReferenciaFiscal))
- params.Add(New CrystalParametro("ClienteContacto", Vta.AtnA))
- End If
-
- 'DIRECCION ENVIO
- If Vta.EnviarA.CveDireccionEnvio > 0 Then
- Dim StrEnvioDi As New StringBuilder
- StrEnvioDi.AppendFormat("{0}", Vta.EnviarA.EnvioDireccion)
- If Vta.EnviarA.EnvioNoExt IsNot Nothing AndAlso Vta.EnviarA.EnvioNoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.EnviarA.EnvioNoExt)
- If Vta.EnviarA.EnvioNoInt IsNot Nothing AndAlso Vta.EnviarA.EnvioNoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.EnviarA.EnvioNoInt)
-
- params.Add(New CrystalParametro("EnvioDireccion", StrEnvioDi.ToString))
- params.Add(New CrystalParametro("EnvioNoExt", Vta.EnviarA.EnvioNoExt))
- params.Add(New CrystalParametro("EnvioNoInt", Vta.EnviarA.EnvioNoInt))
- params.Add(New CrystalParametro("EnvioColonia", Vta.EnviarA.EnvioColonia))
- params.Add(New CrystalParametro("EnvioCiudad", Vta.EnviarA.EnvioCiudad))
- params.Add(New CrystalParametro("EnvioEstado", Vta.EnviarA.EnvioEstado))
- params.Add(New CrystalParametro("EnvioContacto", Vta.EnviarA.EnvioContacto))
- params.Add(New CrystalParametro("EnvioDepartamento", Vta.EnviarA.EnvioDepartamento))
- params.Add(New CrystalParametro("EnvioCP", Vta.EnviarA.EnvioCP))
- Else
- If Vta.CveClienteSucursal.ToEntero > 0 Then
- Dim StrEnvioDi As New StringBuilder
- StrEnvioDi.AppendFormat("{0}", Vta.ClienteSucursal.Direccion)
- If Vta.ClienteSucursal.NoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.ClienteSucursal.NoExt)
- If Vta.ClienteSucursal.NoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.ClienteSucursal.NoInt)
- params.Add(New CrystalParametro("EnvioDireccion", StrEnvioDi.ToString))
- params.Add(New CrystalParametro("EnvioColonia", If(Vta.ClienteSucursal.Colonia.Length > 0, Vta.ClienteSucursal.Colonia, "")))
- params.Add(New CrystalParametro("EnvioCiudad", If(Vta.ClienteSucursal.Municipio.Length > 0, Vta.ClienteSucursal.Municipio, "")))
- params.Add(New CrystalParametro("EnvioEstado", If(Vta.ClienteSucursal.Estado.Length > 0, Vta.ClienteSucursal.Estado, "")))
- params.Add(New CrystalParametro("EnvioCP", If(Vta.ClienteSucursal.CP.Length > 0, Vta.ClienteSucursal.CP, "")))
- Else
- Dim StrEnvioDi As New StringBuilder
- StrEnvioDi.AppendFormat("{0}", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, ""))
- If Vta.Cliente.NoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.Cliente.NoExt)
- If Vta.Cliente.NoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.Cliente.NoInt)
- params.Add(New CrystalParametro("EnvioDireccion", StrEnvioDi.ToString))
- params.Add(New CrystalParametro("EnvioColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
- params.Add(New CrystalParametro("EnvioCiudad", If(Vta.Cliente.Localidad IsNot Nothing And Vta.Cliente.Localidad.Length > 0, Vta.Cliente.Localidad, "")))
- params.Add(New CrystalParametro("EnvioEstado", If(Vta.Cliente.Estado.Length > 0, Vta.Cliente.Estado, "")))
- params.Add(New CrystalParametro("EnvioCP", If(Vta.Cliente.CP.Length > 0, Vta.Cliente.CP, "")))
- End If
-
- End If
-
- 'CLIENTE SUCURSAL
- If Vta.CveClienteSucursal.ToEntero > 0 Then
- params.Add(New CrystalParametro("ClienteCalle", If(Vta.ClienteSucursal.Direccion.Length > 0, Vta.ClienteSucursal.Direccion, "")))
- params.Add(New CrystalParametro("ClienteColonia", If(Vta.ClienteSucursal.Colonia.Length > 0, Vta.ClienteSucursal.Colonia, "")))
- params.Add(New CrystalParametro("ClienteCiudad", If(Vta.ClienteSucursal.Localidad IsNot Nothing And Vta.ClienteSucursal.Localidad.Length > 0, Vta.ClienteSucursal.Localidad, "")))
- params.Add(New CrystalParametro("ClienteMunicipio", If(Vta.ClienteSucursal.Municipio.Length > 0, Vta.ClienteSucursal.Municipio, "")))
- params.Add(New CrystalParametro("ClienteEstado", If(Vta.ClienteSucursal.Estado.Length > 0, Vta.ClienteSucursal.Estado, "")))
- params.Add(New CrystalParametro("ClienteCP", If(Vta.ClienteSucursal.CP.Length > 0, Vta.ClienteSucursal.CP, "")))
- params.Add(New CrystalParametro("ClienteNoInt", If(Vta.ClienteSucursal.NoInt.Length > 0, Vta.ClienteSucursal.NoInt, "")))
- params.Add(New CrystalParametro("ClienteNoExt", If(Vta.ClienteSucursal.NoExt.Length > 0, Vta.ClienteSucursal.NoExt, "")))
- params.Add(New CrystalParametro("ClientePais", If(Vta.ClienteSucursal.Pais.Length > 0, Vta.ClienteSucursal.Pais, "")))
- Else
- params.Add(New CrystalParametro("ClienteCalle", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, "")))
- params.Add(New CrystalParametro("ClienteColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
- params.Add(New CrystalParametro("ClienteCiudad", If(Vta.Cliente.Localidad IsNot Nothing And Vta.Cliente.Localidad.Length > 0, Vta.Cliente.Localidad, "")))
- params.Add(New CrystalParametro("ClienteMunicipio", If(Vta.Cliente.Ciudad.Length > 0, Vta.Cliente.Ciudad, "")))
- params.Add(New CrystalParametro("ClienteEstado", If(Vta.Cliente.Estado.Length > 0, Vta.Cliente.Estado, "")))
- params.Add(New CrystalParametro("ClienteCP", If(Vta.Cliente.CP.Length > 0, Vta.Cliente.CP, "")))
- params.Add(New CrystalParametro("ClienteNoInt", If(Vta.Cliente.NoInt.Length > 0, Vta.Cliente.NoInt, "")))
- params.Add(New CrystalParametro("ClienteNoExt", If(Vta.Cliente.NoExt.Length > 0, Vta.Cliente.NoExt, "")))
- params.Add(New CrystalParametro("ClientePais", If(Vta.Cliente.Pais.Length > 0, Vta.Cliente.Pais, "")))
- End If
- End If
-
- RutaFormato = String.Format("{0}Formatos\{1}.mrt", UsuarioActual.Empresa.Ruta, NombreArchivo)
-
- Case "Egs"
- If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
- NombreArchivo = "NotaCredito"
- Else
- NombreArchivo = "Factura"
- End If
- NombreArchivoDescarga = "Nota de Crédito"
- TipoDocumento = "EGRESO"
- TipoDocumentoRef = String.Format(": Ref.:{0}", Vta.RefDocto)
- AplicaPagare = "0"
-
- 'GENERAL
- params.Add(New CrystalParametro("TipoDocumento", NombreArchivoDescarga))
- params.Add(New CrystalParametro("Tipo", TipoDocumento))
- params.Add(New CrystalParametro("Ref", TipoDocumentoRef))
- params.Add(New CrystalParametro("AplicaPagare", AplicaPagare))
- params.Add(New CrystalParametro("Fecha", String.Format("{0}T{1}", Vta.Fecha.ToString("yyyy-MM-dd"), Vta.Fecha.ToString("HH:mm:ss"))))
-
- 'ALAN YEPIZ
- If UsuarioActual.CveEmpresa.Contiene(123) Then
- params.Add(New CrystalParametro("DiaExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Day)))
- params.Add(New CrystalParametro("MesExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Month)))
- params.Add(New CrystalParametro("AñoExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Year)))
- End If
-
- 'COMPU, DN DIFUSA
- If UsuarioActual.CveEmpresa.Contiene(72, 80, 119) Then
- params.Add(New CrystalParametro("EstatusFactura", If(Vta.TipoEstatus = 5, Vta.EstatusFactura, "")))
- params.Add(New CrystalParametro("EstatusEntrega", If(Vta.Inv_CveEstatusEntrega = 1, Vta.Inv_EstatusEntrega, "")))
- params.Add(New CrystalParametro("PedidoContrato", Vta.PedidoContrato))
-
- params.Add(New CrystalParametro("MonedaAbreviatura", If(Vta.MonedaAbreviatura.ToString IsNot Nothing, Vta.MonedaAbreviatura.ToString, "")))
- params.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
- params.Add(New CrystalParametro("FechaImpresion", Now.ToDateTime.ToString))
- params.Add(New CrystalParametro("Sucursal", Vta.SubProyecto.SubProyecto))
-
- 'CLIENTE SUCURSAL
- If Vta.CveClienteSucursal.ToEntero > 0 Then
- params.Add(New CrystalParametro("ClienteCalle", If(Vta.ClienteSucursal.Direccion.Length > 0, Vta.ClienteSucursal.Direccion, "")))
- params.Add(New CrystalParametro("ClienteColonia", If(Vta.ClienteSucursal.Colonia.Length > 0, Vta.ClienteSucursal.Colonia, "")))
- params.Add(New CrystalParametro("ClienteCiudad", If(Vta.ClienteSucursal.Localidad IsNot Nothing And Vta.ClienteSucursal.Localidad.Length > 0, Vta.ClienteSucursal.Localidad, "")))
- params.Add(New CrystalParametro("ClienteMunicipio", If(Vta.ClienteSucursal.Municipio.Length > 0, Vta.ClienteSucursal.Municipio, "")))
- params.Add(New CrystalParametro("ClienteEstado", If(Vta.ClienteSucursal.Estado.Length > 0, Vta.ClienteSucursal.Estado, "")))
- params.Add(New CrystalParametro("ClienteCP", If(Vta.ClienteSucursal.CP.Length > 0, Vta.ClienteSucursal.CP, "")))
- params.Add(New CrystalParametro("ClienteNoInt", If(Vta.ClienteSucursal.NoInt.Length > 0, Vta.ClienteSucursal.NoInt, "")))
- params.Add(New CrystalParametro("ClienteNoExt", If(Vta.ClienteSucursal.NoExt.Length > 0, Vta.ClienteSucursal.NoExt, "")))
- params.Add(New CrystalParametro("ClientePais", If(Vta.ClienteSucursal.Pais.Length > 0, Vta.ClienteSucursal.Pais, "")))
- Else
- params.Add(New CrystalParametro("ClienteCalle", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, "")))
- params.Add(New CrystalParametro("ClienteColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
- params.Add(New CrystalParametro("ClienteCiudad", If(Vta.Cliente.Localidad IsNot Nothing And Vta.Cliente.Localidad.Length > 0, Vta.Cliente.Localidad, "")))
- params.Add(New CrystalParametro("ClienteMunicipio", If(Vta.Cliente.Ciudad.Length > 0, Vta.Cliente.Ciudad, "")))
- params.Add(New CrystalParametro("ClienteEstado", If(Vta.Cliente.Estado.Length > 0, Vta.Cliente.Estado, "")))
- params.Add(New CrystalParametro("ClienteCP", If(Vta.Cliente.CP.Length > 0, Vta.Cliente.CP, "")))
- params.Add(New CrystalParametro("ClienteNoInt", If(Vta.Cliente.NoInt.Length > 0, Vta.Cliente.NoInt, "")))
- params.Add(New CrystalParametro("ClienteNoExt", If(Vta.Cliente.NoExt.Length > 0, Vta.Cliente.NoExt, "")))
- params.Add(New CrystalParametro("ClientePais", If(Vta.Cliente.Pais.Length > 0, Vta.Cliente.Pais, "")))
- End If
- End If
-
-
- RutaFormato = String.Format("{0}Formatos\{1}.mrt", UsuarioActual.Empresa.Ruta, "Factura")
- Case Else
- NombreArchivo = ""
- TipoDocumento = ""
- End Select
- If NombreArchivo = "" Then
- GuardaLog("No se especifico el tipo de Impresion de venta (Venta, Remision, Cotización, Nota de Crédito).")
- Exit Sub
- End If
- 'TERMINA REGION PARAMETROS
-
- Dim lrds As New List(Of ReportDataSource)
- 'Si es ECLIPSE CREAR COLUMAS PARA FIRMAS EN DtDetalle.
- If UsuarioActual.CveEmpresa.Contiene(1, 15, 17, 71, 76, 125) Then
- Dim DtDetalleFirmas As New DataTable
- DtDetalleFirmas.TableName = "DetalleFirma"
- DtDetalleFirmas = Vta.DtDetalle.Copy()
-
- 'SI NO TIENE LAS COLUMNAS DE FIRMAS LAS CREA.
- If Not DtDetalleFirmas.Columns.Contains("Titulo") Then
- DtDetalleFirmas.Columns.Add("Titulo", GetType(String))
- DtDetalleFirmas.Columns.Add("Nombre", GetType(String))
- DtDetalleFirmas.Columns.Add("Puesto", GetType(String))
- DtDetalleFirmas.Columns.Add("Lado", GetType(Integer))
- End If
-
- 'Se llenan los Rows de las columnas con los datos del DtFirmas
- For i As Integer = 0 To Vta.DtFirmas.Rows.Count - 1
- 'Si DtDetalle es menor al DtFirmas, crea un nuevo Row en DtDetalle y le asigna valor, Si no solo asigna valor
- If DtDetalleFirmas.Rows.Count < i + 1 Then
- Dim Dr = DtDetalleFirmas.NewRow
- Dr("Titulo") = Vta.DtFirmas(i)("Titulo").ToString
- Dr("Nombre") = Vta.DtFirmas(i)("Nombre").ToString
- Dr("Puesto") = Vta.DtFirmas(i)("Puesto").ToString
- Dr("Lado") = Vta.DtFirmas(i)("Lado").ToString.ToEntero
- DtDetalleFirmas.Rows.Add(Dr)
- Else
- DtDetalleFirmas(i)("Titulo") = Vta.DtFirmas(i)("Titulo").ToString
- DtDetalleFirmas(i)("Nombre") = Vta.DtFirmas(i)("Nombre").ToString
- DtDetalleFirmas(i)("Puesto") = Vta.DtFirmas(i)("Puesto").ToString
- DtDetalleFirmas(i)("Lado") = Vta.DtFirmas(i)("Lado").ToString.ToEntero
- End If
- Next i
-
- Dim rds As New ReportDataSource With {.Name = "DsOC", .Value = DtDetalleFirmas}
- lrds.Add(rds)
- Else
- Dim rds As New ReportDataSource With {.Name = "DsOC", .Value = Vta.DtDetalle}
- lrds.Add(rds)
- End If
-
- Dim rds1 As New ReportDataSource With {.Name = "DataSet1", .Value = If(Vta.DtDeduccion IsNot Nothing, Vta.DtDeduccion, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
- lrds.Add(rds1)
-
- 'DETALLE FIRMAS
-
- Dim rds2 As New ReportDataSource With {.Name = "DataSet2", .Value = If(Vta.DtFirmas IsNot Nothing, Vta.DtFirmas, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
- lrds.Add(rds2)
-
- Dim Archivo As New System.IO.FileInfo(RutaFormato)
-
- Dim DataSet As New DataSet
- Vta.DtDetalle.TableName = "Datos"
- Vta.DtDeduccion.TableName = "Deduccion"
- DataSet.Tables.Add(Vta.DtDetalle.Copy)
- DataSet.Tables.Add(Vta.DtDeduccion.Copy)
-
- If Archivo.Exists Then
-
-
- ImprimirbytesPDF(ImprimirPDFPyME(RutaFormato, DataSet, params, NombreArchivo, "PDF", MR:=Nothing), "Factura")
- Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio))
- If Not ArchivoPDF.Exists Then
- Try
- DirectoryExistsCreate(String.Format("{0}PDF", UsuarioActual.Empresa.Ruta))
- DirectoryExistsCreate(String.Format("{0}PDF\{1}", UsuarioActual.Empresa.Ruta, Vta.TipoDocto))
- File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
- Catch ex As Exception
- Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
- End Try
- Else
- Try
- ArchivoPDF.Delete()
- File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
- Catch ex As Exception
- Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
- End Try
- End If
- Else
- params.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
- params.Add(New CrystalParametro("RFC", UsuarioActual.Empresa.RFC))
- ImprimirbytesPDF(ImprimirPDFPyME(RutaFormato, DataSet, params, NombreArchivo, "PDF", MR:=Nothing), "Factura")
- End If
-
-
- Catch ex As Exception
- GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
- End Try
- End Sub
- Protected Function PdfFactura(ByRef Vta As Modelos.Factura, Optional AplicaPagare As String = "0", Optional Guardar As Boolean = True) As Byte()
- Dim retorno As Byte() = Nothing
-
- ' Dim ObjVentas As New ClsVentas
-
- 'DATOS GENERALES
- Dim Ruta As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{UsuarioActual.CveEmpresa}\"
- Dim PathXML As String = $"{Ruta}XML\{Vta.TipoDocto}\{Vta.SerieFolio}.xml"
- Dim NombreArchivo As String = ""
- Dim NombreArchivoDescarga As String = ""
- Dim TipoDocumento As String = ""
- Dim TipoDocumentoRef As String = ""
-
-
- Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
- Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
- Dim ImgCBB As String '= String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
-
- Dim ImagenPath = String.Format("{0}Formatos\Suc{1}\logo.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
- Dim Logo As New System.IO.FileInfo(ImagenPath)
- Dim ImgLogo = New Uri(String.Format("{0}Empresas/{1}/Formatos/Suc{2}.png", UrlSitio, UsuarioActual.CveEmpresa, Vta.CveSucursal)).AbsoluteUri
-
- Dim SBDomicilioSucursal As New StringBuilder()
- Dim CiudadSucursal As String = String.Format("{0},{1}", Vta.SubProyecto.Municipio, Vta.SubProyecto.Estado)
- Dim DomicilioSucursal As String = ""
-
- SBDomicilioSucursal.AppendFormat("{0}", Vta.SubProyecto.Calle)
- If Vta.SubProyecto.NoExt.Length > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", Vta.SubProyecto.NoExt)
- If Vta.SubProyecto.NoInt.Length > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", Vta.SubProyecto.NoInt)
- If Vta.SubProyecto.Colonia.Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", Vta.SubProyecto.Colonia)
- If Vta.SubProyecto.CP.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", Vta.SubProyecto.CP)
- If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
+ If Pagina.ToUpper() = ("/Ventas/RepVentas.aspx").ToUpper() Then
+ Select Case Request("Op")
+ Case "Cot" : Retorno = 367
+ Case Else : Retorno = 9
+ End Select
+ End If
+
+ Return Retorno
+
+ End Function
+ Public Sub CerrarSession()
+
+ Usuario.CerrarSession()
+ End Sub
+ Public Sub Alert(Mensaje As String, Optional pOpcion As TipoMensaje = TipoMensaje.MsgInformacion, Optional JSBtnAceptar As String = "", Optional timeout As Integer = 5)
+ If DirectCast(pOpcion, Integer) >= 5 Then
+ Mensaje = Mensaje.Replace("'"c, "\'").Replace(vbCrLf, "").Replace("""", "\'").Replace(vbLf, " ")
+ JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'")
+ Dim toastscript As String = String.Format("alertatoast({3},'{0}',function(){{{1}}},{2});", Mensaje, JSBtnAceptar, timeout, DirectCast(pOpcion, Integer))
+ ViewState("strToastMsglargonoreplace") = String.Format("{0}{1}", If(Not IsNothing(ViewState("strToastMsglargonoreplace")) AndAlso ViewState("strToastMsglargonoreplace").ToString().Length > 0, ViewState("strToastMsglargonoreplace").ToString(), ""), toastscript)
+ Else
+ Mensaje.Alert(Mensaje, pOpcion, JSBtnAceptar, TimeoutToast:=timeout)
+ End If
+ End Sub
+ Protected Overridable Sub Page_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
+ If sw IsNot Nothing AndAlso Not (Not User.Identity.IsAuthenticated OrElse UsuarioActual Is Nothing) Then
+
+ sw.Stop()
+ Using ObjUsuario As New ClsSisUsuarios
+ ObjUsuario.AddBitacora(CveModulo, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request.Url.PathAndQuery.ToString(), sw.ElapsedMilliseconds)
+ End Using
+ End If
+ If Not IsNothing(ViewState("strToastMsglargonoreplace")) AndAlso ViewState("strToastMsglargonoreplace").ToString.Length > 0 Then
+ RegistraScript(ViewState("strToastMsglargonoreplace").ToString(), "esteseraunticklargoparaquenosesobrescribaconotro")
+ ViewState("strToastMsglargonoreplace") = Nothing
+ End If
+
+ End Sub
+ Protected Overrides Sub SavePageStateToPersistenceMedium(pviewState As Object)
+ 'If Request.Form("__VIEWSTATE_KEY") IsNot Nothing Then Cache.Remove(Request.Form("__VIEWSTATE_KEY")) 'elimino la cachado anteriormente
+ Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, Date.Now.Ticks)
+ 'Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache
+ Session.Add(VSKey, pviewState) 'Store the ViewState on Cache
+ ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", VSKey)
+
+ End Sub
+ Protected Overrides Function LoadPageStateFromPersistenceMedium() As Object
+
+ Dim VSKey As String = Request.Form("__VIEWSTATE_KEY")
+ If Not VSKey.StartsWith("VIEWSTATE_") Then 'Request the Key from the page and validade it.
+ Throw New Exception(String.Format("Invalid VIEWSTATE Key: {0}", VSKey))
+ End If
+ If Session(VSKey) Is Nothing Then 'si por algún motivo, el caché expiró, le dice a la página que se recargue y obtenga los datos de nuevo, y así evitar errores al obtener el viewstate vacío
+ Response.Redirect(Request.RawUrl)
+ Return Nothing
+ Else
+ Return Session(VSKey)
+ End If
+
+ End Function
+ Public Shared Sub CargaParametros(Parametros As String)
+ Dim P1() As String = Parametros.Split("&"c)
+ Dim Tmp As String
+ Dim P2() As String
+
+ UrlParametros = New Hashtable
+
+ For Each Tmp In P1
+ P2 = Tmp.Split("="c)
+ UrlParametros.Add(P2(0).ToString.ToUpper(), P2(1))
+ Next
+
+ End Sub
+ Shared Sub RegeneraImagen(ByVal Ruta As String)
+
+ Dim BM As New Drawing.Bitmap(Ruta)
+ Dim Width As Integer = BM.Width
+ Dim Height As Integer = BM.Height
+ Dim Thumb As New Drawing.Bitmap(Width, Height)
+ Dim G As Drawing.Graphics = Drawing.Graphics.FromImage(Thumb)
+
+
+ G.InterpolationMode = Drawing.Drawing2D.InterpolationMode.HighQualityBicubic
+ G.DrawImage(BM, New Drawing.Rectangle(0, 0, Width, Height), New Drawing.Rectangle(0, 0, BM.Width, BM.Height), Drawing.GraphicsUnit.Pixel)
+
+ BM.Dispose()
+ G.Dispose()
+
+ 'image path.
+ Thumb.Save(Ruta, Drawing.Imaging.ImageFormat.Jpeg) 'can use any image format
+ Thumb.Dispose()
+ End Sub
+ Public Sub RegistraScript(Script As String, Optional valuetick As String = "")
+ Dim Rdm As Random = New Random()
+ ScriptManager.RegisterStartupScript(Page, Me.GetType(), String.Format("{0}{1}{2}", (DateTime.Now.Ticks + 1), Rdm.Next(), valuetick), String.Format("", Script), False)
+ End Sub
+ Public Sub TabEnabled(Tab As System.Web.UI.HtmlControls.HtmlAnchor, Valor As Boolean)
+ If Valor Then
+ 'RegistraScript(String.Format("$( ""#{0}"" ).removeClass( ""linkdesactive"" );", tab.ClientID))
+ Try
+ Tab.Attributes("class") = Tab.Attributes("class").Replace("linkdesactive", "")
+ Catch ex As Exception
+ Tab.Attributes("class") = ""
+ End Try
+ Else
+ Tab.Attributes.Add("class", "linkdesactive")
+ End If
+ End Sub
+ Public Sub TabActive(Tab As System.Web.UI.HtmlControls.HtmlAnchor)
+ RegistraScript(String.Format("$( ""#{0}"" ).Click( );", Tab.ClientID))
+ End Sub
+ '''
+ '''
+ '''
+ Public Sub Alerta(Mensaje As String, Tipo As String, Funcion As String)
+ RegistraScript(String.Format("bootbox.alert('{0}', function() {{{2}}} );", Mensaje, Tipo, Funcion))
+ End Sub
+ Public Sub NotificacionesPendientes(Nota As String)
+ 'incremento el contador de alertas
+ Dim Type = Master.GetType
+ Dim Prop = Type.GetProperty("countNotificaciones")
+ Prop.SetValue(Master, 1 + CInt(Prop.GetValue(Master)))
+ 'end incremento contador de alertas
+
+ Dim ltl = DirectCast(Master.FindControl("LtlMNotificaciones"), Literal)
+
+ ltl.Text = String.Format(" {0} {1}", ltl.Text, Nota)
+ End Sub
+ Public Sub Confirmacion(Mensaje As String, Tipo As String, FuncionOK As String, FuncionCancel As String)
+ RegistraScript(String.Format("bootbox.confirm('{0}', function(result) {{if (result){{ {2} }}else{{ {3} }} }}); ", Mensaje, Tipo, FuncionOK, FuncionCancel))
+ End Sub
+ Public Function AddBitacoraUsuario(CveModulo As Integer, Accion As String, Resultado As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ Dim ObjUsuario As New ClsSisUsuarios
+ Retorno = ObjUsuario.AddBitacora(CveModulo, Accion, Resultado, CveUsuario, CveEmpresa)
+ ObjUsuario.Dispose()
+ Return Retorno
+ End Function
+
+#Region " IMPRIMIR PDF "
+ '''
+ ''' Genera documento PDF o Excel
+ '''
+ '''
Directorio donde se ubica el archivo
+ '''
Datatable
+ '''
Listado de parametros para el reporte
+ '''
Opcional Nombre del archivo que se descarga
+ '''
Optional, Formato de Generacion PDF o Excel
+ '''
+ Public Sub ImprimirPDF(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing)
+ Dim lrds As New List(Of ReportDataSource)
+ Dim rds As New ReportDataSource
+ rds.Name = RDSName
+ rds.Value = DtDatos
+ lrds.Add(rds)
+ ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR)
+ End Sub
+ Public Sub ImprimirPDFMultiDS(RutaReporte As String, lrds As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing)
+ ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR)
+ End Sub
+
+ '''
+ ''' Genera documento PDF o Excel
+ '''
+ '''
Directorio donde se ubica el archivo
+ '''
Contenedor de Datatables
+ '''
Listado de parametros para el reporte
+ '''
Opcional Nombre del archivo que se descarga
+ '''
Optional, Formato de Generacion PDF o Excel
+ '''
+ Public Sub ImprimirPDF(RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing)
+ 'limpio ReportViwer
+ ImprimirbytesPDF(StreamPDF(RutaReporte, DataSource, Parametros, NombreArchivo, Formato, MR), NombreArchivo, Formato)
+ End Sub
+ Public Function StreamPDF(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing) As Byte()
+ Dim lrds As New List(Of ReportDataSource)
+ Dim rds As New ReportDataSource
+ rds.Name = RDSName
+ rds.Value = DtDatos
+ lrds.Add(rds)
+ Return StreamPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR)
+ End Function
+ Public Function StreamPDF(RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing) As Byte()
+ 'limpio ReportViwer
+ Dim sw As New System.Diagnostics.Stopwatch()
+ sw.Start()
+
+ If IsNothing(MR) Then MR = New ReportViewer
+ Dim Bytes As Byte() = Nothing
+ Try
+ ' MasterReporteador.LocalReport.DataSources.Clear()
+ For Each RDS As ReportDataSource In DataSource
+ MR.LocalReport.DataSources.Add(RDS)
+ Next
+
+ MR.LocalReport.ReportPath = RutaReporte
+ MR.ProcessingMode = ProcessingMode.Local
+ MR.LocalReport.EnableExternalImages = True
+ MR.LocalReport.SetParameters(Parametros)
+ MR.LocalReport.Refresh()
+ Dim Warnings As Warning() = Nothing
+ Dim StreamIds As String() = Nothing
+ Dim MimeType As String = Nothing
+ Dim Encoding As String = Nothing
+ Dim Extension As String = Nothing
+ Bytes = MR.LocalReport.Render(Formato, Nothing, MimeType, Encoding, Extension, StreamIds, Warnings)
+ Catch ex As Microsoft.Reporting.WebForms.ScriptManagerNotFoundException
+ GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, 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"))} - Ruta {RutaReporte}")
+ 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
+ 'GuardaLog($"Error: {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
+ Catch ex As Exception
+ GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, 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"))} - Ruta {RutaReporte}")
+ 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
+ 'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
+ End Try
+
+ sw.Stop()
+ If sw.Elapsed.TotalSeconds > 10 Then
+ GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ")
+ End If
+
+ Return Bytes
+ End Function
+ Public Function ImprimirPDFCrystal(RutaReporte As String, DataSource As DataTable, Parametros As List(Of CrystalParametro), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportDocument = Nothing) As Byte()
+ 'limpio ReportViwer
+ Dim sw As New System.Diagnostics.Stopwatch()
+ sw.Start()
+ If IsNothing(MR) Then MR = New ReportDocument()
+ Dim Bytes As Byte() = Nothing
+ Dim formatType As ExportFormatType = ExportFormatType.NoFormat
+ Try
+ MR.Load(RutaReporte)
+ MR.SetDataSource(DataSource)
+
+ For Each item As CrystalParametro In Parametros
+ MR.SetParameterValue(item.Nombre, item.Valor)
+ Next
+
+ Select Case Formato
+ Case "PDF"
+ formatType = ExportFormatType.PortableDocFormat
+ 'Format = "Application/pdf"
+ Case "EXCEL"
+ formatType = ExportFormatType.Excel
+ 'Format = "application/ms-excel"
+ End Select
+ Dim Stream As IO.Stream = MR.ExportToStream(formatType)
+ Dim BD As New BinaryReader(MR.ExportToStream(formatType))
+ Bytes = BD.ReadBytes(CInt(MR.ExportToStream(formatType).Length))
+ BD.Dispose()
+ Stream.Dispose()
+ 'Dim Buffer(CInt(Stream.Length)) As Byte
+ 'Bytes = Buffer
+ 'MR.ExportToHttpResponse(formatType, Response, True, NombreArchivo)
+ Catch ex As CrystalReportsException
+ GuardaLog(If(ex.InnerException IsNot Nothing AndAlso ex.Message IsNot Nothing,
+ $"Error: {If(ex.InnerException.Message, 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"))} Ruta {RutaReporte}", $"Sin descripción - Ruta {RutaReporte}"))
+ 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
+ 'GuardaLog($"Error: {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
+ Catch ex As Exception
+ GuardaLog(If(ex.InnerException IsNot Nothing AndAlso ex.Message IsNot Nothing,
+ $"Error: {If(ex.InnerException.Message, 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"))} Ruta {RutaReporte}", $"Sin descripción - Ruta {RutaReporte}"))
+
+ 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
+ 'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
+ End Try
+ sw.Stop()
+ If sw.Elapsed.TotalSeconds > 10 Then
+ GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ")
+ End If
+ If MR IsNot Nothing Then MR.Dispose()
+ Return Bytes
+ End Function
+
+ Public Function ImprimirSubRepPDFCrystal(RutaReporte As String, DataSource As DataTable, Parametros As List(Of CrystalParametro), DataSource1 As DataTable, DataSource2 As DataTable, SubRep1 As String, SubRep2 As String, Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportDocument = Nothing) As Byte()
+ 'limpio ReportViwer
+ Dim sw As New System.Diagnostics.Stopwatch()
+
+ sw.Start()
+ If IsNothing(MR) Then MR = New ReportDocument()
+
+ Dim SR1 As New ReportDocument
+ Dim SR2 As New ReportDocument
+
+ Dim Bytes As Byte() = Nothing
+ Dim formatType As ExportFormatType = ExportFormatType.NoFormat
+ Try
+
+ MR.Load(RutaReporte)
+
+ SR1 = MR.OpenSubreport(SubRep1)
+ SR2 = MR.OpenSubreport(SubRep2)
+
+ MR.SetDataSource(DataSource)
+
+ SR1.SetDataSource(DataSource1)
+ SR2.SetDataSource(DataSource2)
+
+ For Each item As CrystalParametro In Parametros
+ MR.SetParameterValue(item.Nombre, item.Valor)
+ Next
+
+ Select Case Formato
+ Case "PDF"
+ formatType = ExportFormatType.PortableDocFormat
+ 'Format = "Application/pdf"
+ Case "EXCEL"
+ formatType = ExportFormatType.Excel
+ 'Format = "application/ms-excel"
+ End Select
+ Dim Stream As IO.Stream = MR.ExportToStream(formatType)
+ Dim BD As New BinaryReader(MR.ExportToStream(formatType))
+ Bytes = BD.ReadBytes(CInt(MR.ExportToStream(formatType).Length))
+ BD.Dispose()
+ Stream.Dispose()
+ 'Dim Buffer(CInt(Stream.Length)) As Byte
+ 'Bytes = Buffer
+ 'MR.ExportToHttpResponse(formatType, Response, True, NombreArchivo)
+ Catch ex As CrystalReportsException
+ GuardaLog(If(ex.InnerException IsNot Nothing AndAlso ex.Message IsNot Nothing,
+ $"Error: {If(ex.InnerException.Message, 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"))} Ruta {RutaReporte}", $"Sin descripción - Ruta {RutaReporte}"))
+ 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
+ 'GuardaLog($"Error: {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
+ Catch ex As Exception
+ GuardaLog(If(ex.InnerException IsNot Nothing AndAlso ex.Message IsNot Nothing,
+ $"Error: {If(ex.InnerException.Message, 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"))} Ruta {RutaReporte}", $"Sin descripción - Ruta {RutaReporte}"))
+
+ 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
+ 'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
+ End Try
+ sw.Stop()
+ If sw.Elapsed.TotalSeconds > 10 Then
+ GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ")
+ End If
+ If MR IsNot Nothing Then MR.Dispose()
+ Return Bytes
+ End Function
+
+ Public Function ImprimirPDFPyME(RutaReporte As String, DataSource As DataSet, Parametros As List(Of CrystalParametro), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As StiReport = Nothing) As Byte()
+
+ If IsNothing(MR) Then MR = New StiReport()
+ Dim Bytes As Byte() = Nothing
+ Try
+ MR.Load(RutaReporte)
+ MR.Dictionary.DataSources.Clear()
+ MR.RegData(DataSource)
+ Dim Lista = MR.Dictionary.Variables.ToList()
+ For Each item As CrystalParametro In Parametros
+ If Lista.Exists(Function(a) a.Name = item.Nombre) Then
+ MR.Dictionary.Variables(item.Nombre).Value = item.Valor.ToString
+ End If
+ Next
+
+ MR.Dictionary.Synchronize()
+ MR.IsRendered = False
+ MR.Render(False)
+ Dim pdfSettings As New StiPdfExportSettings()
+ Dim MemoryStream As New MemoryStream
+ Select Case Formato
+ Case "PDF"
+ MR.ExportDocument(StiExportFormat.Pdf, MemoryStream, pdfSettings)
+ Case "EXCEL"
+ MR.ExportDocument(StiExportFormat.Excel2007, MemoryStream, pdfSettings)
+ End Select
+ Bytes = MemoryStream.ToArray
+ Catch ex As Exception
+ GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, 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"))} - Ruta {RutaReporte}")
+ 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
+ 'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
+ End Try
+ Return Bytes
+ End Function
+
+ Public Function StreamPDFTest(RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing) As Byte()
+ 'limpio ReportViwer
+
+ Dim sw As New System.Diagnostics.Stopwatch()
+ sw.Start()
+
+ If IsNothing(MR) Then MR = New ReportViewer
+ Dim Bytes As Byte() = Nothing
+ Try
+
+ ' MR.LocalReport.ReportPath = RutaReporte
+ MR.ProcessingMode = ProcessingMode.Local
+
+ Using rdlcR As New StreamReader(RutaReporte)
+ MR.LocalReport.LoadReportDefinition(rdlcR)
+ MR.LocalReport.EnableExternalImages = True
+ MR.LocalReport.SetParameters(Parametros)
+ MR.LocalReport.Refresh()
+ End Using
+
+ For Each RDS As ReportDataSource In DataSource
+ MR.LocalReport.DataSources.Add(RDS)
+ Next
+
+ Dim Warnings As Warning() = Nothing
+ Dim StreamIds As String() = Nothing
+ Dim MimeType As String = Nothing
+ Dim Encoding As String = Nothing
+ Dim Extension As String = Nothing
+
+ Bytes = MR.LocalReport.Render(Formato, Nothing, MimeType, Encoding, Extension, StreamIds, Warnings)
+ Catch ex As Microsoft.Reporting.WebForms.ScriptManagerNotFoundException
+ GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, 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"))} - Ruta {RutaReporte}")
+ 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
+ 'GuardaLog($"Error: {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
+ Catch ex As Exception
+ GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, 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"))} - Ruta {RutaReporte}")
+ 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
+ 'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
+ End Try
+
+ sw.Stop()
+ If sw.Elapsed.TotalSeconds > 10 Then
+ GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ")
+ 'GuardaLog($"Tiempo Renderizado Milisegundos {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ")
+ End If
+
+ Return Bytes
+ End Function
+
+
+ '''
+ ''' Genera documento PDF o Excel
+ '''
+ '''
+ '''
+ '''
+ '''
+ Public Sub ImprimirbytesPDF(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False)
+ '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 = mimeType
+ Response.AddHeader("content-disposition", String.Format("attachment; filename={0}.{1}", NombreArchivo, If(Formato = "PDF", "pdf", "xls")))
+ Response.BinaryWrite(bytes) ' create the file
+ Response.Flush() ' send it to the client to download
+ 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
+ Public Sub ImprimirPDFview(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing)
+ Dim lrds As New List(Of ReportDataSource)
+ Dim rds As New ReportDataSource
+ rds.Name = RDSName
+ rds.Value = DtDatos
+ lrds.Add(rds)
+ ImprimirPDFview(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR)
+ End Sub
+ Public Sub ImprimirPDFview(RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing)
+ 'limpio ReportViwer
+ If IsNothing(MR) Then
+ MR = New ReportViewer
+ End If
+ ' MasterReporteador.LocalReport.DataSources.Clear()
+ For Each rds As ReportDataSource In DataSource
+ MR.LocalReport.DataSources.Add(rds)
+ Next
+ MR.LocalReport.ReportPath = RutaReporte
+ MR.ProcessingMode = ProcessingMode.Local
+ MR.LocalReport.EnableExternalImages = True
+ MR.LocalReport.SetParameters(Parametros)
+ MR.LocalReport.Refresh()
+
+ End Sub
+#End Region
+
+#Region "IMPRIMIR FACTURA"
+ Public Sub PdfFacturaPyME(ByRef Vta As Modelos.Factura, DT As DataTable)
+ Dim retorno As Byte() = Nothing
+
+ 'DATOS GENERALES
+ Dim Ruta As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{UsuarioActual.CveEmpresa}\"
+ Dim PathXML As String = $"{Ruta}XML\{Vta.TipoDocto}\{Vta.SerieFolio}.xml"
+ Dim NombreArchivo As String = ""
+ Dim NombreArchivoDescarga As String = ""
+ Dim TipoDocumento As String = ""
+ Dim TipoDocumentoRef As String = ""
+ Dim AplicaPagare As String = "1"
+
+ Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
+ Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
+ Dim ImgCBB As String '= String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
+
+ Dim ImagenPath = String.Format("{0}Formatos\Suc{1}\logo.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
+ Dim Logo As New System.IO.FileInfo(ImagenPath)
+ Dim ImgLogo = New Uri(String.Format("{0}Empresas/{1}/Formatos/Suc{2}.png", UrlSitio, UsuarioActual.CveEmpresa, Vta.CveSucursal)).AbsoluteUri
+
+ Dim SBDomicilioSucursal As New StringBuilder()
+ Dim CiudadSucursal As String = String.Format("{0},{1}", Vta.SubProyecto.Municipio, Vta.SubProyecto.Estado)
+ Dim DomicilioSucursal As String = ""
+
+ SBDomicilioSucursal.AppendFormat("{0}", Vta.SubProyecto.Calle)
+ If Vta.SubProyecto.NoExt.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", Vta.SubProyecto.NoExt)
+ If Vta.SubProyecto.NoInt.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", Vta.SubProyecto.NoInt)
+ If Vta.SubProyecto.Colonia.Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", Vta.SubProyecto.Colonia)
+ If Vta.SubProyecto.CP.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", Vta.SubProyecto.CP)
+ If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
If Vta.SubProyecto.Pais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", Vta.SubProyecto.Pais)
- If Not String.IsNullOrEmpty(Vta.SubProyecto.Telefono) AndAlso UsuarioActual.CveEmpresa = 141 Then SBDomicilioSucursal.AppendFormat(", Tel: {0}", Vta.SubProyecto.Telefono)
-
- DomicilioSucursal = SBDomicilioSucursal.ToString
-
- Dim Fecha As String = Vta.Fecha.ToShortDateString
-
- Dim SBDireccion As New StringBuilder()
- Dim SBLugar As New StringBuilder()
- Dim ClienteDireccion As String
- Dim ClienteLugar As String
- Vta.FolioFiscal = "Sin Timbrar"
- Vta.NoSerieCertificado = "Sin Timbrar"
- Vta.SelloCFDi = "Sin Timbrar"
- Vta.SelloSAT = "Sin Timbrar"
-
- 'SI ESTA TIMBRADA - CON XML
- If File.Exists(PathXML) AndAlso Vta.Serie <> "VistaPrevia" Then 'Cuando es vista previe y coincide la serie y folio se ponen los datos fiscales
- Dim XmlDoc As New System.Xml.XmlDocument
-
- Dim EsXMLValido = False
- Try
- XmlDoc.Load(PathXML)
- EsXMLValido = True
- Catch ex As Exception
- GuardaLog(" --- *** Impresion ventas - ClsPaginas LN#5016 (Aprox) - EXISTE EL XML PERO NO SE PUEDE LEER. *** --- ")
- End Try
-
- If EsXMLValido Then
- Dim TC As Decimal = 1
- Try
- TC = XmlDoc.DocumentElement.Attributes("TipoCambio").InnerText.ToDecimal
- Catch ex As Exception
- TC = 1
- End Try
- If ValorNodoXML(XmlDoc.DocumentElement, "version") = "3.3" Then
- Vta.FechaEmision = ValorNodoXML(XmlDoc.DocumentElement, "fecha").ToDate
- Vta.NoSerieCertificadoContribuyente = ValorNodoXML(XmlDoc.DocumentElement, "NoCertificado")
-
- Dim validaElemento = XmlDoc.DocumentElement("cfdi:Complemento")
-
- If Not IsNothing(validaElemento) Then
- For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1
- If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
- Vta.FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
- Vta.NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("NoCertificadoSAT").InnerText
- Vta.FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
- Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText
- Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText
- End If
- Next
-
- End If
- Else
- Vta.FechaEmision = XmlDoc.DocumentElement.Attributes("fecha").InnerText.ToDate
- Vta.NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("noCertificado").InnerText
-
- Dim validaElemento = XmlDoc.DocumentElement("cfdi:Complemento")
-
- If Not IsNothing(validaElemento) Then
- For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1
- If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
- Vta.FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
- Vta.NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("noCertificadoSAT").InnerText
- Vta.FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
- Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloCFD").InnerText
- Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloSAT").InnerText
-
- End If
- Next
- End If
-
- End If
- End If
-
-
- End If
-
- 'DIRECCION CLIENTE
- If Vta.CveClienteSucursal.ToEntero > 0 Then
- 'Si cliente tiene Noint, NoExt, CP
- SBDireccion.AppendFormat("{0}", Vta.ClienteSucursal.Direccion)
- If Vta.ClienteSucursal.NoExt.Length > 0 Then SBDireccion.AppendFormat(", No.Ext: {0}", Vta.ClienteSucursal.NoExt)
- If Vta.ClienteSucursal.NoInt.Length > 0 Then SBDireccion.AppendFormat(", No.Int: {0}", Vta.ClienteSucursal.NoInt)
- If UsuarioActual.CveEmpresa <> 66 Then SBDireccion.AppendFormat(", Col: {0}", Vta.ClienteSucursal.Colonia)
-
- If Not (UsuarioActual.CveEmpresa.Contiene(66, 81, 109) AndAlso Vta.TipoDocto = "Cot") Then
- If Vta.ClienteSucursal.CP.Length > 0 Then SBDireccion.AppendFormat(", CP: {0} ", Vta.ClienteSucursal.CP.Trim)
- End If
-
- 'Si cliente tiene Local, CD, Edo, Pais
- If Vta.ClienteSucursal.Localidad IsNot Nothing AndAlso Vta.ClienteSucursal.Localidad.Length > 0 Then SBLugar.AppendFormat("Loc: {0}, ", Vta.ClienteSucursal.Localidad)
- If Vta.ClienteSucursal.Municipio IsNot Nothing AndAlso Vta.ClienteSucursal.Municipio.Length > 0 Then SBLugar.AppendFormat("Cd: {0}, ", Vta.ClienteSucursal.Municipio)
- If Vta.ClienteSucursal.Estado IsNot Nothing AndAlso Vta.ClienteSucursal.Estado.Length > 0 Then SBLugar.AppendFormat(" Edo: {0}, ", Vta.ClienteSucursal.Estado)
- If Vta.ClienteSucursal.Pais IsNot Nothing AndAlso Vta.ClienteSucursal.Pais.Length > 0 Then SBLugar.AppendFormat(" País: {0} ", Vta.ClienteSucursal.Pais)
- ElseIf Vta.CveCliente.ToEntero > 0 Then
- SBDireccion.AppendFormat("{0}", Vta.Cliente.Direccion)
- If Vta.Cliente.NoExt.Length > 0 Then SBDireccion.AppendFormat(", No.Ext: {0}", Vta.Cliente.NoExt)
- If Vta.Cliente.NoInt.Length > 0 Then SBDireccion.AppendFormat(", No.Int: {0}", Vta.Cliente.NoInt)
- If UsuarioActual.CveEmpresa <> 66 Then SBDireccion.AppendFormat(", Col: {0}", Vta.Cliente.Colonia)
-
- If Not (UsuarioActual.CveEmpresa.Contiene(66, 81, 109) AndAlso Vta.TipoDocto = "Cot") Then
- If Vta.Cliente.CP.Length > 0 Then SBDireccion.AppendFormat(", CP: {0} ", Vta.Cliente.CP.Trim)
- End If
-
- 'Si cliente tiene Local, CD, Edo, Pais
- If Vta.Cliente.Localidad IsNot Nothing AndAlso Vta.Cliente.Localidad.Length > 0 Then SBLugar.AppendFormat("Loc: {0}, ", Vta.Cliente.Localidad)
- If Vta.Cliente.Ciudad IsNot Nothing AndAlso Vta.Cliente.Ciudad.Length > 0 Then SBLugar.AppendFormat("Cd: {0}, ", Vta.Cliente.Ciudad)
- If Vta.Cliente.Estado IsNot Nothing AndAlso Vta.Cliente.Estado.Length > 0 Then SBLugar.AppendFormat(" Edo: {0}, ", Vta.Cliente.Estado)
- If Vta.Cliente.Pais IsNot Nothing AndAlso Vta.Cliente.Pais.Length > 0 Then SBLugar.AppendFormat(" País: {0} ", Vta.Cliente.Pais)
-
- End If
-
- ClienteDireccion = SBDireccion.ToString
- ClienteLugar = SBLugar.ToString
- SBDireccion.Clear()
- SBLugar.Clear()
-
- 'LOGO
- Dim LogoRuta As String = ""
- 'POR SUCURSAL
- LogoRuta = String.Format("{0}Formatos\Suc{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
- If File.Exists(LogoRuta) Then
- LogoRuta = String.Format("file://{0}Formatos\Suc{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
- 'POR EMPRESA
- Else
- LogoRuta = String.Format("{0}Formatos\Logo.png", UsuarioActual.Empresa.Ruta)
- If File.Exists(LogoRuta) Then
- LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
- End If
- End If
-
- 'Si no tiene CBB, SE GENERA
- If Not ImagenCBB.Exists AndAlso Vta.CveCliente.ToEntero > 0 Then
- Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
- CBB.GenerarCBB(UsuarioActual.Empresa.RFC, Vta.Cliente.RFC, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
- End If
- ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
-
- 'Dim CadenaOriginals As String = "||1.0|" + Vta.FolioFiscal + "|" + Vta.FechaCertificacion.ToString("yyyy-MM-dd") + "T" + Vta.FechaCertificacion.ToString("HH:mm:ss") + "|" + Vta.SelloCFDi + "|" + Vta.NoSerieCertificado + "||"
- Dim CadenaOriginals As String = String.Format("||{0}|{1}|{2}T{3}|{4}|{5}||", If(Vta.Version = "3.3", "1.1", "1.0"), Vta.FolioFiscal, Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"), Vta.SelloCFDi, Vta.NoSerieCertificado)
- If Not ImagenCBB.Exists Then ImgCBB = ""
- Dim RutaFormato As String = ""
- Dim RutaFormatoDefault As String = ""
-
- 'AQUI EMPIEZA LOS PARAMETROS
- Try
- Dim params As New List(Of ReportParameter)
-
-
- 'CLIENTE
- If Vta.CveCliente.ToEntero > 0 Then
- params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo))
- params.Add(New ReportParameter("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
- params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion))
- params.Add(New ReportParameter("ClienteLugar", ClienteLugar))
- params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC))
- End If
-
- 'TOTALES
- params.Add(New ReportParameter("SubTotal", Vta.SubTotal.ToString.FormatoNumero(2)))
- params.Add(New ReportParameter("Descuento", Vta.Descuento.ToString.FormatoNumero(2)))
- params.Add(New ReportParameter("Amortizacion", Vta.Amortizacion.ToString.FormatoNumero(2)))
- params.Add(New ReportParameter("SubTotal2", (Vta.SubTotal - Vta.Descuento - Vta.Amortizacion).ToString.FormatoNumero(2)))
- params.Add(New ReportParameter("IVA", Vta.IVA.ToString.FormatoNumero(2)))
- params.Add(New ReportParameter("RetIVA", Vta.RetIVA.ToString.FormatoNumero(2)))
- params.Add(New ReportParameter("RetISR", Vta.RetISR.ToString.FormatoNumero(2)))
- params.Add(New ReportParameter("Total", Vta.Total.ToString.FormatoNumero(2)))
- params.Add(New ReportParameter("ImporteLetra", Vta.Total.ToString.ToDouble.Texto2Letras(Vta.CveMoneda)))
-
- 'DATOS GENERALES
-
-
-
- 'params.Add(New ReportParameter("CP", UsuarioActual.Empresa.CP.ToString))
- params.Add(New ReportParameter("Observaciones", Vta.Observaciones))
- params.Add(New ReportParameter("CveVendedor", Vta.CveVendedor.ToString))
- params.Add(New ReportParameter("Status", Vta.EstatusFactura))
- params.Add(New ReportParameter("FechaSolicitud", Vta.Fecha.ToString("dd/MMMM/yyyy"))) ' se puede omitir
- params.Add(New ReportParameter("Serie", Vta.Serie))
- params.Add(New ReportParameter("Folio", Vta.Folio.ToString))
- params.Add(New ReportParameter("DomicilioSucursal", DomicilioSucursal))
- params.Add(New ReportParameter("Vencimiento", Vta.FechaVencimiento.ToString("dd/MM/yyyy")))
- params.Add(New ReportParameter("FolioFiscal", Vta.FolioFiscal))
- params.Add(New ReportParameter("FechaCertificacion", String.Format("{0}T{1}", Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"))))
- params.Add(New ReportParameter("SelloCFDI", Vta.SelloCFDi))
- params.Add(New ReportParameter("CadenaSAT", CadenaOriginals))
- params.Add(New ReportParameter("SelloSAT", Vta.SelloSAT))
-
- params.Add(New ReportParameter("QR", ImgCBB))
- params.Add(New ReportParameter("Moneda", Vta.Moneda))
- params.Add(New ReportParameter("TipoCambio", Vta.TipoCambio.ToString))
- params.Add(New ReportParameter("CondicionPago", Vta.CondicionesPagoText))
- params.Add(New ReportParameter("CadenaOriginal", CadenaOriginals))
- params.Add(New ReportParameter("SerieCertificadoSAT", Vta.NoSerieCertificado))
- params.Add(New ReportParameter("CertificadoContribuyente", Vta.NoSerieCertificadoContribuyente))
- params.Add(New ReportParameter("NumCta", Vta.NumeroCuenta))
- params.Add(New ReportParameter("LogoPath", LogoRuta))
- params.Add(New ReportParameter("CiudadSucursal", CiudadSucursal))
- params.Add(New ReportParameter("OC", Vta.Det_OrdenCompra.ToString))
- params.Add(New ReportParameter("ClienteDiasCredito", "0"))
- params.Add(New ReportParameter("MonedaAbreviatura", If(Vta.MonedaAbreviatura.ToString IsNot Nothing, Vta.MonedaAbreviatura.ToString, "")))
- params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
- params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
- params.Add(New ReportParameter("Sucursal", Vta.SubProyecto.SubProyecto))
- params.Add(New ReportParameter("EstatusFactura", If(Vta.TipoEstatus = 5, Vta.EstatusFactura, "")))
- params.Add(New ReportParameter("EstatusEntrega", If(Vta.Inv_CveEstatusEntrega = 1, Vta.Inv_EstatusEntrega, "")))
- params.Add(New ReportParameter("PedidoContrato", Vta.PedidoContrato))
- params.Add(New ReportParameter("OrdenCompra", Vta.OrdenCompra))
- params.Add(New ReportParameter("DescripcionContrato", Vta.NumeroDescripcionContrato))
- params.Add(New ReportParameter("Contrato", Vta.NumeroContrato))
- params.Add(New ReportParameter("Fecha", String.Format("{0}T{1}", Vta.Fecha.ToString("yyyy-MM-dd"), Vta.Fecha.ToString("HH:mm:ss"))))
-
- 'VENDEDOR
- Dim VendedorNombre As String = ""
- Dim VendedorMail As String = ""
- Dim VendedorTelefono As String = ""
- Dim VendedorCelular As String = ""
- Dim RowVendedor As DataRow = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
- If Not IsNothing(RowVendedor) Then
- VendedorNombre = RowVendedor("Vendedor").ToString
- VendedorMail = RowVendedor("Correo").ToString
- VendedorTelefono = RowVendedor("Telefono").ToString
- VendedorCelular = RowVendedor("Celular").ToString
- End If
- params.Add(New ReportParameter("VendedorNombre", VendedorNombre))
- params.Add(New ReportParameter("VendedorMail", VendedorMail))
- params.Add(New ReportParameter("VendedorTelefono", VendedorTelefono))
- params.Add(New ReportParameter("VendedorCelular", VendedorCelular))
-
- If UsuarioActual.Empresa.Funcionalidad(508) = "1" Then
- params.Add(New ReportParameter("IEPS", Vta.IEPS.ToString.FormatoNumero(2)))
- End If
-
- If Vta.CveClienteSucursal > 0 Then
- params.Add(New ReportParameter("ClienteContactoMail", Vta.ClienteSucursal.CorreoSucursal))
- params.Add(New ReportParameter("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal))
- ElseIf Vta.CveCliente.ToEntero > 0 Then
- params.Add(New ReportParameter("ClienteContactoMail", Vta.Cliente.MailCotizacion))
- params.Add(New ReportParameter("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", Vta.TelefonoGenerico, Vta.Cliente.Telefono)))
- End If
-
- If UsuarioActual.CveEmpresa.Contiene(17) Then
- params.Add(New ReportParameter("MetodoPago", Vta.ClaveMetodoPagoSAT.ToString))
- End If
-
- If Vta.Version = "3.3" Then
- params.Add(New ReportParameter("FormaPago", Vta.FormaPago33.ToString))
- params.Add(New ReportParameter("MetodoPago", Vta.MetodoPago33.ToString))
- params.Add(New ReportParameter("UsoCFDI", Vta.UsoCFDI))
- If Vta.TipoDocto.Contiene("Ing", "Egs", "Ant", "Dev") Then
- params.Add(New ReportParameter("TipoRelacionTexto", If(Vta.Timbre.CFDIRelacionados.TipoRelacionTexto Is Nothing, "", Vta.Timbre.CFDIRelacionados.TipoRelacionTexto)))
- params.Add(New ReportParameter("FolioFiscalRelacionado", If(Vta.Timbre.CFDIRelacionados.UUID.Count = 0, "", Vta.Timbre.CFDIRelacionados.UUID.Item(0))))
- End If
- Else
- params.Add(New ReportParameter("FormaPago", Vta.FormaPagoText))
- params.Add(New ReportParameter("MetodoPago", Vta.MetodoPago.ToString))
- End If
-
- 'DIRECCION ENVIO
- If Vta.EnviarA IsNot Nothing AndAlso Vta.EnviarA.CveDireccionEnvio > 0 Then
- Dim StrEnvioDi As New StringBuilder
- StrEnvioDi.AppendFormat("{0}", Vta.EnviarA.EnvioDireccion)
- If Vta.EnviarA.EnvioNoExt IsNot Nothing AndAlso Vta.EnviarA.EnvioNoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.EnviarA.EnvioNoExt)
- If Vta.EnviarA.EnvioNoInt IsNot Nothing AndAlso Vta.EnviarA.EnvioNoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.EnviarA.EnvioNoInt)
-
- params.Add(New ReportParameter("EnvioDireccion", StrEnvioDi.ToString))
- params.Add(New ReportParameter("EnvioNoExt", Vta.EnviarA.EnvioNoExt))
- params.Add(New ReportParameter("EnvioNoInt", Vta.EnviarA.EnvioNoInt))
- params.Add(New ReportParameter("EnvioColonia", Vta.EnviarA.EnvioColonia))
- params.Add(New ReportParameter("EnvioCiudad", Vta.EnviarA.EnvioCiudad))
- params.Add(New ReportParameter("EnvioEstado", Vta.EnviarA.EnvioEstado))
- params.Add(New ReportParameter("EnvioContacto", Vta.EnviarA.EnvioContacto))
- params.Add(New ReportParameter("EnvioDepartamento", Vta.EnviarA.EnvioDepartamento))
- params.Add(New ReportParameter("EnvioCP", Vta.EnviarA.EnvioCP))
- If Vta.CveEmpresa = 72 Then
- params.Add(New ReportParameter("EnvioTel", Vta.EnviarA.EnvioTel))
- End If
- ElseIf Vta.CveCliente.ToEntero > 0 Then
- If Vta.CveClienteSucursal.ToEntero > 0 Then
- Dim StrEnvioDi As New StringBuilder
- StrEnvioDi.AppendFormat("{0}", Vta.ClienteSucursal.Direccion)
- If Vta.ClienteSucursal.NoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.ClienteSucursal.NoExt)
- If Vta.ClienteSucursal.NoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.ClienteSucursal.NoInt)
- params.Add(New ReportParameter("EnvioDireccion", StrEnvioDi.ToString))
- params.Add(New ReportParameter("EnvioNoExt", Vta.ClienteSucursal.NoExt))
- params.Add(New ReportParameter("EnvioNoInt", Vta.ClienteSucursal.NoInt))
- params.Add(New ReportParameter("EnvioColonia", If(Vta.ClienteSucursal.Colonia.Length > 0, Vta.ClienteSucursal.Colonia, "")))
- params.Add(New ReportParameter("EnvioCiudad", If(Vta.ClienteSucursal.Municipio.Length > 0, Vta.ClienteSucursal.Municipio, "")))
- params.Add(New ReportParameter("EnvioEstado", If(Vta.ClienteSucursal.Estado.Length > 0, Vta.ClienteSucursal.Estado, "")))
- params.Add(New ReportParameter("EnvioCP", If(Vta.ClienteSucursal.CP.Length > 0, Vta.ClienteSucursal.CP, "")))
- Else
- Dim StrEnvioDi As New StringBuilder
- StrEnvioDi.AppendFormat("{0}", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, ""))
- If Vta.Cliente.NoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.Cliente.NoExt)
- If Vta.Cliente.NoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.Cliente.NoInt)
- params.Add(New ReportParameter("EnvioDireccion", StrEnvioDi.ToString))
- params.Add(New ReportParameter("EnvioNoExt", Vta.Cliente.NoExt))
- params.Add(New ReportParameter("EnvioNoInt", Vta.Cliente.NoInt))
- params.Add(New ReportParameter("EnvioColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
- params.Add(New ReportParameter("EnvioCiudad", If(Vta.Cliente.Localidad IsNot Nothing And Vta.Cliente.Localidad.Length > 0, Vta.Cliente.Localidad, "")))
- params.Add(New ReportParameter("EnvioEstado", If(Vta.Cliente.Estado.Length > 0, Vta.Cliente.Estado, "")))
- params.Add(New ReportParameter("EnvioCP", If(Vta.Cliente.CP.Length > 0, Vta.Cliente.CP, "")))
- End If
- params.Add(New ReportParameter("EnvioContacto", ""))
- params.Add(New ReportParameter("EnvioDepartamento", ""))
- End If
-
- 'CLIENTE SUCURSAL
- If Vta.CveClienteSucursal.ToEntero > 0 Then
- params.Add(New ReportParameter("ClienteCalle", If(Vta.ClienteSucursal.Direccion.Length > 0, Vta.ClienteSucursal.Direccion, "")))
- params.Add(New ReportParameter("ClienteColonia", If(Vta.ClienteSucursal.Colonia.Length > 0, Vta.ClienteSucursal.Colonia, "")))
- params.Add(New ReportParameter("ClienteCiudad", If(Vta.ClienteSucursal.Localidad IsNot Nothing And Vta.ClienteSucursal.Localidad.Length > 0, Vta.ClienteSucursal.Localidad, "")))
- params.Add(New ReportParameter("ClienteMunicipio", If(Vta.ClienteSucursal.Municipio.Length > 0, Vta.ClienteSucursal.Municipio, "")))
- params.Add(New ReportParameter("ClienteEstado", If(Vta.ClienteSucursal.Estado.Length > 0, Vta.ClienteSucursal.Estado, "")))
- params.Add(New ReportParameter("ClienteCP", If(Vta.ClienteSucursal.CP.Length > 0, Vta.ClienteSucursal.CP, "")))
- params.Add(New ReportParameter("ClienteNoInt", If(Vta.ClienteSucursal.NoInt.Length > 0, Vta.ClienteSucursal.NoInt, "")))
- params.Add(New ReportParameter("ClienteNoExt", If(Vta.ClienteSucursal.NoExt.Length > 0, Vta.ClienteSucursal.NoExt, "")))
- params.Add(New ReportParameter("ClientePais", If(Vta.ClienteSucursal.Pais.Length > 0, Vta.ClienteSucursal.Pais, "")))
- params.Add(New ReportParameter("ClienteContacto", Vta.AtnA))
- ElseIf Vta.CveCliente.ToEntero > 0 Then
- params.Add(New ReportParameter("ClienteCalle", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, "")))
- params.Add(New ReportParameter("ClienteColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
- params.Add(New ReportParameter("ClienteCiudad", If(Vta.Cliente.Localidad IsNot Nothing And Vta.Cliente.Localidad.Length > 0, Vta.Cliente.Localidad, "")))
- params.Add(New ReportParameter("ClienteMunicipio", If(Vta.Cliente.Ciudad.Length > 0, Vta.Cliente.Ciudad, "")))
- params.Add(New ReportParameter("ClienteEstado", If(Vta.Cliente.Estado.Length > 0, Vta.Cliente.Estado, "")))
- params.Add(New ReportParameter("ClienteCP", If(Vta.Cliente.CP.Length > 0, Vta.Cliente.CP, "")))
- params.Add(New ReportParameter("ClienteNoInt", If(Vta.Cliente.NoInt.Length > 0, Vta.Cliente.NoInt, "")))
- params.Add(New ReportParameter("ClienteNoExt", If(Vta.Cliente.NoExt.Length > 0, Vta.Cliente.NoExt, "")))
- params.Add(New ReportParameter("ClientePais", If(Vta.Cliente.Pais.Length > 0, Vta.Cliente.Pais, "")))
- params.Add(New ReportParameter("ClienteContacto", Vta.AtnA))
- End If
-
- 'PARAMETROS SEGUN TIPO DOCUMENTO
- Select Case Vta.TipoDocto
- Case "Ing"
- NombreArchivo = "Factura"
- NombreArchivoDescarga = "Factura"
- TipoDocumento = "INGRESO"
-
- If UsuarioActual.CveEmpresa.Contiene(137) Then
- params.Add(New ReportParameter("CveVenta", Vta.CveVenta.ToString))
- End If
-
- params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
- params.Add(New ReportParameter("Tipo", TipoDocumento))
- params.Add(New ReportParameter("Ref", TipoDocumentoRef))
- params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
-
- 'VSH
- If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122, 145) Then
- 'DATOS CLIENTES
- Dim ClienteRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", Vta.CveCliente.ToString))
- Dim DatosCliente = ""
- If ClienteRow IsNot Nothing Then
- DatosCliente = String.Format("{0} | {1} | {2}", Vta.SubProyecto.Municipio, ClienteRow("CuentaContable"), ClienteRow("Codigo"))
- End If
- params.Add(New ReportParameter("ClienteDatoExtra1", DatosCliente))
- End If
-
- 'INE COMPLEMENTOS
- If UsuarioActual.CveEmpresa.Contiene(72, 1) Then
- Dim INETipoProceso As String = ""
- Dim INETipoComite As String = ""
- Dim INEIdContabilidad As Integer = 0
- If Vta.ComplementoINE IsNot Nothing Then
- INETipoProceso = Vta.ComplementoINE.INETipoProceso
- INETipoComite = Vta.ComplementoINE.INETipoComite
- INEIdContabilidad = Vta.ComplementoINE.INEIdContabilidad
- End If
- params.Add(New ReportParameter("INETipoProceso", INETipoProceso))
- params.Add(New ReportParameter("INETipoComite", INETipoComite))
- params.Add(New ReportParameter("INEIdContabilidad", INEIdContabilidad.ToString))
- params.Add(New ReportParameter("Referencia", Vta.Cliente.ReferenciaFiscal))
-
- End If
-
- RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
- RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
- Case "Rem"
- NombreArchivo = "Remision"
- NombreArchivoDescarga = "Remisión"
- TipoDocumento = "REMISION"
-
- params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
- params.Add(New ReportParameter("Tipo", TipoDocumento))
- params.Add(New ReportParameter("Ref", TipoDocumentoRef))
- params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
-
- 'ALAN YEPIZ
- If UsuarioActual.CveEmpresa.Contiene(123) Then
- params.Add(New ReportParameter("DiaExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Day)))
- params.Add(New ReportParameter("MesExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Month)))
- params.Add(New ReportParameter("AñoExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Year)))
- End If
-
- RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
- RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
- Case "Cot"
- NombreArchivo = "Cotizacion"
- NombreArchivoDescarga = "Cotización"
- TipoDocumento = "COTIZACIÓN"
-
- params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
- params.Add(New ReportParameter("Tipo", TipoDocumento))
- params.Add(New ReportParameter("Ref", TipoDocumentoRef))
- params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
- params.Add(New ReportParameter("ClienteContacto", Vta.AtencionA))
-
- If UsuarioActual.CveEmpresa.Contiene(137, 132, 144) Then
- params.Add(New ReportParameter("CveVenta", Vta.CveVenta.ToString))
- End If
-
- 'COMPU DN DIFUSA
- If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 137, 132, 144) Then
-
- Dim FirmaVendedor As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveVendedor))
-
- params.Add(New ReportParameter("FirmaVendedor", If(FirmaVendedor.Exists, New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Firmas/{1}.png", UsuarioActual.CveEmpresa, Vta.CveVendedor))).AbsoluteUri, "")))
- params.Add(New ReportParameter("Entrega", Vta.Entrega))
- params.Add(New ReportParameter("Vigencia", Vta.Vigencia.ToString("dd/MMMM/yyyy")))
- params.Add(New ReportParameter("Sucursal", Vta.SubProyecto.SubProyecto))
- params.Add(New ReportParameter("SucursalCliente", If(Vta.ClienteSucursal.Sucursal.ToString Is Nothing, "", Vta.ClienteSucursal.Sucursal.ToString)))
- params.Add(New ReportParameter("CveMoneda", Vta.CveMoneda.ToString))
- params.Add(New ReportParameter("FormaEntrega", Vta.CondicionEntrega))
-
- If Not IsNothing(RowVendedor) Then
- params.Add(New ReportParameter("TituloVendedor", RowVendedor("TituloDocumentos").ToString))
- Else
- params.Add(New ReportParameter("TituloVendedor", ""))
- End If
-
- End If
-
- RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
- RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
- Case "Egs"
- If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
- NombreArchivo = "NotaCredito"
- Else
- NombreArchivo = "Factura"
- End If
- NombreArchivoDescarga = "Nota de Crédito"
- TipoDocumento = "EGRESO"
- TipoDocumentoRef = String.Format(": Ref.:{0}", Vta.RefDocto)
- AplicaPagare = "0"
-
- If UsuarioActual.CveEmpresa.Contiene(137) Then
- params.Add(New ReportParameter("CveVenta", Vta.CveVenta.ToString))
- End If
-
- params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
- params.Add(New ReportParameter("Tipo", TipoDocumento))
- params.Add(New ReportParameter("Ref", TipoDocumentoRef))
- params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
-
- RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
- RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
- Case "Ant"
- NombreArchivo = "Factura"
- NombreArchivoDescarga = "Anticipo"
- TipoDocumento = "INGRESO"
-
- If UsuarioActual.CveEmpresa.Contiene(137) Then
- params.Add(New ReportParameter("CveVenta", Vta.CveVenta.ToString))
- End If
-
- 'GENERAL
- params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
- params.Add(New ReportParameter("Tipo", TipoDocumento))
- params.Add(New ReportParameter("Ref", TipoDocumentoRef))
- params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
-
- 'INE COMPLEMENTOS
- If UsuarioActual.CveEmpresa.Contiene(72) Then
- Dim INETipoProceso As String = ""
- Dim INETipoComite As String = ""
- Dim INEIdContabilidad As Integer = 0
- If Vta.ComplementoINE IsNot Nothing Then
- INETipoProceso = Vta.ComplementoINE.INETipoProceso
- INETipoComite = Vta.ComplementoINE.INETipoComite
- INEIdContabilidad = Vta.ComplementoINE.INEIdContabilidad
- End If
- params.Add(New ReportParameter("INETipoProceso", INETipoProceso))
- params.Add(New ReportParameter("INETipoComite", INETipoComite))
- params.Add(New ReportParameter("INEIdContabilidad", INEIdContabilidad.ToString))
- params.Add(New ReportParameter("Referencia", Vta.Cliente.ReferenciaFiscal))
- params.Add(New ReportParameter("ClienteContacto", Vta.AtnA))
- End If
-
- RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
- RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
- Case "Ped"
- NombreArchivo = "Pedido"
- NombreArchivoDescarga = "Pedido"
- TipoDocumento = "INGRESO"
-
- 'GENERAL
- params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
- params.Add(New ReportParameter("Tipo", TipoDocumento))
- params.Add(New ReportParameter("Ref", TipoDocumentoRef))
- params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
- params.Add(New ReportParameter("CveAlmacenTraspasoOrigen", Vta.CveAlmacenTraspasoOrigen.ToString))
-
- RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
- RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
- Case "Pd2"
- NombreArchivo = "Pedido2"
- NombreArchivoDescarga = "Pedido2"
- TipoDocumento = "INGRESO"
-
- 'GENERAL
- params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
- params.Add(New ReportParameter("Tipo", TipoDocumento))
- params.Add(New ReportParameter("Ref", TipoDocumentoRef))
- params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
-
- RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
- RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
- Case "Dev"
- NombreArchivo = "NotaDevolucion"
- NombreArchivoDescarga = "NotaDevolucion"
- TipoDocumento = "DEVOLUCION"
-
- params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
- params.Add(New ReportParameter("Tipo", TipoDocumento))
- params.Add(New ReportParameter("Ref", TipoDocumentoRef))
- params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
-
- RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
- RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
- Case "DPe"
- NombreArchivo = "DevolucionPedido"
- NombreArchivoDescarga = "DevolucionPedido"
- TipoDocumento = "INGRESO"
-
- params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
- params.Add(New ReportParameter("Tipo", TipoDocumento))
- params.Add(New ReportParameter("Ref", TipoDocumentoRef))
- params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
-
- RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
- RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
- Case "PeC"
- NombreArchivo = "PedidoConsignacion"
- NombreArchivoDescarga = "Pedido Consignación"
- TipoDocumento = "INGRESO"
-
- 'GENERAL
- params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
- params.Add(New ReportParameter("Tipo", TipoDocumento))
- params.Add(New ReportParameter("Ref", TipoDocumentoRef))
- params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
-
- RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
- RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
- Case "Tra"
- NombreArchivo = "Traspaso"
- NombreArchivoDescarga = "Traspaso"
- TipoDocumento = "Traspaso"
-
- Dim ObjInv As New ClsInventarios
- Dim AlmOrigen As String = ""
- Dim AlmDestino As String = ""
-
- Dim SBDireccionO As New StringBuilder()
- Dim SBDireccionD As New StringBuilder()
-
- If ObjInv.GetMovimientos(Vta.Inv_CveMovimiento.ToEntero, -1, -1, UsuarioActual.CveEmpresa) Then
- If ObjInv.DtResultados.Rows.Count > 0 Then
- Dim Dr As DataRow = ObjInv.DtResultados.Rows(0)
- If Dr IsNot Nothing Then
- AlmOrigen = Dr("AlmacenOrigen").ToString
- AlmDestino = Dr("AlmacenDestino").ToString
-
- If Dr("CalleOrigen").ToString.Length > 0 Then
- SBDireccionO.AppendFormat("{0}", Dr("CalleOrigen").ToString)
- If Dr("NoExtOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", No.Ext: {0}", Dr("NoExtOrigen").ToString)
- If Dr("ColoniaOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Col: {0}", Dr("ColoniaOrigen").ToString)
- If Dr("CPOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", CP: {0}", Dr("CPOrigen").ToString)
- If Dr("LocalidadOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Loc: {0}", Dr("LocalidadOrigen").ToString)
- If Dr("MunicipioOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Cd: {0}", Dr("MunicipioOrigen").ToString)
- If Dr("EstadoOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Edo: {0}", Dr("EstadoOrigen").ToString)
- If Dr("PaisOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", País: {0}", Dr("PaisOrigen").ToString)
- End If
- If Dr("CalleDestino").ToString.Length > 0 Then
- SBDireccionD.AppendFormat("{0}", Dr("CalleDestino").ToString)
- If Dr("NoExtDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", No.Ext: {0}", Dr("NoExtDestino").ToString)
- If Dr("ColoniaDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Col: {0}", Dr("ColoniaDestino").ToString)
- If Dr("CPDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", CP: {0}", Dr("CPDestino").ToString)
- If Dr("LocalidadDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Loc: {0}", Dr("LocalidadDestino").ToString)
- If Dr("MunicipioDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Cd: {0}", Dr("MunicipioDestino").ToString)
- If Dr("EstadoDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Edo: {0}", Dr("EstadoDestino").ToString)
- If Dr("PaisDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", País: {0}", Dr("PaisDestino").ToString)
- End If
- End If
- End If
- End If
-
- 'GENERAL
- params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
- params.Add(New ReportParameter("Tipo", TipoDocumento))
- params.Add(New ReportParameter("Ref", TipoDocumentoRef))
- params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
- params.Add(New ReportParameter("AlmOrigen", AlmOrigen))
- params.Add(New ReportParameter("AlmDestino", AlmDestino))
- params.Add(New ReportParameter("DireccionOrigen", SBDireccionO.ToString))
- params.Add(New ReportParameter("DireccionDestino", SBDireccionD.ToString))
-
- RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
- RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
- Case Else
- NombreArchivo = ""
- TipoDocumento = ""
- End Select
-
- If NombreArchivo = "" Then
- GuardaLog("No se especifico el tipo de Impresion de venta (Venta, Remision, Cotización, Nota de Crédito).")
- Return Nothing
- End If
- 'TERMINA REGION PARAMETROS
-
- Dim lrds As New List(Of ReportDataSource)
- 'Si es ECLIPSE CREAR COLUMAS PARA FIRMAS EN DtDetalle.
- If UsuarioActual.CveEmpresa.Contiene(1, 15, 17, 71, 76, 126) AndAlso Vta.DtFirmas IsNot Nothing Then
- Dim DtDetalleFirmas As New DataTable
- DtDetalleFirmas.TableName = "DetalleFirma"
- DtDetalleFirmas = Vta.DtDetalle.Copy()
-
- 'SI NO TIENE LAS COLUMNAS DE FIRMAS LAS CREA.
- If Not DtDetalleFirmas.Columns.Contains("Titulo") Then
- DtDetalleFirmas.Columns.Add("Titulo", GetType(String))
- DtDetalleFirmas.Columns.Add("Nombre", GetType(String))
- DtDetalleFirmas.Columns.Add("Puesto", GetType(String))
- DtDetalleFirmas.Columns.Add("Lado", GetType(Integer))
- End If
-
- 'Se llenan los Rows de las columnas con los datos del DtFirmas
- For i As Integer = 0 To Vta.DtFirmas.Rows.Count - 1
- 'Si DtDetalle es menor al DtFirmas, crea un nuevo Row en DtDetalle y le asigna valor, Si no solo asigna valor
- If DtDetalleFirmas.Rows.Count < i + 1 Then
- Dim Dr = DtDetalleFirmas.NewRow
- Dr("Titulo") = Vta.DtFirmas(i)("Titulo").ToString
- Dr("Nombre") = Vta.DtFirmas(i)("Nombre").ToString
- Dr("Puesto") = Vta.DtFirmas(i)("Puesto").ToString
- Dr("Lado") = Vta.DtFirmas(i)("Lado").ToString.ToEntero
- DtDetalleFirmas.Rows.Add(Dr)
- Else
- DtDetalleFirmas(i)("Titulo") = Vta.DtFirmas(i)("Titulo").ToString
- DtDetalleFirmas(i)("Nombre") = Vta.DtFirmas(i)("Nombre").ToString
- DtDetalleFirmas(i)("Puesto") = Vta.DtFirmas(i)("Puesto").ToString
- DtDetalleFirmas(i)("Lado") = Vta.DtFirmas(i)("Lado").ToString.ToEntero
- End If
- Next i
-
- Dim rds As New ReportDataSource With {.Name = "DsOC", .Value = DtDetalleFirmas}
- lrds.Add(rds)
- Else
- Dim rds As New ReportDataSource With {.Name = "DsOC", .Value = Vta.DtDetalle}
- lrds.Add(rds)
- End If
-
- Dim rds1 As New ReportDataSource With {.Name = "DataSet1", .Value = If(Vta.DtDeduccion IsNot Nothing, Vta.DtDeduccion, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
- lrds.Add(rds1)
-
- 'DETALLE FIRMAS
- Dim rds2 As New ReportDataSource With {.Name = "DataSet2", .Value = If(Vta.DtFirmas IsNot Nothing, Vta.DtFirmas, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
- lrds.Add(rds2)
-
- Dim rds3 As New ReportDataSource With {.Name = "DataSet3", .Value = If(Vta.DtDesgloseImpuestos IsNot Nothing, Vta.DtDesgloseImpuestos, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
- lrds.Add(rds3)
-
- Dim rds4 As New ReportDataSource With {.Name = "DataSet4", .Value = If(Vta.DtDocumentosRelacionados IsNot Nothing, Vta.DtDocumentosRelacionados, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
- lrds.Add(rds4)
-
- Dim rds5 As New ReportDataSource With {.Name = "DataSet5", .Value = If(Vta.DtNCVinculadas IsNot Nothing, Vta.DtNCVinculadas, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
- lrds.Add(rds5)
-
+
+ DomicilioSucursal = SBDomicilioSucursal.ToString
+
+ Dim Fecha As String = Vta.Fecha.ToShortDateString
+
+ Dim SBDireccion As New StringBuilder()
+ Dim SBLugar As New StringBuilder()
+ Dim ClienteDireccion As String
+ Dim ClienteLugar As String
+
+ 'SI ESTA TIMBRADA - CON XML
+ If File.Exists(PathXML) AndAlso Vta.Serie <> "VistaPrevia" Then 'Cuando es vista previe y coincide la serie y folio se ponen los datos fiscales
+ Dim XmlDoc As New System.Xml.XmlDocument
+ XmlDoc.Load(PathXML)
+
+ Dim TC As Decimal = 1
+ Try
+ TC = XmlDoc.DocumentElement.Attributes("TipoCambio").InnerText.ToDecimal
+ Catch ex As Exception
+ TC = 1
+ End Try
+
+ Vta.FechaEmision = XmlDoc.DocumentElement.Attributes("fecha").InnerText.ToDate
+ Vta.NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("noCertificado").InnerText
+
+ Dim validaElemento = XmlDoc.DocumentElement("cfdi:Complemento")
+
+ If Not IsNothing(validaElemento) Then
+ For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1
+ If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
+ Vta.FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
+ Vta.NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("noCertificadoSAT").InnerText
+ Vta.FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
+ Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloCFD").InnerText
+ Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloSAT").InnerText
+
+ End If
+ Next
+ Else
+ Vta.FolioFiscal = "Sin Timbrar"
+ Vta.NoSerieCertificado = "Sin Timbrar"
+ Vta.SelloCFDi = "Sin Timbrar"
+ Vta.SelloSAT = "Sin Timbrar"
+ End If
+
+ 'SIN TIMBRAR - SIN XML
+ Else
+ Vta.FolioFiscal = "Sin Timbrar"
+ Vta.NoSerieCertificado = "Sin Timbrar"
+ Vta.SelloCFDi = "Sin Timbrar"
+ Vta.SelloSAT = "Sin Timbrar"
+ End If
+
+ 'DIRECCION CLIENTE
+ If Vta.CveClienteSucursal.ToEntero > 0 Then
+ 'Si cliente tiene Noint, NoExt, CP
+ SBDireccion.AppendFormat("{0}", Vta.ClienteSucursal.Direccion)
+ If Vta.ClienteSucursal.NoExt.Length > 0 Then SBDireccion.AppendFormat(", No.Ext: {0}", Vta.ClienteSucursal.NoExt)
+ If Vta.ClienteSucursal.NoInt.Length > 0 Then SBDireccion.AppendFormat(", No.Int: {0}", Vta.ClienteSucursal.NoInt)
+ If UsuarioActual.CveEmpresa <> 66 Then SBDireccion.AppendFormat(", Col: {0}", Vta.ClienteSucursal.Colonia)
+
+ If Not (UsuarioActual.CveEmpresa.Contiene(66, 81, 109) AndAlso Vta.TipoDocto = "Cot") Then
+ If Vta.ClienteSucursal.CP.Length > 0 Then SBDireccion.AppendFormat(", CP: {0} ", Vta.ClienteSucursal.CP.Trim)
+ End If
+
+ 'Si cliente tiene Local, CD, Edo, Pais
+ If Vta.ClienteSucursal.Localidad IsNot Nothing AndAlso Vta.ClienteSucursal.Localidad.Length > 0 Then SBLugar.AppendFormat("Loc: {0}, ", Vta.ClienteSucursal.Localidad)
+ If Vta.ClienteSucursal.Municipio IsNot Nothing AndAlso Vta.ClienteSucursal.Municipio.Length > 0 Then SBLugar.AppendFormat("Cd: {0}, ", Vta.ClienteSucursal.Municipio)
+ If Vta.ClienteSucursal.Estado IsNot Nothing AndAlso Vta.ClienteSucursal.Estado.Length > 0 Then SBLugar.AppendFormat(" Edo: {0}, ", Vta.ClienteSucursal.Estado)
+ If Vta.ClienteSucursal.Pais IsNot Nothing AndAlso Vta.ClienteSucursal.Pais.Length > 0 Then SBLugar.AppendFormat(" País: {0} ", Vta.ClienteSucursal.Pais)
+ Else
+ SBDireccion.AppendFormat("{0}", Vta.Cliente.Direccion)
+ If Vta.Cliente.NoExt.Length > 0 Then SBDireccion.AppendFormat(", No.Ext: {0}", Vta.Cliente.NoExt)
+ If Vta.Cliente.NoInt.Length > 0 Then SBDireccion.AppendFormat(", No.Int: {0}", Vta.Cliente.NoInt)
+ If UsuarioActual.CveEmpresa <> 66 Then SBDireccion.AppendFormat(", Col: {0}", Vta.Cliente.Colonia)
+
+ If Not (UsuarioActual.CveEmpresa.Contiene(66, 81, 109) AndAlso Vta.TipoDocto = "Cot") Then
+ If Vta.Cliente.CP.Length > 0 Then SBDireccion.AppendFormat(", CP: {0} ", Vta.Cliente.CP.Trim)
+ End If
+
+ 'Si cliente tiene Local, CD, Edo, Pais
+ If Vta.Cliente.Localidad IsNot Nothing AndAlso Vta.Cliente.Localidad.Length > 0 Then SBLugar.AppendFormat("Loc: {0}, ", Vta.Cliente.Localidad)
+ If Vta.Cliente.Ciudad IsNot Nothing AndAlso Vta.Cliente.Ciudad.Length > 0 Then SBLugar.AppendFormat("Cd: {0}, ", Vta.Cliente.Ciudad)
+ If Vta.Cliente.Estado IsNot Nothing AndAlso Vta.Cliente.Estado.Length > 0 Then SBLugar.AppendFormat(" Edo: {0}, ", Vta.Cliente.Estado)
+ If Vta.Cliente.Pais IsNot Nothing AndAlso Vta.Cliente.Pais.Length > 0 Then SBLugar.AppendFormat(" País: {0} ", Vta.Cliente.Pais)
+
+ End If
+
+ ClienteDireccion = SBDireccion.ToString
+ ClienteLugar = SBLugar.ToString
+ SBDireccion.Clear()
+ SBLugar.Clear()
+
+ 'LOGO
+ Dim LogoRuta As String = ""
+ 'POR SUCURSAL
+ LogoRuta = String.Format("{0}Formatos\Suc{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
+ If File.Exists(LogoRuta) Then
+ LogoRuta = String.Format("file://{0}Formatos\Suc{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
+ 'POR EMPRESA
+ Else
+ LogoRuta = String.Format("{0}Formatos\Logo.png", UsuarioActual.Empresa.Ruta)
+ If File.Exists(LogoRuta) Then
+ LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+ End If
+ End If
+ LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+ 'Si no tiene CBB, SE GENERA
+ If Not ImagenCBB.Exists Then
+ Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
+ CBB.GenerarCBB(UsuarioActual.Empresa.RFC, Vta.Cliente.RFC, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
+ End If
+ ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
+
+ Dim CadenaOriginals As String = "||1.0|" + Vta.FolioFiscal + "|" + Vta.FechaCertificacion.ToString("yyyy-MM-dd") + "T" + Vta.FechaCertificacion.ToString("HH:mm:ss") + "|" + Vta.SelloCFDi + "|" + Vta.NoSerieCertificado + "||"
+ If Not ImagenCBB.Exists Then ImgCBB = ""
+ Dim RutaFormato As String = ""
+
+
+ 'AQUI EMPIEZA LOS PARAMETROS
+ Try
+ Dim params = New List(Of CrystalParametro)
+
+ 'CLIENTE
+ params.Add(New CrystalParametro("ClienteCodigo", Vta.Cliente.Codigo))
+ params.Add(New CrystalParametro("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
+ params.Add(New CrystalParametro("ClienteDireccion", ClienteDireccion))
+ params.Add(New CrystalParametro("ClienteLugar", ClienteLugar))
+
+
+ 'TOTALES
+ params.Add(New CrystalParametro("SubTotal", Vta.SubTotal.ToString.FormatoNumero(2)))
+ params.Add(New CrystalParametro("Descuento", Vta.Descuento.ToString.FormatoNumero(2)))
+ params.Add(New CrystalParametro("Amortizacion", Vta.Amortizacion.ToString.FormatoNumero(2)))
+ params.Add(New CrystalParametro("SubTotal2", (Vta.SubTotal - Vta.Descuento - Vta.Amortizacion).ToString.FormatoNumero(2)))
+ params.Add(New CrystalParametro("IVA", Vta.IVA.ToString.FormatoNumero(2)))
+ params.Add(New CrystalParametro("RetIVA", Vta.RetIVA.ToString.FormatoNumero(2)))
+ params.Add(New CrystalParametro("RetISR", Vta.RetISR.ToString.FormatoNumero(2)))
+ params.Add(New CrystalParametro("Total", Vta.Total.ToString.FormatoNumero(2)))
+ params.Add(New CrystalParametro("ImporteLetra", Vta.Total.ToString.ToDouble.Texto2Letras(Vta.CveMoneda)))
+
+ 'DATOS GENERALES
+ params.Add(New CrystalParametro("Observaciones", Vta.Observaciones))
+ params.Add(New CrystalParametro("CveVendedor", Vta.CveVendedor.ToString))
+ 'params.Add(New CrystalParametro("Status", Vta.EstatusFactura))
+ params.Add(New CrystalParametro("FechaSolicitud", Vta.Fecha.ToString("dd/MMMM/yyyy"))) ' se puede omitir
+ params.Add(New CrystalParametro("Serie", Vta.Serie))
+ params.Add(New CrystalParametro("Folio", Vta.Folio.ToString))
+ params.Add(New CrystalParametro("DomicilioSucursal", DomicilioSucursal))
+ params.Add(New CrystalParametro("Vencimiento", Vta.FechaVencimiento.ToString("dd/MM/yyyy")))
+ params.Add(New CrystalParametro("FolioFiscal", Vta.FolioFiscal))
+ params.Add(New CrystalParametro("FechaCertificacion", String.Format("{0}T{1}", Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"))))
+ params.Add(New CrystalParametro("SelloCFDI", Vta.SelloCFDi))
+ params.Add(New CrystalParametro("CadenaSAT", CadenaOriginals))
+ params.Add(New CrystalParametro("SelloSAT", Vta.SelloSAT))
+
+ params.Add(New CrystalParametro("QR", ImgCBB))
+ params.Add(New CrystalParametro("ClienteRFC", Vta.Cliente.RFC))
+ params.Add(New CrystalParametro("FormaPago", Vta.FormaPagoText))
+ params.Add(New CrystalParametro("Moneda", Vta.Moneda))
+ params.Add(New CrystalParametro("TipoCambio", Vta.TipoCambio.ToString))
+ params.Add(New CrystalParametro("CondicionPago", Vta.CondicionesPagoText))
+ params.Add(New CrystalParametro("CadenaOriginal", CadenaOriginals))
+ params.Add(New CrystalParametro("SerieCertificadoSAT", Vta.NoSerieCertificado))
+ params.Add(New CrystalParametro("CertificadoContribuyente", Vta.NoSerieCertificadoContribuyente))
+ params.Add(New CrystalParametro("NumCta", Vta.NumeroCuenta))
+ params.Add(New CrystalParametro("LogoPath", LogoRuta))
+
+ 'VENDEDOR
+ Dim RowVendedor As DataRow = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
+ If Not IsNothing(RowVendedor) Then
+ params.Add(New CrystalParametro("VendedorNombre", RowVendedor("Vendedor").ToString))
+ params.Add(New CrystalParametro("VendedorMail", RowVendedor("Correo").ToString))
+ params.Add(New CrystalParametro("VendedorTelefono", RowVendedor("Telefono").ToString))
+ params.Add(New CrystalParametro("VendedorCelular", RowVendedor("Celular").ToString))
+
+ End If
+
+ params.Add(New CrystalParametro("CiudadSucursal", CiudadSucursal))
+ params.Add(New CrystalParametro("OC", Vta.Det_OrdenCompra.ToString))
+
+ If UsuarioActual.Empresa.Funcionalidad(508) = "1" Then
+ params.Add(New CrystalParametro("IEPS", Vta.IEPS.ToString.FormatoNumero(2)))
+ End If
+
+ If Vta.CveClienteSucursal > 0 Then
+ params.Add(New CrystalParametro("ClienteContactoMail", Vta.ClienteSucursal.CorreoSucursal))
+ params.Add(New CrystalParametro("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal))
+ Else
+ params.Add(New CrystalParametro("ClienteContactoMail", Vta.Cliente.MailCotizacion))
+ params.Add(New CrystalParametro("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", Vta.TelefonoGenerico, Vta.Cliente.Telefono)))
+ End If
+
+ If UsuarioActual.CveEmpresa.Contiene(17) Then
+ params.Add(New CrystalParametro("MetodoPago", Vta.ClaveMetodoPagoSAT.ToString))
+ Else
+ params.Add(New CrystalParametro("MetodoPago", Vta.MetodoPago.ToString))
+ End If
+
+
+ Select Case Vta.TipoDocto
+ Case "Ing"
+ NombreArchivo = "Factura"
+ NombreArchivoDescarga = "Factura"
+ TipoDocumento = "INGRESO"
+
+ 'GENERAL
+ params.Add(New CrystalParametro("TipoDocumento", NombreArchivoDescarga))
+ params.Add(New CrystalParametro("Tipo", TipoDocumento))
+ params.Add(New CrystalParametro("Ref", TipoDocumentoRef))
+ params.Add(New CrystalParametro("AplicaPagare", AplicaPagare))
+
+ 'VSH
+ If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122, 145) Then
+ 'DATOS CLIENTES
+ Dim ClienteRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", Vta.CveCliente.ToString))
+ Dim DatosCliente = ""
+ If ClienteRow IsNot Nothing Then
+ DatosCliente = String.Format("{0} | {1} | {2}", Vta.SubProyecto.Municipio, ClienteRow("CuentaContable"), ClienteRow("Codigo"))
+ End If
+ params.Add(New CrystalParametro("DatosClientes", DatosCliente))
+ params.Add(New CrystalParametro("Sucursal", Vta.SubProyecto.SubProyecto))
+ End If
+
+ 'COMPU, DN DIFUSA
+ If UsuarioActual.CveEmpresa.Contiene(72, 80, 119) Then
+ params.Add(New CrystalParametro("EstatusFactura", If(Vta.TipoEstatus = 5, Vta.EstatusFactura, "")))
+ params.Add(New CrystalParametro("EstatusEntrega", If(Vta.Inv_CveEstatusEntrega = 1, Vta.Inv_EstatusEntrega, "")))
+ params.Add(New CrystalParametro("PedidoContrato", Vta.PedidoContrato))
+ params.Add(New CrystalParametro("DescripcionContrato", Vta.NumeroDescripcionContrato))
+
+ params.Add(New CrystalParametro("MonedaAbreviatura", If(Vta.MonedaAbreviatura.ToString IsNot Nothing, Vta.MonedaAbreviatura.ToString, "")))
+ params.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
+ params.Add(New CrystalParametro("FechaImpresion", Now.ToDateTime.ToString))
+ params.Add(New CrystalParametro("Sucursal", Vta.SubProyecto.SubProyecto))
+
+ 'INE COMPLEMENTOS
+ If UsuarioActual.CveEmpresa.Contiene(72) Then
+ Dim INETipoProceso As String = ""
+ Dim INETipoComite As String = ""
+ Dim INEIdContabilidad As Integer = 0
+ If Vta.ComplementoINE IsNot Nothing Then
+ INETipoProceso = Vta.ComplementoINE.INETipoProceso
+ INETipoComite = Vta.ComplementoINE.INETipoComite
+ INEIdContabilidad = Vta.ComplementoINE.INEIdContabilidad
+ End If
+ params.Add(New CrystalParametro("INETipoProceso", INETipoProceso))
+ params.Add(New CrystalParametro("INETipoComite", INETipoComite))
+ params.Add(New CrystalParametro("INEIdContabilidad", INEIdContabilidad))
+ params.Add(New CrystalParametro("Referencia", Vta.Cliente.ReferenciaFiscal))
+ params.Add(New CrystalParametro("ClienteContacto", Vta.AtnA))
+ End If
+
+ 'DIRECCION ENVIO
+ If Vta.EnviarA.CveDireccionEnvio > 0 Then
+ Dim StrEnvioDi As New StringBuilder
+ StrEnvioDi.AppendFormat("{0}", Vta.EnviarA.EnvioDireccion)
+ If Vta.EnviarA.EnvioNoExt IsNot Nothing AndAlso Vta.EnviarA.EnvioNoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.EnviarA.EnvioNoExt)
+ If Vta.EnviarA.EnvioNoInt IsNot Nothing AndAlso Vta.EnviarA.EnvioNoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.EnviarA.EnvioNoInt)
+
+ params.Add(New CrystalParametro("EnvioDireccion", StrEnvioDi.ToString))
+ params.Add(New CrystalParametro("EnvioNoExt", Vta.EnviarA.EnvioNoExt))
+ params.Add(New CrystalParametro("EnvioNoInt", Vta.EnviarA.EnvioNoInt))
+ params.Add(New CrystalParametro("EnvioColonia", Vta.EnviarA.EnvioColonia))
+ params.Add(New CrystalParametro("EnvioCiudad", Vta.EnviarA.EnvioCiudad))
+ params.Add(New CrystalParametro("EnvioEstado", Vta.EnviarA.EnvioEstado))
+ params.Add(New CrystalParametro("EnvioContacto", Vta.EnviarA.EnvioContacto))
+ params.Add(New CrystalParametro("EnvioDepartamento", Vta.EnviarA.EnvioDepartamento))
+ params.Add(New CrystalParametro("EnvioCP", Vta.EnviarA.EnvioCP))
+ Else
+ If Vta.CveClienteSucursal.ToEntero > 0 Then
+ Dim StrEnvioDi As New StringBuilder
+ StrEnvioDi.AppendFormat("{0}", Vta.ClienteSucursal.Direccion)
+ If Vta.ClienteSucursal.NoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.ClienteSucursal.NoExt)
+ If Vta.ClienteSucursal.NoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.ClienteSucursal.NoInt)
+ params.Add(New CrystalParametro("EnvioDireccion", StrEnvioDi.ToString))
+ params.Add(New CrystalParametro("EnvioColonia", If(Vta.ClienteSucursal.Colonia.Length > 0, Vta.ClienteSucursal.Colonia, "")))
+ params.Add(New CrystalParametro("EnvioCiudad", If(Vta.ClienteSucursal.Municipio.Length > 0, Vta.ClienteSucursal.Municipio, "")))
+ params.Add(New CrystalParametro("EnvioEstado", If(Vta.ClienteSucursal.Estado.Length > 0, Vta.ClienteSucursal.Estado, "")))
+ params.Add(New CrystalParametro("EnvioCP", If(Vta.ClienteSucursal.CP.Length > 0, Vta.ClienteSucursal.CP, "")))
+ Else
+ Dim StrEnvioDi As New StringBuilder
+ StrEnvioDi.AppendFormat("{0}", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, ""))
+ If Vta.Cliente.NoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.Cliente.NoExt)
+ If Vta.Cliente.NoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.Cliente.NoInt)
+ params.Add(New CrystalParametro("EnvioDireccion", StrEnvioDi.ToString))
+ params.Add(New CrystalParametro("EnvioColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
+ params.Add(New CrystalParametro("EnvioCiudad", If(Vta.Cliente.Localidad IsNot Nothing And Vta.Cliente.Localidad.Length > 0, Vta.Cliente.Localidad, "")))
+ params.Add(New CrystalParametro("EnvioEstado", If(Vta.Cliente.Estado.Length > 0, Vta.Cliente.Estado, "")))
+ params.Add(New CrystalParametro("EnvioCP", If(Vta.Cliente.CP.Length > 0, Vta.Cliente.CP, "")))
+ End If
+
+ End If
+
+ 'CLIENTE SUCURSAL
+ If Vta.CveClienteSucursal.ToEntero > 0 Then
+ params.Add(New CrystalParametro("ClienteCalle", If(Vta.ClienteSucursal.Direccion.Length > 0, Vta.ClienteSucursal.Direccion, "")))
+ params.Add(New CrystalParametro("ClienteColonia", If(Vta.ClienteSucursal.Colonia.Length > 0, Vta.ClienteSucursal.Colonia, "")))
+ params.Add(New CrystalParametro("ClienteCiudad", If(Vta.ClienteSucursal.Localidad IsNot Nothing And Vta.ClienteSucursal.Localidad.Length > 0, Vta.ClienteSucursal.Localidad, "")))
+ params.Add(New CrystalParametro("ClienteMunicipio", If(Vta.ClienteSucursal.Municipio.Length > 0, Vta.ClienteSucursal.Municipio, "")))
+ params.Add(New CrystalParametro("ClienteEstado", If(Vta.ClienteSucursal.Estado.Length > 0, Vta.ClienteSucursal.Estado, "")))
+ params.Add(New CrystalParametro("ClienteCP", If(Vta.ClienteSucursal.CP.Length > 0, Vta.ClienteSucursal.CP, "")))
+ params.Add(New CrystalParametro("ClienteNoInt", If(Vta.ClienteSucursal.NoInt.Length > 0, Vta.ClienteSucursal.NoInt, "")))
+ params.Add(New CrystalParametro("ClienteNoExt", If(Vta.ClienteSucursal.NoExt.Length > 0, Vta.ClienteSucursal.NoExt, "")))
+ params.Add(New CrystalParametro("ClientePais", If(Vta.ClienteSucursal.Pais.Length > 0, Vta.ClienteSucursal.Pais, "")))
+ Else
+ params.Add(New CrystalParametro("ClienteCalle", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, "")))
+ params.Add(New CrystalParametro("ClienteColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
+ params.Add(New CrystalParametro("ClienteCiudad", If(Vta.Cliente.Localidad IsNot Nothing And Vta.Cliente.Localidad.Length > 0, Vta.Cliente.Localidad, "")))
+ params.Add(New CrystalParametro("ClienteMunicipio", If(Vta.Cliente.Ciudad.Length > 0, Vta.Cliente.Ciudad, "")))
+ params.Add(New CrystalParametro("ClienteEstado", If(Vta.Cliente.Estado.Length > 0, Vta.Cliente.Estado, "")))
+ params.Add(New CrystalParametro("ClienteCP", If(Vta.Cliente.CP.Length > 0, Vta.Cliente.CP, "")))
+ params.Add(New CrystalParametro("ClienteNoInt", If(Vta.Cliente.NoInt.Length > 0, Vta.Cliente.NoInt, "")))
+ params.Add(New CrystalParametro("ClienteNoExt", If(Vta.Cliente.NoExt.Length > 0, Vta.Cliente.NoExt, "")))
+ params.Add(New CrystalParametro("ClientePais", If(Vta.Cliente.Pais.Length > 0, Vta.Cliente.Pais, "")))
+ End If
+ End If
+
+ RutaFormato = String.Format("{0}Formatos\{1}.mrt", UsuarioActual.Empresa.Ruta, NombreArchivo)
+
+ Case "Egs"
+ If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
+ NombreArchivo = "NotaCredito"
+ Else
+ NombreArchivo = "Factura"
+ End If
+ NombreArchivoDescarga = "Nota de Crédito"
+ TipoDocumento = "EGRESO"
+ TipoDocumentoRef = String.Format(": Ref.:{0}", Vta.RefDocto)
+ AplicaPagare = "0"
+
+ 'GENERAL
+ params.Add(New CrystalParametro("TipoDocumento", NombreArchivoDescarga))
+ params.Add(New CrystalParametro("Tipo", TipoDocumento))
+ params.Add(New CrystalParametro("Ref", TipoDocumentoRef))
+ params.Add(New CrystalParametro("AplicaPagare", AplicaPagare))
+ params.Add(New CrystalParametro("Fecha", String.Format("{0}T{1}", Vta.Fecha.ToString("yyyy-MM-dd"), Vta.Fecha.ToString("HH:mm:ss"))))
+
+ 'ALAN YEPIZ
+ If UsuarioActual.CveEmpresa.Contiene(123) Then
+ params.Add(New CrystalParametro("DiaExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Day)))
+ params.Add(New CrystalParametro("MesExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Month)))
+ params.Add(New CrystalParametro("AñoExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Year)))
+ End If
+
+ 'COMPU, DN DIFUSA
+ If UsuarioActual.CveEmpresa.Contiene(72, 80, 119) Then
+ params.Add(New CrystalParametro("EstatusFactura", If(Vta.TipoEstatus = 5, Vta.EstatusFactura, "")))
+ params.Add(New CrystalParametro("EstatusEntrega", If(Vta.Inv_CveEstatusEntrega = 1, Vta.Inv_EstatusEntrega, "")))
+ params.Add(New CrystalParametro("PedidoContrato", Vta.PedidoContrato))
+
+ params.Add(New CrystalParametro("MonedaAbreviatura", If(Vta.MonedaAbreviatura.ToString IsNot Nothing, Vta.MonedaAbreviatura.ToString, "")))
+ params.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
+ params.Add(New CrystalParametro("FechaImpresion", Now.ToDateTime.ToString))
+ params.Add(New CrystalParametro("Sucursal", Vta.SubProyecto.SubProyecto))
+
+ 'CLIENTE SUCURSAL
+ If Vta.CveClienteSucursal.ToEntero > 0 Then
+ params.Add(New CrystalParametro("ClienteCalle", If(Vta.ClienteSucursal.Direccion.Length > 0, Vta.ClienteSucursal.Direccion, "")))
+ params.Add(New CrystalParametro("ClienteColonia", If(Vta.ClienteSucursal.Colonia.Length > 0, Vta.ClienteSucursal.Colonia, "")))
+ params.Add(New CrystalParametro("ClienteCiudad", If(Vta.ClienteSucursal.Localidad IsNot Nothing And Vta.ClienteSucursal.Localidad.Length > 0, Vta.ClienteSucursal.Localidad, "")))
+ params.Add(New CrystalParametro("ClienteMunicipio", If(Vta.ClienteSucursal.Municipio.Length > 0, Vta.ClienteSucursal.Municipio, "")))
+ params.Add(New CrystalParametro("ClienteEstado", If(Vta.ClienteSucursal.Estado.Length > 0, Vta.ClienteSucursal.Estado, "")))
+ params.Add(New CrystalParametro("ClienteCP", If(Vta.ClienteSucursal.CP.Length > 0, Vta.ClienteSucursal.CP, "")))
+ params.Add(New CrystalParametro("ClienteNoInt", If(Vta.ClienteSucursal.NoInt.Length > 0, Vta.ClienteSucursal.NoInt, "")))
+ params.Add(New CrystalParametro("ClienteNoExt", If(Vta.ClienteSucursal.NoExt.Length > 0, Vta.ClienteSucursal.NoExt, "")))
+ params.Add(New CrystalParametro("ClientePais", If(Vta.ClienteSucursal.Pais.Length > 0, Vta.ClienteSucursal.Pais, "")))
+ Else
+ params.Add(New CrystalParametro("ClienteCalle", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, "")))
+ params.Add(New CrystalParametro("ClienteColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
+ params.Add(New CrystalParametro("ClienteCiudad", If(Vta.Cliente.Localidad IsNot Nothing And Vta.Cliente.Localidad.Length > 0, Vta.Cliente.Localidad, "")))
+ params.Add(New CrystalParametro("ClienteMunicipio", If(Vta.Cliente.Ciudad.Length > 0, Vta.Cliente.Ciudad, "")))
+ params.Add(New CrystalParametro("ClienteEstado", If(Vta.Cliente.Estado.Length > 0, Vta.Cliente.Estado, "")))
+ params.Add(New CrystalParametro("ClienteCP", If(Vta.Cliente.CP.Length > 0, Vta.Cliente.CP, "")))
+ params.Add(New CrystalParametro("ClienteNoInt", If(Vta.Cliente.NoInt.Length > 0, Vta.Cliente.NoInt, "")))
+ params.Add(New CrystalParametro("ClienteNoExt", If(Vta.Cliente.NoExt.Length > 0, Vta.Cliente.NoExt, "")))
+ params.Add(New CrystalParametro("ClientePais", If(Vta.Cliente.Pais.Length > 0, Vta.Cliente.Pais, "")))
+ End If
+ End If
+
+
+ RutaFormato = String.Format("{0}Formatos\{1}.mrt", UsuarioActual.Empresa.Ruta, "Factura")
+ Case Else
+ NombreArchivo = ""
+ TipoDocumento = ""
+ End Select
+ If NombreArchivo = "" Then
+ GuardaLog("No se especifico el tipo de Impresion de venta (Venta, Remision, Cotización, Nota de Crédito).")
+ Exit Sub
+ End If
+ 'TERMINA REGION PARAMETROS
+
+ Dim lrds As New List(Of ReportDataSource)
+ 'Si es ECLIPSE CREAR COLUMAS PARA FIRMAS EN DtDetalle.
+ If UsuarioActual.CveEmpresa.Contiene(1, 15, 17, 71, 76, 125) Then
+ Dim DtDetalleFirmas As New DataTable
+ DtDetalleFirmas.TableName = "DetalleFirma"
+ DtDetalleFirmas = Vta.DtDetalle.Copy()
+
+ 'SI NO TIENE LAS COLUMNAS DE FIRMAS LAS CREA.
+ If Not DtDetalleFirmas.Columns.Contains("Titulo") Then
+ DtDetalleFirmas.Columns.Add("Titulo", GetType(String))
+ DtDetalleFirmas.Columns.Add("Nombre", GetType(String))
+ DtDetalleFirmas.Columns.Add("Puesto", GetType(String))
+ DtDetalleFirmas.Columns.Add("Lado", GetType(Integer))
+ End If
+
+ 'Se llenan los Rows de las columnas con los datos del DtFirmas
+ For i As Integer = 0 To Vta.DtFirmas.Rows.Count - 1
+ 'Si DtDetalle es menor al DtFirmas, crea un nuevo Row en DtDetalle y le asigna valor, Si no solo asigna valor
+ If DtDetalleFirmas.Rows.Count < i + 1 Then
+ Dim Dr = DtDetalleFirmas.NewRow
+ Dr("Titulo") = Vta.DtFirmas(i)("Titulo").ToString
+ Dr("Nombre") = Vta.DtFirmas(i)("Nombre").ToString
+ Dr("Puesto") = Vta.DtFirmas(i)("Puesto").ToString
+ Dr("Lado") = Vta.DtFirmas(i)("Lado").ToString.ToEntero
+ DtDetalleFirmas.Rows.Add(Dr)
+ Else
+ DtDetalleFirmas(i)("Titulo") = Vta.DtFirmas(i)("Titulo").ToString
+ DtDetalleFirmas(i)("Nombre") = Vta.DtFirmas(i)("Nombre").ToString
+ DtDetalleFirmas(i)("Puesto") = Vta.DtFirmas(i)("Puesto").ToString
+ DtDetalleFirmas(i)("Lado") = Vta.DtFirmas(i)("Lado").ToString.ToEntero
+ End If
+ Next i
+
+ Dim rds As New ReportDataSource With {.Name = "DsOC", .Value = DtDetalleFirmas}
+ lrds.Add(rds)
+ Else
+ Dim rds As New ReportDataSource With {.Name = "DsOC", .Value = Vta.DtDetalle}
+ lrds.Add(rds)
+ End If
+
+ Dim rds1 As New ReportDataSource With {.Name = "DataSet1", .Value = If(Vta.DtDeduccion IsNot Nothing, Vta.DtDeduccion, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
+ lrds.Add(rds1)
+
+ 'DETALLE FIRMAS
+
+ Dim rds2 As New ReportDataSource With {.Name = "DataSet2", .Value = If(Vta.DtFirmas IsNot Nothing, Vta.DtFirmas, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
+ lrds.Add(rds2)
+
+ Dim Archivo As New System.IO.FileInfo(RutaFormato)
+
+ Dim DataSet As New DataSet
+ Vta.DtDetalle.TableName = "Datos"
+ Vta.DtDeduccion.TableName = "Deduccion"
+ DataSet.Tables.Add(Vta.DtDetalle.Copy)
+ DataSet.Tables.Add(Vta.DtDeduccion.Copy)
+
+ If Archivo.Exists Then
+
+
+ ImprimirbytesPDF(ImprimirPDFPyME(RutaFormato, DataSet, params, NombreArchivo, "PDF", MR:=Nothing), "Factura")
+ Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio))
+ If Not ArchivoPDF.Exists Then
+ Try
+ DirectoryExistsCreate(String.Format("{0}PDF", UsuarioActual.Empresa.Ruta))
+ DirectoryExistsCreate(String.Format("{0}PDF\{1}", UsuarioActual.Empresa.Ruta, Vta.TipoDocto))
+ File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
+ Catch ex As Exception
+ Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
+ End Try
+ Else
+ Try
+ ArchivoPDF.Delete()
+ File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
+ Catch ex As Exception
+ Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
+ End Try
+ End If
+ Else
+ params.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
+ params.Add(New CrystalParametro("RFC", UsuarioActual.Empresa.RFC))
+ ImprimirbytesPDF(ImprimirPDFPyME(RutaFormato, DataSet, params, NombreArchivo, "PDF", MR:=Nothing), "Factura")
+ End If
+
+
+ Catch ex As Exception
+ GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
+ End Try
+ End Sub
+ Protected Function PdfFactura(ByRef Vta As Modelos.Factura, Optional AplicaPagare As String = "0", Optional Guardar As Boolean = True) As Byte()
+ Dim retorno As Byte() = Nothing
+
+ ' Dim ObjVentas As New ClsVentas
+
+ 'DATOS GENERALES
+ Dim Ruta As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{UsuarioActual.CveEmpresa}\"
+ Dim PathXML As String = $"{Ruta}XML\{Vta.TipoDocto}\{Vta.SerieFolio}.xml"
+ Dim NombreArchivo As String = ""
+ Dim NombreArchivoDescarga As String = ""
+ Dim TipoDocumento As String = ""
+ Dim TipoDocumentoRef As String = ""
+
+
+ Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
+ Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
+ Dim ImgCBB As String '= String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
+
+ Dim ImagenPath = String.Format("{0}Formatos\Suc{1}\logo.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
+ Dim Logo As New System.IO.FileInfo(ImagenPath)
+ Dim ImgLogo = New Uri(String.Format("{0}Empresas/{1}/Formatos/Suc{2}.png", UrlSitio, UsuarioActual.CveEmpresa, Vta.CveSucursal)).AbsoluteUri
+
+ Dim SBDomicilioSucursal As New StringBuilder()
+ Dim CiudadSucursal As String = String.Format("{0},{1}", Vta.SubProyecto.Municipio, Vta.SubProyecto.Estado)
+ Dim DomicilioSucursal As String = ""
+
+ SBDomicilioSucursal.AppendFormat("{0}", Vta.SubProyecto.Calle)
+ If Vta.SubProyecto.NoExt.Length > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", Vta.SubProyecto.NoExt)
+ If Vta.SubProyecto.NoInt.Length > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", Vta.SubProyecto.NoInt)
+ If Vta.SubProyecto.Colonia.Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", Vta.SubProyecto.Colonia)
+ If Vta.SubProyecto.CP.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", Vta.SubProyecto.CP)
+ If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
+ If Vta.SubProyecto.Pais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", Vta.SubProyecto.Pais)
+ If Not String.IsNullOrEmpty(Vta.SubProyecto.Telefono) AndAlso UsuarioActual.CveEmpresa = 141 Then SBDomicilioSucursal.AppendFormat(", Tel: {0}", Vta.SubProyecto.Telefono)
+
+ DomicilioSucursal = SBDomicilioSucursal.ToString
+
+ Dim Fecha As String = Vta.Fecha.ToShortDateString
+
+ Dim SBDireccion As New StringBuilder()
+ Dim SBLugar As New StringBuilder()
+ Dim ClienteDireccion As String
+ Dim ClienteLugar As String
+ Vta.FolioFiscal = "Sin Timbrar"
+ Vta.NoSerieCertificado = "Sin Timbrar"
+ Vta.SelloCFDi = "Sin Timbrar"
+ Vta.SelloSAT = "Sin Timbrar"
+
+ 'SI ESTA TIMBRADA - CON XML
+ If File.Exists(PathXML) AndAlso Vta.Serie <> "VistaPrevia" Then 'Cuando es vista previe y coincide la serie y folio se ponen los datos fiscales
+ Dim XmlDoc As New System.Xml.XmlDocument
+
+ Dim EsXMLValido = False
+ Try
+ XmlDoc.Load(PathXML)
+ EsXMLValido = True
+ Catch ex As Exception
+ GuardaLog(" --- *** Impresion ventas - ClsPaginas LN#5016 (Aprox) - EXISTE EL XML PERO NO SE PUEDE LEER. *** --- ")
+ End Try
+
+ If EsXMLValido Then
+ Dim TC As Decimal = 1
+ Try
+ TC = XmlDoc.DocumentElement.Attributes("TipoCambio").InnerText.ToDecimal
+ Catch ex As Exception
+ TC = 1
+ End Try
+ If ValorNodoXML(XmlDoc.DocumentElement, "version") = "3.3" Then
+ Vta.FechaEmision = ValorNodoXML(XmlDoc.DocumentElement, "fecha").ToDate
+ Vta.NoSerieCertificadoContribuyente = ValorNodoXML(XmlDoc.DocumentElement, "NoCertificado")
+
+ Dim validaElemento = XmlDoc.DocumentElement("cfdi:Complemento")
+
+ If Not IsNothing(validaElemento) Then
+ For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1
+ If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
+ Vta.FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
+ Vta.NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("NoCertificadoSAT").InnerText
+ Vta.FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
+ Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText
+ Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText
+ End If
+ Next
+
+ End If
+ Else
+ Vta.FechaEmision = XmlDoc.DocumentElement.Attributes("fecha").InnerText.ToDate
+ Vta.NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("noCertificado").InnerText
+
+ Dim validaElemento = XmlDoc.DocumentElement("cfdi:Complemento")
+
+ If Not IsNothing(validaElemento) Then
+ For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1
+ If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
+ Vta.FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
+ Vta.NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("noCertificadoSAT").InnerText
+ Vta.FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
+ Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloCFD").InnerText
+ Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloSAT").InnerText
+
+ End If
+ Next
+ End If
+
+ End If
+ End If
+
+
+ End If
+
+ 'DIRECCION CLIENTE
+ If Vta.CveClienteSucursal.ToEntero > 0 Then
+ 'Si cliente tiene Noint, NoExt, CP
+ SBDireccion.AppendFormat("{0}", Vta.ClienteSucursal.Direccion)
+ If Vta.ClienteSucursal.NoExt.Length > 0 Then SBDireccion.AppendFormat(", No.Ext: {0}", Vta.ClienteSucursal.NoExt)
+ If Vta.ClienteSucursal.NoInt.Length > 0 Then SBDireccion.AppendFormat(", No.Int: {0}", Vta.ClienteSucursal.NoInt)
+ If UsuarioActual.CveEmpresa <> 66 Then SBDireccion.AppendFormat(", Col: {0}", Vta.ClienteSucursal.Colonia)
+
+ If Not (UsuarioActual.CveEmpresa.Contiene(66, 81, 109) AndAlso Vta.TipoDocto = "Cot") Then
+ If Vta.ClienteSucursal.CP.Length > 0 Then SBDireccion.AppendFormat(", CP: {0} ", Vta.ClienteSucursal.CP.Trim)
+ End If
+
+ 'Si cliente tiene Local, CD, Edo, Pais
+ If Vta.ClienteSucursal.Localidad IsNot Nothing AndAlso Vta.ClienteSucursal.Localidad.Length > 0 Then SBLugar.AppendFormat("Loc: {0}, ", Vta.ClienteSucursal.Localidad)
+ If Vta.ClienteSucursal.Municipio IsNot Nothing AndAlso Vta.ClienteSucursal.Municipio.Length > 0 Then SBLugar.AppendFormat("Cd: {0}, ", Vta.ClienteSucursal.Municipio)
+ If Vta.ClienteSucursal.Estado IsNot Nothing AndAlso Vta.ClienteSucursal.Estado.Length > 0 Then SBLugar.AppendFormat(" Edo: {0}, ", Vta.ClienteSucursal.Estado)
+ If Vta.ClienteSucursal.Pais IsNot Nothing AndAlso Vta.ClienteSucursal.Pais.Length > 0 Then SBLugar.AppendFormat(" País: {0} ", Vta.ClienteSucursal.Pais)
+ ElseIf Vta.CveCliente.ToEntero > 0 Then
+ SBDireccion.AppendFormat("{0}", Vta.Cliente.Direccion)
+ If Vta.Cliente.NoExt.Length > 0 Then SBDireccion.AppendFormat(", No.Ext: {0}", Vta.Cliente.NoExt)
+ If Vta.Cliente.NoInt.Length > 0 Then SBDireccion.AppendFormat(", No.Int: {0}", Vta.Cliente.NoInt)
+ If UsuarioActual.CveEmpresa <> 66 Then SBDireccion.AppendFormat(", Col: {0}", Vta.Cliente.Colonia)
+
+ If Not (UsuarioActual.CveEmpresa.Contiene(66, 81, 109) AndAlso Vta.TipoDocto = "Cot") Then
+ If Vta.Cliente.CP.Length > 0 Then SBDireccion.AppendFormat(", CP: {0} ", Vta.Cliente.CP.Trim)
+ End If
+
+ 'Si cliente tiene Local, CD, Edo, Pais
+ If Vta.Cliente.Localidad IsNot Nothing AndAlso Vta.Cliente.Localidad.Length > 0 Then SBLugar.AppendFormat("Loc: {0}, ", Vta.Cliente.Localidad)
+ If Vta.Cliente.Ciudad IsNot Nothing AndAlso Vta.Cliente.Ciudad.Length > 0 Then SBLugar.AppendFormat("Cd: {0}, ", Vta.Cliente.Ciudad)
+ If Vta.Cliente.Estado IsNot Nothing AndAlso Vta.Cliente.Estado.Length > 0 Then SBLugar.AppendFormat(" Edo: {0}, ", Vta.Cliente.Estado)
+ If Vta.Cliente.Pais IsNot Nothing AndAlso Vta.Cliente.Pais.Length > 0 Then SBLugar.AppendFormat(" País: {0} ", Vta.Cliente.Pais)
+
+ End If
+
+ ClienteDireccion = SBDireccion.ToString
+ ClienteLugar = SBLugar.ToString
+ SBDireccion.Clear()
+ SBLugar.Clear()
+
+ 'LOGO
+ Dim LogoRuta As String = ""
+ 'POR SUCURSAL
+ LogoRuta = String.Format("{0}Formatos\Suc{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
+ If File.Exists(LogoRuta) Then
+ LogoRuta = String.Format("file://{0}Formatos\Suc{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
+ 'POR EMPRESA
+ Else
+ LogoRuta = String.Format("{0}Formatos\Logo.png", UsuarioActual.Empresa.Ruta)
+ If File.Exists(LogoRuta) Then
+ LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+ End If
+ End If
+
+ 'Si no tiene CBB, SE GENERA
+ If Not ImagenCBB.Exists AndAlso Vta.CveCliente.ToEntero > 0 Then
+ Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
+ CBB.GenerarCBB(UsuarioActual.Empresa.RFC, Vta.Cliente.RFC, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
+ End If
+ ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
+
+ 'Dim CadenaOriginals As String = "||1.0|" + Vta.FolioFiscal + "|" + Vta.FechaCertificacion.ToString("yyyy-MM-dd") + "T" + Vta.FechaCertificacion.ToString("HH:mm:ss") + "|" + Vta.SelloCFDi + "|" + Vta.NoSerieCertificado + "||"
+ Dim CadenaOriginals As String = String.Format("||{0}|{1}|{2}T{3}|{4}|{5}||", If(Vta.Version = "3.3", "1.1", "1.0"), Vta.FolioFiscal, Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"), Vta.SelloCFDi, Vta.NoSerieCertificado)
+ If Not ImagenCBB.Exists Then ImgCBB = ""
+ Dim RutaFormato As String = ""
+ Dim RutaFormatoDefault As String = ""
+
+ 'AQUI EMPIEZA LOS PARAMETROS
+ Try
+ Dim params As New List(Of ReportParameter)
+
+
+ 'CLIENTE
+ If Vta.CveCliente.ToEntero > 0 Then
+ params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo))
+ params.Add(New ReportParameter("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
+ params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion))
+ params.Add(New ReportParameter("ClienteLugar", ClienteLugar))
+ params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC))
+ End If
+
+ 'TOTALES
+ params.Add(New ReportParameter("SubTotal", Vta.SubTotal.ToString.FormatoNumero(2)))
+ params.Add(New ReportParameter("Descuento", Vta.Descuento.ToString.FormatoNumero(2)))
+ params.Add(New ReportParameter("Amortizacion", Vta.Amortizacion.ToString.FormatoNumero(2)))
+ params.Add(New ReportParameter("SubTotal2", (Vta.SubTotal - Vta.Descuento - Vta.Amortizacion).ToString.FormatoNumero(2)))
+ params.Add(New ReportParameter("IVA", Vta.IVA.ToString.FormatoNumero(2)))
+ params.Add(New ReportParameter("RetIVA", Vta.RetIVA.ToString.FormatoNumero(2)))
+ params.Add(New ReportParameter("RetISR", Vta.RetISR.ToString.FormatoNumero(2)))
+ params.Add(New ReportParameter("Total", Vta.Total.ToString.FormatoNumero(2)))
+ params.Add(New ReportParameter("ImporteLetra", Vta.Total.ToString.ToDouble.Texto2Letras(Vta.CveMoneda)))
+
+ 'DATOS GENERALES
+
+
+
+ 'params.Add(New ReportParameter("CP", UsuarioActual.Empresa.CP.ToString))
+ params.Add(New ReportParameter("Observaciones", Vta.Observaciones))
+ params.Add(New ReportParameter("CveVendedor", Vta.CveVendedor.ToString))
+ params.Add(New ReportParameter("Status", Vta.EstatusFactura))
+ params.Add(New ReportParameter("FechaSolicitud", Vta.Fecha.ToString("dd/MMMM/yyyy"))) ' se puede omitir
+ params.Add(New ReportParameter("Serie", Vta.Serie))
+ params.Add(New ReportParameter("Folio", Vta.Folio.ToString))
+ params.Add(New ReportParameter("DomicilioSucursal", DomicilioSucursal))
+ params.Add(New ReportParameter("Vencimiento", Vta.FechaVencimiento.ToString("dd/MM/yyyy")))
+ params.Add(New ReportParameter("FolioFiscal", Vta.FolioFiscal))
+ params.Add(New ReportParameter("FechaCertificacion", String.Format("{0}T{1}", Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"))))
+ params.Add(New ReportParameter("SelloCFDI", Vta.SelloCFDi))
+ params.Add(New ReportParameter("CadenaSAT", CadenaOriginals))
+ params.Add(New ReportParameter("SelloSAT", Vta.SelloSAT))
+
+ params.Add(New ReportParameter("QR", ImgCBB))
+ params.Add(New ReportParameter("Moneda", Vta.Moneda))
+ params.Add(New ReportParameter("TipoCambio", Vta.TipoCambio.ToString))
+ params.Add(New ReportParameter("CondicionPago", Vta.CondicionesPagoText))
+ params.Add(New ReportParameter("CadenaOriginal", CadenaOriginals))
+ params.Add(New ReportParameter("SerieCertificadoSAT", Vta.NoSerieCertificado))
+ params.Add(New ReportParameter("CertificadoContribuyente", Vta.NoSerieCertificadoContribuyente))
+ params.Add(New ReportParameter("NumCta", Vta.NumeroCuenta))
+ params.Add(New ReportParameter("LogoPath", LogoRuta))
+ params.Add(New ReportParameter("CiudadSucursal", CiudadSucursal))
+ params.Add(New ReportParameter("OC", Vta.Det_OrdenCompra.ToString))
+ params.Add(New ReportParameter("ClienteDiasCredito", "0"))
+ params.Add(New ReportParameter("MonedaAbreviatura", If(Vta.MonedaAbreviatura.ToString IsNot Nothing, Vta.MonedaAbreviatura.ToString, "")))
+ params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
+ params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
+ params.Add(New ReportParameter("Sucursal", Vta.SubProyecto.SubProyecto))
+ params.Add(New ReportParameter("EstatusFactura", If(Vta.TipoEstatus = 5, Vta.EstatusFactura, "")))
+ params.Add(New ReportParameter("EstatusEntrega", If(Vta.Inv_CveEstatusEntrega = 1, Vta.Inv_EstatusEntrega, "")))
+ params.Add(New ReportParameter("PedidoContrato", Vta.PedidoContrato))
+ params.Add(New ReportParameter("OrdenCompra", Vta.OrdenCompra))
+ params.Add(New ReportParameter("DescripcionContrato", Vta.NumeroDescripcionContrato))
+ params.Add(New ReportParameter("Contrato", Vta.NumeroContrato))
+ params.Add(New ReportParameter("Fecha", String.Format("{0}T{1}", Vta.Fecha.ToString("yyyy-MM-dd"), Vta.Fecha.ToString("HH:mm:ss"))))
+
+ 'VENDEDOR
+ Dim VendedorNombre As String = ""
+ Dim VendedorMail As String = ""
+ Dim VendedorTelefono As String = ""
+ Dim VendedorCelular As String = ""
+ Dim RowVendedor As DataRow = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
+ If Not IsNothing(RowVendedor) Then
+ VendedorNombre = RowVendedor("Vendedor").ToString
+ VendedorMail = RowVendedor("Correo").ToString
+ VendedorTelefono = RowVendedor("Telefono").ToString
+ VendedorCelular = RowVendedor("Celular").ToString
+ End If
+ params.Add(New ReportParameter("VendedorNombre", VendedorNombre))
+ params.Add(New ReportParameter("VendedorMail", VendedorMail))
+ params.Add(New ReportParameter("VendedorTelefono", VendedorTelefono))
+ params.Add(New ReportParameter("VendedorCelular", VendedorCelular))
+
+ If UsuarioActual.Empresa.Funcionalidad(508) = "1" Then
+ params.Add(New ReportParameter("IEPS", Vta.IEPS.ToString.FormatoNumero(2)))
+ End If
+
+ If Vta.CveClienteSucursal > 0 Then
+ params.Add(New ReportParameter("ClienteContactoMail", Vta.ClienteSucursal.CorreoSucursal))
+ params.Add(New ReportParameter("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal))
+ ElseIf Vta.CveCliente.ToEntero > 0 Then
+ params.Add(New ReportParameter("ClienteContactoMail", Vta.Cliente.MailCotizacion))
+ params.Add(New ReportParameter("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", Vta.TelefonoGenerico, Vta.Cliente.Telefono)))
+ End If
+
+ If UsuarioActual.CveEmpresa.Contiene(17) Then
+ params.Add(New ReportParameter("MetodoPago", Vta.ClaveMetodoPagoSAT.ToString))
+ End If
+
+ If Vta.Version = "3.3" Then
+ params.Add(New ReportParameter("FormaPago", Vta.FormaPago33.ToString))
+ params.Add(New ReportParameter("MetodoPago", Vta.MetodoPago33.ToString))
+ params.Add(New ReportParameter("UsoCFDI", Vta.UsoCFDI))
+ If Vta.TipoDocto.Contiene("Ing", "Egs", "Ant", "Dev") Then
+ params.Add(New ReportParameter("TipoRelacionTexto", If(Vta.Timbre.CFDIRelacionados.TipoRelacionTexto Is Nothing, "", Vta.Timbre.CFDIRelacionados.TipoRelacionTexto)))
+ params.Add(New ReportParameter("FolioFiscalRelacionado", If(Vta.Timbre.CFDIRelacionados.UUID.Count = 0, "", Vta.Timbre.CFDIRelacionados.UUID.Item(0))))
+ End If
+ Else
+ params.Add(New ReportParameter("FormaPago", Vta.FormaPagoText))
+ params.Add(New ReportParameter("MetodoPago", Vta.MetodoPago.ToString))
+ End If
+
+ 'DIRECCION ENVIO
+ If Vta.EnviarA IsNot Nothing AndAlso Vta.EnviarA.CveDireccionEnvio > 0 Then
+ Dim StrEnvioDi As New StringBuilder
+ StrEnvioDi.AppendFormat("{0}", Vta.EnviarA.EnvioDireccion)
+ If Vta.EnviarA.EnvioNoExt IsNot Nothing AndAlso Vta.EnviarA.EnvioNoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.EnviarA.EnvioNoExt)
+ If Vta.EnviarA.EnvioNoInt IsNot Nothing AndAlso Vta.EnviarA.EnvioNoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.EnviarA.EnvioNoInt)
+
+ params.Add(New ReportParameter("EnvioDireccion", StrEnvioDi.ToString))
+ params.Add(New ReportParameter("EnvioNoExt", Vta.EnviarA.EnvioNoExt))
+ params.Add(New ReportParameter("EnvioNoInt", Vta.EnviarA.EnvioNoInt))
+ params.Add(New ReportParameter("EnvioColonia", Vta.EnviarA.EnvioColonia))
+ params.Add(New ReportParameter("EnvioCiudad", Vta.EnviarA.EnvioCiudad))
+ params.Add(New ReportParameter("EnvioEstado", Vta.EnviarA.EnvioEstado))
+ params.Add(New ReportParameter("EnvioContacto", Vta.EnviarA.EnvioContacto))
+ params.Add(New ReportParameter("EnvioDepartamento", Vta.EnviarA.EnvioDepartamento))
+ params.Add(New ReportParameter("EnvioCP", Vta.EnviarA.EnvioCP))
+ If Vta.CveEmpresa = 72 Then
+ params.Add(New ReportParameter("EnvioTel", Vta.EnviarA.EnvioTel))
+ End If
+ ElseIf Vta.CveCliente.ToEntero > 0 Then
+ If Vta.CveClienteSucursal.ToEntero > 0 Then
+ Dim StrEnvioDi As New StringBuilder
+ StrEnvioDi.AppendFormat("{0}", Vta.ClienteSucursal.Direccion)
+ If Vta.ClienteSucursal.NoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.ClienteSucursal.NoExt)
+ If Vta.ClienteSucursal.NoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.ClienteSucursal.NoInt)
+ params.Add(New ReportParameter("EnvioDireccion", StrEnvioDi.ToString))
+ params.Add(New ReportParameter("EnvioNoExt", Vta.ClienteSucursal.NoExt))
+ params.Add(New ReportParameter("EnvioNoInt", Vta.ClienteSucursal.NoInt))
+ params.Add(New ReportParameter("EnvioColonia", If(Vta.ClienteSucursal.Colonia.Length > 0, Vta.ClienteSucursal.Colonia, "")))
+ params.Add(New ReportParameter("EnvioCiudad", If(Vta.ClienteSucursal.Municipio.Length > 0, Vta.ClienteSucursal.Municipio, "")))
+ params.Add(New ReportParameter("EnvioEstado", If(Vta.ClienteSucursal.Estado.Length > 0, Vta.ClienteSucursal.Estado, "")))
+ params.Add(New ReportParameter("EnvioCP", If(Vta.ClienteSucursal.CP.Length > 0, Vta.ClienteSucursal.CP, "")))
+ Else
+ Dim StrEnvioDi As New StringBuilder
+ StrEnvioDi.AppendFormat("{0}", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, ""))
+ If Vta.Cliente.NoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.Cliente.NoExt)
+ If Vta.Cliente.NoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.Cliente.NoInt)
+ params.Add(New ReportParameter("EnvioDireccion", StrEnvioDi.ToString))
+ params.Add(New ReportParameter("EnvioNoExt", Vta.Cliente.NoExt))
+ params.Add(New ReportParameter("EnvioNoInt", Vta.Cliente.NoInt))
+ params.Add(New ReportParameter("EnvioColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
+ params.Add(New ReportParameter("EnvioCiudad", If(Vta.Cliente.Localidad IsNot Nothing And Vta.Cliente.Localidad.Length > 0, Vta.Cliente.Localidad, "")))
+ params.Add(New ReportParameter("EnvioEstado", If(Vta.Cliente.Estado.Length > 0, Vta.Cliente.Estado, "")))
+ params.Add(New ReportParameter("EnvioCP", If(Vta.Cliente.CP.Length > 0, Vta.Cliente.CP, "")))
+ End If
+ params.Add(New ReportParameter("EnvioContacto", ""))
+ params.Add(New ReportParameter("EnvioDepartamento", ""))
+ End If
+
+ 'CLIENTE SUCURSAL
+ If Vta.CveClienteSucursal.ToEntero > 0 Then
+ params.Add(New ReportParameter("ClienteCalle", If(Vta.ClienteSucursal.Direccion.Length > 0, Vta.ClienteSucursal.Direccion, "")))
+ params.Add(New ReportParameter("ClienteColonia", If(Vta.ClienteSucursal.Colonia.Length > 0, Vta.ClienteSucursal.Colonia, "")))
+ params.Add(New ReportParameter("ClienteCiudad", If(Vta.ClienteSucursal.Localidad IsNot Nothing And Vta.ClienteSucursal.Localidad.Length > 0, Vta.ClienteSucursal.Localidad, "")))
+ params.Add(New ReportParameter("ClienteMunicipio", If(Vta.ClienteSucursal.Municipio.Length > 0, Vta.ClienteSucursal.Municipio, "")))
+ params.Add(New ReportParameter("ClienteEstado", If(Vta.ClienteSucursal.Estado.Length > 0, Vta.ClienteSucursal.Estado, "")))
+ params.Add(New ReportParameter("ClienteCP", If(Vta.ClienteSucursal.CP.Length > 0, Vta.ClienteSucursal.CP, "")))
+ params.Add(New ReportParameter("ClienteNoInt", If(Vta.ClienteSucursal.NoInt.Length > 0, Vta.ClienteSucursal.NoInt, "")))
+ params.Add(New ReportParameter("ClienteNoExt", If(Vta.ClienteSucursal.NoExt.Length > 0, Vta.ClienteSucursal.NoExt, "")))
+ params.Add(New ReportParameter("ClientePais", If(Vta.ClienteSucursal.Pais.Length > 0, Vta.ClienteSucursal.Pais, "")))
+ params.Add(New ReportParameter("ClienteContacto", Vta.AtnA))
+ ElseIf Vta.CveCliente.ToEntero > 0 Then
+ params.Add(New ReportParameter("ClienteCalle", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, "")))
+ params.Add(New ReportParameter("ClienteColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
+ params.Add(New ReportParameter("ClienteCiudad", If(Vta.Cliente.Localidad IsNot Nothing And Vta.Cliente.Localidad.Length > 0, Vta.Cliente.Localidad, "")))
+ params.Add(New ReportParameter("ClienteMunicipio", If(Vta.Cliente.Ciudad.Length > 0, Vta.Cliente.Ciudad, "")))
+ params.Add(New ReportParameter("ClienteEstado", If(Vta.Cliente.Estado.Length > 0, Vta.Cliente.Estado, "")))
+ params.Add(New ReportParameter("ClienteCP", If(Vta.Cliente.CP.Length > 0, Vta.Cliente.CP, "")))
+ params.Add(New ReportParameter("ClienteNoInt", If(Vta.Cliente.NoInt.Length > 0, Vta.Cliente.NoInt, "")))
+ params.Add(New ReportParameter("ClienteNoExt", If(Vta.Cliente.NoExt.Length > 0, Vta.Cliente.NoExt, "")))
+ params.Add(New ReportParameter("ClientePais", If(Vta.Cliente.Pais.Length > 0, Vta.Cliente.Pais, "")))
+ params.Add(New ReportParameter("ClienteContacto", Vta.AtnA))
+ End If
+
+ 'PARAMETROS SEGUN TIPO DOCUMENTO
+ Select Case Vta.TipoDocto
+ Case "Ing"
+ NombreArchivo = "Factura"
+ NombreArchivoDescarga = "Factura"
+ TipoDocumento = "INGRESO"
+
+ If UsuarioActual.CveEmpresa.Contiene(137) Then
+ params.Add(New ReportParameter("CveVenta", Vta.CveVenta.ToString))
+ End If
+
+ params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
+ params.Add(New ReportParameter("Tipo", TipoDocumento))
+ params.Add(New ReportParameter("Ref", TipoDocumentoRef))
+ params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
+
+ 'VSH
+ If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122, 145) Then
+ 'DATOS CLIENTES
+ Dim ClienteRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", Vta.CveCliente.ToString))
+ Dim DatosCliente = ""
+ If ClienteRow IsNot Nothing Then
+ DatosCliente = String.Format("{0} | {1} | {2}", Vta.SubProyecto.Municipio, ClienteRow("CuentaContable"), ClienteRow("Codigo"))
+ End If
+ params.Add(New ReportParameter("ClienteDatoExtra1", DatosCliente))
+ End If
+
+ 'INE COMPLEMENTOS
+ If UsuarioActual.CveEmpresa.Contiene(72, 1) Then
+ Dim INETipoProceso As String = ""
+ Dim INETipoComite As String = ""
+ Dim INEIdContabilidad As Integer = 0
+ If Vta.ComplementoINE IsNot Nothing Then
+ INETipoProceso = Vta.ComplementoINE.INETipoProceso
+ INETipoComite = Vta.ComplementoINE.INETipoComite
+ INEIdContabilidad = Vta.ComplementoINE.INEIdContabilidad
+ End If
+ params.Add(New ReportParameter("INETipoProceso", INETipoProceso))
+ params.Add(New ReportParameter("INETipoComite", INETipoComite))
+ params.Add(New ReportParameter("INEIdContabilidad", INEIdContabilidad.ToString))
+ params.Add(New ReportParameter("Referencia", Vta.Cliente.ReferenciaFiscal))
+
+ End If
+
+ RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
+ RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
+ Case "Rem"
+ NombreArchivo = "Remision"
+ NombreArchivoDescarga = "Remisión"
+ TipoDocumento = "REMISION"
+
+ params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
+ params.Add(New ReportParameter("Tipo", TipoDocumento))
+ params.Add(New ReportParameter("Ref", TipoDocumentoRef))
+ params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
+
+ 'ALAN YEPIZ
+ If UsuarioActual.CveEmpresa.Contiene(123) Then
+ params.Add(New ReportParameter("DiaExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Day)))
+ params.Add(New ReportParameter("MesExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Month)))
+ params.Add(New ReportParameter("AñoExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Year)))
+ End If
+
+ RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
+ RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
+ Case "Cot"
+ NombreArchivo = "Cotizacion"
+ NombreArchivoDescarga = "Cotización"
+ TipoDocumento = "COTIZACIÓN"
+
+ params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
+ params.Add(New ReportParameter("Tipo", TipoDocumento))
+ params.Add(New ReportParameter("Ref", TipoDocumentoRef))
+ params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
+ params.Add(New ReportParameter("ClienteContacto", Vta.AtencionA))
+
+ If UsuarioActual.CveEmpresa.Contiene(137, 132, 144) Then
+ params.Add(New ReportParameter("CveVenta", Vta.CveVenta.ToString))
+ End If
+
+ 'COMPU DN DIFUSA
+ If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 137, 132, 144) Then
+
+ Dim FirmaVendedor As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveVendedor))
+
+ params.Add(New ReportParameter("FirmaVendedor", If(FirmaVendedor.Exists, New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Firmas/{1}.png", UsuarioActual.CveEmpresa, Vta.CveVendedor))).AbsoluteUri, "")))
+ params.Add(New ReportParameter("Entrega", Vta.Entrega))
+ params.Add(New ReportParameter("Vigencia", Vta.Vigencia.ToString("dd/MMMM/yyyy")))
+ params.Add(New ReportParameter("Sucursal", Vta.SubProyecto.SubProyecto))
+ params.Add(New ReportParameter("SucursalCliente", If(Vta.ClienteSucursal.Sucursal.ToString Is Nothing, "", Vta.ClienteSucursal.Sucursal.ToString)))
+ params.Add(New ReportParameter("CveMoneda", Vta.CveMoneda.ToString))
+ params.Add(New ReportParameter("FormaEntrega", Vta.CondicionEntrega))
+
+ If Not IsNothing(RowVendedor) Then
+ params.Add(New ReportParameter("TituloVendedor", RowVendedor("TituloDocumentos").ToString))
+ Else
+ params.Add(New ReportParameter("TituloVendedor", ""))
+ End If
+
+ End If
+
+ RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
+ RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
+ Case "Egs"
+ If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
+ NombreArchivo = "NotaCredito"
+ Else
+ NombreArchivo = "Factura"
+ End If
+ NombreArchivoDescarga = "Nota de Crédito"
+ TipoDocumento = "EGRESO"
+ TipoDocumentoRef = String.Format(": Ref.:{0}", Vta.RefDocto)
+ AplicaPagare = "0"
+
+ If UsuarioActual.CveEmpresa.Contiene(137) Then
+ params.Add(New ReportParameter("CveVenta", Vta.CveVenta.ToString))
+ End If
+
+ params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
+ params.Add(New ReportParameter("Tipo", TipoDocumento))
+ params.Add(New ReportParameter("Ref", TipoDocumentoRef))
+ params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
+
+ RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
+ RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
+ Case "Ant"
+ NombreArchivo = "Factura"
+ NombreArchivoDescarga = "Anticipo"
+ TipoDocumento = "INGRESO"
+
+ If UsuarioActual.CveEmpresa.Contiene(137) Then
+ params.Add(New ReportParameter("CveVenta", Vta.CveVenta.ToString))
+ End If
+
+ 'GENERAL
+ params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
+ params.Add(New ReportParameter("Tipo", TipoDocumento))
+ params.Add(New ReportParameter("Ref", TipoDocumentoRef))
+ params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
+
+ 'INE COMPLEMENTOS
+ If UsuarioActual.CveEmpresa.Contiene(72) Then
+ Dim INETipoProceso As String = ""
+ Dim INETipoComite As String = ""
+ Dim INEIdContabilidad As Integer = 0
+ If Vta.ComplementoINE IsNot Nothing Then
+ INETipoProceso = Vta.ComplementoINE.INETipoProceso
+ INETipoComite = Vta.ComplementoINE.INETipoComite
+ INEIdContabilidad = Vta.ComplementoINE.INEIdContabilidad
+ End If
+ params.Add(New ReportParameter("INETipoProceso", INETipoProceso))
+ params.Add(New ReportParameter("INETipoComite", INETipoComite))
+ params.Add(New ReportParameter("INEIdContabilidad", INEIdContabilidad.ToString))
+ params.Add(New ReportParameter("Referencia", Vta.Cliente.ReferenciaFiscal))
+ params.Add(New ReportParameter("ClienteContacto", Vta.AtnA))
+ End If
+
+ RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
+ RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
+ Case "Ped"
+ NombreArchivo = "Pedido"
+ NombreArchivoDescarga = "Pedido"
+ TipoDocumento = "INGRESO"
+
+ 'GENERAL
+ params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
+ params.Add(New ReportParameter("Tipo", TipoDocumento))
+ params.Add(New ReportParameter("Ref", TipoDocumentoRef))
+ params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
+ params.Add(New ReportParameter("CveAlmacenTraspasoOrigen", Vta.CveAlmacenTraspasoOrigen.ToString))
+
+ RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
+ RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
+ Case "Pd2"
+ NombreArchivo = "Pedido2"
+ NombreArchivoDescarga = "Pedido2"
+ TipoDocumento = "INGRESO"
+
+ 'GENERAL
+ params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
+ params.Add(New ReportParameter("Tipo", TipoDocumento))
+ params.Add(New ReportParameter("Ref", TipoDocumentoRef))
+ params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
+
+ RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
+ RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
+ Case "Dev"
+ NombreArchivo = "NotaDevolucion"
+ NombreArchivoDescarga = "NotaDevolucion"
+ TipoDocumento = "DEVOLUCION"
+
+ params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
+ params.Add(New ReportParameter("Tipo", TipoDocumento))
+ params.Add(New ReportParameter("Ref", TipoDocumentoRef))
+ params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
+
+ RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
+ RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
+ Case "DPe"
+ NombreArchivo = "DevolucionPedido"
+ NombreArchivoDescarga = "DevolucionPedido"
+ TipoDocumento = "INGRESO"
+
+ params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
+ params.Add(New ReportParameter("Tipo", TipoDocumento))
+ params.Add(New ReportParameter("Ref", TipoDocumentoRef))
+ params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
+
+ RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
+ RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
+ Case "PeC"
+ NombreArchivo = "PedidoConsignacion"
+ NombreArchivoDescarga = "Pedido Consignación"
+ TipoDocumento = "INGRESO"
+
+ 'GENERAL
+ params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
+ params.Add(New ReportParameter("Tipo", TipoDocumento))
+ params.Add(New ReportParameter("Ref", TipoDocumentoRef))
+ params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
+
+ RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
+ RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
+ Case "Tra"
+ NombreArchivo = "Traspaso"
+ NombreArchivoDescarga = "Traspaso"
+ TipoDocumento = "Traspaso"
+
+ Dim ObjInv As New ClsInventarios
+ Dim AlmOrigen As String = ""
+ Dim AlmDestino As String = ""
+
+ Dim SBDireccionO As New StringBuilder()
+ Dim SBDireccionD As New StringBuilder()
+
+ If ObjInv.GetMovimientos(Vta.Inv_CveMovimiento.ToEntero, -1, -1, UsuarioActual.CveEmpresa) Then
+ If ObjInv.DtResultados.Rows.Count > 0 Then
+ Dim Dr As DataRow = ObjInv.DtResultados.Rows(0)
+ If Dr IsNot Nothing Then
+ AlmOrigen = Dr("AlmacenOrigen").ToString
+ AlmDestino = Dr("AlmacenDestino").ToString
+
+ If Dr("CalleOrigen").ToString.Length > 0 Then
+ SBDireccionO.AppendFormat("{0}", Dr("CalleOrigen").ToString)
+ If Dr("NoExtOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", No.Ext: {0}", Dr("NoExtOrigen").ToString)
+ If Dr("ColoniaOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Col: {0}", Dr("ColoniaOrigen").ToString)
+ If Dr("CPOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", CP: {0}", Dr("CPOrigen").ToString)
+ If Dr("LocalidadOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Loc: {0}", Dr("LocalidadOrigen").ToString)
+ If Dr("MunicipioOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Cd: {0}", Dr("MunicipioOrigen").ToString)
+ If Dr("EstadoOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Edo: {0}", Dr("EstadoOrigen").ToString)
+ If Dr("PaisOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", País: {0}", Dr("PaisOrigen").ToString)
+ End If
+ If Dr("CalleDestino").ToString.Length > 0 Then
+ SBDireccionD.AppendFormat("{0}", Dr("CalleDestino").ToString)
+ If Dr("NoExtDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", No.Ext: {0}", Dr("NoExtDestino").ToString)
+ If Dr("ColoniaDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Col: {0}", Dr("ColoniaDestino").ToString)
+ If Dr("CPDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", CP: {0}", Dr("CPDestino").ToString)
+ If Dr("LocalidadDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Loc: {0}", Dr("LocalidadDestino").ToString)
+ If Dr("MunicipioDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Cd: {0}", Dr("MunicipioDestino").ToString)
+ If Dr("EstadoDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Edo: {0}", Dr("EstadoDestino").ToString)
+ If Dr("PaisDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", País: {0}", Dr("PaisDestino").ToString)
+ End If
+ End If
+ End If
+ End If
+
+ 'GENERAL
+ params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga))
+ params.Add(New ReportParameter("Tipo", TipoDocumento))
+ params.Add(New ReportParameter("Ref", TipoDocumentoRef))
+ params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
+ params.Add(New ReportParameter("AlmOrigen", AlmOrigen))
+ params.Add(New ReportParameter("AlmDestino", AlmDestino))
+ params.Add(New ReportParameter("DireccionOrigen", SBDireccionO.ToString))
+ params.Add(New ReportParameter("DireccionDestino", SBDireccionD.ToString))
+
+ RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
+ RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
+ Case Else
+ NombreArchivo = ""
+ TipoDocumento = ""
+ End Select
+
+ If NombreArchivo = "" Then
+ GuardaLog("No se especifico el tipo de Impresion de venta (Venta, Remision, Cotización, Nota de Crédito).")
+ Return Nothing
+ End If
+ 'TERMINA REGION PARAMETROS
+
+ Dim lrds As New List(Of ReportDataSource)
+ 'Si es ECLIPSE CREAR COLUMAS PARA FIRMAS EN DtDetalle.
+ If UsuarioActual.CveEmpresa.Contiene(1, 15, 17, 71, 76, 126) AndAlso Vta.DtFirmas IsNot Nothing Then
+ Dim DtDetalleFirmas As New DataTable
+ DtDetalleFirmas.TableName = "DetalleFirma"
+ DtDetalleFirmas = Vta.DtDetalle.Copy()
+
+ 'SI NO TIENE LAS COLUMNAS DE FIRMAS LAS CREA.
+ If Not DtDetalleFirmas.Columns.Contains("Titulo") Then
+ DtDetalleFirmas.Columns.Add("Titulo", GetType(String))
+ DtDetalleFirmas.Columns.Add("Nombre", GetType(String))
+ DtDetalleFirmas.Columns.Add("Puesto", GetType(String))
+ DtDetalleFirmas.Columns.Add("Lado", GetType(Integer))
+ End If
+
+ 'Se llenan los Rows de las columnas con los datos del DtFirmas
+ For i As Integer = 0 To Vta.DtFirmas.Rows.Count - 1
+ 'Si DtDetalle es menor al DtFirmas, crea un nuevo Row en DtDetalle y le asigna valor, Si no solo asigna valor
+ If DtDetalleFirmas.Rows.Count < i + 1 Then
+ Dim Dr = DtDetalleFirmas.NewRow
+ Dr("Titulo") = Vta.DtFirmas(i)("Titulo").ToString
+ Dr("Nombre") = Vta.DtFirmas(i)("Nombre").ToString
+ Dr("Puesto") = Vta.DtFirmas(i)("Puesto").ToString
+ Dr("Lado") = Vta.DtFirmas(i)("Lado").ToString.ToEntero
+ DtDetalleFirmas.Rows.Add(Dr)
+ Else
+ DtDetalleFirmas(i)("Titulo") = Vta.DtFirmas(i)("Titulo").ToString
+ DtDetalleFirmas(i)("Nombre") = Vta.DtFirmas(i)("Nombre").ToString
+ DtDetalleFirmas(i)("Puesto") = Vta.DtFirmas(i)("Puesto").ToString
+ DtDetalleFirmas(i)("Lado") = Vta.DtFirmas(i)("Lado").ToString.ToEntero
+ End If
+ Next i
+
+ Dim rds As New ReportDataSource With {.Name = "DsOC", .Value = DtDetalleFirmas}
+ lrds.Add(rds)
+ Else
+ Dim rds As New ReportDataSource With {.Name = "DsOC", .Value = Vta.DtDetalle}
+ lrds.Add(rds)
+ End If
+
+ Dim rds1 As New ReportDataSource With {.Name = "DataSet1", .Value = If(Vta.DtDeduccion IsNot Nothing, Vta.DtDeduccion, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
+ lrds.Add(rds1)
+
+ 'DETALLE FIRMAS
+ Dim rds2 As New ReportDataSource With {.Name = "DataSet2", .Value = If(Vta.DtFirmas IsNot Nothing, Vta.DtFirmas, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
+ lrds.Add(rds2)
+
+ Dim rds3 As New ReportDataSource With {.Name = "DataSet3", .Value = If(Vta.DtDesgloseImpuestos IsNot Nothing, Vta.DtDesgloseImpuestos, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
+ lrds.Add(rds3)
+
+ Dim rds4 As New ReportDataSource With {.Name = "DataSet4", .Value = If(Vta.DtDocumentosRelacionados IsNot Nothing, Vta.DtDocumentosRelacionados, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
+ lrds.Add(rds4)
+
+ Dim rds5 As New ReportDataSource With {.Name = "DataSet5", .Value = If(Vta.DtNCVinculadas IsNot Nothing, Vta.DtNCVinculadas, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
+ lrds.Add(rds5)
+
If UsuarioActual.CveEmpresa = 141 AndAlso RutaFormato.Contains("Factura") Then
params.Add(New ReportParameter("Kilometraje", Vta.Kilometraje.ToString))
- End If
- 'Imprime los parametros
- 'Dim ast As New StringBuilder
- 'For Each par As ReportParameter In params
- ' ast.AppendFormat("{0}{1}", par.Name, vbCrLf)
- 'Next
- 'ast.ToString.GuardaLog()
-
- Dim Archivo As New System.IO.FileInfo(RutaFormato)
- If Archivo.Exists Then
-
- retorno = StreamPDF(RutaFormato, lrds, params, NombreArchivo, "PDF", MR:=Nothing)
- Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio))
- If Guardar Then
- If Not ArchivoPDF.Exists Then
- Try
- DirectoryExistsCreate(String.Format("{0}PDF", UsuarioActual.Empresa.Ruta))
- DirectoryExistsCreate(String.Format("{0}PDF\{1}", UsuarioActual.Empresa.Ruta, Vta.TipoDocto))
- File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
- Catch ex As Exception
- Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
- End Try
- Else
- Try
- ArchivoPDF.Delete()
- File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
- Catch ex As Exception
- Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
- End Try
- End If
- End If
- Else
- params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
- params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
- retorno = StreamPDF(RutaFormatoDefault, lrds, params, NombreArchivo, "PDF", MR:=Nothing)
- End If
- Catch ex As Exception
- GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
- End Try
-
- Return retorno
- End Function
- Private Function ValorNodoXML(n As System.Xml.XmlNode, Campo As String, Optional Retorno As String = "") As String
- Dim o As System.Xml.XmlNode = n.Attributes.Cast(Of System.Xml.XmlAttribute)().SingleOrDefault(Function(a) String.Compare(a.Name, Campo, True) = 0)
- If o Is Nothing Then
- Return Retorno
- Else
- Return o.Value
- End If
- End Function
- Public Sub GenerarFacturaVenta(CveVenta As Integer)
- Dim ObjVentas As New ClsVentas
- Dim Vta As Modelos.Factura = Nothing
-
- Dim TmpDTImpuestos = New DataTable
- TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String))
- TmpDTImpuestos.Columns.Add("Importe", GetType(Double))
- TmpDTImpuestos.Columns.Add("Orden", GetType(Integer))
-
- If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
- Dim dtVentas As DataTable = ObjVentas.DtResultados
-
- ' se rellenan los campos de la factura
- Vta = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.Factura)
-
- Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString
- 'se rellena la sucursal
- Vta.SubProyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SubProyectoModel)
- Vta.Cliente = New Modelos.ClienteModel
- Vta.Cliente.Nombre = dtVentas(0)("ClienteNombre").ToString
- Vta.Cliente.Telefono = dtVentas(0)("Telefono").ToString
- Vta.Cliente.Direccion = dtVentas(0)("ClienteDireccion").ToString
- Vta.Cliente.CP = dtVentas(0)("CPCliente").ToString
- Vta.Cliente.Ciudad = dtVentas(0)("ClienteCiudad").ToString
- Vta.Cliente.Localidad = dtVentas(0)("ClienteLocalidad").ToString
- Vta.Cliente.Estado = dtVentas(0)("ClienteEstado").ToString
- Vta.Cliente.Pais = dtVentas(0)("ClientePais").ToString
- Vta.Cliente.RFC = dtVentas(0)("ClienteRFC").ToString
- Vta.Cliente.Colonia = dtVentas(0)("ColoniaCliente").ToString
- Vta.AtencionA = dtVentas(0)("AtencionA").ToString
- Vta.TelefonoGenerico = dtVentas(0)("TelefonoGenerico").ToString
- Vta.Cliente.NoExt = dtVentas(0)("ClienteNoExt").ToString
- Vta.Cliente.NoInt = dtVentas(0)("ClienteNoInt").ToString
- Vta.Cliente.Codigo = dtVentas(0)("ClienteCodigo").ToString
- Vta.Cliente.Mail = dtVentas(0)("Mail").ToString
- Vta.RefDocto = dtVentas(0)("Ref").ToString
- Vta.CveVenta = dtVentas(0)("CveVenta").ToString.ToEntero
- Vta.Version = dtVentas(0)("Version").ToString
-
- Vta.ClienteSucursal = New Modelos.SucursalModel
- Vta.ClienteSucursal.Direccion = dtVentas(0)("SucClienteDireccion").ToString
- Vta.ClienteSucursal.NoExt = dtVentas(0)("SucClienteNoExt").ToString
- Vta.ClienteSucursal.NoInt = dtVentas(0)("SucClienteNoInt").ToString
- Vta.ClienteSucursal.Colonia = dtVentas(0)("SucClienteColonia").ToString
- Vta.ClienteSucursal.CP = dtVentas(0)("SucClienteCP").ToString
- Vta.ClienteSucursal.Municipio = dtVentas(0)("SucClienteCiudad").ToString
- Vta.ClienteSucursal.Estado = dtVentas(0)("SucClienteEstado").ToString
- Vta.ClienteSucursal.Pais = dtVentas(0)("SucClientePais").ToString
- Vta.ClienteSucursal.Localidad = dtVentas(0)("SucClienteLocalidad").ToString
- Vta.ClienteSucursal.CorreoSucursal = dtVentas(0)("SucClienteCorreo").ToString
- Vta.ClienteSucursal.TelefonoSucursal = dtVentas(0)("SucClienteTelefono").ToString
- Vta.ClienteSucursal.Sucursal = dtVentas(0)("SucursalCliente").ToString
-
- Vta.EnviarA = New Modelos.EnviarAModel
- Vta.EnviarA.CveDireccionEnvio = dtVentas(0)("CveDireccionEnvio").ToString.ToEntero
- Vta.EnviarA.EnvioDireccion = dtVentas(0)("EnvioDireccion").ToString
- Vta.EnviarA.EnvioColonia = dtVentas(0)("EnvioColonia").ToString
- Vta.EnviarA.EnvioCiudad = dtVentas(0)("EnvioCiudad").ToString
- Vta.EnviarA.EnvioEstado = dtVentas(0)("EnvioEstado").ToString
- Vta.EnviarA.EnvioCP = dtVentas(0)("EnvioCP").ToString
-
- Dim DR As DataRow = TmpDTImpuestos.NewRow()
- If UsuarioActual.CveEmpresa.Contiene(1, 5, 15, 17, 72, 66, 79, 81, 109, 110, 111, 76) Then
- If dtVentas(0)("SubTotal").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Subtotal" : DR("Importe") = dtVentas(0)("SubTotal").ToString.ToDouble : DR("Orden") = 10 : TmpDTImpuestos.Rows.Add(DR)
- DR = TmpDTImpuestos.NewRow()
- If dtVentas(0)("Descuento").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Descuentos" : DR("Importe") = dtVentas(0)("Descuento").ToString.ToDouble : DR("Orden") = 20 : TmpDTImpuestos.Rows.Add(DR)
- DR = TmpDTImpuestos.NewRow()
- If dtVentas(0)("Amortizacion").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Amort.Ant" : DR("Importe") = dtVentas(0)("Amortizacion").ToString.ToDouble : DR("Orden") = 30 : TmpDTImpuestos.Rows.Add(DR)
- DR = TmpDTImpuestos.NewRow()
- If dtVentas(0)("SubTotal").ToString.ToDouble <> (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) Then DR("ImpuestoLocal") = "SubTotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) : DR("Orden") = 40 : TmpDTImpuestos.Rows.Add(DR)
- DR = TmpDTImpuestos.NewRow()
- If dtVentas(0)("IVA").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "IVA" : DR("Importe") = dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 50 : TmpDTImpuestos.Rows.Add(DR)
-
- 'solo para eclipse, que muesre un subtotal debajo de IVA
- If UsuarioActual.CveEmpresa = 15 Then DR = TmpDTImpuestos.NewRow() : DR("ImpuestoLocal") = "Subtotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) + dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 51 : TmpDTImpuestos.Rows.Add(DR)
- DR = TmpDTImpuestos.NewRow()
- If dtVentas(0)("RetIVA").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.IVA" : DR("Importe") = dtVentas(0)("RetIVA").ToString.ToDouble : DR("Orden") = 60 : TmpDTImpuestos.Rows.Add(DR)
- DR = TmpDTImpuestos.NewRow()
- If dtVentas(0)("RetISR").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.ISR" : DR("Importe") = dtVentas(0)("RetISR").ToString.ToDouble : DR("Orden") = 70 : TmpDTImpuestos.Rows.Add(DR)
- DR = TmpDTImpuestos.NewRow()
- If dtVentas(0)("Total").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Total" : DR("Importe") = dtVentas(0)("Total").ToString.ToDouble : DR("Orden") = 1000 : TmpDTImpuestos.Rows.Add(DR)
- DR = TmpDTImpuestos.NewRow()
- End If
-
- If ObjVentas.GetVentaDetalle(CveVenta) Then 'Obtenemos el Detalle de la Oorden de Compra
- Vta.DtDetalle = ObjVentas.DtResultados
- End If
-
- If ObjVentas.GetVentaImpuestosLocales(CveVenta) Then
- If UsuarioActual.CveEmpresa.Contiene(1, 5, 15, 17, 72, 66, 79, 81, 109, 110, 111, 76) Then
- Dim dtImpuesto As DataTable = ObjVentas.DtResultados
- If dtImpuesto.Rows.Count > 0 Then
- For Each Row As DataRow In dtImpuesto.Rows
- Dim Orden = 80
- If Row("Importe").ToString.ToDouble <> 0 Then
- DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString
- DR("Importe") = Row("Importe").ToString.ToDouble
- DR("Orden") = Orden
- TmpDTImpuestos.Rows.Add(DR)
- DR = TmpDTImpuestos.NewRow()
- Orden = Orden + 1
- End If
- Next
- End If
- Vta.DtDeduccion = TmpDTImpuestos.FiltraParametros("", Orderby:="Orden ASC")
- Else
- Vta.DtDeduccion = ObjVentas.DtResultados
- End If
- End If
-
- If ObjVentas.GetVentasFirmas(CveVenta) Then
- Vta.DtFirmas = ObjVentas.DtResultados
- End If
- End If
- ObjVentas.Dispose()
-
- If Not IsNothing(Vta) Then
- PdfFactura(Vta)
- Vta = Nothing
- End If
-
- End Sub
-#End Region
-
-#Region " PDF OC NEW 2.0"
- Public Function NewGeneraBytesOC(tCveOrdenCompra As Integer, Optional MR As ReportViewer = Nothing, Optional ConBitacora As Boolean = False) As Byte()
- Dim bytes As Byte() = Nothing
- Dim CveEmpresaActual As Integer
- Dim TmpDTEnvioDireccion As DataTable
- Dim params As New List(Of ReportParameter)
-
- Try
-
- Dim DtDetalle As DataTable = Nothing
- Dim ObjOC As New ClsOC
-
- If ObjOC.GetOC(tCveOrdenCompra, UsuarioActual.CveEmpresa, CveUsuario:=UsuarioActual.CveUsuario) Then
- CveEmpresaActual = ObjOC.CveEmpresa
-
- Dim ObjEmpresa As New ClsSisEmpresas()
- Dim EmpresaActual As New Empresa
- If ObjEmpresa.GetEmpresas(CveEmpresaActual, "-1", "-1", "-1", "-1") Then
- 'Session("Empresa") = ObjEmpresa
- If ObjEmpresa.GetEmpresasFuncionalidades(CveEmpresaActual) Then
- Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados
-
- Dim EmpresasFuncionalidades As New HybridDictionary
- For Each Row As Data.DataRow In dttmp.Rows
- EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString)
- Next
- ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades)
- End If
-
- EmpresaActual = ObjEmpresa.Empresa
- End If
- ObjEmpresa.Dispose()
-
- Dim dtOC As DataTable = ObjOC.DtResultados
- If ObjOC.GetOrdenesDetalle(ObjOC.CveOrdenCompra) Then 'Obtenemos el Detalle de la Oorden de Compra
- DtDetalle = ObjOC.DtResultados
- End If
-
-
- 'Obtenemos la sucursal de la OC PARA COMPU PROVEEDORES
- Dim DomicilioSucursal As String = ""
-
- If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
- Dim SBDomicilioSucursal As New StringBuilder()
- Dim CiudadSucursal As String = ""
- Dim ObjClientes As New ClsClientes
-
- If ObjOC.GetSucursalOC(ObjOC.CveOrdenCompra) AndAlso ObjOC.DtResultados.Rows.Count > 0 Then
-
- CiudadSucursal = String.Format("{0},{1}", ObjOC.SucMunicipio, ObjOC.SucEstado)
-
- SBDomicilioSucursal.AppendFormat("{0}", ObjOC.SucCalle)
- If ObjOC.SucNoExt.Length > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", ObjOC.SucNoExt)
- If ObjOC.SucNoInt.Length > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", ObjOC.SucNoInt)
- If ObjOC.SucColonia.Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", ObjOC.SucColonia)
- If ObjOC.SucCP.Length > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", ObjOC.SucCP)
- If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
- If ObjOC.SucPais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", ObjOC.SucPais)
-
- DomicilioSucursal = SBDomicilioSucursal.ToString
- params.Add(New ReportParameter("Proyecto", ObjOC.SucSubProyecto.ToString))
- params.Add(New ReportParameter("Telefono", ObjOC.SucTelefono.ToString))
-
- 'Obtenemos la direccion envio PARA COMPU PROVEEDORES
- If ObjOC.CveDireccionEnvio > 0 Then
- Dim StrEnvioDi As New StringBuilder
-
- If ObjClientes.DireccionEnvioGet(ObjOC.CveDireccionEnvio, ObjOC.CveCliente, -1) Then
- TmpDTEnvioDireccion = ObjClientes.DtResultados
- Else
- TmpDTEnvioDireccion = Nothing
- End If
- ObjClientes.Dispose()
-
-
- If TmpDTEnvioDireccion IsNot Nothing AndAlso TmpDTEnvioDireccion.FiltraParametros(String.Format("CveDireccionEnvio = {0}", ObjOC.CveDireccionEnvio)).Rows.Count > 0 Then
- StrEnvioDi.AppendFormat("{0}", TmpDTEnvioDireccion(0)("EnvioDireccion"))
- If TmpDTEnvioDireccion(0)("EnvioNoExt") IsNot Nothing AndAlso TmpDTEnvioDireccion(0)("EnvioNoExt").ToString.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", TmpDTEnvioDireccion(0)("EnvioNoExt"))
- If TmpDTEnvioDireccion(0)("EnvioNoInt") IsNot Nothing AndAlso TmpDTEnvioDireccion(0)("EnvioNoInt").ToString.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", TmpDTEnvioDireccion(0)("EnvioNoInt"))
-
- params.Add(New ReportParameter("EnvioDireccion", StrEnvioDi.ToString))
- params.Add(New ReportParameter("EnvioNoExt", TmpDTEnvioDireccion(0)("EnvioNoExt").ToString))
- params.Add(New ReportParameter("EnvioNoInt", TmpDTEnvioDireccion(0)("EnvioNoInt").ToString))
- params.Add(New ReportParameter("EnvioColonia", TmpDTEnvioDireccion(0)("EnvioColonia").ToString))
- params.Add(New ReportParameter("EnvioCiudad", TmpDTEnvioDireccion(0)("EnvioCiudad").ToString))
- params.Add(New ReportParameter("EnvioEstado", TmpDTEnvioDireccion(0)("EnvioEstado").ToString))
- params.Add(New ReportParameter("EnvioContacto", TmpDTEnvioDireccion(0)("EnvioContacto").ToString))
- params.Add(New ReportParameter("EnvioDepartamento", TmpDTEnvioDireccion(0)("EnvioDepartamento").ToString))
- params.Add(New ReportParameter("EnvioCP", TmpDTEnvioDireccion(0)("EnvioCP").ToString))
- params.Add(New ReportParameter("EnvioTel", TmpDTEnvioDireccion(0)("EnvioTel").ToString))
- End If
-
- Else
-
- If ObjOC.LugarEntrega.ToString IsNot Nothing AndAlso ObjOC.LugarEntrega.ToString = "" Then
- Dim StrEnvioDi As New StringBuilder
- StrEnvioDi.AppendFormat("{0}", ObjOC.SucCalle)
- If ObjOC.SucNoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", ObjOC.SucNoExt)
- If ObjOC.SucNoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", ObjOC.SucNoInt)
- params.Add(New ReportParameter("EnvioDireccion", StrEnvioDi.ToString))
- params.Add(New ReportParameter("EnvioColonia", If(ObjOC.SucColonia.Length > 0, ObjOC.SucColonia, "")))
- params.Add(New ReportParameter("EnvioCiudad", If(ObjOC.SucMunicipio.Length > 0, ObjOC.SucMunicipio, "")))
- params.Add(New ReportParameter("EnvioEstado", If(ObjOC.SucEstado.Length > 0, ObjOC.SucEstado, "")))
- params.Add(New ReportParameter("EnvioCP", If(ObjOC.SucCP.Length > 0, ObjOC.SucCP, "")))
- Else
- params.Add(New ReportParameter("EnvioDireccion", ObjOC.LugarEntrega))
- params.Add(New ReportParameter("LugarEntrega", ObjOC.LugarEntrega))
- End If
- params.Add(New ReportParameter("EnvioTel", ObjOC.SucTelefono.ToString))
-
-
- End If
-
- End If
- End If
-
-
- Dim CveUsuarioSol As Integer = dtOC(0)("CveUsuarioSolicito").ToString.ToEntero
- Dim CveUsuarioAut As Integer = dtOC(0)("CveUsuarioAutorizo").ToString.ToEntero
- Dim drSol As DataRow = GlobalDTUsuarios(CveUsuarioSol, EmpresaActual.CveEmpresa).FiltroPrimero("") 'DataRow (incluye el NOMBRE de quien SOLICITÓ la OC)
- Dim drAut As DataRow = GlobalDTUsuarios(CveUsuarioAut, EmpresaActual.CveEmpresa).FiltroPrimero("") 'DataRow (incluye el NOMBRE de quien AUTORIZÓ la OC)
-
- Dim CvePersonalSol, CvePersonalAut As Integer
-
- Dim PuestoSol As String = ""
- Dim PuestoAut As String = ""
-
- If drSol IsNot Nothing AndAlso drSol("CvePersonal").ToString.ToEntero > 0 Then CvePersonalSol = drSol("CvePersonal").ToString.ToEntero
- If drAut IsNot Nothing AndAlso drAut("CvePersonal").ToString.ToEntero > 0 Then CvePersonalAut = drAut("CvePersonal").ToString.ToEntero
-
- Dim ObjRH As New ClsRH()
- If ObjRH.GetPersonal(CvePersonalSol, EmpresaActual.CveEmpresa) AndAlso ObjRH.DtResultados.Rows.Count > 0 Then
- PuestoSol = ObjRH.DtResultados(0)("Puesto").ToString
- End If
- If ObjRH.GetPersonal(CvePersonalAut, EmpresaActual.CveEmpresa) AndAlso ObjRH.DtResultados.Rows.Count > 0 Then
- PuestoAut = ObjRH.DtResultados(0)("Puesto").ToString
- End If
- ObjRH.Dispose()
-
- Dim TipoCambio As String
- If ObjOC.CveMoneda = 1 Then
- TipoCambio = "1.00"
- Else
- TipoCambio = GlobalTipoCambio.ToString()
- End If
-
-
-
- Dim nombreautorizo As String = dtOC(0)("UsuarioAutorizo").ToString
-
- 'If EmpresaActual = 48 Then
- ' nombreautorizo = "Lic. LUIS JORGE CONTRERAS LANDGRAVE"
- 'End If
- Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta))
+ End If
+ 'Imprime los parametros
+ 'Dim ast As New StringBuilder
+ 'For Each par As ReportParameter In params
+ ' ast.AppendFormat("{0}{1}", par.Name, vbCrLf)
+ 'Next
+ 'ast.ToString.GuardaLog()
+
+ Dim Archivo As New System.IO.FileInfo(RutaFormato)
+ If Archivo.Exists Then
+
+ retorno = StreamPDF(RutaFormato, lrds, params, NombreArchivo, "PDF", MR:=Nothing)
+ Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio))
+ If Guardar Then
+ If Not ArchivoPDF.Exists Then
+ Try
+ DirectoryExistsCreate(String.Format("{0}PDF", UsuarioActual.Empresa.Ruta))
+ DirectoryExistsCreate(String.Format("{0}PDF\{1}", UsuarioActual.Empresa.Ruta, Vta.TipoDocto))
+ File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
+ Catch ex As Exception
+ Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
+ End Try
+ Else
+ Try
+ ArchivoPDF.Delete()
+ File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
+ Catch ex As Exception
+ Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
+ End Try
+ End If
+ End If
+ Else
+ params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
+ params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
+ retorno = StreamPDF(RutaFormatoDefault, lrds, params, NombreArchivo, "PDF", MR:=Nothing)
+ End If
+ Catch ex As Exception
+ GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
+ End Try
+
+ Return retorno
+ End Function
+ Private Function ValorNodoXML(n As System.Xml.XmlNode, Campo As String, Optional Retorno As String = "") As String
+ Dim o As System.Xml.XmlNode = n.Attributes.Cast(Of System.Xml.XmlAttribute)().SingleOrDefault(Function(a) String.Compare(a.Name, Campo, True) = 0)
+ If o Is Nothing Then
+ Return Retorno
+ Else
+ Return o.Value
+ End If
+ End Function
+ Public Sub GenerarFacturaVenta(CveVenta As Integer)
+ Dim ObjVentas As New ClsVentas
+ Dim Vta As Modelos.Factura = Nothing
+
+ Dim TmpDTImpuestos = New DataTable
+ TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String))
+ TmpDTImpuestos.Columns.Add("Importe", GetType(Double))
+ TmpDTImpuestos.Columns.Add("Orden", GetType(Integer))
+
+ If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
+ Dim dtVentas As DataTable = ObjVentas.DtResultados
+
+ ' se rellenan los campos de la factura
+ Vta = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.Factura)
+
+ Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString
+ 'se rellena la sucursal
+ Vta.SubProyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SubProyectoModel)
+ Vta.Cliente = New Modelos.ClienteModel
+ Vta.Cliente.Nombre = dtVentas(0)("ClienteNombre").ToString
+ Vta.Cliente.Telefono = dtVentas(0)("Telefono").ToString
+ Vta.Cliente.Direccion = dtVentas(0)("ClienteDireccion").ToString
+ Vta.Cliente.CP = dtVentas(0)("CPCliente").ToString
+ Vta.Cliente.Ciudad = dtVentas(0)("ClienteCiudad").ToString
+ Vta.Cliente.Localidad = dtVentas(0)("ClienteLocalidad").ToString
+ Vta.Cliente.Estado = dtVentas(0)("ClienteEstado").ToString
+ Vta.Cliente.Pais = dtVentas(0)("ClientePais").ToString
+ Vta.Cliente.RFC = dtVentas(0)("ClienteRFC").ToString
+ Vta.Cliente.Colonia = dtVentas(0)("ColoniaCliente").ToString
+ Vta.AtencionA = dtVentas(0)("AtencionA").ToString
+ Vta.TelefonoGenerico = dtVentas(0)("TelefonoGenerico").ToString
+ Vta.Cliente.NoExt = dtVentas(0)("ClienteNoExt").ToString
+ Vta.Cliente.NoInt = dtVentas(0)("ClienteNoInt").ToString
+ Vta.Cliente.Codigo = dtVentas(0)("ClienteCodigo").ToString
+ Vta.Cliente.Mail = dtVentas(0)("Mail").ToString
+ Vta.RefDocto = dtVentas(0)("Ref").ToString
+ Vta.CveVenta = dtVentas(0)("CveVenta").ToString.ToEntero
+ Vta.Version = dtVentas(0)("Version").ToString
+
+ Vta.ClienteSucursal = New Modelos.SucursalModel
+ Vta.ClienteSucursal.Direccion = dtVentas(0)("SucClienteDireccion").ToString
+ Vta.ClienteSucursal.NoExt = dtVentas(0)("SucClienteNoExt").ToString
+ Vta.ClienteSucursal.NoInt = dtVentas(0)("SucClienteNoInt").ToString
+ Vta.ClienteSucursal.Colonia = dtVentas(0)("SucClienteColonia").ToString
+ Vta.ClienteSucursal.CP = dtVentas(0)("SucClienteCP").ToString
+ Vta.ClienteSucursal.Municipio = dtVentas(0)("SucClienteCiudad").ToString
+ Vta.ClienteSucursal.Estado = dtVentas(0)("SucClienteEstado").ToString
+ Vta.ClienteSucursal.Pais = dtVentas(0)("SucClientePais").ToString
+ Vta.ClienteSucursal.Localidad = dtVentas(0)("SucClienteLocalidad").ToString
+ Vta.ClienteSucursal.CorreoSucursal = dtVentas(0)("SucClienteCorreo").ToString
+ Vta.ClienteSucursal.TelefonoSucursal = dtVentas(0)("SucClienteTelefono").ToString
+ Vta.ClienteSucursal.Sucursal = dtVentas(0)("SucursalCliente").ToString
+
+ Vta.EnviarA = New Modelos.EnviarAModel
+ Vta.EnviarA.CveDireccionEnvio = dtVentas(0)("CveDireccionEnvio").ToString.ToEntero
+ Vta.EnviarA.EnvioDireccion = dtVentas(0)("EnvioDireccion").ToString
+ Vta.EnviarA.EnvioColonia = dtVentas(0)("EnvioColonia").ToString
+ Vta.EnviarA.EnvioCiudad = dtVentas(0)("EnvioCiudad").ToString
+ Vta.EnviarA.EnvioEstado = dtVentas(0)("EnvioEstado").ToString
+ Vta.EnviarA.EnvioCP = dtVentas(0)("EnvioCP").ToString
+
+ Dim DR As DataRow = TmpDTImpuestos.NewRow()
+ If UsuarioActual.CveEmpresa.Contiene(1, 5, 15, 17, 72, 66, 79, 81, 109, 110, 111, 76) Then
+ If dtVentas(0)("SubTotal").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Subtotal" : DR("Importe") = dtVentas(0)("SubTotal").ToString.ToDouble : DR("Orden") = 10 : TmpDTImpuestos.Rows.Add(DR)
+ DR = TmpDTImpuestos.NewRow()
+ If dtVentas(0)("Descuento").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Descuentos" : DR("Importe") = dtVentas(0)("Descuento").ToString.ToDouble : DR("Orden") = 20 : TmpDTImpuestos.Rows.Add(DR)
+ DR = TmpDTImpuestos.NewRow()
+ If dtVentas(0)("Amortizacion").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Amort.Ant" : DR("Importe") = dtVentas(0)("Amortizacion").ToString.ToDouble : DR("Orden") = 30 : TmpDTImpuestos.Rows.Add(DR)
+ DR = TmpDTImpuestos.NewRow()
+ If dtVentas(0)("SubTotal").ToString.ToDouble <> (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) Then DR("ImpuestoLocal") = "SubTotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) : DR("Orden") = 40 : TmpDTImpuestos.Rows.Add(DR)
+ DR = TmpDTImpuestos.NewRow()
+ If dtVentas(0)("IVA").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "IVA" : DR("Importe") = dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 50 : TmpDTImpuestos.Rows.Add(DR)
+
+ 'solo para eclipse, que muesre un subtotal debajo de IVA
+ If UsuarioActual.CveEmpresa = 15 Then DR = TmpDTImpuestos.NewRow() : DR("ImpuestoLocal") = "Subtotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) + dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 51 : TmpDTImpuestos.Rows.Add(DR)
+ DR = TmpDTImpuestos.NewRow()
+ If dtVentas(0)("RetIVA").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.IVA" : DR("Importe") = dtVentas(0)("RetIVA").ToString.ToDouble : DR("Orden") = 60 : TmpDTImpuestos.Rows.Add(DR)
+ DR = TmpDTImpuestos.NewRow()
+ If dtVentas(0)("RetISR").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.ISR" : DR("Importe") = dtVentas(0)("RetISR").ToString.ToDouble : DR("Orden") = 70 : TmpDTImpuestos.Rows.Add(DR)
+ DR = TmpDTImpuestos.NewRow()
+ If dtVentas(0)("Total").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Total" : DR("Importe") = dtVentas(0)("Total").ToString.ToDouble : DR("Orden") = 1000 : TmpDTImpuestos.Rows.Add(DR)
+ DR = TmpDTImpuestos.NewRow()
+ End If
+
+ If ObjVentas.GetVentaDetalle(CveVenta) Then 'Obtenemos el Detalle de la Oorden de Compra
+ Vta.DtDetalle = ObjVentas.DtResultados
+ End If
+
+ If ObjVentas.GetVentaImpuestosLocales(CveVenta) Then
+ If UsuarioActual.CveEmpresa.Contiene(1, 5, 15, 17, 72, 66, 79, 81, 109, 110, 111, 76) Then
+ Dim dtImpuesto As DataTable = ObjVentas.DtResultados
+ If dtImpuesto.Rows.Count > 0 Then
+ For Each Row As DataRow In dtImpuesto.Rows
+ Dim Orden = 80
+ If Row("Importe").ToString.ToDouble <> 0 Then
+ DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString
+ DR("Importe") = Row("Importe").ToString.ToDouble
+ DR("Orden") = Orden
+ TmpDTImpuestos.Rows.Add(DR)
+ DR = TmpDTImpuestos.NewRow()
+ Orden = Orden + 1
+ End If
+ Next
+ End If
+ Vta.DtDeduccion = TmpDTImpuestos.FiltraParametros("", Orderby:="Orden ASC")
+ Else
+ Vta.DtDeduccion = ObjVentas.DtResultados
+ End If
+ End If
+
+ If ObjVentas.GetVentasFirmas(CveVenta) Then
+ Vta.DtFirmas = ObjVentas.DtResultados
+ End If
+ End If
+ ObjVentas.Dispose()
+
+ If Not IsNothing(Vta) Then
+ PdfFactura(Vta)
+ Vta = Nothing
+ End If
+
+ End Sub
+#End Region
+
+#Region " PDF OC NEW 2.0"
+ Public Function NewGeneraBytesOC(tCveOrdenCompra As Integer, Optional MR As ReportViewer = Nothing, Optional ConBitacora As Boolean = False) As Byte()
+ Dim bytes As Byte() = Nothing
+ Dim CveEmpresaActual As Integer
+ Dim TmpDTEnvioDireccion As DataTable
+ Dim params As New List(Of ReportParameter)
+
+ Try
+
+ Dim DtDetalle As DataTable = Nothing
+ Dim ObjOC As New ClsOC
+
+ If ObjOC.GetOC(tCveOrdenCompra, UsuarioActual.CveEmpresa, CveUsuario:=UsuarioActual.CveUsuario) Then
+ CveEmpresaActual = ObjOC.CveEmpresa
+
+ Dim ObjEmpresa As New ClsSisEmpresas()
+ Dim EmpresaActual As New Empresa
+ If ObjEmpresa.GetEmpresas(CveEmpresaActual, "-1", "-1", "-1", "-1") Then
+ 'Session("Empresa") = ObjEmpresa
+ If ObjEmpresa.GetEmpresasFuncionalidades(CveEmpresaActual) Then
+ Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados
+
+ Dim EmpresasFuncionalidades As New HybridDictionary
+ For Each Row As Data.DataRow In dttmp.Rows
+ EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString)
+ Next
+ ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades)
+ End If
+
+ EmpresaActual = ObjEmpresa.Empresa
+ End If
+ ObjEmpresa.Dispose()
+
+ Dim dtOC As DataTable = ObjOC.DtResultados
+ If ObjOC.GetOrdenesDetalle(ObjOC.CveOrdenCompra) Then 'Obtenemos el Detalle de la Oorden de Compra
+ DtDetalle = ObjOC.DtResultados
+ End If
+
+
+ 'Obtenemos la sucursal de la OC PARA COMPU PROVEEDORES
+ Dim DomicilioSucursal As String = ""
+
+ If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
+ Dim SBDomicilioSucursal As New StringBuilder()
+ Dim CiudadSucursal As String = ""
+ Dim ObjClientes As New ClsClientes
+
+ If ObjOC.GetSucursalOC(ObjOC.CveOrdenCompra) AndAlso ObjOC.DtResultados.Rows.Count > 0 Then
+
+ CiudadSucursal = String.Format("{0},{1}", ObjOC.SucMunicipio, ObjOC.SucEstado)
+
+ SBDomicilioSucursal.AppendFormat("{0}", ObjOC.SucCalle)
+ If ObjOC.SucNoExt.Length > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", ObjOC.SucNoExt)
+ If ObjOC.SucNoInt.Length > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", ObjOC.SucNoInt)
+ If ObjOC.SucColonia.Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", ObjOC.SucColonia)
+ If ObjOC.SucCP.Length > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", ObjOC.SucCP)
+ If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
+ If ObjOC.SucPais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", ObjOC.SucPais)
+
+ DomicilioSucursal = SBDomicilioSucursal.ToString
+ params.Add(New ReportParameter("Proyecto", ObjOC.SucSubProyecto.ToString))
+ params.Add(New ReportParameter("Telefono", ObjOC.SucTelefono.ToString))
+
+ 'Obtenemos la direccion envio PARA COMPU PROVEEDORES
+ If ObjOC.CveDireccionEnvio > 0 Then
+ Dim StrEnvioDi As New StringBuilder
+
+ If ObjClientes.DireccionEnvioGet(ObjOC.CveDireccionEnvio, ObjOC.CveCliente, -1) Then
+ TmpDTEnvioDireccion = ObjClientes.DtResultados
+ Else
+ TmpDTEnvioDireccion = Nothing
+ End If
+ ObjClientes.Dispose()
+
+
+ If TmpDTEnvioDireccion IsNot Nothing AndAlso TmpDTEnvioDireccion.FiltraParametros(String.Format("CveDireccionEnvio = {0}", ObjOC.CveDireccionEnvio)).Rows.Count > 0 Then
+ StrEnvioDi.AppendFormat("{0}", TmpDTEnvioDireccion(0)("EnvioDireccion"))
+ If TmpDTEnvioDireccion(0)("EnvioNoExt") IsNot Nothing AndAlso TmpDTEnvioDireccion(0)("EnvioNoExt").ToString.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", TmpDTEnvioDireccion(0)("EnvioNoExt"))
+ If TmpDTEnvioDireccion(0)("EnvioNoInt") IsNot Nothing AndAlso TmpDTEnvioDireccion(0)("EnvioNoInt").ToString.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", TmpDTEnvioDireccion(0)("EnvioNoInt"))
+
+ params.Add(New ReportParameter("EnvioDireccion", StrEnvioDi.ToString))
+ params.Add(New ReportParameter("EnvioNoExt", TmpDTEnvioDireccion(0)("EnvioNoExt").ToString))
+ params.Add(New ReportParameter("EnvioNoInt", TmpDTEnvioDireccion(0)("EnvioNoInt").ToString))
+ params.Add(New ReportParameter("EnvioColonia", TmpDTEnvioDireccion(0)("EnvioColonia").ToString))
+ params.Add(New ReportParameter("EnvioCiudad", TmpDTEnvioDireccion(0)("EnvioCiudad").ToString))
+ params.Add(New ReportParameter("EnvioEstado", TmpDTEnvioDireccion(0)("EnvioEstado").ToString))
+ params.Add(New ReportParameter("EnvioContacto", TmpDTEnvioDireccion(0)("EnvioContacto").ToString))
+ params.Add(New ReportParameter("EnvioDepartamento", TmpDTEnvioDireccion(0)("EnvioDepartamento").ToString))
+ params.Add(New ReportParameter("EnvioCP", TmpDTEnvioDireccion(0)("EnvioCP").ToString))
+ params.Add(New ReportParameter("EnvioTel", TmpDTEnvioDireccion(0)("EnvioTel").ToString))
+ End If
+
+ Else
+
+ If ObjOC.LugarEntrega.ToString IsNot Nothing AndAlso ObjOC.LugarEntrega.ToString = "" Then
+ Dim StrEnvioDi As New StringBuilder
+ StrEnvioDi.AppendFormat("{0}", ObjOC.SucCalle)
+ If ObjOC.SucNoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", ObjOC.SucNoExt)
+ If ObjOC.SucNoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", ObjOC.SucNoInt)
+ params.Add(New ReportParameter("EnvioDireccion", StrEnvioDi.ToString))
+ params.Add(New ReportParameter("EnvioColonia", If(ObjOC.SucColonia.Length > 0, ObjOC.SucColonia, "")))
+ params.Add(New ReportParameter("EnvioCiudad", If(ObjOC.SucMunicipio.Length > 0, ObjOC.SucMunicipio, "")))
+ params.Add(New ReportParameter("EnvioEstado", If(ObjOC.SucEstado.Length > 0, ObjOC.SucEstado, "")))
+ params.Add(New ReportParameter("EnvioCP", If(ObjOC.SucCP.Length > 0, ObjOC.SucCP, "")))
+ Else
+ params.Add(New ReportParameter("EnvioDireccion", ObjOC.LugarEntrega))
+ params.Add(New ReportParameter("LugarEntrega", ObjOC.LugarEntrega))
+ End If
+ params.Add(New ReportParameter("EnvioTel", ObjOC.SucTelefono.ToString))
+
+
+ End If
+
+ End If
+ End If
+
+
+ Dim CveUsuarioSol As Integer = dtOC(0)("CveUsuarioSolicito").ToString.ToEntero
+ Dim CveUsuarioAut As Integer = dtOC(0)("CveUsuarioAutorizo").ToString.ToEntero
+ Dim drSol As DataRow = GlobalDTUsuarios(CveUsuarioSol, EmpresaActual.CveEmpresa).FiltroPrimero("") 'DataRow (incluye el NOMBRE de quien SOLICITÓ la OC)
+ Dim drAut As DataRow = GlobalDTUsuarios(CveUsuarioAut, EmpresaActual.CveEmpresa).FiltroPrimero("") 'DataRow (incluye el NOMBRE de quien AUTORIZÓ la OC)
+
+ Dim CvePersonalSol, CvePersonalAut As Integer
+
+ Dim PuestoSol As String = ""
+ Dim PuestoAut As String = ""
+
+ If drSol IsNot Nothing AndAlso drSol("CvePersonal").ToString.ToEntero > 0 Then CvePersonalSol = drSol("CvePersonal").ToString.ToEntero
+ If drAut IsNot Nothing AndAlso drAut("CvePersonal").ToString.ToEntero > 0 Then CvePersonalAut = drAut("CvePersonal").ToString.ToEntero
+
+ Dim ObjRH As New ClsRH()
+ If ObjRH.GetPersonal(CvePersonalSol, EmpresaActual.CveEmpresa) AndAlso ObjRH.DtResultados.Rows.Count > 0 Then
+ PuestoSol = ObjRH.DtResultados(0)("Puesto").ToString
+ End If
+ If ObjRH.GetPersonal(CvePersonalAut, EmpresaActual.CveEmpresa) AndAlso ObjRH.DtResultados.Rows.Count > 0 Then
+ PuestoAut = ObjRH.DtResultados(0)("Puesto").ToString
+ End If
+ ObjRH.Dispose()
+
+ Dim TipoCambio As String
+ If ObjOC.CveMoneda = 1 Then
+ TipoCambio = "1.00"
+ Else
+ TipoCambio = GlobalTipoCambio.ToString()
+ End If
+
+
+
+ Dim nombreautorizo As String = dtOC(0)("UsuarioAutorizo").ToString
+
+ 'If EmpresaActual = 48 Then
+ ' nombreautorizo = "Lic. LUIS JORGE CONTRERAS LANDGRAVE"
+ 'End If
+ Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta))
If Not Archivo.Exists OrElse EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 122, 126) Then
params.Add(New ReportParameter("Descuento", DtDetalle.SUM("Descuento").ToString.FormatoNumero(2)))
- End If
- 'DATOS PARA DESCUENTO
- If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 122, 126) Then 'EMPRESAS QUE YA TIENEN EL AJUSTE EN EL FORMATO
- params.Add(New ReportParameter("SubTotal", ObjOC.SubTotal.ToString))
- params.Add(New ReportParameter("SubTotal2", DtDetalle.SUM("Total").ToString))
- Else
- params.Add(New ReportParameter("SubTotal", DtDetalle.SUM("Total").ToString))
- End If
-
- If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 122) Then
-
- params.Add(New ReportParameter("ReferenciaBancaria", dtOC(0)("BancoCuenta").ToString))
- params.Add(New ReportParameter("ReferenciaBanco", dtOC(0)("BancoNombre").ToString))
- params.Add(New ReportParameter("Justificacion", dtOC(0)("Justificacion").ToString))
- params.Add(New ReportParameter("TipoTermino", ObjOC.TipoTermino.ToString))
- params.Add(New ReportParameter("Proyecto", If(DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0, DtDetalle.MAX("SubProyecto").ToString, "")))
- Else
- params.Add(New ReportParameter("Proyecto", If(DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0, DtDetalle.MAX("Proyecto").ToString, "")))
- End If
- params.Add(New ReportParameter("CentroCostos", If(DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0, DtDetalle.MAX("Proyecto").ToString, "")))
-
- params.Add(New ReportParameter("Folio", ObjOC.Folio.ToString))
- params.Add(New ReportParameter("ProveedorNombre", ObjOC.RazonSocial))
- params.Add(New ReportParameter("ProveedorLugar", ObjOC.LugarEntrega))
- params.Add(New ReportParameter("Estatus", ObjOC.Estatus))
- params.Add(New ReportParameter("Descripcion", ObjOC.Descripcion))
- params.Add(New ReportParameter("Asunto", ObjOC.Justificacion))
- params.Add(New ReportParameter("FechaEntrega", ObjOC.FechaEstimadaEntrega.ToString("dd/MM/yyyy")))
- params.Add(New ReportParameter("FechaSolicitud", String.Format("{0}T{1}", ObjOC.Fecha.ToString("dd/MM/yyyy"), ObjOC.HoraElaboracion.ToString)))
-
- params.Add(New ReportParameter("ProveedorDireccion", If(ObjOC.CveProveedorSucursal > 0, ObjOC.SucursalDireccion, ObjOC.Direccion)))
- params.Add(New ReportParameter("ProveedorTel", If(ObjOC.CveProveedorSucursal > 0, ObjOC.SucursalTelefono, ObjOC.Telefono)))
- params.Add(New ReportParameter("ProveedorRFC", ObjOC.RFC))
- params.Add(New ReportParameter("IVA", ObjOC.IVA.ToString))
- params.Add(New ReportParameter("RetIVA", ObjOC.RetIVA.ToString.FormatoNumero(2)))
- params.Add(New ReportParameter("RetISR", ObjOC.RetISR.ToString.FormatoNumero(2)))
- params.Add(New ReportParameter("IEPS", ObjOC.IEPS.ToString.FormatoNumero(2)))
- params.Add(New ReportParameter("Total", ObjOC.Total.ToString))
- params.Add(New ReportParameter("ImporteLetra", (ObjOC.Total).ToString.ToDouble.Texto2Letras(ObjOC.CveMoneda)))
- params.Add(New ReportParameter("CorreoControl", If(drAut IsNot Nothing, drAut("Correo").ToString, "")))
- params.Add(New ReportParameter("Moneda", ObjOC.Moneda))
- params.Add(New ReportParameter("TipoCambio", TipoCambio))
- params.Add(New ReportParameter("NombreSolicito", dtOC(0)("UsuarioSolicito").ToString)) 'drSol("Nombre").ToString))
- params.Add(New ReportParameter("PuestoSolicito", PuestoSol)) 'drPuestoSol("Puesto").ToString
- params.Add(New ReportParameter("NombreAutorizo", nombreautorizo))
- params.Add(New ReportParameter("PuestoAutorizo", PuestoAut)) 'drPuestoAut("Puesto").ToString
- params.Add(New ReportParameter("TipoOC", If(ObjOC.Tipo = "OC", "Orden de Compra", "Requisición")))
- params.Add(New ReportParameter("UsoCFDI", ObjOC.UsoCFDI))
-
-
- If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
-
- params.Add(New ReportParameter("FolioAdicional", dtOC(0)("FolioAdicional").ToString))
- params.Add(New ReportParameter("Vendedor", dtOC(0)("Vendedor").ToString))
- params.Add(New ReportParameter("Observacion", dtOC(0)("PrioridadObservacion").ToString))
- params.Add(New ReportParameter("EntregarA", ObjOC.LugarEntrega))
- params.Add(New ReportParameter("EntregaDirecta", ObjOC.EntregaDirecta.ToString))
- params.Add(New ReportParameter("NombreCliente", ObjOC.NombreCliente.ToString))
- params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
- params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
- params.Add(New ReportParameter("DomicilioSucursal", DomicilioSucursal))
- params.Add(New ReportParameter("ProveedorContacto", ObjOC.ProveedorContacto))
- params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado))
- End If
-
- 'params.Add(New ReportParameter("FechaOC", ObjOC.Fecha.ToShortDateString))
- Dim FirmaSol As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", EmpresaActual.Ruta, CveUsuarioSol))
- params.Add(New ReportParameter("FirmaSolicito", If(FirmaSol.Exists, New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Firmas/{1}.png", EmpresaActual.CveEmpresa, CveUsuarioSol))).AbsoluteUri, "")))
- Dim FirmaAut As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", EmpresaActual.Ruta, CveUsuarioAut))
+ End If
+ 'DATOS PARA DESCUENTO
+ If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 122, 126) Then 'EMPRESAS QUE YA TIENEN EL AJUSTE EN EL FORMATO
+ params.Add(New ReportParameter("SubTotal", ObjOC.SubTotal.ToString))
+ params.Add(New ReportParameter("SubTotal2", DtDetalle.SUM("Total").ToString))
+ Else
+ params.Add(New ReportParameter("SubTotal", DtDetalle.SUM("Total").ToString))
+ End If
+
+ If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 122) Then
+
+ params.Add(New ReportParameter("ReferenciaBancaria", dtOC(0)("BancoCuenta").ToString))
+ params.Add(New ReportParameter("ReferenciaBanco", dtOC(0)("BancoNombre").ToString))
+ params.Add(New ReportParameter("Justificacion", dtOC(0)("Justificacion").ToString))
+ params.Add(New ReportParameter("TipoTermino", ObjOC.TipoTermino.ToString))
+ params.Add(New ReportParameter("Proyecto", If(DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0, DtDetalle.MAX("SubProyecto").ToString, "")))
+ Else
+ params.Add(New ReportParameter("Proyecto", If(DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0, DtDetalle.MAX("Proyecto").ToString, "")))
+ End If
+ params.Add(New ReportParameter("CentroCostos", If(DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0, DtDetalle.MAX("Proyecto").ToString, "")))
+
+ params.Add(New ReportParameter("Folio", ObjOC.Folio.ToString))
+ params.Add(New ReportParameter("ProveedorNombre", ObjOC.RazonSocial))
+ params.Add(New ReportParameter("ProveedorLugar", ObjOC.LugarEntrega))
+ params.Add(New ReportParameter("Estatus", ObjOC.Estatus))
+ params.Add(New ReportParameter("Descripcion", ObjOC.Descripcion))
+ params.Add(New ReportParameter("Asunto", ObjOC.Justificacion))
+ params.Add(New ReportParameter("FechaEntrega", ObjOC.FechaEstimadaEntrega.ToString("dd/MM/yyyy")))
+ params.Add(New ReportParameter("FechaSolicitud", String.Format("{0}T{1}", ObjOC.Fecha.ToString("dd/MM/yyyy"), ObjOC.HoraElaboracion.ToString)))
+
+ params.Add(New ReportParameter("ProveedorDireccion", If(ObjOC.CveProveedorSucursal > 0, ObjOC.SucursalDireccion, ObjOC.Direccion)))
+ params.Add(New ReportParameter("ProveedorTel", If(ObjOC.CveProveedorSucursal > 0, ObjOC.SucursalTelefono, ObjOC.Telefono)))
+ params.Add(New ReportParameter("ProveedorRFC", ObjOC.RFC))
+ params.Add(New ReportParameter("IVA", ObjOC.IVA.ToString))
+ params.Add(New ReportParameter("RetIVA", ObjOC.RetIVA.ToString.FormatoNumero(2)))
+ params.Add(New ReportParameter("RetISR", ObjOC.RetISR.ToString.FormatoNumero(2)))
+ params.Add(New ReportParameter("IEPS", ObjOC.IEPS.ToString.FormatoNumero(2)))
+ params.Add(New ReportParameter("Total", ObjOC.Total.ToString))
+ params.Add(New ReportParameter("ImporteLetra", (ObjOC.Total).ToString.ToDouble.Texto2Letras(ObjOC.CveMoneda)))
+ params.Add(New ReportParameter("CorreoControl", If(drAut IsNot Nothing, drAut("Correo").ToString, "")))
+ params.Add(New ReportParameter("Moneda", ObjOC.Moneda))
+ params.Add(New ReportParameter("TipoCambio", TipoCambio))
+ params.Add(New ReportParameter("NombreSolicito", dtOC(0)("UsuarioSolicito").ToString)) 'drSol("Nombre").ToString))
+ params.Add(New ReportParameter("PuestoSolicito", PuestoSol)) 'drPuestoSol("Puesto").ToString
+ params.Add(New ReportParameter("NombreAutorizo", nombreautorizo))
+ params.Add(New ReportParameter("PuestoAutorizo", PuestoAut)) 'drPuestoAut("Puesto").ToString
+ params.Add(New ReportParameter("TipoOC", If(ObjOC.Tipo = "OC", "Orden de Compra", "Requisición")))
+ params.Add(New ReportParameter("UsoCFDI", ObjOC.UsoCFDI))
+
+
+ If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
+
+ params.Add(New ReportParameter("FolioAdicional", dtOC(0)("FolioAdicional").ToString))
+ params.Add(New ReportParameter("Vendedor", dtOC(0)("Vendedor").ToString))
+ params.Add(New ReportParameter("Observacion", dtOC(0)("PrioridadObservacion").ToString))
+ params.Add(New ReportParameter("EntregarA", ObjOC.LugarEntrega))
+ params.Add(New ReportParameter("EntregaDirecta", ObjOC.EntregaDirecta.ToString))
+ params.Add(New ReportParameter("NombreCliente", ObjOC.NombreCliente.ToString))
+ params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
+ params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
+ params.Add(New ReportParameter("DomicilioSucursal", DomicilioSucursal))
+ params.Add(New ReportParameter("ProveedorContacto", ObjOC.ProveedorContacto))
+ params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado))
+ End If
+
+ 'params.Add(New ReportParameter("FechaOC", ObjOC.Fecha.ToShortDateString))
+ Dim FirmaSol As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", EmpresaActual.Ruta, CveUsuarioSol))
+ params.Add(New ReportParameter("FirmaSolicito", If(FirmaSol.Exists, New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Firmas/{1}.png", EmpresaActual.CveEmpresa, CveUsuarioSol))).AbsoluteUri, "")))
+ Dim FirmaAut As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", EmpresaActual.Ruta, CveUsuarioAut))
params.Add(New ReportParameter("FirmaAutorizo", If(FirmaAut.Exists, New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Firmas/{1}.png", EmpresaActual.CveEmpresa, CveUsuarioAut))).AbsoluteUri, "")))
- If Archivo.Exists Then
- bytes = StreamPDF(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta), DtDetalle, params, $"OC_{ObjOC.Folio.ToString}", RDSName:="DsOC", MR:=MR)
- Else
- params.Add(New ReportParameter("Empresa", EmpresaActual.Empresa))
- bytes = StreamPDF("Empresas\Grales\Formatos\OC.rdlc", DtDetalle, params, $"OC_{ObjOC.Folio.ToString}", RDSName:="DsOC", MR:=MR)
- End If
-
- If ConBitacora Then
- Dim dttemp As New DataTable
- Dim ObjEventoBitacora As New ClsOIEventos()
- If ObjEventoBitacora.GetAgendaBitacora(UsuarioActual.CveUsuario, EmpresaActual.CveEmpresa, CveOC:=tCveOrdenCompra) Then
- dttemp = ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento = 6 OR CveTipoEvento = 2")
- End If
- ObjEventoBitacora.Dispose()
- If Not IsNothing(dttemp) AndAlso dttemp.Rows.Count > 0 Then
-
- Dim paramsest As New List(Of ReportParameter)
- paramsest.Add(New ReportParameter("Empresa", EmpresaActual.Empresa))
- paramsest.Add(New ReportParameter("Titulo", "Bitácora de órdenes de compra"))
- paramsest.Add(New ReportParameter("Folio", ObjOC.Folio.ToString))
- paramsest.Add(New ReportParameter("TipoOC", If(ObjOC.Tipo = "OC", "Orden de Compra", "Requisición")))
- Dim bytes2 As Byte()
- bytes2 = StreamPDF("Empresas\Grales\Formatos\Bitacora.rdlc", dttemp, paramsest, $"OC_{ObjOC.Folio.ToString}", MR:=MR)
- Using ms As New MemoryStream()
- Using document As New iTextSharp.text.Document()
- Using copy As New PdfCopy(document, ms)
- document.Open()
-
- Dim reader As New PdfReader(bytes)
- ' loop over the pages in that document
- Dim n As Integer = reader.NumberOfPages
- Dim page As Integer = 0
- While page < n
- page = page + 1
- copy.AddPage(copy.GetImportedPage(reader, page))
- End While
-
-
- reader = New PdfReader(bytes2)
- ' loop over the pages in that document
- n = reader.NumberOfPages
- page = 0
- While page < n
- page = page + 1
- copy.AddPage(copy.GetImportedPage(reader, page))
- End While
-
- End Using
- End Using
- bytes = ms.ToArray()
- End Using
- End If
- dttemp.Dispose()
- End If
-
- End If
- ObjOC.Dispose()
-
- DtDetalle.Dispose()
-
- Catch ex As Exception
- GuardaLog(String.Format("Ocurrio un error al generar el strem de la oc={0}. {1}", tCveOrdenCompra, ex.Message))
- End Try
-
- Return bytes
- End Function
-
- Public Function NewGeneraOCCotizacion(tCveOrdenCompra As Integer, Optional MR As ReportViewer = Nothing, Optional ConBitacora As Boolean = False) As Byte()
- Dim bytes As Byte() = Nothing
- Dim CveEmpresaActual As Integer
-
- Try
- Dim DtDetalle As DataTable = Nothing
- Dim ObjOC As New ClsOC
-
- If ObjOC.GetOC(tCveOrdenCompra, UsuarioActual.CveEmpresa, CveUsuario:=UsuarioActual.CveUsuario) Then
- CveEmpresaActual = ObjOC.CveEmpresa
-
- Dim ObjEmpresa As New ClsSisEmpresas()
- Dim EmpresaActual As New Empresa
- If ObjEmpresa.GetEmpresas(CveEmpresaActual, "-1", "-1", "-1", "-1") Then
- EmpresaActual = ObjEmpresa.Empresa
- End If
- ObjEmpresa.Dispose()
-
- '-----------------------COTIZACIONES--------------------------
- Dim params As New List(Of ReportParameter)
- Dim NumCotizaciones = 0
- Dim DtCotizaciones As New DataTable
- Dim ProveedoresCotizacion = New ArrayList
- Dim Ds As DataSet = ObjOC.GetCotizacionesTabla(tCveOrdenCompra)
- If Ds IsNot Nothing AndAlso Ds.Tables.Count = 2 Then
- For Each Dr2 As DataRow In Ds.Tables(1).Rows
- ProveedoresCotizacion.Add(Dr2("RazonSocial"))
- Next
- NumCotizaciones = Ds.Tables(1).Rows.Count
- DtCotizaciones = Ds.Tables(0)
-
- If Not DtCotizaciones.Columns.Contains("PU1") Then DtCotizaciones.Columns.Add("PU1", GetType(String))
- If Not DtCotizaciones.Columns.Contains("PU2") Then DtCotizaciones.Columns.Add("PU2", GetType(String))
- If Not DtCotizaciones.Columns.Contains("PU3") Then DtCotizaciones.Columns.Add("PU3", GetType(String))
- If Not DtCotizaciones.Columns.Contains("PU4") Then DtCotizaciones.Columns.Add("PU4", GetType(String))
- If Not DtCotizaciones.Columns.Contains("PU5") Then DtCotizaciones.Columns.Add("PU5", GetType(String))
-
- End If
-
- 'COTIZACION
- For Index = 1 To 5
- Try
- params.Add(New ReportParameter($"Cotizacion{Index.ToString}", ProveedoresCotizacion(Index - 1).ToString))
- Catch ex As Exception
- params.Add(New ReportParameter($"Cotizacion{Index.ToString}", ""))
- End Try
- Next
-
- params.Add(New ReportParameter("CentroCostos", If(DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0, DtDetalle.MAX("Proyecto").ToString, "")))
- params.Add(New ReportParameter("Folio", ObjOC.Folio.ToString))
- params.Add(New ReportParameter("ProveedorNombre", ObjOC.RazonSocial))
- params.Add(New ReportParameter("ProveedorLugar", ObjOC.LugarEntrega))
- params.Add(New ReportParameter("Estatus", ObjOC.Estatus))
- params.Add(New ReportParameter("Descripcion", ObjOC.Descripcion))
- params.Add(New ReportParameter("Asunto", ObjOC.Justificacion))
- params.Add(New ReportParameter("FechaEntrega", ObjOC.FechaEstimadaEntrega.ToShortDateString))
- params.Add(New ReportParameter("FechaSolicitud", ObjOC.Fecha.ToShortDateString))
-
- Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\CotizacionOC.rdlc", EmpresaActual.Ruta))
- If Archivo.Exists Then
- bytes = StreamPDF(String.Format("{0}Formatos\CotizacionOC.rdlc", EmpresaActual.Ruta), DtCotizaciones, params, $"OC_{ObjOC.Folio.ToString}", RDSName:="DsOC", MR:=MR)
- End If
- End If
- ObjOC.Dispose()
- DtDetalle.Dispose()
- Catch ex As Exception
- GuardaLog(String.Format("Ocurrio un error al generar el strem de la oc={0}. {1}", tCveOrdenCompra, ex.Message))
- End Try
- Return bytes
- End Function
-#End Region
-
-#Region "NEW RepProveedorCxP.rpt"
- Public Function NewGeneraBytesCxP(CveProveedor As Integer, UsuarioActual As String, Optional MR As ReportViewer = Nothing) As Byte()
- Dim bytes As Byte() = Nothing
- Dim CveEmpresaActual As Integer
- 'Dim TmpDTEnvioDireccion As DataTable
- Dim params As New List(Of ReportParameter)
-
- Try
- Dim DTCxPTempral As DataTable = Nothing
-
- Dim ObjMovtos As New ClsMovimientos()
- If ObjMovtos.GetCxPProveedor(CveProveedor, "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, "-1", "-1") Then
- DTCxPTempral = ObjMovtos.DtResultados
- End If
-
- If DTCxPTempral IsNot Nothing AndAlso DTCxPTempral.Rows.Count > 0 Then
- Dim dr As DataRow = DTCxPTempral.Rows(0)
- Dim NombreProv = ""
- Dim Direccion = ""
- Dim RFC = ""
- Dim Tel = ""
- Dim DiasCredito = ""
- Dim LimCredito As Double
-
- CveEmpresaActual = dr("CveEmpresa").ToString.ToEntero
- Dim ObjEmpresa As New ClsSisEmpresas()
- Dim EmpresaActual As New Empresa
- If ObjEmpresa.GetEmpresas(CveEmpresaActual, "-1", "-1", "-1", "-1") Then
- EmpresaActual = ObjEmpresa.Empresa
- End If
- ObjEmpresa.Dispose()
-
- Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepProveedorCxP.rpt", EmpresaActual.Ruta))
- Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", EmpresaActual.Ruta))
- Dim logouri = String.Format("{0}Logo.png", EmpresaActual.Ruta) 'String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, CveEmpresaActual)
-
- Dim ObjProveedor As New ClsCompProveedores()
- If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, EmpresaActual.CveEmpresa) Then
- If ObjProveedor.DtResultados.Rows.Count > 0 Then
- NombreProv = ObjProveedor.RazonSocial
- Direccion = ObjProveedor.Direccion
- RFC = ObjProveedor.RFC
- Tel = ObjProveedor.Telefono
- DiasCredito = ObjProveedor.PlazoPago.ToString
- LimCredito = ObjProveedor.LimiteCredito.ToEntero
- End If
- End If
- ObjProveedor.Dispose()
-
- Dim lista = New List(Of CrystalParametro)
- lista.Add(New CrystalParametro("Empresa", EmpresaActual.Empresa))
- lista.Add(New CrystalParametro("TipoCuentas", "Todas"))
- lista.Add(New CrystalParametro("FechaInicio", "-"))
- lista.Add(New CrystalParametro("FechaFin", DateTime.Now.ToShortDateString))
- lista.Add(New CrystalParametro("NombreProveedor", NombreProv))
- lista.Add(New CrystalParametro("DireccionProveedor", Direccion))
- lista.Add(New CrystalParametro("ProveedorRFC", RFC))
- lista.Add(New CrystalParametro("ProveedorTelefono", Tel))
- lista.Add(New CrystalParametro("DiasCredito", DiasCredito))
- lista.Add(New CrystalParametro("LimiteCredito", LimCredito))
- lista.Add(New CrystalParametro("SaldoDisponible", (LimCredito - dr("Saldo").ToString.ToDouble).ToString.FormatoNumero))
- lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual))
-
- If Imagen.Exists Then
- lista.Add(New CrystalParametro("LogoPath", logouri))
- Else
- lista.Add(New CrystalParametro("LogoPath", ""))
- End If
-
- If Archivo.Exists Then
- bytes = ImprimirPDFCrystal(String.Format("{0}Formatos/RepProveedorCxP.rpt", EmpresaActual.Ruta), DTCxPTempral, lista, "EstadoCuentaCxP")
- Else
- bytes = ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/RepProveedorCxP.rpt"), DTCxPTempral, lista, "EstadoCuentaCxP")
- End If
-
- End If
-
- ObjMovtos.Dispose()
-
- Catch ex As Exception
- GuardaLog(String.Format("Ocurrio un error al generar el strem de la oc={0}. {1}", CveProveedor, ex.Message))
- End Try
-
- Return bytes
- End Function
-#End Region
-
-#Region "PDF NOMINA"
- Public Function GeneraPDFNomina(CvePersonal As Integer, CvePeriodo As Integer, CveEmpresa As Integer, RutaEmpresa As String) As Byte()
-
- Dim ObjNomina As New ClsNominas
- Dim ObjPersonal As New ClsRH
- Dim TieneError = False
- Dim Retorno As Byte() = Nothing
-
- If Not ObjNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodo, -1, CveEmpresa) Then
- Alert("Ocurrio un erro al obtener datos de la nomina", TipoMensaje.MsgError)
- ObjPersonal.Dispose()
- ObjNomina.Dispose()
- Return Nothing
- End If
-
- Dim CveNomina = ObjNomina.CveNomina
- Dim DTPercepciones As Data.DataTable
- Dim DTDeducciones As Data.DataTable
-
- Dim Ruta As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{CveEmpresa}\"
- Dim PathXML As String = $"{Ruta}XML\Nomina\{ObjNomina.SerieFolio}.xml"
- Dim FechaEmision, FechaCertificacion As DateTime
- Dim FolioFiscal, NoSerieCertificado, NoSerieCertificadoContribuyente, SelloCFDi, SelloSAT As String
- FolioFiscal = ""
- NoSerieCertificado = ""
- SelloCFDi = ""
- SelloSAT = ""
- NoSerieCertificadoContribuyente = ""
-
-
- Dim RutaCBB As String = String.Format("{0}CBB\Nomina\{1}.jpg", RutaEmpresa, ObjNomina.SerieFolio)
- Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
- Dim ImgCBB As String
-
- Dim RutaFormato As String = String.Format("{0}Formatos\Nomina.rdlc", RutaEmpresa)
- Dim RutaFormatoDefault As String = String.Format("Empresas\Grales\Formatos\Nomina.rdlc")
-
- 'SI ESTA TIMBRADA - CON XML
-
- If System.IO.File.Exists(PathXML) Then
-
- Dim XmlDoc As New System.Xml.XmlDocument
- 'XmlDoc.Load(Ruta & "XML\\Nomina\NOM A-3845.xml")
- XmlDoc.Load(PathXML)
-
- If ValorNodoXML(XmlDoc.DocumentElement, "version") = "3.3" Then
- FechaEmision = XmlDoc.DocumentElement.Attributes("Fecha").InnerText.ToDate
- NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("NoCertificado").InnerText
-
- For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1
- If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
- FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
- NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("NoCertificadoSAT").InnerText
- FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
- SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText
- SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText
- End If
- Next
- Else
- FechaEmision = XmlDoc.DocumentElement.Attributes("fecha").InnerText.ToDate
- NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("noCertificado").InnerText
-
- For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1
- If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:timbreFiscalDigital" Then
- FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
- NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("noCertificadoSAT").InnerText
- FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("fechaTimbrado").InnerText.ToDate
- SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloCFD").InnerText
- SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloSAT").InnerText
- End If
- Next
- End If
-
-
- 'SIN TIMBRAR - SIN XML
- Else
- FolioFiscal = "Sin Timbrar"
- NoSerieCertificado = "Sin Timbrar"
- SelloCFDi = "Sin Timbrar"
- SelloSAT = "Sin Timbrar"
- End If
-
- 'Si no tiene CBB, SE GENERA
- If Not ImagenCBB.Exists Then
- Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
- If ObjPersonal.GetPersonal(CvePersonal, CveEmpresa) Then
- CBB.GenerarCBB(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString.ToDecimal, FolioFiscal, RutaCBB)
- End If
- End If
-
- ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/Nomina/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, ObjNomina.SerieFolio)
-
- Try
- Dim CadenaOriginalCFD As String = "||1.0|" + FolioFiscal + "|" + FechaCertificacion.ToString("yyyy-MM-dd") + "T" + FechaCertificacion.ToString("HH:mm:ss") + "|" + SelloCFDi + "|" + NoSerieCertificado + "||"
-
- Dim RptParametro As New List(Of ReportParameter)
-
-
- 'Datos Empresa
- RptParametro.Add(New ReportParameter("RegistroPatronal", ObjNomina.RegistroPatronal))
-
- 'DATOS DEL EMPLEADO
- If ObjPersonal.GetPersonal(CvePersonal, CveEmpresa) Then
-
- RptParametro.Add(New ReportParameter("NoEmpleado", ObjPersonal.Codigo))
- RptParametro.Add(New ReportParameter("RFC", ObjPersonal.RFC))
- RptParametro.Add(New ReportParameter("CURP", ObjPersonal.CURP))
-
- RptParametro.Add(New ReportParameter("NombreCompleto", ObjPersonal.NombreCompleto))
- RptParametro.Add(New ReportParameter("Regimen", ObjPersonal.RegimenContratacion))
- RptParametro.Add(New ReportParameter("RiesgoPuesto", ObjPersonal.RiesgoPuesto))
-
- RptParametro.Add(New ReportParameter("NSS", ObjPersonal.NumeroSS))
- RptParametro.Add(New ReportParameter("Departamento", ObjPersonal.Departamento))
- RptParametro.Add(New ReportParameter("Puesto", ObjPersonal.Puesto.ToString))
-
- RptParametro.Add(New ReportParameter("Contrato", ObjPersonal.TipoContrato.ToString))
-
- RptParametro.Add(New ReportParameter("Jornada", ObjPersonal.Jornada))
- RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo))
- RptParametro.Add(New ReportParameter("SalarioBase", ObjPersonal.SalarioDiario.ToString))
- RptParametro.Add(New ReportParameter("SalarioDiarioInt", ObjPersonal.SDI.ToString))
-
- RptParametro.Add(New ReportParameter("Banco", ObjPersonal.Banco))
- RptParametro.Add(New ReportParameter("CLABE", ObjPersonal.CLABE))
-
-
- 'DATOS NOMINA
- If ObjNomina.GetNom_Nominas(CveNomina, CvePersonal, CvePeriodo, 1, CveEmpresa) Then
- RptParametro.Add(New ReportParameter("ReciboNomina", ObjNomina.Folio.ToString))
- RptParametro.Add(New ReportParameter("Serie", ObjNomina.Serie))
- RptParametro.Add(New ReportParameter("Fecha", ObjNomina.Fecha.ToString))
- RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo))
-
- RptParametro.Add(New ReportParameter("DiasPagados", ObjNomina.DiasPagados.ToString))
- RptParametro.Add(New ReportParameter("MetodoPago", ObjNomina.MetodoPago))
- RptParametro.Add(New ReportParameter("FormaPago", ObjNomina.FormaPago))
-
- RptParametro.Add(New ReportParameter("Cantidad", "1"))
- RptParametro.Add(New ReportParameter("Unidad", "SERVICIO"))
- RptParametro.Add(New ReportParameter("Descripcion", "PAGO DE NÓMINA"))
- RptParametro.Add(New ReportParameter("PU", ObjNomina.SubTotal.ToString))
- RptParametro.Add(New ReportParameter("Importe", ObjNomina.SubTotal.ToString))
-
- RptParametro.Add(New ReportParameter("SubTotal", ObjNomina.SubTotal.ToString))
- RptParametro.Add(New ReportParameter("Descuentos", ObjNomina.Descuento.ToString))
- RptParametro.Add(New ReportParameter("ISR", ObjNomina.RetISR.ToString))
- RptParametro.Add(New ReportParameter("Total", ObjNomina.Total.ToString))
-
-
- RptParametro.Add(New ReportParameter("ImporteLetra", ObjNomina.Total.ToString.ToDouble.Texto2Letras))
- RptParametro.Add(New ReportParameter("Clave", ""))
- Else
- TieneError = True
- End If
- Else
- TieneError = True
- End If
-
- If Not TieneError Then
- If ObjNomina.GetPeriodos(-1, CveEmpresa, -1, -1, CvePeriodo) Then
- RptParametro.Add(New ReportParameter("FechaInicio", ObjNomina.FechaInicio.ToString("dd/MM/yyyy")))
- RptParametro.Add(New ReportParameter("FechaFin", ObjNomina.FechaFin.ToString("dd/MM/yyyy")))
- Else
- TieneError = True
- End If
- End If
-
-
- 'Timbrado
- RptParametro.Add(New ReportParameter("FolioFiscal", FolioFiscal))
- RptParametro.Add(New ReportParameter("CertificadoSAT", NoSerieCertificado))
- RptParametro.Add(New ReportParameter("FechaCertificacion", FechaCertificacion.ToString))
- RptParametro.Add(New ReportParameter("SelloDigitalEmisor", SelloCFDi))
- RptParametro.Add(New ReportParameter("SelloDigitalSAT", SelloSAT))
- RptParametro.Add(New ReportParameter("CadenaOriginal", CadenaOriginalCFD))
- RptParametro.Add(New ReportParameter("QR", ImgCBB.ToString))
-
- 'PERCECIONES - DEDUCCIONES
- If ObjNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then
- DTPercepciones = ObjNomina.DtResultados.FiltraParametros("Tipo = 'P' AND EsPadre = 1")
- DTDeducciones = ObjNomina.DtResultados.FiltraParametros("Tipo = 'D' AND EsPadre = 1")
- Else
- DTPercepciones = Nothing
- DTDeducciones = Nothing
- End If
-
- Dim LSRds As New List(Of ReportDataSource)
- Dim RptDS As New ReportDataSource
- RptDS.Name = "DsOC"
- RptDS.Value = DTPercepciones
- LSRds.Add(RptDS)
-
- Dim RDS As New ReportDataSource
- RDS.Name = "DataSet1"
- RDS.Value = DTDeducciones
- LSRds.Add(RDS)
- Dim Archivo As New System.IO.FileInfo(RutaFormato)
-
- If Not TieneError Then
- If Archivo.Exists Then
- Retorno = StreamPDF(RutaFormato, LSRds, RptParametro, ObjNomina.SerieFolio, "PDF", MR:=Nothing)
- Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\\{1}.pdf", RutaEmpresa, ObjNomina.SerieFolio))
- If Not ArchivoPDF.Exists Then
- Try
- DirectoryExistsCreate(String.Format("{0}PDF", RutaEmpresa))
- DirectoryExistsCreate(String.Format("{0}PDF\{1}", RutaEmpresa, "Nomina"))
- File.WriteAllBytes(String.Format("{0}PDF\Nomina\{1}.pdf", RutaEmpresa, ObjNomina.SerieFolio), Retorno)
- Catch ex As Exception
- Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
- End Try
- End If
- Else
- ImprimirPDF(String.Format("{0}\Formatos\Nomina.rdlc", RutaEmpresa), LSRds, RptParametro, ObjNomina.SerieFolio)
- End If
- Else
- Alert("Ocurrio un error al obtener los datos de la Nomina")
- End If
- Catch ex As Exception
-
- GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
- End Try
-
-
- ObjNomina.Dispose()
- ObjPersonal.Dispose()
-
- Return Retorno
- End Function
-#End Region
-
-#Region "PDF PAGOS"
- Public Sub PDFReciboDePagos(CveVenta As Integer, CveIE As Integer, CveComplementoPago As Integer, Optional imprimir As Boolean = True)
-
-
- Dim ObjBancos As New ClsBancos
- Dim ObjClientes As New ClsClientes
- Dim params As New List(Of ReportParameter)
- Dim SerieFolio As String
-
- Dim Serie = ""
- Dim Folio = ""
- Dim CveCliente = -1
- Dim RFCOrdenante = ""
- Dim CveMoneda As Integer = 1
-
- Dim FolioFiscal = ""
- Dim NoSerieCertificado = ""
- Dim FechaCertificacion = ""
- Dim SelloCFDi = ""
- Dim SelloSAT = ""
- Dim CertificadoSAT = ""
- Dim FechaComprobante As Date
-
- Dim CveUnidad = ""
- Dim Descripcion = ""
- Dim Cantidad = ""
- Dim CvePS = ""
- Dim PU = ""
- Dim Importe = ""
- Dim TotalLetra = ""
-
- Dim FechaRecibo = ""
-
- 'DT PAGO
- Dim DTConceptosPago As New DataTable
- DTConceptosPago.Columns.Add("CtaOrdenante", GetType(String))
- DTConceptosPago.Columns.Add("Monto", GetType(Decimal))
- DTConceptosPago.Columns.Add("MonedaP", GetType(String))
- DTConceptosPago.Columns.Add("FormaDePagoP", GetType(String))
- DTConceptosPago.Columns.Add("FechaPago", GetType(String))
- DTConceptosPago.Columns.Add("TipoCambioP", GetType(String))
- DTConceptosPago.Columns.Add("RfcEmisorCtaOrd", GetType(String))
-
- 'DT DOCUMENTOS RELACIONADOS
- Dim DTConceptosPagoRelacionado As New DataTable
- DTConceptosPagoRelacionado.Columns.Add("IdDocumento", GetType(String))
- DTConceptosPagoRelacionado.Columns.Add("Folio", GetType(String))
- DTConceptosPagoRelacionado.Columns.Add("Serie", GetType(String))
- DTConceptosPagoRelacionado.Columns.Add("ImpPagado", GetType(Decimal))
- DTConceptosPagoRelacionado.Columns.Add("ImpSaldoAnt", GetType(Decimal))
- DTConceptosPagoRelacionado.Columns.Add("NumParcialidad", GetType(String))
- DTConceptosPagoRelacionado.Columns.Add("MetodoDePagoDR", GetType(String))
- DTConceptosPagoRelacionado.Columns.Add("MonedaDR", GetType(String))
- DTConceptosPagoRelacionado.Columns.Add("TipoCambioDR", GetType(String))
-
-
- If ObjBancos.GetComplementoPagos(CveComplementoPago, CveIE, CveVenta, UsuarioActual.CveEmpresa) Then
- Serie = ObjBancos.DtResultados.FiltroPrimeroValor("Serie")
- Folio = ObjBancos.DtResultados.FiltroPrimeroValor("Folio")
- CveCliente = ObjBancos.DtResultados.FiltroPrimeroValor("CveCliente").ToEntero
- CveMoneda = ObjBancos.DtResultados.FiltroPrimeroValor("CveMoneda").ToEntero
- FechaComprobante = ObjBancos.DtResultados.FiltroPrimeroValor("Fecha").ToDate
- End If
-
- 'CLIENTE
- If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, Estatus:=-1) Then
- RFCOrdenante = ObjClientes.RFC
-
- params.Add(New ReportParameter("Cliente", ObjClientes.Nombre))
- params.Add(New ReportParameter("ClienteDireccion", ObjClientes.Direccion))
- params.Add(New ReportParameter("ClienteColonia", ObjClientes.Colonia))
- params.Add(New ReportParameter("ClienteCiudad", ObjClientes.Ciudad))
- params.Add(New ReportParameter("ClienteEstado", ObjClientes.Estado))
- params.Add(New ReportParameter("ClienteCP", ObjClientes.CP))
- params.Add(New ReportParameter("ClienteRFC", ObjClientes.RFC))
- End If
-
- 'DATOS DE EMPRESA
- params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
- params.Add(New ReportParameter("EmpresaDireccion", UsuarioActual.Empresa.Direccion))
- params.Add(New ReportParameter("EmpresaColonia", UsuarioActual.Empresa.Colonia))
- params.Add(New ReportParameter("EmpresaCiudad", UsuarioActual.Empresa.Ciudad))
- params.Add(New ReportParameter("EmpresaEstado", UsuarioActual.Empresa.Estado))
- params.Add(New ReportParameter("EmpresaCP", UsuarioActual.Empresa.CP.ToString()))
- params.Add(New ReportParameter("EmpresaRFC", UsuarioActual.Empresa.RFC))
- params.Add(New ReportParameter("EmpresaNoExt", UsuarioActual.Empresa.NoExt))
- params.Add(New ReportParameter("EmpresaNoInt", UsuarioActual.Empresa.NoInt))
-
- 'DATOS IMPRESION
- params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
- params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
-
- 'DATOS GENERALES
- Dim Ruta As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{UsuarioActual.CveEmpresa}\"
- Dim PathXML As String = $"{Ruta}XML\Pag\{Serie}-{Folio}.xml"
- Dim PathPDF As String = $"{Ruta}PDF\Pag\{Serie}-{Folio}.pdf"
- SerieFolio = $"{Serie}-{Folio}"
- Dim ImagenCBB As String = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, $"{Serie}-{Folio}.jpg")
-
- If File.Exists(PathXML) Then
- Dim XmlDoc As New System.Xml.XmlDocument
- XmlDoc.Load(PathXML)
-
- Dim validaElemento = XmlDoc.DocumentElement("cfdi:Complemento")
- Dim validaElementoPago = XmlDoc.DocumentElement("cfdi:Conceptos")
-
- 'Datos Fiscales
- If Not IsNothing(validaElemento) Then
- For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1
- If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
- FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
- NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("NoCertificadoSAT").InnerText
- FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText
- SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText
- SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText
- End If
- Next
- End If
-
- 'Pago
- If Not IsNothing(validaElemento) Then
- Dim PagosChild = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Cast(Of XmlNode).Where(Function(a) a.LocalName.Equals("Pagos", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault()
-
- For Each Pagos As XmlNode In PagosChild.ChildNodes
- Dim Dr As DataRow = DTConceptosPago.NewRow
-
- If Not Pagos.Attributes("CtaOrdenante") Is Nothing Then Dr("CtaOrdenante") = Pagos.Attributes("CtaOrdenante").Value Else Dr("CtaOrdenante") = ""
- If Not Pagos.Attributes("TipoCambioP") Is Nothing Then Dr("TipoCambioP") = Pagos.Attributes("TipoCambioP").Value Else Dr("TipoCambioP") = ""
-
- If Not Pagos.Attributes("RfcEmisorCtaOrd") Is Nothing Then
- Dr("RfcEmisorCtaOrd") = Pagos.Attributes("RfcEmisorCtaOrd").Value
- RFCOrdenante = Pagos.Attributes("RfcEmisorCtaOrd").Value
- Else
- Dr("RfcEmisorCtaOrd") = ""
- End If
-
- Dr("Monto") = Pagos.Attributes("Monto").Value
- Dr("MonedaP") = Pagos.Attributes("MonedaP").Value
- Dr("FormaDePagoP") = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPagoSAT", $"ClaveFormaPagoSAT= '{Pagos.Attributes("FormaDePagoP").Value}'")
- Dr("FechaPago") = Pagos.Attributes("FechaPago").Value
-
- FechaRecibo = Pagos.Attributes("FechaPago").Value
- TotalLetra = Pagos.Attributes("Monto").Value.ToString.ToDouble.Texto2Letras(CveMoneda)
-
- DTConceptosPago.Rows.Add(Dr)
-
- For Each Relacionado As XmlNode In Pagos.ChildNodes
- Dim DrRelacionado As DataRow = DTConceptosPagoRelacionado.NewRow
-
- If Not Relacionado.Attributes("Folio") Is Nothing Then DrRelacionado("Folio") = Relacionado.Attributes("Folio").Value Else DrRelacionado("Folio") = ""
- If Not Relacionado.Attributes("Serie") Is Nothing Then DrRelacionado("Serie") = Relacionado.Attributes("Serie").Value Else DrRelacionado("Serie") = ""
- If Not Relacionado.Attributes("TipoCambioDR") Is Nothing Then DrRelacionado("TipoCambioDR") = Relacionado.Attributes("TipoCambioDR").Value Else DrRelacionado("TipoCambioDR") = ""
-
- DrRelacionado("IdDocumento") = Relacionado.Attributes("IdDocumento").Value
- DrRelacionado("ImpPagado") = Relacionado.Attributes("ImpPagado").Value
- DrRelacionado("ImpSaldoAnt") = Relacionado.Attributes("ImpSaldoAnt").Value
- DrRelacionado("NumParcialidad") = Relacionado.Attributes("NumParcialidad").Value
- DrRelacionado("MetodoDePagoDR") = Relacionado.Attributes("MetodoDePagoDR").Value
- DrRelacionado("MonedaDR") = Relacionado.Attributes("MonedaDR").Value
-
- DTConceptosPagoRelacionado.Rows.Add(DrRelacionado)
- Next
- Next
-
- End If
-
- If Not IsNothing(validaElementoPago) Then
- For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes.Count - 1
- If XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Name = "cfdi:Concepto" Then
- Importe = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("Importe").InnerText
- PU = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("ValorUnitario").InnerText
- Descripcion = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("Descripcion").InnerText
- CveUnidad = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("ClaveUnidad").InnerText
- Cantidad = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("Cantidad").InnerText
- CvePS = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("ClaveProdServ").InnerText
- End If
- Next
- End If
-
- Dim CadenaOriginal As String = $"||1.0| {FolioFiscal} | {FechaCertificacion.ToDate.ToShortDateString} T {FechaCertificacion.ToDateTime.ToShortTimeString} | {SelloCFDi} | {NoSerieCertificado} ||"
-
- ' PARAMETROS DEL REPORTE
-
- params.Add(New ReportParameter("SerieFolio", SerieFolio))
- params.Add(New ReportParameter("RFCOrdenante", RFCOrdenante))
- params.Add(New ReportParameter("FechaRecibo", FechaRecibo))
-
- params.Add(New ReportParameter("Cantidad", Cantidad))
- params.Add(New ReportParameter("Descripcion", Descripcion))
- params.Add(New ReportParameter("UnidadMedida", CveUnidad))
- params.Add(New ReportParameter("PU", PU))
- params.Add(New ReportParameter("Importe", Importe))
-
- params.Add(New ReportParameter("CantidadLetra", TotalLetra.ToUpper()))
-
- params.Add(New ReportParameter("UUIDPago", FolioFiscal))
- params.Add(New ReportParameter("NoCertificado", NoSerieCertificado))
- params.Add(New ReportParameter("FechaTimbre", FechaComprobante.ToShortDateString))
- params.Add(New ReportParameter("Sello", SelloCFDi))
- params.Add(New ReportParameter("SelloSAT", SelloSAT))
- params.Add(New ReportParameter("CadenaOriginal", CadenaOriginal))
- params.Add(New ReportParameter("CertificadoSAT", CertificadoSAT))
- params.Add(New ReportParameter("QR", ImagenCBB))
-
- Dim lrds As New List(Of ReportDataSource)
- Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = If(DTConceptosPago IsNot Nothing, DTConceptosPago, New DataTable)}
- Dim rds2 As New ReportDataSource With {.Name = "DataSet2", .Value = If(DTConceptosPagoRelacionado IsNot Nothing, DTConceptosPagoRelacionado, New DataTable)}
- lrds.Add(rds)
- lrds.Add(rds2)
-
- Dim rutaArchivo As String = ""
-
- 'LOGO
- Dim LogoRuta As String = ""
-
- LogoRuta = String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta)
- If File.Exists(LogoRuta) Then
-
- If File.Exists(LogoRuta) Then
- LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
- End If
- 'POR EMPRESA
- params.Add(New ReportParameter("LogoPath", LogoRuta))
- Else
- params.Add(New ReportParameter("LogoPath", ""))
- End If
-
-
- If File.Exists($"{UsuarioActual.Empresa.Ruta}\Formatos\ReciboDePago.rdlc") Then
- rutaArchivo = $"Empresas\{UsuarioActual.CveEmpresa}\Formatos\ReciboDePago.rdlc"
- Else
- rutaArchivo = " \Empresas\Grales\Formatos\ReciboDePago.rdlc"
- End If
-
- If Not Directory.Exists($"{UsuarioActual.Empresa.Ruta}\PDF\Pag\") Then
- Directory.CreateDirectory($"{UsuarioActual.Empresa.Ruta}\PDF\Pag\")
- End If
-
-
- Dim ArchivoPDF As New System.IO.FileInfo($"{Ruta}PDF\Pag\{Serie}-{Folio}.pdf")
- If ArchivoPDF.Exists Then
- Try
- ArchivoPDF.Delete()
- File.WriteAllBytes($"{UsuarioActual.Empresa.Ruta}\PDF\Pag\{SerieFolio}.pdf", StreamPDF(rutaArchivo, lrds, params, "Pago", "PDF"))
- Catch ex As Exception
- Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
- End Try
- Else
- File.WriteAllBytes($"{UsuarioActual.Empresa.Ruta}\PDF\Pag\{SerieFolio}.pdf", StreamPDF(rutaArchivo, lrds, params, "Pago", "PDF"))
- End If
-
- If imprimir Then
- ImprimirPDF(rutaArchivo, lrds, params, SerieFolio, "PDF")
- End If
-
- End If
-
- ObjBancos.Dispose()
- ObjClientes.Dispose()
-
- End Sub
-#End Region
-
-End Class
-
+ If Archivo.Exists Then
+ bytes = StreamPDF(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta), DtDetalle, params, $"OC_{ObjOC.Folio.ToString}", RDSName:="DsOC", MR:=MR)
+ Else
+ params.Add(New ReportParameter("Empresa", EmpresaActual.Empresa))
+ bytes = StreamPDF("Empresas\Grales\Formatos\OC.rdlc", DtDetalle, params, $"OC_{ObjOC.Folio.ToString}", RDSName:="DsOC", MR:=MR)
+ End If
+
+ If ConBitacora Then
+ Dim dttemp As New DataTable
+ Dim ObjEventoBitacora As New ClsOIEventos()
+ If ObjEventoBitacora.GetAgendaBitacora(UsuarioActual.CveUsuario, EmpresaActual.CveEmpresa, CveOC:=tCveOrdenCompra) Then
+ dttemp = ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento = 6 OR CveTipoEvento = 2")
+ End If
+ ObjEventoBitacora.Dispose()
+ If Not IsNothing(dttemp) AndAlso dttemp.Rows.Count > 0 Then
+
+ Dim paramsest As New List(Of ReportParameter)
+ paramsest.Add(New ReportParameter("Empresa", EmpresaActual.Empresa))
+ paramsest.Add(New ReportParameter("Titulo", "Bitácora de órdenes de compra"))
+ paramsest.Add(New ReportParameter("Folio", ObjOC.Folio.ToString))
+ paramsest.Add(New ReportParameter("TipoOC", If(ObjOC.Tipo = "OC", "Orden de Compra", "Requisición")))
+ Dim bytes2 As Byte()
+ bytes2 = StreamPDF("Empresas\Grales\Formatos\Bitacora.rdlc", dttemp, paramsest, $"OC_{ObjOC.Folio.ToString}", MR:=MR)
+ Using ms As New MemoryStream()
+ Using document As New iTextSharp.text.Document()
+ Using copy As New PdfCopy(document, ms)
+ document.Open()
+
+ Dim reader As New PdfReader(bytes)
+ ' loop over the pages in that document
+ Dim n As Integer = reader.NumberOfPages
+ Dim page As Integer = 0
+ While page < n
+ page = page + 1
+ copy.AddPage(copy.GetImportedPage(reader, page))
+ End While
+
+
+ reader = New PdfReader(bytes2)
+ ' loop over the pages in that document
+ n = reader.NumberOfPages
+ page = 0
+ While page < n
+ page = page + 1
+ copy.AddPage(copy.GetImportedPage(reader, page))
+ End While
+
+ End Using
+ End Using
+ bytes = ms.ToArray()
+ End Using
+ End If
+ dttemp.Dispose()
+ End If
+
+ End If
+ ObjOC.Dispose()
+
+ DtDetalle.Dispose()
+
+ Catch ex As Exception
+ GuardaLog(String.Format("Ocurrio un error al generar el strem de la oc={0}. {1}", tCveOrdenCompra, ex.Message))
+ End Try
+
+ Return bytes
+ End Function
+
+ Public Function NewGeneraOCCotizacion(tCveOrdenCompra As Integer, Optional MR As ReportViewer = Nothing, Optional ConBitacora As Boolean = False) As Byte()
+ Dim bytes As Byte() = Nothing
+ Dim CveEmpresaActual As Integer
+
+ Try
+ Dim DtDetalle As DataTable = Nothing
+ Dim ObjOC As New ClsOC
+
+ If ObjOC.GetOC(tCveOrdenCompra, UsuarioActual.CveEmpresa, CveUsuario:=UsuarioActual.CveUsuario) Then
+ CveEmpresaActual = ObjOC.CveEmpresa
+
+ Dim ObjEmpresa As New ClsSisEmpresas()
+ Dim EmpresaActual As New Empresa
+ If ObjEmpresa.GetEmpresas(CveEmpresaActual, "-1", "-1", "-1", "-1") Then
+ EmpresaActual = ObjEmpresa.Empresa
+ End If
+ ObjEmpresa.Dispose()
+
+ '-----------------------COTIZACIONES--------------------------
+ Dim params As New List(Of ReportParameter)
+ Dim NumCotizaciones = 0
+ Dim DtCotizaciones As New DataTable
+ Dim ProveedoresCotizacion = New ArrayList
+ Dim Ds As DataSet = ObjOC.GetCotizacionesTabla(tCveOrdenCompra)
+ If Ds IsNot Nothing AndAlso Ds.Tables.Count = 2 Then
+ For Each Dr2 As DataRow In Ds.Tables(1).Rows
+ ProveedoresCotizacion.Add(Dr2("RazonSocial"))
+ Next
+ NumCotizaciones = Ds.Tables(1).Rows.Count
+ DtCotizaciones = Ds.Tables(0)
+
+ If Not DtCotizaciones.Columns.Contains("PU1") Then DtCotizaciones.Columns.Add("PU1", GetType(String))
+ If Not DtCotizaciones.Columns.Contains("PU2") Then DtCotizaciones.Columns.Add("PU2", GetType(String))
+ If Not DtCotizaciones.Columns.Contains("PU3") Then DtCotizaciones.Columns.Add("PU3", GetType(String))
+ If Not DtCotizaciones.Columns.Contains("PU4") Then DtCotizaciones.Columns.Add("PU4", GetType(String))
+ If Not DtCotizaciones.Columns.Contains("PU5") Then DtCotizaciones.Columns.Add("PU5", GetType(String))
+
+ End If
+
+ 'COTIZACION
+ For Index = 1 To 5
+ Try
+ params.Add(New ReportParameter($"Cotizacion{Index.ToString}", ProveedoresCotizacion(Index - 1).ToString))
+ Catch ex As Exception
+ params.Add(New ReportParameter($"Cotizacion{Index.ToString}", ""))
+ End Try
+ Next
+
+ params.Add(New ReportParameter("CentroCostos", If(DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0, DtDetalle.MAX("Proyecto").ToString, "")))
+ params.Add(New ReportParameter("Folio", ObjOC.Folio.ToString))
+ params.Add(New ReportParameter("ProveedorNombre", ObjOC.RazonSocial))
+ params.Add(New ReportParameter("ProveedorLugar", ObjOC.LugarEntrega))
+ params.Add(New ReportParameter("Estatus", ObjOC.Estatus))
+ params.Add(New ReportParameter("Descripcion", ObjOC.Descripcion))
+ params.Add(New ReportParameter("Asunto", ObjOC.Justificacion))
+ params.Add(New ReportParameter("FechaEntrega", ObjOC.FechaEstimadaEntrega.ToShortDateString))
+ params.Add(New ReportParameter("FechaSolicitud", ObjOC.Fecha.ToShortDateString))
+
+ Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\CotizacionOC.rdlc", EmpresaActual.Ruta))
+ If Archivo.Exists Then
+ bytes = StreamPDF(String.Format("{0}Formatos\CotizacionOC.rdlc", EmpresaActual.Ruta), DtCotizaciones, params, $"OC_{ObjOC.Folio.ToString}", RDSName:="DsOC", MR:=MR)
+ End If
+ End If
+ ObjOC.Dispose()
+ DtDetalle.Dispose()
+ Catch ex As Exception
+ GuardaLog(String.Format("Ocurrio un error al generar el strem de la oc={0}. {1}", tCveOrdenCompra, ex.Message))
+ End Try
+ Return bytes
+ End Function
+#End Region
+
+#Region "NEW RepProveedorCxP.rpt"
+ Public Function NewGeneraBytesCxP(CveProveedor As Integer, UsuarioActual As String, Optional MR As ReportViewer = Nothing) As Byte()
+ Dim bytes As Byte() = Nothing
+ Dim CveEmpresaActual As Integer
+ 'Dim TmpDTEnvioDireccion As DataTable
+ Dim params As New List(Of ReportParameter)
+
+ Try
+ Dim DTCxPTempral As DataTable = Nothing
+
+ Dim ObjMovtos As New ClsMovimientos()
+ If ObjMovtos.GetCxPProveedor(CveProveedor, "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, "-1", "-1") Then
+ DTCxPTempral = ObjMovtos.DtResultados
+ End If
+
+ If DTCxPTempral IsNot Nothing AndAlso DTCxPTempral.Rows.Count > 0 Then
+ Dim dr As DataRow = DTCxPTempral.Rows(0)
+ Dim NombreProv = ""
+ Dim Direccion = ""
+ Dim RFC = ""
+ Dim Tel = ""
+ Dim DiasCredito = ""
+ Dim LimCredito As Double
+
+ CveEmpresaActual = dr("CveEmpresa").ToString.ToEntero
+ Dim ObjEmpresa As New ClsSisEmpresas()
+ Dim EmpresaActual As New Empresa
+ If ObjEmpresa.GetEmpresas(CveEmpresaActual, "-1", "-1", "-1", "-1") Then
+ EmpresaActual = ObjEmpresa.Empresa
+ End If
+ ObjEmpresa.Dispose()
+
+ Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepProveedorCxP.rpt", EmpresaActual.Ruta))
+ Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", EmpresaActual.Ruta))
+ Dim logouri = String.Format("{0}Logo.png", EmpresaActual.Ruta) 'String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, CveEmpresaActual)
+
+ Dim ObjProveedor As New ClsCompProveedores()
+ If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, EmpresaActual.CveEmpresa) Then
+ If ObjProveedor.DtResultados.Rows.Count > 0 Then
+ NombreProv = ObjProveedor.RazonSocial
+ Direccion = ObjProveedor.Direccion
+ RFC = ObjProveedor.RFC
+ Tel = ObjProveedor.Telefono
+ DiasCredito = ObjProveedor.PlazoPago.ToString
+ LimCredito = ObjProveedor.LimiteCredito.ToEntero
+ End If
+ End If
+ ObjProveedor.Dispose()
+
+ Dim lista = New List(Of CrystalParametro)
+ lista.Add(New CrystalParametro("Empresa", EmpresaActual.Empresa))
+ lista.Add(New CrystalParametro("TipoCuentas", "Todas"))
+ lista.Add(New CrystalParametro("FechaInicio", "-"))
+ lista.Add(New CrystalParametro("FechaFin", DateTime.Now.ToShortDateString))
+ lista.Add(New CrystalParametro("NombreProveedor", NombreProv))
+ lista.Add(New CrystalParametro("DireccionProveedor", Direccion))
+ lista.Add(New CrystalParametro("ProveedorRFC", RFC))
+ lista.Add(New CrystalParametro("ProveedorTelefono", Tel))
+ lista.Add(New CrystalParametro("DiasCredito", DiasCredito))
+ lista.Add(New CrystalParametro("LimiteCredito", LimCredito))
+ lista.Add(New CrystalParametro("SaldoDisponible", (LimCredito - dr("Saldo").ToString.ToDouble).ToString.FormatoNumero))
+ lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual))
+
+ If Imagen.Exists Then
+ lista.Add(New CrystalParametro("LogoPath", logouri))
+ Else
+ lista.Add(New CrystalParametro("LogoPath", ""))
+ End If
+
+ If Archivo.Exists Then
+ bytes = ImprimirPDFCrystal(String.Format("{0}Formatos/RepProveedorCxP.rpt", EmpresaActual.Ruta), DTCxPTempral, lista, "EstadoCuentaCxP")
+ Else
+ bytes = ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/RepProveedorCxP.rpt"), DTCxPTempral, lista, "EstadoCuentaCxP")
+ End If
+
+ End If
+
+ ObjMovtos.Dispose()
+
+ Catch ex As Exception
+ GuardaLog(String.Format("Ocurrio un error al generar el strem de la oc={0}. {1}", CveProveedor, ex.Message))
+ End Try
+
+ Return bytes
+ End Function
+#End Region
+
+#Region "PDF NOMINA"
+ Public Function GeneraPDFNomina(CvePersonal As Integer, CvePeriodo As Integer, CveEmpresa As Integer, RutaEmpresa As String) As Byte()
+
+ Dim ObjNomina As New ClsNominas
+ Dim ObjPersonal As New ClsRH
+ Dim TieneError = False
+ Dim Retorno As Byte() = Nothing
+
+ If Not ObjNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodo, -1, CveEmpresa) Then
+ Alert("Ocurrio un erro al obtener datos de la nomina", TipoMensaje.MsgError)
+ ObjPersonal.Dispose()
+ ObjNomina.Dispose()
+ Return Nothing
+ End If
+
+ Dim CveNomina = ObjNomina.CveNomina
+ Dim DTPercepciones As Data.DataTable
+ Dim DTDeducciones As Data.DataTable
+
+ Dim Ruta As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{CveEmpresa}\"
+ Dim PathXML As String = $"{Ruta}XML\Nomina\{ObjNomina.SerieFolio}.xml"
+ Dim FechaEmision, FechaCertificacion As DateTime
+ Dim FolioFiscal, NoSerieCertificado, NoSerieCertificadoContribuyente, SelloCFDi, SelloSAT As String
+ FolioFiscal = ""
+ NoSerieCertificado = ""
+ SelloCFDi = ""
+ SelloSAT = ""
+ NoSerieCertificadoContribuyente = ""
+
+
+ Dim RutaCBB As String = String.Format("{0}CBB\Nomina\{1}.jpg", RutaEmpresa, ObjNomina.SerieFolio)
+ Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
+ Dim ImgCBB As String
+
+ Dim RutaFormato As String = String.Format("{0}Formatos\Nomina.rdlc", RutaEmpresa)
+ Dim RutaFormatoDefault As String = String.Format("Empresas\Grales\Formatos\Nomina.rdlc")
+
+ 'SI ESTA TIMBRADA - CON XML
+
+ If System.IO.File.Exists(PathXML) Then
+
+ Dim XmlDoc As New System.Xml.XmlDocument
+ 'XmlDoc.Load(Ruta & "XML\\Nomina\NOM A-3845.xml")
+ XmlDoc.Load(PathXML)
+
+ If ValorNodoXML(XmlDoc.DocumentElement, "version") = "3.3" Then
+ FechaEmision = XmlDoc.DocumentElement.Attributes("Fecha").InnerText.ToDate
+ NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("NoCertificado").InnerText
+
+ For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1
+ If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
+ FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
+ NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("NoCertificadoSAT").InnerText
+ FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
+ SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText
+ SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText
+ End If
+ Next
+ Else
+ FechaEmision = XmlDoc.DocumentElement.Attributes("fecha").InnerText.ToDate
+ NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("noCertificado").InnerText
+
+ For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1
+ If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:timbreFiscalDigital" Then
+ FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
+ NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("noCertificadoSAT").InnerText
+ FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("fechaTimbrado").InnerText.ToDate
+ SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloCFD").InnerText
+ SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloSAT").InnerText
+ End If
+ Next
+ End If
+
+
+ 'SIN TIMBRAR - SIN XML
+ Else
+ FolioFiscal = "Sin Timbrar"
+ NoSerieCertificado = "Sin Timbrar"
+ SelloCFDi = "Sin Timbrar"
+ SelloSAT = "Sin Timbrar"
+ End If
+
+ 'Si no tiene CBB, SE GENERA
+ If Not ImagenCBB.Exists Then
+ Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
+ If ObjPersonal.GetPersonal(CvePersonal, CveEmpresa) Then
+ CBB.GenerarCBB(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString.ToDecimal, FolioFiscal, RutaCBB)
+ End If
+ End If
+
+ ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/Nomina/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, ObjNomina.SerieFolio)
+
+ Try
+ Dim CadenaOriginalCFD As String = "||1.0|" + FolioFiscal + "|" + FechaCertificacion.ToString("yyyy-MM-dd") + "T" + FechaCertificacion.ToString("HH:mm:ss") + "|" + SelloCFDi + "|" + NoSerieCertificado + "||"
+
+ Dim RptParametro As New List(Of ReportParameter)
+
+
+ 'Datos Empresa
+ RptParametro.Add(New ReportParameter("RegistroPatronal", ObjNomina.RegistroPatronal))
+
+ 'DATOS DEL EMPLEADO
+ If ObjPersonal.GetPersonal(CvePersonal, CveEmpresa) Then
+
+ RptParametro.Add(New ReportParameter("NoEmpleado", ObjPersonal.Codigo))
+ RptParametro.Add(New ReportParameter("RFC", ObjPersonal.RFC))
+ RptParametro.Add(New ReportParameter("CURP", ObjPersonal.CURP))
+
+ RptParametro.Add(New ReportParameter("NombreCompleto", ObjPersonal.NombreCompleto))
+ RptParametro.Add(New ReportParameter("Regimen", ObjPersonal.RegimenContratacion))
+ RptParametro.Add(New ReportParameter("RiesgoPuesto", ObjPersonal.RiesgoPuesto))
+
+ RptParametro.Add(New ReportParameter("NSS", ObjPersonal.NumeroSS))
+ RptParametro.Add(New ReportParameter("Departamento", ObjPersonal.Departamento))
+ RptParametro.Add(New ReportParameter("Puesto", ObjPersonal.Puesto.ToString))
+
+ RptParametro.Add(New ReportParameter("Contrato", ObjPersonal.TipoContrato.ToString))
+
+ RptParametro.Add(New ReportParameter("Jornada", ObjPersonal.Jornada))
+ RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo))
+ RptParametro.Add(New ReportParameter("SalarioBase", ObjPersonal.SalarioDiario.ToString))
+ RptParametro.Add(New ReportParameter("SalarioDiarioInt", ObjPersonal.SDI.ToString))
+
+ RptParametro.Add(New ReportParameter("Banco", ObjPersonal.Banco))
+ RptParametro.Add(New ReportParameter("CLABE", ObjPersonal.CLABE))
+
+
+ 'DATOS NOMINA
+ If ObjNomina.GetNom_Nominas(CveNomina, CvePersonal, CvePeriodo, 1, CveEmpresa) Then
+ RptParametro.Add(New ReportParameter("ReciboNomina", ObjNomina.Folio.ToString))
+ RptParametro.Add(New ReportParameter("Serie", ObjNomina.Serie))
+ RptParametro.Add(New ReportParameter("Fecha", ObjNomina.Fecha.ToString))
+ RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo))
+
+ RptParametro.Add(New ReportParameter("DiasPagados", ObjNomina.DiasPagados.ToString))
+ RptParametro.Add(New ReportParameter("MetodoPago", ObjNomina.MetodoPago))
+ RptParametro.Add(New ReportParameter("FormaPago", ObjNomina.FormaPago))
+
+ RptParametro.Add(New ReportParameter("Cantidad", "1"))
+ RptParametro.Add(New ReportParameter("Unidad", "SERVICIO"))
+ RptParametro.Add(New ReportParameter("Descripcion", "PAGO DE NÓMINA"))
+ RptParametro.Add(New ReportParameter("PU", ObjNomina.SubTotal.ToString))
+ RptParametro.Add(New ReportParameter("Importe", ObjNomina.SubTotal.ToString))
+
+ RptParametro.Add(New ReportParameter("SubTotal", ObjNomina.SubTotal.ToString))
+ RptParametro.Add(New ReportParameter("Descuentos", ObjNomina.Descuento.ToString))
+ RptParametro.Add(New ReportParameter("ISR", ObjNomina.RetISR.ToString))
+ RptParametro.Add(New ReportParameter("Total", ObjNomina.Total.ToString))
+
+
+ RptParametro.Add(New ReportParameter("ImporteLetra", ObjNomina.Total.ToString.ToDouble.Texto2Letras))
+ RptParametro.Add(New ReportParameter("Clave", ""))
+ Else
+ TieneError = True
+ End If
+ Else
+ TieneError = True
+ End If
+
+ If Not TieneError Then
+ If ObjNomina.GetPeriodos(-1, CveEmpresa, -1, -1, CvePeriodo) Then
+ RptParametro.Add(New ReportParameter("FechaInicio", ObjNomina.FechaInicio.ToString("dd/MM/yyyy")))
+ RptParametro.Add(New ReportParameter("FechaFin", ObjNomina.FechaFin.ToString("dd/MM/yyyy")))
+ Else
+ TieneError = True
+ End If
+ End If
+
+
+ 'Timbrado
+ RptParametro.Add(New ReportParameter("FolioFiscal", FolioFiscal))
+ RptParametro.Add(New ReportParameter("CertificadoSAT", NoSerieCertificado))
+ RptParametro.Add(New ReportParameter("FechaCertificacion", FechaCertificacion.ToString))
+ RptParametro.Add(New ReportParameter("SelloDigitalEmisor", SelloCFDi))
+ RptParametro.Add(New ReportParameter("SelloDigitalSAT", SelloSAT))
+ RptParametro.Add(New ReportParameter("CadenaOriginal", CadenaOriginalCFD))
+ RptParametro.Add(New ReportParameter("QR", ImgCBB.ToString))
+
+ 'PERCECIONES - DEDUCCIONES
+ If ObjNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then
+ DTPercepciones = ObjNomina.DtResultados.FiltraParametros("Tipo = 'P' AND EsPadre = 1")
+ DTDeducciones = ObjNomina.DtResultados.FiltraParametros("Tipo = 'D' AND EsPadre = 1")
+ Else
+ DTPercepciones = Nothing
+ DTDeducciones = Nothing
+ End If
+
+ Dim LSRds As New List(Of ReportDataSource)
+ Dim RptDS As New ReportDataSource
+ RptDS.Name = "DsOC"
+ RptDS.Value = DTPercepciones
+ LSRds.Add(RptDS)
+
+ Dim RDS As New ReportDataSource
+ RDS.Name = "DataSet1"
+ RDS.Value = DTDeducciones
+ LSRds.Add(RDS)
+ Dim Archivo As New System.IO.FileInfo(RutaFormato)
+
+ If Not TieneError Then
+ If Archivo.Exists Then
+ Retorno = StreamPDF(RutaFormato, LSRds, RptParametro, ObjNomina.SerieFolio, "PDF", MR:=Nothing)
+ Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\\{1}.pdf", RutaEmpresa, ObjNomina.SerieFolio))
+ If Not ArchivoPDF.Exists Then
+ Try
+ DirectoryExistsCreate(String.Format("{0}PDF", RutaEmpresa))
+ DirectoryExistsCreate(String.Format("{0}PDF\{1}", RutaEmpresa, "Nomina"))
+ File.WriteAllBytes(String.Format("{0}PDF\Nomina\{1}.pdf", RutaEmpresa, ObjNomina.SerieFolio), Retorno)
+ Catch ex As Exception
+ Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
+ End Try
+ End If
+ Else
+ ImprimirPDF(String.Format("{0}\Formatos\Nomina.rdlc", RutaEmpresa), LSRds, RptParametro, ObjNomina.SerieFolio)
+ End If
+ Else
+ Alert("Ocurrio un error al obtener los datos de la Nomina")
+ End If
+ Catch ex As Exception
+
+ GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
+ End Try
+
+
+ ObjNomina.Dispose()
+ ObjPersonal.Dispose()
+
+ Return Retorno
+ End Function
+#End Region
+
+#Region "PDF PAGOS"
+ Public Sub PDFReciboDePagos(CveVenta As Integer, CveIE As Integer, CveComplementoPago As Integer, Optional imprimir As Boolean = True)
+
+
+ Dim ObjBancos As New ClsBancos
+ Dim ObjClientes As New ClsClientes
+ Dim params As New List(Of ReportParameter)
+ Dim SerieFolio As String
+
+ Dim Serie = ""
+ Dim Folio = ""
+ Dim CveCliente = -1
+ Dim RFCOrdenante = ""
+ Dim CveMoneda As Integer = 1
+
+ Dim FolioFiscal = ""
+ Dim NoSerieCertificado = ""
+ Dim FechaCertificacion = ""
+ Dim SelloCFDi = ""
+ Dim SelloSAT = ""
+ Dim CertificadoSAT = ""
+ Dim FechaComprobante As Date
+
+ Dim CveUnidad = ""
+ Dim Descripcion = ""
+ Dim Cantidad = ""
+ Dim CvePS = ""
+ Dim PU = ""
+ Dim Importe = ""
+ Dim TotalLetra = ""
+
+ Dim FechaRecibo = ""
+
+ 'DT PAGO
+ Dim DTConceptosPago As New DataTable
+ DTConceptosPago.Columns.Add("CtaOrdenante", GetType(String))
+ DTConceptosPago.Columns.Add("Monto", GetType(Decimal))
+ DTConceptosPago.Columns.Add("MonedaP", GetType(String))
+ DTConceptosPago.Columns.Add("FormaDePagoP", GetType(String))
+ DTConceptosPago.Columns.Add("FechaPago", GetType(String))
+ DTConceptosPago.Columns.Add("TipoCambioP", GetType(String))
+ DTConceptosPago.Columns.Add("RfcEmisorCtaOrd", GetType(String))
+
+ 'DT DOCUMENTOS RELACIONADOS
+ Dim DTConceptosPagoRelacionado As New DataTable
+ DTConceptosPagoRelacionado.Columns.Add("IdDocumento", GetType(String))
+ DTConceptosPagoRelacionado.Columns.Add("Folio", GetType(String))
+ DTConceptosPagoRelacionado.Columns.Add("Serie", GetType(String))
+ DTConceptosPagoRelacionado.Columns.Add("ImpPagado", GetType(Decimal))
+ DTConceptosPagoRelacionado.Columns.Add("ImpSaldoAnt", GetType(Decimal))
+ DTConceptosPagoRelacionado.Columns.Add("NumParcialidad", GetType(String))
+ DTConceptosPagoRelacionado.Columns.Add("MetodoDePagoDR", GetType(String))
+ DTConceptosPagoRelacionado.Columns.Add("MonedaDR", GetType(String))
+ DTConceptosPagoRelacionado.Columns.Add("TipoCambioDR", GetType(String))
+
+
+ If ObjBancos.GetComplementoPagos(CveComplementoPago, CveIE, CveVenta, UsuarioActual.CveEmpresa) Then
+ Serie = ObjBancos.DtResultados.FiltroPrimeroValor("Serie")
+ Folio = ObjBancos.DtResultados.FiltroPrimeroValor("Folio")
+ CveCliente = ObjBancos.DtResultados.FiltroPrimeroValor("CveCliente").ToEntero
+ CveMoneda = ObjBancos.DtResultados.FiltroPrimeroValor("CveMoneda").ToEntero
+ FechaComprobante = ObjBancos.DtResultados.FiltroPrimeroValor("Fecha").ToDate
+ End If
+
+ 'CLIENTE
+ If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, Estatus:=-1) Then
+ RFCOrdenante = ObjClientes.RFC
+
+ params.Add(New ReportParameter("Cliente", ObjClientes.Nombre))
+ params.Add(New ReportParameter("ClienteDireccion", ObjClientes.Direccion))
+ params.Add(New ReportParameter("ClienteColonia", ObjClientes.Colonia))
+ params.Add(New ReportParameter("ClienteCiudad", ObjClientes.Ciudad))
+ params.Add(New ReportParameter("ClienteEstado", ObjClientes.Estado))
+ params.Add(New ReportParameter("ClienteCP", ObjClientes.CP))
+ params.Add(New ReportParameter("ClienteRFC", ObjClientes.RFC))
+ End If
+
+ 'DATOS DE EMPRESA
+ params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
+ params.Add(New ReportParameter("EmpresaDireccion", UsuarioActual.Empresa.Direccion))
+ params.Add(New ReportParameter("EmpresaColonia", UsuarioActual.Empresa.Colonia))
+ params.Add(New ReportParameter("EmpresaCiudad", UsuarioActual.Empresa.Ciudad))
+ params.Add(New ReportParameter("EmpresaEstado", UsuarioActual.Empresa.Estado))
+ params.Add(New ReportParameter("EmpresaCP", UsuarioActual.Empresa.CP.ToString()))
+ params.Add(New ReportParameter("EmpresaRFC", UsuarioActual.Empresa.RFC))
+ params.Add(New ReportParameter("EmpresaNoExt", UsuarioActual.Empresa.NoExt))
+ params.Add(New ReportParameter("EmpresaNoInt", UsuarioActual.Empresa.NoInt))
+
+ 'DATOS IMPRESION
+ params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
+ params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
+
+ 'DATOS GENERALES
+ Dim Ruta As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{UsuarioActual.CveEmpresa}\"
+ Dim PathXML As String = $"{Ruta}XML\Pag\{Serie}-{Folio}.xml"
+ Dim PathPDF As String = $"{Ruta}PDF\Pag\{Serie}-{Folio}.pdf"
+ SerieFolio = $"{Serie}-{Folio}"
+ Dim ImagenCBB As String = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, $"{Serie}-{Folio}.jpg")
+
+ If File.Exists(PathXML) Then
+ Dim XmlDoc As New System.Xml.XmlDocument
+ XmlDoc.Load(PathXML)
+
+ Dim validaElemento = XmlDoc.DocumentElement("cfdi:Complemento")
+ Dim validaElementoPago = XmlDoc.DocumentElement("cfdi:Conceptos")
+
+ 'Datos Fiscales
+ If Not IsNothing(validaElemento) Then
+ For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1
+ If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
+ FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
+ NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("NoCertificadoSAT").InnerText
+ FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText
+ SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText
+ SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText
+ End If
+ Next
+ End If
+
+ 'Pago
+ If Not IsNothing(validaElemento) Then
+ Dim PagosChild = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Cast(Of XmlNode).Where(Function(a) a.LocalName.Equals("Pagos", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault()
+
+ For Each Pagos As XmlNode In PagosChild.ChildNodes
+ Dim Dr As DataRow = DTConceptosPago.NewRow
+
+ If Not Pagos.Attributes("CtaOrdenante") Is Nothing Then Dr("CtaOrdenante") = Pagos.Attributes("CtaOrdenante").Value Else Dr("CtaOrdenante") = ""
+ If Not Pagos.Attributes("TipoCambioP") Is Nothing Then Dr("TipoCambioP") = Pagos.Attributes("TipoCambioP").Value Else Dr("TipoCambioP") = ""
+
+ If Not Pagos.Attributes("RfcEmisorCtaOrd") Is Nothing Then
+ Dr("RfcEmisorCtaOrd") = Pagos.Attributes("RfcEmisorCtaOrd").Value
+ RFCOrdenante = Pagos.Attributes("RfcEmisorCtaOrd").Value
+ Else
+ Dr("RfcEmisorCtaOrd") = ""
+ End If
+
+ Dr("Monto") = Pagos.Attributes("Monto").Value
+ Dr("MonedaP") = Pagos.Attributes("MonedaP").Value
+ Dr("FormaDePagoP") = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPagoSAT", $"ClaveFormaPagoSAT= '{Pagos.Attributes("FormaDePagoP").Value}'")
+ Dr("FechaPago") = Pagos.Attributes("FechaPago").Value
+
+ FechaRecibo = Pagos.Attributes("FechaPago").Value
+ TotalLetra = Pagos.Attributes("Monto").Value.ToString.ToDouble.Texto2Letras(CveMoneda)
+
+ DTConceptosPago.Rows.Add(Dr)
+
+ For Each Relacionado As XmlNode In Pagos.ChildNodes
+ Dim DrRelacionado As DataRow = DTConceptosPagoRelacionado.NewRow
+
+ If Not Relacionado.Attributes("Folio") Is Nothing Then DrRelacionado("Folio") = Relacionado.Attributes("Folio").Value Else DrRelacionado("Folio") = ""
+ If Not Relacionado.Attributes("Serie") Is Nothing Then DrRelacionado("Serie") = Relacionado.Attributes("Serie").Value Else DrRelacionado("Serie") = ""
+ If Not Relacionado.Attributes("TipoCambioDR") Is Nothing Then DrRelacionado("TipoCambioDR") = Relacionado.Attributes("TipoCambioDR").Value Else DrRelacionado("TipoCambioDR") = ""
+
+ DrRelacionado("IdDocumento") = Relacionado.Attributes("IdDocumento").Value
+ DrRelacionado("ImpPagado") = Relacionado.Attributes("ImpPagado").Value
+ DrRelacionado("ImpSaldoAnt") = Relacionado.Attributes("ImpSaldoAnt").Value
+ DrRelacionado("NumParcialidad") = Relacionado.Attributes("NumParcialidad").Value
+ DrRelacionado("MetodoDePagoDR") = Relacionado.Attributes("MetodoDePagoDR").Value
+ DrRelacionado("MonedaDR") = Relacionado.Attributes("MonedaDR").Value
+
+ DTConceptosPagoRelacionado.Rows.Add(DrRelacionado)
+ Next
+ Next
+
+ End If
+
+ If Not IsNothing(validaElementoPago) Then
+ For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes.Count - 1
+ If XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Name = "cfdi:Concepto" Then
+ Importe = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("Importe").InnerText
+ PU = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("ValorUnitario").InnerText
+ Descripcion = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("Descripcion").InnerText
+ CveUnidad = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("ClaveUnidad").InnerText
+ Cantidad = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("Cantidad").InnerText
+ CvePS = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("ClaveProdServ").InnerText
+ End If
+ Next
+ End If
+
+ Dim CadenaOriginal As String = $"||1.0| {FolioFiscal} | {FechaCertificacion.ToDate.ToShortDateString} T {FechaCertificacion.ToDateTime.ToShortTimeString} | {SelloCFDi} | {NoSerieCertificado} ||"
+
+ ' PARAMETROS DEL REPORTE
+
+ params.Add(New ReportParameter("SerieFolio", SerieFolio))
+ params.Add(New ReportParameter("RFCOrdenante", RFCOrdenante))
+ params.Add(New ReportParameter("FechaRecibo", FechaRecibo))
+
+ params.Add(New ReportParameter("Cantidad", Cantidad))
+ params.Add(New ReportParameter("Descripcion", Descripcion))
+ params.Add(New ReportParameter("UnidadMedida", CveUnidad))
+ params.Add(New ReportParameter("PU", PU))
+ params.Add(New ReportParameter("Importe", Importe))
+
+ params.Add(New ReportParameter("CantidadLetra", TotalLetra.ToUpper()))
+
+ params.Add(New ReportParameter("UUIDPago", FolioFiscal))
+ params.Add(New ReportParameter("NoCertificado", NoSerieCertificado))
+ params.Add(New ReportParameter("FechaTimbre", FechaComprobante.ToShortDateString))
+ params.Add(New ReportParameter("Sello", SelloCFDi))
+ params.Add(New ReportParameter("SelloSAT", SelloSAT))
+ params.Add(New ReportParameter("CadenaOriginal", CadenaOriginal))
+ params.Add(New ReportParameter("CertificadoSAT", CertificadoSAT))
+ params.Add(New ReportParameter("QR", ImagenCBB))
+
+ Dim lrds As New List(Of ReportDataSource)
+ Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = If(DTConceptosPago IsNot Nothing, DTConceptosPago, New DataTable)}
+ Dim rds2 As New ReportDataSource With {.Name = "DataSet2", .Value = If(DTConceptosPagoRelacionado IsNot Nothing, DTConceptosPagoRelacionado, New DataTable)}
+ lrds.Add(rds)
+ lrds.Add(rds2)
+
+ Dim rutaArchivo As String = ""
+
+ 'LOGO
+ Dim LogoRuta As String = ""
+
+ LogoRuta = String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta)
+ If File.Exists(LogoRuta) Then
+
+ If File.Exists(LogoRuta) Then
+ LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+ End If
+ 'POR EMPRESA
+ params.Add(New ReportParameter("LogoPath", LogoRuta))
+ Else
+ params.Add(New ReportParameter("LogoPath", ""))
+ End If
+
+
+ If File.Exists($"{UsuarioActual.Empresa.Ruta}\Formatos\ReciboDePago.rdlc") Then
+ rutaArchivo = $"Empresas\{UsuarioActual.CveEmpresa}\Formatos\ReciboDePago.rdlc"
+ Else
+ rutaArchivo = " \Empresas\Grales\Formatos\ReciboDePago.rdlc"
+ End If
+
+ If Not Directory.Exists($"{UsuarioActual.Empresa.Ruta}\PDF\Pag\") Then
+ Directory.CreateDirectory($"{UsuarioActual.Empresa.Ruta}\PDF\Pag\")
+ End If
+
+
+ Dim ArchivoPDF As New System.IO.FileInfo($"{Ruta}PDF\Pag\{Serie}-{Folio}.pdf")
+ If ArchivoPDF.Exists Then
+ Try
+ ArchivoPDF.Delete()
+ File.WriteAllBytes($"{UsuarioActual.Empresa.Ruta}\PDF\Pag\{SerieFolio}.pdf", StreamPDF(rutaArchivo, lrds, params, "Pago", "PDF"))
+ Catch ex As Exception
+ Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
+ End Try
+ Else
+ File.WriteAllBytes($"{UsuarioActual.Empresa.Ruta}\PDF\Pag\{SerieFolio}.pdf", StreamPDF(rutaArchivo, lrds, params, "Pago", "PDF"))
+ End If
+
+ If imprimir Then
+ ImprimirPDF(rutaArchivo, lrds, params, SerieFolio, "PDF")
+ End If
+
+ End If
+
+ ObjBancos.Dispose()
+ ObjClientes.Dispose()
+
+ End Sub
+#End Region
+
+End Class
+
diff --git a/App_Code/ClsSisEmpresas.vb b/App_Code/ClsSisEmpresas.vb
index 12fb16ca2..19ac5cf29 100644
--- a/App_Code/ClsSisEmpresas.vb
+++ b/App_Code/ClsSisEmpresas.vb
@@ -463,7 +463,8 @@ Public Class ClsSisEmpresas
_Empresa.CveDistribuidor = Data.Rows(0)("CveDistribuidor").ToString.ToEntero
_Empresa.DiasPermitidos = Data.Rows(0)("DiasPermitidos").ToString.ToEntero
_Empresa.AsientoContableComprasContado = If(Data.Rows(0)("Conta_AsientoContableComprasContado").ToString = "", False, CBool(Data.Rows(0)("Conta_AsientoContableComprasContado").ToString))
- _Empresa.TipoContabilizacion = Data.Rows(0)("Conta_TipoContabilizacion").ToString.ToEntero '0 - Sin Conta, 1- Contabilidad SIG, 2- Contabilidad Contpaq
+ _Empresa.TipoContabilizacion = Data.Rows(0)("Conta_TipoContabilizacion").ToString.ToEntero
+ _Empresa.TipoContabilidad = Data.Rows(0)("Conta_TipoContabilidad").ToString.ToEntero '0 - Sin Conta, 1- Contabilidad SIG, 2- Contabilidad Contpaq
_Empresa.DefaultAsistencias = If(Data.Rows(0)("RH_DefaultAsistencias").ToString = "", False, CBool(Data.Rows(0)("RH_DefaultAsistencias").ToString))
_Empresa.CIEC = Data.Rows(0)("CIEC").ToString
_Empresa.Localidad = Data.Rows(0)("Localidad").ToString
diff --git a/App_Code/ClsSisUsuarios.vb b/App_Code/ClsSisUsuarios.vb
index 2b70e5370..5781c70cf 100644
--- a/App_Code/ClsSisUsuarios.vb
+++ b/App_Code/ClsSisUsuarios.vb
@@ -891,7 +891,7 @@ Public Class ClsSisUsuarios
Return Retorno
End Function
- Public Function AddBitacora(CveModulo As Integer, Accion As String, Resultado As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
+ Public Function AddBitacora(CveModulo As Integer, Accion As String, Resultado As String, CveUsuario As Integer, CveEmpresa As Integer, Optional URL As String = "-1", Optional TiempodeEjecucion As Long = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Sis_UsuariosBitacoraAdd")
@@ -901,6 +901,8 @@ Public Class ClsSisUsuarios
.Add("@Resultado", SqlDbType.VarChar).Value = Resultado
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@URL", SqlDbType.VarChar).Value = URL
+ .Add("@TiempodeEjecucion", SqlDbType.BigInt).Value = TiempodeEjecucion
End With
Try
diff --git a/App_Code/Empresa.vb b/App_Code/Empresa.vb
index 2efb97358..c16fa4e9b 100644
--- a/App_Code/Empresa.vb
+++ b/App_Code/Empresa.vb
@@ -153,6 +153,7 @@ Public Class Empresa
Public Property DiasPermitidos As Integer
Public Property AsientoContableComprasContado As Boolean
Public Property TipoContabilizacion As Integer
+ Public Property TipoContabilidad As Integer
Public Property DefaultAsistencias As Boolean
Public Property FormatoImpresion As Integer
Public Property EsPersonaFisica As Integer
diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb
index c27ade4b3..542714a52 100644
--- a/App_Code/LogicNominas.vb
+++ b/App_Code/LogicNominas.vb
@@ -17,6 +17,7 @@ Public Class LogicNominas
Dim sw As Diagnostics.Stopwatch = Nothing
If guardarLogTimbrado Then
sw = New Diagnostics.Stopwatch
+
sw.Start()
End If
Dim cfdi As CFDITimbre = PreTimbrar(CveNomina, UsuarioActual) 'CvePersonal, CvePeriodo,
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 833d6b4c2..045b59ec5 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -8828,6 +8828,7 @@ Namespace Modelos
Estado = ""
Pais = ""
CP = ""
+ Telefono = ""
AplicaFord = False
Ford_GSDB = ""
AplicaFEMSA = False
diff --git a/App_Code/MyHub.vb b/App_Code/MyHub.vb
index 188cdf257..133da54e7 100644
--- a/App_Code/MyHub.vb
+++ b/App_Code/MyHub.vb
@@ -15,7 +15,7 @@ Public Class MyHub
Private Sub RemoveUsuarios()
End Sub
- Public Shared Sub RemoveConexiones(CveUsuario As Integer)
+ Public Shared Sub RemoveConexiones(CveUsuario As Integer)
End Sub
Public Sub ShowUsersOnLine()
diff --git a/App_Code/Notificaciones.vb b/App_Code/Notificaciones.vb
index fa9af0d8c..998dc6149 100644
--- a/App_Code/Notificaciones.vb
+++ b/App_Code/Notificaciones.vb
@@ -31,4 +31,8 @@ Public Class Notificaciones
Clients.Users(Para).AlertaVentana(Titulo, Message, DirectCast(Tipo, Integer), timeoutseconds)
End Sub
+ 'Public Shared Sub AlertaVentana(Message As String, Para As List(Of String), Optional Titulo As String = "", Optional timeoutseconds As Integer = 5, Optional Tipo As TipoNotificacion = TipoNotificacion.AlertaVentanaNoOcultar)
+ ' Dim Clients As Hubs.IHubConnectionContext(Of Object) = GlobalHost.ConnectionManager.GetHubContext(Of Notificaciones)().Clients
+ ' Clients.Users(Para).AlertaVentana(Titulo, Message, DirectCast(Tipo, Integer), timeoutseconds)
+ 'End Sub
End Class
diff --git a/App_Code/Usuario.vb b/App_Code/Usuario.vb
index 39b921fe9..11d6e8718 100644
--- a/App_Code/Usuario.vb
+++ b/App_Code/Usuario.vb
@@ -115,6 +115,7 @@ Namespace ADSSession
getListasession = 3 'solo lectura
CambiarEmpresa = 4
getSession = 5
+ CambiarModulo = 6
End Enum
Public Enum OpcionHub As Integer
agregar = 1
@@ -158,7 +159,7 @@ Namespace ADSSession
HttpContext.Current.Session(strsessionDpage) = value
End Set
End Property
- Public Shared Function SessionManager(opcion As OpcionSession, Optional obj As ADSSessionObj = Nothing, Optional CveEmpresa As Integer = -1, Optional SessionID As String = Nothing) As Object
+ Public Shared Function SessionManager(opcion As OpcionSession, Optional obj As ADSSessionObj = Nothing, Optional CveEmpresa As Integer = -1, Optional SessionID As String = Nothing, Optional modulo As String = "") As Object
SyncLock strsessionid 'todo el codigo que este dentro de este corchete no se ejecutara mas de una vez al mismo tiempo en el servidor
If _dicSessionobj Is Nothing Then
_dicSessionobj = New ConcurrentDictionary(Of String, ADSSessionObj)
@@ -194,6 +195,18 @@ Namespace ADSSession
obj.CveEmpresa = CveEmpresa
End If
retorno = obj
+
+ Case OpcionSession.CambiarModulo
+ If Not IsNothing(HttpContext.Current) AndAlso Not IsNothing(HttpContext.Current.Session) AndAlso Not IsNothing(HttpContext.Current.Session(strsessionid)) Then
+ obj = DirectCast(HttpContext.Current.Session(strsessionid), ADSSessionObj)
+ obj.Modulo = modulo
+ obj.LastPostback = DateTime.Now
+ If _dicSessionobj.TryGetValue(obj.SessionID, obj) Then
+ obj.Modulo = modulo
+ obj.LastPostback = DateTime.Now
+ End If
+ retorno = obj
+ End If
End Select
Catch ex As Exception
retorno = Nothing
@@ -227,6 +240,8 @@ Namespace ADSSession
End Sub
Public Property CveUsuario As Integer
Public Property CveEmpresa As Integer
+ Public Property Modulo As String
+ Public Property LastPostback As DateTime
Protected Property _SessionID As String
Private Property _ipAdrres As String
Public ReadOnly Property IpAddres As String
diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx
index be1ff3fcd..720b39b81 100644
--- a/Ashx/CargaEventos.ashx
+++ b/Ashx/CargaEventos.ashx
@@ -33,8 +33,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
If Not GetEventos(CveUsuario, CveEmpresa, FI, FF) Then
'Convierte el objeto de Eventos en JSON
- Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer
- Dim sJSON As String = oSerializer.Serialize(events)
+ 'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer
+ Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events)
context.Response.Write(sJSON)
End If
diff --git a/Ashx/SIGGPS.ashx b/Ashx/SIGGPS.ashx
index 600e75669..f8a206eed 100644
--- a/Ashx/SIGGPS.ashx
+++ b/Ashx/SIGGPS.ashx
@@ -363,7 +363,7 @@ Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
strBody.Append("")
End If
strBody.Append("
")
- strBody.Append("![]() | ")
+ strBody.AppendFormat("![]() | ", Row("Liga"))
strBody.Append("
")
strBody.Append("")
strBody.Append("")
diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx
index 9af99331f..986094a69 100644
--- a/Ashx/SIGWeb.ashx
+++ b/Ashx/SIGWeb.ashx
@@ -210,6 +210,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
DtRetorno = dt.FiltraParametros($"NombreComercial like '%{Name}%' OR Nombre like '%{Name}%' ")
End If
+ dt.Dispose()
End If
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
@@ -220,6 +221,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Else
context.Response.Write("[]")
End If
+ DtRetorno.Dispose()
Return retorno
End Function
@@ -256,6 +258,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
DtRetorno = dt.FiltraParametros($"NombreCortoProveedor like '%{Name}%'")
End If
+ dt.Dispose()
End If
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
@@ -266,7 +269,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Else
context.Response.Write("[]")
End If
-
+ DtRetorno.Dispose()
Return retorno
End Function
#End Region
@@ -464,6 +467,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End Try
End If
+ DTPS = Nothing
End If
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
DtPSRetorno.Columns("CvePS").ColumnName = "id"
@@ -478,6 +482,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Else
context.Response.Write("[]")
End If
+ DtPSRetorno.Dispose()
End If
Return retorno
diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb
index 7a3e359f8..1395d747c 100644
--- a/Bancos/PopIEVentas.aspx.vb
+++ b/Bancos/PopIEVentas.aspx.vb
@@ -322,6 +322,15 @@ Partial Class Bancos_PopIEVentas
End Set
End Property
+ Private Property CveCorte As Integer
+ Get
+ Return ViewState("CveCorte").ToString.ToEntero
+ End Get
+ Set(value As Integer)
+ ViewState("CveCorte") = value
+ End Set
+ End Property
+
Private Property TipoCambioOriginal As Decimal
Get
Return ViewState("TipoCambioOriginal").ToString.ToDecimal
@@ -527,7 +536,7 @@ Partial Class Bancos_PopIEVentas
ViewState("IdCtaAnticipo") = 0
ViewState("IdCtaContMonedaExtranjeraAnticipo") = 0
ViewState("IdCtaContMonedaComplementariaAnticipo") = 0
-
+ CveCorte = -1
IdCuentaBancariaComplementaria = 0
@@ -672,48 +681,46 @@ Partial Class Bancos_PopIEVentas
If ObjVenta.DtResultados IsNot Nothing AndAlso ObjVenta.DtResultados.Rows.Count > 0 Then
-
- 'CargaProveedor
Dim dr As DataRow = ObjVenta.DtResultados.Rows(0)
Dim Validada As Boolean = True
'JJMQ:20190606 Se cancela código de validacion ante el SAT por lentitud en el servicio.
'Sustituir la línea anterior por todo lo siguiente hasta donde termina el end if para que valide de nueva cuenta
'Dim Validada As Boolean = False
- 'If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
+ If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
- ' Dim Valida As New ClsValidaCFDi(dr("FolioFiscal").ToString(), dr("ClienteRFC").ToString, UsuarioActual.Empresa.RFC)
+ Dim Valida As New ClsValidaCFDi(dr("FolioFiscal").ToString(), dr("ClienteRFC").ToString, UsuarioActual.Empresa.RFC)
- ' If Valida.EsValida > 0 Then
- ' If Valida.EsValida = 2 Then
- ' Validada = False
- ' 'Dim ObjDatos As New ClsCompras
+ If Valida.EsValida > 0 Then
+ If Valida.EsValida = 2 Then
+ Validada = False
+ 'Dim ObjDatos As New ClsCompras
- ' 'If ObjDatos.UpdateEstatus(Valida.EsValida, gvr.DataKey("CveFactura").ToEntero) Then
+ 'If ObjDatos.UpdateEstatus(Valida.EsValida, gvr.DataKey("CveFactura").ToEntero) Then
- ' 'End If
- ' 'ObjDatos.Dispose()
+ 'End If
+ 'ObjDatos.Dispose()
- ' BtnGuardar.Enabled = False
+ BtnGuardar.Enabled = False
- ' If UsuarioActual.Empresa.UsaAC Then
- ' RegistraScript("if (confirm('La factura está cancelada ante el SAT., ¿Desea eliminar la compra?')) { $get('BtnEliminarCompra').click();}")
- ' Else
- ' Alert("La factura está cancelada ante el SAT.")
- ' End If
+ If UsuarioActual.Empresa.UsaAC Then
+ RegistraScript("if (confirm('La factura está cancelada ante el SAT., ¿Desea eliminar la compra?')) { $get('BtnEliminarCompra').click();}")
+ Else
+ Alert("La factura está cancelada ante el SAT.")
+ End If
- ' Else
- ' Validada = True
- ' End If
- ' Else
- ' 'no se pudo validar, pero ya tuvo la primera vuelta de validacion
- ' Validada = True
- ' End If
- ' Valida.Dispose()
- 'Else
- ' Validada = True
- 'End If
+ Else
+ Validada = True
+ End If
+ Else
+ 'no se pudo validar, pero ya tuvo la primera vuelta de validacion
+ Validada = True
+ End If
+ Valida.Dispose()
+ Else
+ Validada = True
+ End If
If Validada Then
@@ -725,7 +732,7 @@ Partial Class Bancos_PopIEVentas
CveMoneda = dr("CveMoneda").ToString.ToEntero
CveMonedaVenta = dr("CveMoneda").ToString.ToEntero
CveMonedaFiltros = dr("CveMoneda").ToString.ToEntero
- NombreCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Nombre", String.Format("CveCliente = {0}", CveCliente))
+ NombreCliente = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre", String.Format("CveCliente = {0}", CveCliente))
SerieFolio = dr("SerieFolio").ToString
TipoCambioOriginal = dr("TipoCambio").ToString.ToDecimal
CveSubProyectoVenta = dr("CveSubProyecto").ToString.ToEntero
@@ -777,6 +784,12 @@ Partial Class Bancos_PopIEVentas
FechaVenta = dr("Fecha").ToString.ToDate
SaldoVenta = dr("Saldo").ToString.ToDouble
+
+
+ 'Cortes de Caja
+ If UsuarioActual.TienePermisoProceso(160) Then
+ CargaCorteCaja()
+ End If
End If
@@ -786,6 +799,19 @@ Partial Class Bancos_PopIEVentas
ObjVenta.Dispose()
End Sub
+ Private Sub CargaCorteCaja()
+ 'Checar si hay un Turno Abierto
+ Dim ObjPVenta As New ClsPuntoVenta
+
+ If ObjPVenta.GetVta_Cortes("-1", "-1", UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 0) Then
+
+ If ObjPVenta.DtResultados.Rows.Count > 0 Then
+ CveCorte = ObjPVenta.CveCorte
+ End If
+ End If
+ ObjPVenta.Dispose()
+ End Sub
+
Private Sub CargaCliente(ByVal CveCliente As Integer, RFC As String)
Dim ObjCliente As New ClsClientes
@@ -1497,7 +1523,7 @@ Partial Class Bancos_PopIEVentas
Select Case RBLContado.SelectedValue
Case "1" ' Banco
- CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, tipoCambioPago, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), CveCuentaDeposito:=CveCuentaDeposito, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"))
+ CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, tipoCambioPago, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), CveCuentaDeposito:=CveCuentaDeposito, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCorte:=CveCorte)
If CveIE > 0 Then
If CveVenta > 0 Then
CveConcepto = 2
diff --git a/Compras/PopUpVerFactura.aspx b/Compras/PopUpVerFactura.aspx
index 4270e8dce..5f063d646 100644
--- a/Compras/PopUpVerFactura.aspx
+++ b/Compras/PopUpVerFactura.aspx
@@ -12,7 +12,7 @@
-
+
diff --git a/Contabilidad/ContabilizacionCompras.aspx b/Contabilidad/ContabilizacionCompras.aspx
index 0d1df40eb..cf38a955a 100644
--- a/Contabilidad/ContabilizacionCompras.aspx
+++ b/Contabilidad/ContabilizacionCompras.aspx
@@ -129,7 +129,7 @@
-
+
@@ -142,7 +142,7 @@
-
+
@@ -249,7 +249,7 @@
-
+
@@ -345,7 +345,7 @@
-
+
@@ -354,7 +354,7 @@
-
+
@@ -435,7 +435,7 @@
-
+
@@ -444,7 +444,7 @@
-
+
diff --git a/Contabilidad/ContabilizacionCompras.aspx.cs b/Contabilidad/ContabilizacionCompras.aspx.cs
index 77c08b249..ec8ae0aba 100644
--- a/Contabilidad/ContabilizacionCompras.aspx.cs
+++ b/Contabilidad/ContabilizacionCompras.aspx.cs
@@ -42,7 +42,7 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
TienePermisoEditar = false;
DdlProveedores.setEsWebService(true);
DdlProveedores.Attributes.Add("data-metodo", "getproveedores");
- if (UsuarioActual.Empresa.UsaContabilidad)
+ if (UsuarioActual.Empresa.TipoContabilidad == 2 && UsuarioActual.Empresa.UsaContabilidad)
{
TienePermisoEditar = false;
ClsContPAQi ObjCont = new ClsContPAQi(UsuarioActual.Empresa);
@@ -65,23 +65,27 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
txtFechaF.Text = DateTime.Now.ToShortDateString();
//CargaDatos();
+
+ }
- if (UsuarioActual.CveRol == 1 || UsuarioActual.CveUsuario == 17 || UsuarioActual.CveUsuario == 171 || UsuarioActual.TienePermisoProceso(221))
- {
- TienePermisoEditar = true;
- TienePermisoVerPoliza = true;
- }
- }
- else
+ if (UsuarioActual.CveRol == 1 || UsuarioActual.CveUsuario == 17 || UsuarioActual.CveUsuario == 171 || UsuarioActual.TienePermisoProceso(221))
{
- Alert("Este módulo requiere el uso de Contabilidad.", ModExtensiones.TipoMensaje.MsgAdvertencia);
- // BtnConsultar.Enabled = false;
- BtnContabilizarCompras.Enabled = false;
- BtnContabilizarPagos.Enabled = false;
- BtnContabilizarAnticipos.Enabled = false;
- BtnContabilizarAmortizaciones.Enabled = false;
+ TienePermisoEditar = true;
+ TienePermisoVerPoliza = true;
}
+ txtFechaI.Text = DateTime.Now.ToShortDateString();
+ txtFechaF.Text = DateTime.Now.ToShortDateString();
+ //else
+ //{
+ // Alert("Este módulo requiere el uso de Contabilidad.", ModExtensiones.TipoMensaje.MsgAdvertencia);
+ // // BtnConsultar.Enabled = false;
+ // BtnContabilizarCompras.Enabled = false;
+ // BtnContabilizarPagos.Enabled = false;
+ // BtnContabilizarAnticipos.Enabled = false;
+ // BtnContabilizarAmortizaciones.Enabled = false;
+ //}
+
}
BtnConsultar.Click += new EventHandler(this.BtnConsultar_Click);
@@ -310,6 +314,7 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
if (e.Row.RowType == DataControlRowType.DataRow)
{
int cuenta = e.Row.DataKey("IdCtaContable").ToString().ToEntero();
+ int cvecuenta = e.Row.DataKey("CveCuenta").ToString().ToEntero();
int CveConcepto = e.Row.DBCampo("CveConceptoContable").ToEntero();
if (CveConcepto.Contiene(5, 6, 14, 16, 17, 19, 206, 22, 23, 25, 26, 18, 60, 183, 184, 185, 186 ,205, 240, 243, 244, 248, 249,15,22,248,249,237))
@@ -337,21 +342,37 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/OC/OC.aspx?OC={0}", e.Row.DBCampo("CveOC"));
}
-
- if (cuenta > 0)
+ if (UsuarioActual.Empresa.TipoContabilidad == 1) // conta SIG
{
- DataRow dr = DTmpC.FiltroPrimero(String.Format("Id = {0}", cuenta));
+ if (cvecuenta == 0)
+ {
+ e.Row.Cells[0].ForeColor = System.Drawing.Color.Red;
+ ((GridViewRow)((GridView)e.Row.NamingContainer).BindingContainer).FCCheckBox("Chk").Visible = false;
+ }
- if (dr != null) e.Row.Cells[3].Text = string.Format("{0}
{1}", dr["CuentaFormato"], dr["Nombre"]);
}
else
{
- e.Row.Cells[0].ForeColor = System.Drawing.Color.Red;
+ if (UsuarioActual.Empresa.TipoContabilidad == 2) // conta Contpaq
+ {
- ((GridViewRow)((GridView)e.Row.NamingContainer).BindingContainer).FCCheckBox("Chk").Enabled = false;
- ((GridViewRow)((GridView)e.Row.NamingContainer).BindingContainer).FCCheckBox("Chk").ToolTip = "Hay conceptos sin cuenta asignada";
+ if (cuenta > 0)
+ {
+ DataRow dr = DTmpC.FiltroPrimero(String.Format("Id = {0}", cuenta));
+
+ if (dr != null) e.Row.Cells[3].Text = string.Format("{0}
{1}", dr["CuentaFormato"], dr["Nombre"]);
+ }
+ else
+ {
+ e.Row.Cells[0].ForeColor = System.Drawing.Color.Red;
+
+ ((GridViewRow)((GridView)e.Row.NamingContainer).BindingContainer).FCCheckBox("Chk").Enabled = false;
+ ((GridViewRow)((GridView)e.Row.NamingContainer).BindingContainer).FCCheckBox("Chk").ToolTip = "Hay conceptos sin cuenta asignada";
+ }
+ }
}
+
if (Convert.ToDecimal(e.Row.DataKey("Cargo").ToString()) == 0) e.Row.Cells[4].Text = "";
if (Convert.ToDecimal(e.Row.DataKey("Abono").ToString()) == 0) e.Row.Cells[5].Text = "";
diff --git a/Contabilidad/ContabilizacionVentas.aspx b/Contabilidad/ContabilizacionVentas.aspx
index 3cb3117cb..3bd4788a6 100644
--- a/Contabilidad/ContabilizacionVentas.aspx
+++ b/Contabilidad/ContabilizacionVentas.aspx
@@ -111,12 +111,12 @@
-