From 8026ba4071d9be18013c1aeb2fd43f4fc66e257c Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 20 Jan 2023 14:43:27 -0700 Subject: [PATCH 001/103] -- se activo citrus, para comprobacioes --- Compras/Compras.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index def669f49..004593a48 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -8196,7 +8196,7 @@ Partial Class Compras_Compras End If 'CUANDO ES REEMBOLSO COMPROBACION Y CAJA CHICA - If UsuarioActual.CveEmpresa.Contiene(1, 119, 141) AndAlso TxtNumeroReembolso.Text.Trim <> "" AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0) Then + If UsuarioActual.CveEmpresa.Contiene(1, 119, 141, 172, 173) AndAlso TxtNumeroReembolso.Text.Trim <> "" AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0) Then If ObjCompras.GetComprobacion(DdlPersonalReembolso.SelectedValue.ToEntero, DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero, TxtNumeroReembolso.Text.Trim, UsuarioActual.CveEmpresa) Then Dim CvePreComprobacion As Integer If ObjCompras.DtResultados.Rows.Count = 0 Then From f427d5707d37d320bb443837388919d3fe312b40 Mon Sep 17 00:00:00 2001 From: MLopez Date: Sat, 21 Jan 2023 12:23:50 -0700 Subject: [PATCH 002/103] =?UTF-8?q?E172=20Indicador=20Resumen=20agrupar=20?= =?UTF-8?q?productos=20por=20clasificaci=C3=B3n=20SE=20MODIFIC=C3=93=20PA?= =?UTF-8?q?=5FVtas=5FGetRepPS=20en=20SIG=5FResp=5FMLR=20-=20Nuevo=20grupo?= =?UTF-8?q?=2028:=20Clasificaci=C3=B3n=20-=20PS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- General/RepIndicadorResumen.aspx.vb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/General/RepIndicadorResumen.aspx.vb b/General/RepIndicadorResumen.aspx.vb index 8808e6002..c555565c5 100644 --- a/General/RepIndicadorResumen.aspx.vb +++ b/General/RepIndicadorResumen.aspx.vb @@ -50,10 +50,11 @@ Partial Class General_RepIndicadorResumen Dim ObjCompras As New ClsCompras Dim ObjMovtos As New ClsMovimientos Dim ObjCitrus As New ClsCGame + Dim Grupo As Integer = 28 'Clasificación - PS If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), MinFecha, MaxFecha, -1, - -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:="Ing", TipoCambio:=1) Then - GvVxP.DataSource = ObjVentas.DtResultados.FiltraParametros("", "CveMoneda,SubTotal DESC") + -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, Grupo, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:="Ing", TipoCambio:=1) Then + GvVxP.DataSource = ObjVentas.DtResultados End If If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero) Then @@ -88,8 +89,8 @@ Partial Class General_RepIndicadorResumen 'Mostrar gráficos y totales en portlets solo si hay datos en su respectiva tabla If GvVxP.Rows.Count > 0 Then UPGraficaVxP.Visible = True - PLVxPTot.InnerHtml = "" + "Cantidad: " + "" + String.Format("{0:n} Kg", CType(GvVxP.DataSource, DataTable).SUM("Cantidad", "Orden IS NOT NULL")) _ - + "" + "Total: " + "" + String.Format("{0:c} MXN", CType(GvVxP.DataSource, DataTable).SUM("SubTotalMN", "Orden IS NOT NULL")) + PLVxPTot.InnerHtml = "" + "Cantidad: " + "" + String.Format("{0:n} Kg", CType(GvVxP.DataSource, DataTable).SUM("Cantidad", "CodigoPS <> ''")) _ + + "" + "Total: " + "" + String.Format("{0:c} MXN", CType(GvVxP.DataSource, DataTable).SUM("SubTotalMN", "CodigoPS <> ''")) Else UPGraficaVxP.Visible = False PLVxPTot.InnerHtml = Nothing @@ -159,6 +160,10 @@ Partial Class General_RepIndicadorResumen If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.DBCampo("Orden") = "" Then e.Row.CssClass = "Totales" + Else + If e.Row.DBCampo("CodigoPS") = "" Then + e.Row.CssClass = "SubTotales" + End If End If End If End Sub @@ -253,7 +258,7 @@ Partial Class General_RepIndicadorResumen DtVxP.Columns.Add("Unidad") 'RowColorIndex = 0 For Each Dr As DataRow In CType(GvVxP.DataSource, DataTable).FiltraParametros("", "SubTotalMN DESC").Rows - If Not Dr("Orden").ToString = "" Then + If Not Dr("CodigoPS").ToString = "" Then Dim Row = DtVxP.NewRow() Row("Texto") = Dr("GPO").ToString Row("Valor") = Dr("SubTotalMN").ToString.FormatoNumero From 793b06166a2d0c15a1139de0370e779cec1e3887 Mon Sep 17 00:00:00 2001 From: MLopez Date: Sat, 21 Jan 2023 14:10:24 -0700 Subject: [PATCH 003/103] =?UTF-8?q?Rep=20Compras=20AF=20Detalle:=20Agregar?= =?UTF-8?q?=20Tipo,=20SubTipo,=20Clasificacion.=20Limpiar=20c=C3=B3digo.?= =?UTF-8?q?=20Corregir=20configuraci=C3=B3n=20de=20centros=20de=20costo.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/RepComprasAFDetalle.aspx | 160 ++++------------------------ Compras/RepComprasAFDetalle.aspx.vb | 38 ++----- 2 files changed, 30 insertions(+), 168 deletions(-) diff --git a/Compras/RepComprasAFDetalle.aspx b/Compras/RepComprasAFDetalle.aspx index bb5fbd9fa..2d2fb3f5d 100644 --- a/Compras/RepComprasAFDetalle.aspx +++ b/Compras/RepComprasAFDetalle.aspx @@ -8,6 +8,9 @@ max-width:600px; width:600px; } + .margenbound { + text-align: right; + } @@ -156,7 +159,6 @@
Proyecto:
-
@@ -164,7 +166,6 @@ SubProyecto:
-
@@ -213,144 +214,25 @@ - - - - Factura - - - - - - - - - - SubProyecto - - - - - - - - - ActivoFijo - - - <%----%> - - - - - - - No. Serie - - - - - - - - - Producto - - - - - - - - - - Responsable - - - - - - - - - Horometro/Odometro - - - - - - - - - - Tipo Mantenimiento - - - - - - - - - Clasificación 2 - - - - - - - - - - - - - Unidad de Medida - - - - - - - - - Cantidad - - - - - - - - - PU - - - - - - - - - Total - - - - - - - - - Cuenta - - - - - - + + + + + + + + + + + + + + + + + + - <%-- - --%> diff --git a/Compras/RepComprasAFDetalle.aspx.vb b/Compras/RepComprasAFDetalle.aspx.vb index 5b19beed7..d6bcbd3a5 100644 --- a/Compras/RepComprasAFDetalle.aspx.vb +++ b/Compras/RepComprasAFDetalle.aspx.vb @@ -226,31 +226,7 @@ Partial Class Compras_RepComprasAFDetalle DdlPS.ddl.Items.Add(New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2")) End If - If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then - DdlProyecto.Visible = False - LblSubProyecto.Text = "Sucursal" - LblProyecto.Visible = False - DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - DdlSubProyecto.DataBind() - DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then - DdlProyecto.Visible = False - LblSubProyecto.Text = "Proyecto" - LblProyecto.Visible = False - DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - DdlSubProyecto.DataBind() - DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Or UsuarioActual.Empresa.Tipo_CentroCosto = 0 Then - LblProyecto.Text = "Proyecto" - - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then - LblProyecto.Text = "Sucursal" - LblSubProyecto.Text = "Proyecto" - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then - LblProyecto.Text = "Proyecto" - LblSubProyecto.Text = "Sucursal" - End If - + CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto) End Sub @@ -264,15 +240,19 @@ Partial Class Compras_RepComprasAFDetalle End Sub Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged - CargaSubProyecto() + If DdlProyecto.SelectedValue = "-1" Then + DdlProyecto.Items.Clear() + DdlSubProyecto.Items.Clear() + CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto) + Else + CargaSubProyecto() + End If End Sub Private Sub CargaSubProyecto() - DdlSubProyecto.Items.Clear() - DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) + DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros(String.Format("CveProyecto = {0}", DdlProyecto.SelectedValue), "SubProyecto") DdlSubProyecto.DataBind() DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - End Sub Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click CargaDatos() From 334f72210a2737771a67c52ba8124496ccdcc366 Mon Sep 17 00:00:00 2001 From: MLopez Date: Mon, 23 Jan 2023 09:05:44 -0700 Subject: [PATCH 004/103] Rep Compras Detalle: Hacer columnas personalizables --- App_Code/modExtensiones.vb | 29 +++++----- Compras/RepComprasAFDetalle.aspx | 89 ++++++++++++++++++++++++++--- Compras/RepComprasAFDetalle.aspx.vb | 48 ++++++++++++---- 3 files changed, 131 insertions(+), 35 deletions(-) diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 63ff870df..5fe30068f 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -1650,25 +1650,22 @@ Namespace Extensiones End Function - Public Function GetColumn(ByVal gv As GridView, ByVal name As String) As Integer - Dim index As Integer = 0 - Dim found As Boolean = False - - For Each c As DataControlField In gv.Columns - - If TypeOf c Is BoundField Then - Dim field As BoundField = CType(c, BoundField) - - If name = field.DataField OrElse name = field.SortExpression OrElse name = field.HeaderText Then - found = True - Exit For + Public Function FBColumn(gv As GridView, name As String) As DataControlField + name = name.ToLower + For Each col As DataControlField In gv.Columns + If TypeOf col Is BoundField Then + Dim field As BoundField = CType(col, BoundField) + If field.DataField.ToLower = name OrElse field.SortExpression.ToLower = name OrElse field.HeaderText.Trim.ToLower = name Then + Return col + End If + ElseIf TypeOf col Is HyperLinkField Then + Dim field As HyperLinkField = CType(col, HyperLinkField) + If field.DataTextField.ToLower = name OrElse field.SortExpression.ToLower = name OrElse field.HeaderText.Trim.ToLower = name Then + Return col End If End If - - index += 1 Next - - Return If(found, index, -1) + Return Nothing End Function diff --git a/Compras/RepComprasAFDetalle.aspx b/Compras/RepComprasAFDetalle.aspx index 2d2fb3f5d..f9bd2e1b4 100644 --- a/Compras/RepComprasAFDetalle.aspx +++ b/Compras/RepComprasAFDetalle.aspx @@ -25,6 +25,13 @@
  • Generar Excel
  • + + +
  • + Personalizar +
  • +
    +
  • Ver Dlls en pesos
  • @@ -153,9 +160,6 @@
    - - -
    Proyecto:
    @@ -213,7 +217,7 @@
    - + @@ -237,10 +241,7 @@
    - - - + + + + + diff --git a/Compras/RepComprasAFDetalle.aspx.vb b/Compras/RepComprasAFDetalle.aspx.vb index d6bcbd3a5..6be1261bd 100644 --- a/Compras/RepComprasAFDetalle.aspx.vb +++ b/Compras/RepComprasAFDetalle.aspx.vb @@ -82,12 +82,13 @@ Partial Class Compras_RepComprasAFDetalle #End Region + Private Personalizado As Boolean = False + Private Sub Compras_RepComprasAFDetalle_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then CargaCombos() 'ImgPersonalizar.Attributes.Add("onclick", "javascript:$('#DivPersonalizar').show(1000); PosicionaObjeto(this.id,'DivPersonalizar');") - - + GvDatos.DataBind(True) Try Dim Fecha, FechaI, FechaF As String @@ -163,9 +164,11 @@ Partial Class Compras_RepComprasAFDetalle End If If UsuarioActual.CveEmpresa = 72 Then - GvDatos.Columns(3).Visible = True + GvDatos.FBColumn("NoSerie").Visible = True End If + UPDatos.Update() + End If End Sub @@ -284,18 +287,12 @@ Partial Class Compras_RepComprasAFDetalle CvePS, Anio.ToEntero, Mes.ToEntero, AnioMes, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero) Then DTDatos = ObjCompras.DtResultados - GvDatos.DataSource = ObjCompras.DtResultados - Else - GvDatos.DataSource = Nothing - DTDatos = Nothing + GvDatos.DataSource = DTDatos End If - ObjCompras.Dispose() - GvDatos.DataBind() - - - + GvDatos.DataBind(True) + UPDatos.Update() End Sub Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound @@ -482,4 +479,31 @@ Partial Class Compras_RepComprasAFDetalle End If End Sub + + Protected Sub PersonalizarColumnas() + GvDatos.FBColumn("SerieFolio").Visible = ChkFactura.Checked + GvDatos.FBColumn("SubProyecto").Visible = ChkSubProyecto.Checked + GvDatos.FBColumn("CodigoAF").Visible = ChkAF.Checked + GvDatos.FBColumn("NoSerie").Visible = ChkNS.Checked + GvDatos.FBColumn("CodigoPS").Visible = ChkPS.Checked + GvDatos.FBColumn("NombreCompleto").Visible = ChkResp.Checked + GvDatos.FBColumn("AFMedida").Visible = ChkMedidaAF.Checked + GvDatos.FBColumn("AFTipoMantenimientoStr").Visible = ChkTipoMant.Checked + GvDatos.FBColumn("TipoActivoFijo").Visible = ChkTipoAF.Checked + GvDatos.FBColumn("SubTipoActivoFijo").Visible = ChkSubTipoAF.Checked + GvDatos.FBColumn("Clasificacion").Visible = ChkClasif.Checked + GvDatos.FBColumn("Clasificacion2").Visible = ChkClasif2.Checked + GvDatos.FBColumn("UnidadMedida").Visible = ChkUM.Checked + GvDatos.FBColumn("Cantidad").Visible = ChkCant.Checked + GvDatos.FBColumn("PU").Visible = ChkPU.Checked + GvDatos.FBColumn("Total").Visible = ChkTotal.Checked + GvDatos.FBColumn("Cuenta").Visible = ChkCuenta.Checked + UPDatos.Update() + End Sub + + Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click + Personalizado = True + PersonalizarColumnas() + End Sub + End Class \ No newline at end of file From efc9e61ff9aace21cb86fe80073d7d81790a5a98 Mon Sep 17 00:00:00 2001 From: MLopez Date: Mon, 23 Jan 2023 09:34:18 -0700 Subject: [PATCH 005/103] =?UTF-8?q?Rep=20Compras=20AF=20Detalle:=20Agregar?= =?UTF-8?q?=20opci=C3=B3n=20Excel=20Personalizado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/RepComprasAFDetalle.aspx | 32 ++++++++++++++++++----------- Compras/RepComprasAFDetalle.aspx.vb | 15 +++++++++----- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/Compras/RepComprasAFDetalle.aspx b/Compras/RepComprasAFDetalle.aspx index f9bd2e1b4..98c3f24f4 100644 --- a/Compras/RepComprasAFDetalle.aspx +++ b/Compras/RepComprasAFDetalle.aspx @@ -19,19 +19,20 @@ -
  • - Generar PDF -
  • -
  • - Generar Excel -
  • - + -
  • - Personalizar -
  • -
    -
    +
  • + Generar PDF +
  • +
  • + Generar Excel +
  • +
  • + Personalizar +
  • +
  • + Excel Personalizado +
  • Ver Dlls en pesos
  • @@ -39,6 +40,13 @@ <%-- --%>   + + + + + + +
    diff --git a/Compras/RepComprasAFDetalle.aspx.vb b/Compras/RepComprasAFDetalle.aspx.vb index 6be1261bd..9077f17ce 100644 --- a/Compras/RepComprasAFDetalle.aspx.vb +++ b/Compras/RepComprasAFDetalle.aspx.vb @@ -337,6 +337,9 @@ Partial Class Compras_RepComprasAFDetalle Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LinkPDF.Click GenerarPDF() End Sub + Private Sub LnkExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles LnkExcelPersonalizado.Click + GvDatos.ExportToExcel("ComprasDetalle_" + DdlPS.txtValue.Value + Now.ToShortDateString) + End Sub Private Sub GenerarPDF(Optional Formato As String = "PDF") Dim ObjTareas As New ClsOIEventos @@ -349,12 +352,8 @@ Partial Class Compras_RepComprasAFDetalle End If Dim params As New List(Of ReportParameter) - - - Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - Dim FechaI, FechaF As String FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text) FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text) @@ -367,7 +366,6 @@ Partial Class Compras_RepComprasAFDetalle params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) - params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF(RutaPDF, DTDatos, params, "ReporteComprasAFDetalle_" & Now.ToString("yyyyMMddmmss"), Formato:=Formato) @@ -499,6 +497,13 @@ Partial Class Compras_RepComprasAFDetalle GvDatos.FBColumn("Total").Visible = ChkTotal.Checked GvDatos.FBColumn("Cuenta").Visible = ChkCuenta.Checked UPDatos.Update() + + If Personalizado Then + LnkExcelPersonalizado.Visible = True + Else + LnkExcelPersonalizado.Visible = False + End If + UPAcciones.Update() End Sub Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click From c357cba4b9e47ff4714b9fc972fc86e5be2dbb23 Mon Sep 17 00:00:00 2001 From: MLopez Date: Mon, 23 Jan 2023 09:35:03 -0700 Subject: [PATCH 006/103] Rep Entradas Salidas: Corregir filename Excel --- Inventarios/RepEntradasSalidas.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/RepEntradasSalidas.aspx.vb b/Inventarios/RepEntradasSalidas.aspx.vb index 72404a554..c8b79970a 100644 --- a/Inventarios/RepEntradasSalidas.aspx.vb +++ b/Inventarios/RepEntradasSalidas.aspx.vb @@ -345,7 +345,7 @@ Partial Class Inventarios_ReporteEntradasSalidas ImprimiReporte("EXCEL") End Sub Private Sub LnkExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles LnkExcelPersonalizado.Click - GvM.ExportToExcel("EntradasSalidas_" + Now.ToShortDateString + ".xls") + GvM.ExportToExcel("EntradasSalidas_" + Now.ToShortDateString) End Sub Private Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click ImprimiReporte() From 11b90a6367c68d4505fd35ee442a76f700b2bce4 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Mon, 23 Jan 2023 12:00:19 -0700 Subject: [PATCH 007/103] Clientes restriccion Forma de pago ,Portal Proveedores Descarga de comprobantes --- CRM/EmpresaCRM.aspx.cs | 21 ++++++++++----- Contabilidad/RegPrePolizaS.aspx.vb | 5 ++++ PortalProveedor/PortalProveedor.aspx | 3 ++- PortalProveedor/PortalProveedor.aspx.vb | 11 ++++---- Ventas/Clientes.aspx | 3 ++- Ventas/Clientes.aspx.vb | 34 ++++++++++++++++++++++++- 6 files changed, 63 insertions(+), 14 deletions(-) diff --git a/CRM/EmpresaCRM.aspx.cs b/CRM/EmpresaCRM.aspx.cs index 5d694eff3..5b7fb8098 100644 --- a/CRM/EmpresaCRM.aspx.cs +++ b/CRM/EmpresaCRM.aspx.cs @@ -292,10 +292,16 @@ public partial class CRM_EmpresaCRM : ClsPaginas CargarTiposEventos(); LimitaFechasAcercamiento(); CargaDatos(); - if (CveEncuestaCRM > 0) - { - CargaDatosTecnicos(); - } + + //if( Request["CveEmpresaCRM"] != null) + //{ + if (CveEncuestaCRM > 0) + { + CargaDatosTecnicos(); + } + // } + + VerificaPermisos(); CargaClasificaciones(); DdlPS.setEsWebService(true); @@ -1476,8 +1482,11 @@ public partial class CRM_EmpresaCRM : ClsPaginas var responseGenericGetDatosTecnicosEmpresaCRM = encuestaService.GetDatosTecnicosEmpresaCRM(new RequestDatosTecnicosEmpresaCRMGet() { CveEmpresa = UsuarioActual.Empresa.CveEmpresa, CveEncuesta = CveEncuestaCRM, CveEncuestaAplicada = CveEncuestaAplicada, CvePregunta = -1 }); if (responseGenericGetDatosTecnicosEmpresaCRM.IsSuccess) { - GvDatosTecnicos.DataSource = responseGenericGetDatosTecnicosEmpresaCRM.Result; - if (responseGenericGetDatosTecnicosEmpresaCRM.Result.Count > 0) + + + var DTTemp = responseGenericGetDatosTecnicosEmpresaCRM.Result.ToDataTable(); + GvDatosTecnicos.DataSource = DTTemp; + if (DTTemp.Rows.Count > 0) { GvDatosTecnicos.Visible = true; } diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 1d39150e5..5325a5a58 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -3228,6 +3228,7 @@ Partial Class ContabilidadC_RegPrePolizaS Dim Bytes As Byte() = Nothing Dim ImpresionPersonalizada As Integer = UsuarioActual.Empresa.Funcionalidad(282).ToEntero + Dim ConceptoPoliza As String = TxtConcepto.Text Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/PolizasResumen.rdlc", UsuarioActual.Empresa.Ruta)) @@ -3257,6 +3258,10 @@ Partial Class ContabilidadC_RegPrePolizaS params.Add(New ReportParameter("CodigoPostal", "")) params.Add(New ReportParameter("UsuarioRegistro", TxtUsuarioElaboro.Text)) + params.Add(New ReportParameter("ConceptoPoliza", ConceptoPoliza)) + + + If Logo.Exists Then diff --git a/PortalProveedor/PortalProveedor.aspx b/PortalProveedor/PortalProveedor.aspx index 4bcd4e740..39c129a0a 100644 --- a/PortalProveedor/PortalProveedor.aspx +++ b/PortalProveedor/PortalProveedor.aspx @@ -325,7 +325,8 @@
    - + diff --git a/PortalProveedor/PortalProveedor.aspx.vb b/PortalProveedor/PortalProveedor.aspx.vb index 6329d75bf..dc4fec606 100644 --- a/PortalProveedor/PortalProveedor.aspx.vb +++ b/PortalProveedor/PortalProveedor.aspx.vb @@ -592,16 +592,17 @@ Partial Class Portal_PortalProveedor Protected Sub GvBancos_comprobante(sender As Object, e As EventArgs) - Dim Gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - - Dim Path As String = String.Format("{0}{1}{2}{3}", UsuarioActual.Empresa.Ruta, "IE\", Gvr.FCHiddenField("CveIe").Value, ".png") + Dim Gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + + Dim Path As String = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, Gvr.DataKey("Comprobante")) + Dim Archivo As New System.IO.FileInfo(Path) If Archivo.Exists Then HttpContext.Current.Response.Clear() HttpContext.Current.Response.ClearContent() - HttpContext.Current.Response.ContentType = "application/png" - HttpContext.Current.Response.AppendHeader("Content-disposition", "attachment; filename=comprobante.png") + HttpContext.Current.Response.ContentType = "application/png" + HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name)) HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString()) HttpContext.Current.Response.TransmitFile(Path) 'HttpContext.Current.Response.Flush() diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 342e0bd09..6920fa6c9 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1111,7 +1111,8 @@
    - + diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 2b438d38a..0c9c53526 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1656,7 +1656,8 @@ Partial Class Clientes DdlUsoCFDI.SelectedValueExist(ObjClientes.CveUsoCFDI.ToString()) DdlMetodoPago33.SelectedValueExist(ObjClientes.CveMetodoPago33.ToString()) - DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString()) + 'DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString()) + CargaFormaDePago(ObjClientes.CveFormaPago33) If ObjClientes.CveRegimenFiscal > 0 Then DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal) ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS @@ -10583,5 +10584,36 @@ Partial Class Clientes UpLineaAdicionalmodal.Update() End Sub + + Protected Sub DdlMetodoPago33_SelectedIndexChanged(sender As Object, e As EventArgs) + + CargaFormaDePago(-1) + + End Sub + + Private Sub CargaFormaDePago(Optional CveFormaPago As Integer = -1) + + DdlFormaPago33.Items.Clear() + + If DdlMetodoPago33.SelectedValue.ToEntero = 3 Then + DdlFormaPago33.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago = 20") + Else + DdlFormaPago33.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago <> 20") + End If + + DdlFormaPago33.DataBind() + + If Not DdlMetodoPago33.SelectedValue.ToEntero = 3 Then + DdlFormaPago33.Items.Insert(0, New ListItem("Seleccione uno", "-1")) + End If + + If CveFormaPago > 0 Then + DdlFormaPago33.SelectedValueExist(CveFormaPago) + End If + + UpFiscalContable.Update() + + End Sub + End Class From b9651e8ba69ad059fabfdf7129637c37aba4e995 Mon Sep 17 00:00:00 2001 From: MLopez Date: Mon, 23 Jan 2023 23:07:15 -0700 Subject: [PATCH 008/103] E13 Buscar Cuentas de banco de proveedores en Popup --- App_Code/ClsPaginas.vb | 2 + Bancos/PopUpBuscarCuentasProveedor.aspx | 164 +++++++++++++++++++++ Bancos/PopUpBuscarCuentasProveedor.aspx.vb | 124 ++++++++++++++++ Site.master | 6 + Site.master.vb | 5 +- 5 files changed, 300 insertions(+), 1 deletion(-) create mode 100644 Bancos/PopUpBuscarCuentasProveedor.aspx create mode 100644 Bancos/PopUpBuscarCuentasProveedor.aspx.vb diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index ecbcd2ecf..ae6a62790 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4555,6 +4555,7 @@ Public Class ClsPaginas PaginaDict.Add("/Sistemas/CatContrasenia.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/PopUpBuscarClientes.aspx".ToUpper(), -1) PaginaDict.Add("/Compras/PopUpBuscarProveedor.aspx".ToUpper(), -1) + PaginaDict.Add("/Compras/PopUpBuscarCuentasProveedor.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/PopUpImprimir.aspx".ToUpper(), -1) PaginaDict.Add("/Contabilidad/PopUpAuxiliar.aspx".ToUpper(), -1) PaginaDict.Add("/Fiscal/PopUpConfiguracion.aspx".ToUpper(), -1) @@ -4797,6 +4798,7 @@ Public Class ClsPaginas PaginaDict.Add("/Bancos/PopUpBuscaPersonal.aspx".ToUpper(), 281) PaginaDict.Add("/Bancos/PopUpBuscarColectiva.aspx".ToUpper(), 281) PaginaDict.Add("/Bancos/PopUpBuscarProveedor.aspx".ToUpper(), 281) + PaginaDict.Add("/Bancos/PopUpBuscarCuentasProveedor.aspx".ToUpper(), 281) PaginaDict.Add("/Bancos/PopUpBuscarFolioC.aspx".ToUpper(), 281) PaginaDict.Add("/Bancos/PopUpBuscarClientes.aspx".ToUpper(), 281) 'PaginaDict.Add("/Bancos/CatTiposCuenta.aspx".ToUpper(), -1) diff --git a/Bancos/PopUpBuscarCuentasProveedor.aspx b/Bancos/PopUpBuscarCuentasProveedor.aspx new file mode 100644 index 000000000..61cf9512b --- /dev/null +++ b/Bancos/PopUpBuscarCuentasProveedor.aspx @@ -0,0 +1,164 @@ +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PopUpBuscarCuentasProveedor.aspx.vb" Inherits="Bancos_PopUpBuscarCuentasProveedor" %> + +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + + + + + + + + + + + + + + + +<%----%> + + + + + + + + + + + + + + + + + + +
    Filtros para búsqueda
    Proveedor: + + + + + +
    + +
    +
    +
    + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +<%-- --%> +
    + + + + + diff --git a/Bancos/PopUpBuscarCuentasProveedor.aspx.vb b/Bancos/PopUpBuscarCuentasProveedor.aspx.vb new file mode 100644 index 000000000..48c16f351 --- /dev/null +++ b/Bancos/PopUpBuscarCuentasProveedor.aspx.vb @@ -0,0 +1,124 @@ +Option Explicit On +Option Strict On + +Imports System.Data +Imports Extensiones +Partial Class Bancos_PopUpBuscarCuentasProveedor + Inherits ClsPaginas + +#Region "Propiedades" + Private ReadOnly Property CveProveedor As Integer + Get + Return ViewState("CveProveedor").ToString.ToEntero + End Get + End Property + Private Property DTCuentasBancos As DataTable + Get + Return CType(ViewState("DTCuentasBancos"), DataTable) + End Get + Set(value As DataTable) + ViewState("DTCuentasBancos") = value + End Set + End Property + + +#End Region + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not Page.IsPostBack Then + CType(Me.Master, BaseMasterPage).EsPopup = True + CType(Me.Master, BaseMasterPage).PopupWidth = 780 + RegistraScript("if($get('tdContenido')){$get('tdContenido').style.height='465px'}") + + If Request("CveProveedor") IsNot Nothing AndAlso IsNumeric(Request("CveProveedor")) AndAlso Request("CveProveedor").ToEntero > 0 Then + ViewState("CveProveedor") = Request("CveProveedor") + CargaDatos(CveProveedor) + DdlProveedores.SelectedValue = CveProveedor.ToString + Else + ViewState("CveProveedor") = -1 + End If + + InicializaValores() + + Me.Form.DefaultButton = BtnBuscar.UniqueID + End If + End Sub + Private Sub InicializaValores() + Dim Txt As String = IfNull(Request("Txt"), "").ToString + If Txt <> "" Then LblTitulo.Text = String.Format("Búsqueda de {0}", Txt) + + DdlProveedores.setEsWebService(True) + DdlProveedores.Attributes.Add("data-metodo", "getproveedores") + DdlProveedores.SelectedText = "Seleccione" + DdlProveedores.SelectedValue = "-1" + DdlProveedores.DataBind() + End Sub + Private Sub CargaDatos(CveProveedor As Integer) + + If ValidarFiltrosSeleccionados() OrElse CveProveedor > 0 Then + CargaCuentasBancarias() + UPDatos.Update() + Else + Alert("Seleccione un proveedor", TipoMensaje.MsgAdvertencia) + End If + End Sub + + Private Sub CargaCuentasBancarias() + 'If CveProveedor <= 0 Then Exit Sub + Dim ObjCuentasBancos As New ClsGenerales + DTCuentasBancos = New DataTable + + If ObjCuentasBancos.GetCuentasDepositos(CveProveedor) Then + DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados) + Else + Alert("No se pudieron cargar las cuentas bancarias. Por favor intente nuevamente.", TipoMensaje.MsgAdvertencia) + ObjCuentasBancos.Dispose() + Exit Sub + End If + + If CveProveedor < 0 Then + 'Alert("No hay proveedor", TipoMensaje.MsgInformacion) + 'TempDTCuentasBancos = DTCuentasBancos + End If + + ObjCuentasBancos.Dispose() + CargaPSGridCuentasBancos() + RecargaGlobalCuentasBancarias() + End Sub + + Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1) + If CveProveedor > 0 Then + Dim ObjCuentasBancos As New ClsGenerales + + If ObjCuentasBancos.GetCuentasDepositos() Then + GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados + End If + ObjCuentasBancos.Dispose() + End If + End Sub + + Private Sub CargaPSGridCuentasBancos() + GvBancosCuentas.DataSource = DTCuentasBancos.FiltraParametros($"CveProveedor = {DdlProveedores.SelectedValue}") + GvBancosCuentas.DataBind() + TblBusqueda.Visible = True + UPDatos.Update() + End Sub + + Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click + CargaDatos(DdlProveedores.SelectedValue.ToEntero) + End Sub + + Private Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound + 'If e.Row.RowType = DataControlRowType.DataRow Then + ' If e.Row.DBCampo("CveAlmacen") = "" Then + ' e.Row.CssClass = "Totales" + ' End If + 'End If + End Sub + + Private Function ValidarFiltrosSeleccionados() As Boolean + If DdlProveedores.SelectedValue.ToEntero > 0 Then Return True + Return False + End Function + +End Class diff --git a/Site.master b/Site.master index 0a9eac6db..e21684d8e 100644 --- a/Site.master +++ b/Site.master @@ -194,6 +194,12 @@ Buscar Proveedor +
  • + + + Buscar Cuentas Proveedor + +
  • diff --git a/Site.master.vb b/Site.master.vb index 88c437c73..4db71a563 100644 --- a/Site.master.vb +++ b/Site.master.vb @@ -215,7 +215,10 @@ Partial Class Site 'End Sub Private Sub CargaBuscadores() 'Proveedores - If UsuarioActual.TienePermisoPagina(37) Then tdProv.Visible = True + If UsuarioActual.TienePermisoPagina(37) Then + tdProv.Visible = True + tdProvBancos.Visible = True + End If 'Clientes If UsuarioActual.TienePermisoPagina(26) Then tdCliente.Visible = True From 28beea57e16a99b16d947d4b2a4f08c854f893f9 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 24 Jan 2023 06:34:39 -0700 Subject: [PATCH 009/103] -- mejoras en pagoprepolziaventa ++ clientesabonar. cambio para utilziar pagoprepoliza --- App_Code/ClsBancos.vb | 3 +- App_Code/ClsPaginas.vb | 5 +- Ventas/ClientesAbonar.aspx | 39 +- Ventas/ClientesAbonar.aspx.vb | 852 +++++++++++----------------------- 4 files changed, 298 insertions(+), 601 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 8b60b8ae6..81a6e7ee9 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -1466,7 +1466,7 @@ Public Class ClsBancos Public Function AddBancos_IE(CveCuenta As Integer, CveTipoTransaccion As Integer, FechaDocumento As Date, Folio As String, PagueseA As String, Importe As Double, CveMoneda As Integer, TipoCambio As Double, Observaciones As String, NotificarA As String, EsAbonoEnCuenta As Boolean, AplicaImpuestos As Boolean, IDPoliza As Integer, CvePrePoliza As Integer, Comprobante As String, CveUsuario As Integer, CveEmpresa As Integer, Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1, - Optional Referencia As String = "-1", Optional CveIESustitucion As Integer = -1, Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False, + Optional Referencia As String = "-1", Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False, Optional MesesSinIntereses As Integer = -1, Optional Modulo As String = "", Optional ConceptoCIE As String = "", Optional CveOCAnticipo As Integer = -1) As Integer Dim Retorno As Integer = -1 @@ -1497,7 +1497,6 @@ Public Class ClsBancos .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveCuentaTarjeta", SqlDbType.Int).Value = CveCuentaTarjeta .Add("@Referencia", SqlDbType.VarChar).Value = Referencia - .Add("@CveIESustitucion", SqlDbType.Int).Value = CveIESustitucion .Add("@CveCorte", SqlDbType.Int).Value = CveCorte .Add("@CveProveedorIntermediario", SqlDbType.Int).Value = CveProveedorIntermediario .Add("@FueConciliado", SqlDbType.Bit).Value = FueConciliado diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index ecbcd2ecf..bfdb02edb 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -10381,7 +10381,8 @@ Public Class ClsPaginas End If If VentaActual.CveMoneda = 1 And Pago.CveMonedaPago <> 1 Then 'factura pesos, pago en dolares - tImportePago = ((Pago.ImportePago * TCValuacionVenta / Pago.TCPago).RoundSQL * Pago.TCPago).RoundSQL + tImportePago = ((Pago.ImportePago * TCValuacionVenta / Pago.TCPago) * Pago.TCPago).RoundSQL + tImporteVenta = (Pago.ImportePago * TCValuacionVenta).RoundSQL ElseIf VentaActual.CveMoneda <> 1 And Pago.CveMonedaPago <> 1 Then 'factura dolares, pago en dolares tImporteVenta = (Pago.ImportePago * TCValuacionVenta).RoundSQL tImportePago = (Pago.ImportePago * TCValuacionPago).RoundSQL @@ -10557,6 +10558,7 @@ Public Class ClsPaginas Dim ConceptoContable, IdCtaContable As Integer Dim TipoMovimiento As Boolean Dim Diferencia As Decimal = 0 + tImportePago +=Pago.ImporteFluctuacionAdicional 'para los casos de aplicación de If tImporteVenta <> tImportePago Then If tImporteVenta < tImportePago Then @@ -10608,6 +10610,7 @@ Public Class ClsPaginas Public Property CveCreditoDetalle As Integer = -1 Public Property AplicaTraslado As Boolean = True Public Property Referencia As String + Public Property ImporteFluctuacionAdicional As Decimal = 0 End Class diff --git a/Ventas/ClientesAbonar.aspx b/Ventas/ClientesAbonar.aspx index 07d9c10b3..b296b6faa 100644 --- a/Ventas/ClientesAbonar.aspx +++ b/Ventas/ClientesAbonar.aspx @@ -96,7 +96,7 @@
    -
    +
    @@ -114,10 +114,7 @@
    - - - - +
    T.C: @@ -216,22 +213,22 @@
    - - -
    Liquidación:
    +
    - +
    -
    Préstamo:
    - +
    - +
    +
    Intereses: + +
    @@ -820,6 +817,24 @@ Importe = Importe + ToDouble($get('TxtAnticipo').value); } } + if ($get('TxtPrestamoImporte') != null) { + + if ($get('TxtPrestamoImporte').value == '') { + $get('TxtPrestamoImporte').value = 0.00; + } + else { + Importe = Importe - ToDouble($get('TxtPrestamoImporte').value); + } + } + if ($get('TxtPrestamoIntereses') != null) { + + if ($get('TxtPrestamoIntereses').value == '') { + $get('TxtPrestamoIntereses').value = 0.00; + } + else { + Importe = Importe - ToDouble($get('TxtPrestamoIntereses').value); + } + } if ($get('TxtOtrosImportes') != null) { if (pagoMultiple != 0) { diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index d7af7a10b..84a614416 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -69,6 +69,14 @@ Partial Class Ventas_ClientesAbonar ViewState("DtIngresos") = value End Set End Property + Private Property DtPrestamos As DataTable + Get + Return CType(ViewState("DtPrestamos"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtPrestamos") = value + End Set + End Property Private Property IdCuentaBancaria As Integer Get @@ -164,15 +172,6 @@ Partial Class Ventas_ClientesAbonar End Set End Property - 'Private Property CveIESustitucion As Integer - ' Get - ' Return ViewState("CveIESustitucion").ToString.ToEntero - ' End Get - ' Set(value As Integer) - ' ViewState("CveIESustitucion") = value - ' End Set - 'End Property - Private Property CFDIRelacionadoSustitucion As String Get If ViewState("CFDIRelacionadoSustitucion") Is Nothing Then @@ -248,16 +247,11 @@ Partial Class Ventas_ClientesAbonar ViewState("IdCtaContMonedaExtranjeraAnticipo") = 0 ViewState("IdCtaContMonedaComplementariaAnticipo") = 0 - ViewState("CveIESustitucion") = IfNull(Request("CveIESustitucion"), "-1").ToString.ToEntero DdlProveedorIntermediario.setEsWebService(True) DdlProveedorIntermediario.Attributes.Add("data-metodo", "getproveedores") FechaCorteIE = DateTime.Now - 'If CveIESustitucion > 0 Then - ' CargaIESustituir() - 'End If - Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, Now.Day - 1, Now.Day) Fecha = (dia.ToString + "/" + Now.Month.ToString + "/" + Now.Year.ToString).ToDate @@ -355,7 +349,6 @@ Partial Class Ventas_ClientesAbonar CargaCuentas() CargaTipoTransaccion() - 'TxtFechaDocumento.Text = IIf(CveIESustitucion > 0, FechaCorteIE.ToShortDateString, Now.ToShortDateString).ToString TxtFechaDocumento.Text = Now.ToShortDateString.ToString TxtAboneA.Enabled = False @@ -390,6 +383,7 @@ Partial Class Ventas_ClientesAbonar 'Dim CveClasificacionCol6 As Integer = 21572 'Dim CveClasificacionCol7 As Integer = 21571 divAnticipo.Visible = True + divPrestamo.Visible = True GvCxC.Columns(17).HeaderText = "Comisión
    Venta" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol1).FiltroPrimeroValor("Clasificacion").Substring(0, 10) GvCxC.Columns(18).HeaderText = "Gastos
    Manejo" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol2).FiltroPrimeroValor("Clasificacion").Substring(0, 12) @@ -406,6 +400,7 @@ Partial Class Ventas_ClientesAbonar DvLiquidacion2.Visible = True DtIngresos = CargaIngresos(2) + DtPrestamos = CargaPrestamos(1) End If CargaDatos(tCveMoneda) @@ -422,18 +417,15 @@ Partial Class Ventas_ClientesAbonar Dim FechaI As String = IfNull(Request("FechaI"), "-1") Dim FechaF As String = IfNull(Request("FechaF"), "-1") - 'Dim FechaCorte As Date = IIf(CveIESustitucion > 0, (FechaCorteIE.ToDate).ToShortDateString, DateTime.Now.AddYears(1).ToShortDateString).ToString.ToDate Dim FechaCorte As Date = DateTime.Now.AddYears(1).ToShortDateString.ToString.ToDate Dim SumDescuentoProntoPago As Double = 0.0 - 'If Mov.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, FechaI, FechaF, pCveMoneda, CveSubProyecto, UsuarioActual.CveEmpresa, CveClienteSucursal, FechaCorte:=FechaCorte, CveIESustitucion:=CveIESustitucion) Then If Mov.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, FechaI, FechaF, pCveMoneda, CveSubProyecto, UsuarioActual.CveEmpresa, CveClienteSucursal, FechaCorte:=FechaCorte) Then Dim TmpCxCAux As DataTable TmpCxCAux = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio") SumDescuentoProntoPago = TmpCxCAux.SUM("DescuentoProntoPago") GvCxC.DataSource = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio") - CveMoneda = pCveMoneda End If @@ -799,12 +791,6 @@ Partial Class Ventas_ClientesAbonar '02-05-2018 MANDAMOS CANCELAR EL COMPLEMENTO A SUSTITUIR Dim ErrorCancelarIE As Boolean = False - 'If CveIESustitucion > 0 Then - ' ErrorCancelarIE = CancelarIE() - ' If ErrorCancelarIE Then - ' Exit Sub - ' End If - 'End If Dim ObjIE As New ClsBancos() Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL) @@ -856,11 +842,8 @@ Partial Class Ventas_ClientesAbonar Dim CveProvIntermediario As Integer If ChkProveedorIntermediario.Checked Then CveProvIntermediario = If(DdlProveedorIntermediario.SelectedValue.ToEntero <= 0, -1, DdlProveedorIntermediario.SelectedValue.ToEntero) - End If - - 'CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveIESustitucion:=CveIESustitucion, CveProveedorIntermediario:=CveProvIntermediario) - CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveIESustitucion:=-1, CveProveedorIntermediario:=CveProvIntermediario) + CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveProveedorIntermediario:=CveProvIntermediario) Else If RblTipoPago.SelectedValue.Contiene("3") Then CveIE = DdlIngreso.SelectedValue.ToEntero @@ -878,7 +861,6 @@ Partial Class Ventas_ClientesAbonar filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If - 'inserto los movimientos de la conta para abonar al saldo If CvePrePoliza > 0 Then @@ -895,7 +877,6 @@ Partial Class Ventas_ClientesAbonar Dim CveSubProyectoContabilizar As Integer = -1 Dim CveSubProyectoMaximo As Integer = -1 Dim CuentasContablesInvalidas As New StringBuilder - Dim CuentasContablesInvalidasSIG As New StringBuilder Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False) Dim TipoCambioFluctuacion As Decimal = 1 Dim FechaUltimaFluctuacion As Date = MinFecha @@ -903,15 +884,41 @@ Partial Class Ventas_ClientesAbonar Dim tFecha As Date = TxtFechaDocumento.Text.ToDate Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha) - If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then - If UltimaFluctuacion.FechaFluctuacion <= tFecha Then - FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion - TipoCambioFluctuacion = UltimaFluctuacion.TCFluctuacion + Dim ImportePrestamo As Decimal = 0 + Dim TCPrestamo As Decimal = 0 + If TxtPrestamoImporte.Text.ToDecimal <> 0 Then 'amortización del préstamo + ImportePrestamo = TxtPrestamoImporte.Text.ToDecimal + Dim tCveProv As Integer = DtPrestamos.FiltroPrimeroValor("CveProveedor", "CveIE=" & DdlPrestamo.SelectedValue) + Dim tFechaIE As Date = DtPrestamos.FiltroPrimeroValor("FechaDocumento", "CveIE=" & DdlPrestamo.SelectedValue).ToDate + TCPrestamo = DtPrestamos.FiltroPrimeroValor("TipoCambio", "CveIE=" & DdlPrestamo.SelectedValue).ToDecimal + If CveMoneda = 1 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImportePrestamo, ImportePrestamo, 57, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=CveSubProyecto, TipoCambio:=tipoCambioPago, CveProveedor:=tCveProv) Then + MsgError = "No se pudo insertar la póliza" + End If + Else + If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then + If tFechaIE <= UltimaFluctuacion.FechaFluctuacion Then + FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion + TCPrestamo = UltimaFluctuacion.TCFluctuacion + End If + End If + + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImportePrestamo, ImportePrestamo, 349, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=CveSubProyecto, TipoCambio:=TCPrestamo, ImporteME:=ImportePrestamo, CveProveedor:=tCveProv) Then + MsgError = "No se pudo insertar la póliza" + End If + + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImportePrestamo, ((ImportePrestamo * TCPrestamo) - ImportePrestamo).RoundSQL, 350, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=CveSubProyecto, TipoCambio:=TCPrestamo, ImporteME:=ImportePrestamo, CveProveedor:=tCveProv) Then + MsgError = "No se pudo insertar la póliza" + End If End If - End If + + If TxtPrestamoIntereses.Text.ToDecimal <> 0 AndAlso MsgError = "" Then + Dim ImporteIntereses As Decimal = (TxtPrestamoIntereses.Text.ToDecimal * tipoCambioPago).RoundSQL + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteIntereses, ImporteIntereses, 6, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=CveSubProyecto, TipoCambio:=tipoCambioPago, CveClasificacion:=21927) Then + MsgError = "No se pudo insertar la póliza" + End If + End If - If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then - dtConceptos = ObjMov.DtResultados End If 'inserto las ventas que voy a pagar @@ -920,11 +927,52 @@ Partial Class Ventas_ClientesAbonar If gvr.FCCheckBox("Chk").Checked Then Dim ObjFactura As Modelos.Factura = Nothing + Dim EsAnticipoEspecial As Boolean = False If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then ObjFactura = New Modelos.Factura(UsuarioActual, gvr.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa) End If + Dim VentaActual As New Venta + VentaActual.CveVenta = gvr.DataKey("CveVenta").ToEntero + VentaActual.Fecha = gvr.DataKey("Fecha").ToDate + VentaActual.CveCliente = gvr.DataKey("CveCliente").ToEntero + VentaActual.CveMoneda = gvr.DataKey("CveMoneda").ToEntero + VentaActual.SerieFolio = gvr.DataKey("SerieFolio") + VentaActual.ClienteNombre = NombreComercial + VentaActual.TC = gvr.DataKey("TipoCambio").ToDecimal + VentaActual.Total = gvr.DataKey("Original").ToDecimal + VentaActual.IVA = gvr.DataKey("IVA").ToDecimal + VentaActual.IEPS = gvr.DataKey("IEPS").ToDecimal + VentaActual.RetIVA = gvr.DataKey("RetIVA").ToDecimal + VentaActual.RetISR = gvr.DataKey("RetISR").ToDecimal + + VentaActual.PorcentajeIVA = gvr.DataKey("PorcentajeIVA").ToDecimal + VentaActual.UsuarioActual = UsuarioActual + VentaActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero + + 'Importe de pago + Dim Pago As New VentaPago + Pago.Fecha = TxtFechaDocumento.Text.ToDate + Pago.CveIE = CveIE + Pago.CveMonedaPago = CveMoneda + Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal + Pago.ImportePagoVenta = gvr.FCTextBox("TxtAbonar").Text.ToDecimal + Pago.Referencia = TxtFolio.Text + + If RblTipoPago.SelectedValue = "3" Then Pago.TipoPago = "I" + + 'Tipos de cambio + If Pago.CveMonedaPago = 1 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos + Pago.TCPago = TxtTC.Text.ToDecimal + ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES + Pago.TCPago = IIf(TxtTCDolaresDolares.Visible, TxtTCDolaresDolares.Text.ToDecimal, TxtTCDolares.Text.ToDecimal) + ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES + Pago.TCPago = TxtTCDolares.Text.ToDecimal + End If + tipoCambioPago = Pago.TCPago + + If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en Pesos y se va a pagar en Pesos tipoCambioPago = 1 @@ -946,531 +994,173 @@ Partial Class Ventas_ClientesAbonar PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / gvr.DataKey("Original").ToDecimal End If + If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then + EsAnticipoEspecial = True + Pago.AplicaTraslado = False + Dim IdCtaContable As Integer = If(EsAnticipoEspecial, IdCtaAnticipo, IdCuentaCliente) + If VentaActual.CveMoneda = 2 Then IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaExtranjeraAnticipo, IdCtaContMonedaExtranjera) + + If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, VentaActual.SerieFolio, 3, VentaActual.SerieFolio, IdCtaContable, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, VentaActual.SerieFolio, 95, VentaActual.SerieFolio, IdCtaContable, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then + MsgError = "No se pudo insertar la póliza" + End If + Else + MsgError = "No se pudo insertar la póliza" + End If + End If + + If UsuarioActual.Empresa.Funcionalidad(590) = "1" AndAlso MsgError = "" Then '' si es empresa agrícola + Dim FluctuacionAnticipo As Decimal = 0 + Dim ImporteLiq1 As Decimal = gvr.FCTextBox("TxtLiqCol1").Text.ToDecimal + Dim ImporteLiq2 As Decimal = gvr.FCTextBox("TxtLiqCol2").Text.ToDecimal + Dim ImporteLiq3 As Decimal = gvr.FCTextBox("TxtLiqCol3").Text.ToDecimal + Dim ImporteLiq4 As Decimal = gvr.FCTextBox("TxtLiqCol4").Text.ToDecimal + Dim ImporteLiq5 As Decimal = gvr.FCTextBox("TxtLiqCol5").Text.ToDecimal + Dim ImporteLiq6 As Decimal = gvr.FCTextBox("TxtLiqCol6").Text.ToDecimal + Dim ImporteLiq7 As Decimal = gvr.FCTextBox("TxtLiqCol7").Text.ToDecimal + Dim ImporteLiq8 As Decimal = gvr.FCTextBox("TxtLiqCol8").Text.ToDecimal + Dim ImporteLiq9 As Decimal = gvr.FCTextBox("TxtLiqCol9").Text.ToDecimal + + Dim CveClasificacionCol1 As Integer = 21514 'comisiones sobre venta + Dim CveClasificacionCol2 As Integer = 21916 ' manejo + Dim CveClasificacionCol3 As Integer = 21917 'servicios de inspección + Dim CveClasificacionCol4 As Integer = 21918 ' seguro liquidación + Dim CveClasificacionCol5 As Integer = 21561 ' gastos aduanales mex + Dim CveClasificacionCol6 As Integer = 21920 ' diveros + Dim CveClasificacionCol7 As Integer = 21919 'gastos aduanales usa + Dim CveClasificacionCol8 As Integer = 21211 'material Empaque + Dim CveClasificacionCol9 As Integer = 21207 'Semilla + + Dim CveSubProyectoLiquidacion As Integer = gvr.DataKey("CveSubProyecto").ToEntero + Dim CveConceptoLiquidacion As Integer = 51 + Dim ConceptoPartida As String = gvr.DataKey("SerieFolio") & " " & gvr.FCDropDownList("DdlTG").SelectedItem.Text + + If ImporteLiq1 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq1, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq1 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol1, ImporteME:=If(CveMoneda > 1, ImporteLiq1, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If ImporteLiq2 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq2, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq2 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol2, ImporteME:=If(CveMoneda > 1, ImporteLiq2, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If ImporteLiq3 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq3, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq3 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol3, ImporteME:=If(CveMoneda > 1, ImporteLiq3, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If ImporteLiq4 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq4, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq4 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol4, ImporteME:=If(CveMoneda > 1, ImporteLiq4, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If ImporteLiq5 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq5, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq5 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol5, ImporteME:=If(CveMoneda > 1, ImporteLiq5, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If ImporteLiq6 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq6, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq6 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol6, ImporteME:=If(CveMoneda > 1, ImporteLiq6, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If ImporteLiq7 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq7, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq7 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol7, ImporteME:=If(CveMoneda > 1, ImporteLiq7, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If ImporteLiq8 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq8, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq8 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol8, ImporteME:=If(CveMoneda > 1, ImporteLiq8, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If ImporteLiq9 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq9, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq9 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol9, ImporteME:=If(CveMoneda > 1, ImporteLiq9, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If MsgError = "" AndAlso gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero > 0 Then + Dim TCP As Decimal = 0 + Dim FolioPago As String = " " + If DtIngresos IsNot Nothing Then + TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue)) + FolioPago = DtIngresos.FiltroPrimeroValor("Folio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)) + Dim tTCPFecha As Date = DtIngresos.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue)).ToDate + 'considera fluctuación + If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then + If tTCPFecha <= UltimaFluctuacion.FechaFluctuacion Then + tTCPFecha = UltimaFluctuacion.FechaFluctuacion + TCP = UltimaFluctuacion.TCFluctuacion + End If + End If + End If + 'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo + FluctuacionAnticipo = ((TCP - tipoCambioPago) * gvr.FCTextBox("TxtAmort").Text.ToDecimal).RoundSQL + MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort").Text.ToDecimal, TCP, tipoCambioVentaValuacion, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago) + End If + + If MsgError = "" AndAlso gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero > 0 Then + Dim TCP As Decimal = 0 + Dim FolioPago As String = " " + If DtIngresos IsNot Nothing Then + TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)) + FolioPago = DtIngresos.FiltroPrimeroValor("Folio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)) + Dim tTCPFecha As Date = DtIngresos.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)).ToDate + 'considera fluctuación + If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then + If tTCPFecha <= UltimaFluctuacion.FechaFluctuacion Then + tTCPFecha = UltimaFluctuacion.FechaFluctuacion + TCP = UltimaFluctuacion.TCFluctuacion + End If + End If + + End If + 'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo + FluctuacionAnticipo += ((TCP - tipoCambioPago) * gvr.FCTextBox("TxtAmort2").Text.ToDecimal).RoundSQL + MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort2").Text.ToDecimal, TCP, tipoCambioVentaValuacion, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago) + End If + + If ImportePrestamo <> 0 Then + If TCPrestamo > 0 Then + FluctuacionAnticipo += ((TCPrestamo - tipoCambioPago) * ImportePrestamo).RoundSQL + End If + End If + Pago.ImporteFluctuacionAdicional = FluctuacionAnticipo + End If + + If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then + MsgError = "No se pudo insertar la póliza" + End If + + ' Case 134 'Pago Intermediario + If RblTipoPago.SelectedValue = "2" Then + Dim ImporteMovimiento As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - gvr.FCTextBox("TxtComision").Text.ToDecimal + Dim ImporteMN As Decimal = (ImporteMovimiento * tipoCambioPago).RoundSQL + Dim IdCtaContable As Integer = 0 + + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, VentaActual.SerieFolio, 134, VentaActual.SerieFolio, IdCtaContable, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveProveedor:=DdlProveedorPagoInt.SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" + End If + End If + 'PARA EMITIR COMPLEMENTO PAGO CveVentasPago.Add(gvr.DataKey("CveVenta").ToEntero) SeriesPago.Add(gvr.DataKey("SerieFolio")) - Dim tipoCambioVentaDiferenciaCambiaria As Double = 1 - Dim EsAnticipoEspecial As Boolean = False - If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then EsAnticipoEspecial = True - Dim FluctuacionAnticipo As Decimal = 0 - - If dtConceptos IsNot Nothing Then - FluctuacionAnticipo = 0 ' se limpia la fluctuación por cada factura. - For Each Row As DataRow In dtConceptos.Rows - - Dim ConceptoContable = Row("CveConcepto").ToString.ToEntero - Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False) - Dim ImporteMovimiento As Decimal = 0 - Dim ImporteMN As Decimal - Dim FechaMovimiento As Date = TxtFechaDocumento.Text - Dim IdCtaContable As Integer = 0 - Dim ConceptoMovimiento As String = ObjMov.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreComercial, gvr.DataKey("SerieFolio").ToString, TxtFolio.Text.Trim) - Dim Referencia As String = gvr.DataKey("SerieFolio").ToString - Dim CveSubProyecto As Integer = gvr.DataKey("CveSubProyecto").ToEntero - CveSubProyectoContabilizar = -1 - Dim PorcentajeImpuesto As Decimal = 0 - If CveSubProyecto > 0 Then CveSubProyectoMaximo = CveSubProyecto - - Select Case ConceptoContable - Case 2 'Pago Cliente - If gvr.DataKey("CveMoneda").ToEntero > 1 Then ConceptoContable = 292 - - ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal).RoundSQL - ImporteMN = ImporteMovimiento '(ImporteMovimiento * tipoCambioVentaValuacion).RoundSQL - TipoCambioGeneral = tipoCambioVentaValuacion - CveSubProyectoContabilizar = CveSubProyecto - - If gvr.DataKey("CveMoneda").ToEntero = 1 Then - IdCtaContable = If(EsAnticipoEspecial, IdCtaAnticipo, IdCuentaCliente) - ConceptoContable = If(EsAnticipoEspecial, 3, ConceptoContable) - Else - ConceptoMovimiento += $" TC:{tipoCambioVentaValuacion} ${ImporteMovimiento.FormatoNumero(2)}" - IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaComplementariaAnticipo, IdCtaContComplementaria) - If ImporteMovimiento <> 0 Then - ImporteMN = ImporteMovimiento - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, If(gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(119, 158), 226, 207), ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento).RoundSQL, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then - MsgError = "No se pudo insertar la póliza" - End If - End If - IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaExtranjeraAnticipo, IdCtaContMonedaExtranjera) - ConceptoContable = If(EsAnticipoEspecial, 3, ConceptoContable) - End If - - If EsAnticipoEspecial Then - If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Referencia, 2, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteMN, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=False) Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Referencia, 95, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteMN, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=False) Then - MsgError = "No se pudo insertar la póliza" - End If - Else - MsgError = "No se pudo insertar la póliza" - End If - End If - - If UsuarioActual.Empresa.Funcionalidad(590) = "1" AndAlso MsgError = "" Then '' si es empresa agrícola - - Dim ImporteLiq1 As Decimal = gvr.FCTextBox("TxtLiqCol1").Text.ToDecimal - Dim ImporteLiq2 As Decimal = gvr.FCTextBox("TxtLiqCol2").Text.ToDecimal - Dim ImporteLiq3 As Decimal = gvr.FCTextBox("TxtLiqCol3").Text.ToDecimal - Dim ImporteLiq4 As Decimal = gvr.FCTextBox("TxtLiqCol4").Text.ToDecimal - Dim ImporteLiq5 As Decimal = gvr.FCTextBox("TxtLiqCol5").Text.ToDecimal - Dim ImporteLiq6 As Decimal = gvr.FCTextBox("TxtLiqCol6").Text.ToDecimal - Dim ImporteLiq7 As Decimal = gvr.FCTextBox("TxtLiqCol7").Text.ToDecimal - Dim ImporteLiq8 As Decimal = gvr.FCTextBox("TxtLiqCol8").Text.ToDecimal - Dim ImporteLiq9 As Decimal = gvr.FCTextBox("TxtLiqCol9").Text.ToDecimal - - Dim CveClasificacionCol1 As Integer = 21514 'comisiones sobre venta - Dim CveClasificacionCol2 As Integer = 21916 ' manejo - Dim CveClasificacionCol3 As Integer = 21917 'servicios de inspección - Dim CveClasificacionCol4 As Integer = 21918 ' seguro liquidación - Dim CveClasificacionCol5 As Integer = 21561 ' gastos aduanales mex - Dim CveClasificacionCol6 As Integer = 21920 ' diveros - Dim CveClasificacionCol7 As Integer = 21919 'gastos aduanales usa - Dim CveClasificacionCol8 As Integer = 21211 'material Empaque - Dim CveClasificacionCol9 As Integer = 21207 'Semilla - - Dim CveSubProyectoLiquidacion As Integer = gvr.DataKey("CveSubProyecto").ToEntero - Dim CveConceptoLiquidacion As Integer = 51 - Dim ConceptoPartida As String = gvr.DataKey("SerieFolio") & " " & gvr.FCDropDownList("DdlTG").SelectedItem.Text - - If ImporteLiq1 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq1, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq1 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol1, ImporteME:=If(CveMoneda > 1, ImporteLiq1, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq2 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq2, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq2 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol2, ImporteME:=If(CveMoneda > 1, ImporteLiq2, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq3 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq3, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq3 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol3, ImporteME:=If(CveMoneda > 1, ImporteLiq3, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq4 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq4, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq4 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol4, ImporteME:=If(CveMoneda > 1, ImporteLiq4, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq5 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq5, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq5 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol5, ImporteME:=If(CveMoneda > 1, ImporteLiq5, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq6 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq6, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq6 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol6, ImporteME:=If(CveMoneda > 1, ImporteLiq6, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq7 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq7, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq7 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol7, ImporteME:=If(CveMoneda > 1, ImporteLiq7, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq8 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq8, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq8 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol8, ImporteME:=If(CveMoneda > 1, ImporteLiq8, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" - Exit For - End If - End If - - If ImporteLiq9 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq9, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq9 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol9, ImporteME:=If(CveMoneda > 1, ImporteLiq9, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" - Exit For - End If - End If - - If gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero > 0 Then - Dim TCP As Decimal = 0 - Dim FolioPago As String = " " - If DtIngresos IsNot Nothing Then - TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue)) - FolioPago = DtIngresos.FiltroPrimeroValor("Folio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)) - Dim tTCPFecha As Date = DtIngresos.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue)).ToDate - 'considera fluctuación - If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then - If tTCPFecha <= UltimaFluctuacion.FechaFluctuacion Then - tTCPFecha = UltimaFluctuacion.FechaFluctuacion - TCP = UltimaFluctuacion.TCFluctuacion - End If - End If - End If - 'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo - FluctuacionAnticipo = ((TCP - tipoCambioVentaValuacion) * gvr.FCTextBox("TxtAmort").Text.ToDecimal).RoundSQL - MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort").Text.ToDecimal, TCP, tipoCambioVentaValuacion, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago) - End If - - If gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero > 0 Then - Dim TCP As Decimal = 0 - Dim FolioPago As String = " " - If DtIngresos IsNot Nothing Then - TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)) - FolioPago = DtIngresos.FiltroPrimeroValor("Folio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)) - Dim tTCPFecha As Date = DtIngresos.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)).ToDate - 'considera fluctuación - If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then - If tTCPFecha <= UltimaFluctuacion.FechaFluctuacion Then - tTCPFecha = UltimaFluctuacion.FechaFluctuacion - TCP = UltimaFluctuacion.TCFluctuacion - End If - End If - - End If - 'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo - FluctuacionAnticipo += ((TCP - tipoCambioVentaValuacion) * gvr.FCTextBox("TxtAmort2").Text.ToDecimal).RoundSQL - MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort2").Text.ToDecimal, TCP, tipoCambioVentaValuacion, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago) - End If - - End If - - - - Case 8 'Ret IVA x Trasladar - If EsAnticipoEspecial Then Exit Select - If gvr.DataKey("CveTipoRetencion").ToEntero = 4 Then - Exit Select - End If - - ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * tipoCambioVenta).RoundSQL - TipoCambioGeneral = tipoCambioVenta - CveSubProyectoContabilizar = CveSubProyecto - - If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}" - - - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - 'Conta ContPAQ - If IdCtaContRetIVA <> 0 Then - IdCtaContable = IdCtaContRetIVA - Else - If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjMov.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero - End If - End If - End If - End If - - - Case 313 'Ret Iva Servicios - If EsAnticipoEspecial Then Exit Select - If gvr.DataKey("CveTipoRetencion").ToEntero = 4 Then - - ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * tipoCambioVenta).RoundSQL - TipoCambioGeneral = tipoCambioVenta - CveSubProyectoContabilizar = CveSubProyecto - - If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}" - - 'OBTENER CUENTAS - If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjMov.DtResultados.Rows.Count > 0 Then - 'Conta ContPAQ - IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero - - End If - End If - - End If - - Case 9 'Ret ISR x Trasladar - If EsAnticipoEspecial Then Exit Select - - ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * tipoCambioVenta).RoundSQL - TipoCambioGeneral = tipoCambioVenta - CveSubProyectoContabilizar = CveSubProyecto - - If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}" - - - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - 'Conta ContPAQ - If IdCtaContRetISR <> 0 Then - IdCtaContable = IdCtaContRetISR - Else - If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjMov.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero - End If - End If - End If - End If - - - - Case 13 'Iva por Trasladar - If EsAnticipoEspecial Then Exit Select - - ImporteMovimiento = (gvr.DataKey("IVA").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * tipoCambioVenta).RoundSQL - TipoCambioGeneral = tipoCambioVenta - CveSubProyectoContabilizar = CveSubProyecto - - PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal - Dim IdCtaIVAXTrasladar As Integer = 0 - - If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then - IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero - End If - - IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar) - If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}" - Case 62 'Ret IVA Trasladado - If EsAnticipoEspecial Then Exit Select - If gvr.DataKey("CveTipoRetencion").ToEntero = 4 Then - Exit Select - End If - - ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)).RoundSQL - TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) - CveSubProyectoContabilizar = CveSubProyecto - - If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" - - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - 'Conta ContPAQ - If IdCtaContRetIVA <> 0 Then - IdCtaContable = IdCtaContRetIVA - Else - If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjMov.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero - End If - End If - End If - End If - - Case 314 'Ret Iva Servicios Traslado - If EsAnticipoEspecial Then Exit Select - If gvr.DataKey("CveTipoRetencion").ToEntero = 4 Then - - ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)).RoundSQL - TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) - CveSubProyectoContabilizar = CveSubProyecto - - If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" - - 'OBTENER CUENTAS - If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjMov.DtResultados.Rows.Count > 0 Then - 'Conta ContPAQ - IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero - End If - End If - End If - - Case 63 'Ret ISR Trasladado - If EsAnticipoEspecial Then Exit Select - - ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)).RoundSQL - TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) - CveSubProyectoContabilizar = CveSubProyecto - - If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" - - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - 'Conta ContPAQ - If IdCtaContRetISR <> 0 Then - IdCtaContable = IdCtaContRetISR - Else - If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjMov.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero - End If - End If - End If - End If - - - - Case 61 'Iva Trasladado - If EsAnticipoEspecial Then Exit Select - - ImporteMovimiento = (gvr.DataKey("IVA").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)).RoundSQL - TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) - CveSubProyectoContabilizar = CveSubProyecto - - PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal - Dim IdCtaIVATrasladado As Integer = 0 - - If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then - IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVATrasladado").ToString.ToEntero - End If - - IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado) - If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" - Case 38 'IEPS por trasladar - If EsAnticipoEspecial Then Exit Select - - ImporteMovimiento = (gvr.DataKey("IEPS").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)).RoundSQL - TipoCambioGeneral = tipoCambioVenta - CveSubProyectoContabilizar = CveSubProyecto - - IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar - Case 39 'IEPS Trasladado - If EsAnticipoEspecial Then Exit Select - - ImporteMovimiento = (gvr.DataKey("IEPS").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * tipoCambioVenta).RoundSQL - TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) - - CveSubProyectoContabilizar = CveSubProyecto - - IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado - Case 64 'Ganancia - If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then - - Dim CveMonedaVenta As Integer = gvr.DataKey("CveMoneda").ToEntero - Dim tImporteVenta, tImportePago As Decimal - Dim Diferencia As Decimal = 0 - ImporteMovimiento = 0 - Dim ImportePago As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal.RoundSQL - - If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then - ImportePago = ImportePago - gvr.FCTextBox("TxtAmort").Text.ToDecimal - gvr.FCTextBox("TxtAmort2").Text.ToDecimal - End If - - tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal) - - If CveMonedaVenta = 1 And CveMoneda <> 1 Then - 'factura pesos, pago en dolares - tImporteVenta = ImportePago - tImportePago = ((ImportePago * tipoCambioVenta / tipoCambioPago).RoundSQL * tipoCambioPago).RoundSQL - ElseIf CveMonedaVenta <> 1 And CveMoneda <> 1 Then - 'factura dolares, pago en dolares - tImporteVenta = (ImportePago * tipoCambioVentaValuacion).RoundSQL - tImportePago = (ImportePago * tipoCambioPago).RoundSQL - ElseIf CveMonedaVenta <> 1 And CveMoneda = 1 Then - 'factura dolares, pago en pesos - tImporteVenta = (ImportePago * tipoCambioVentaValuacion).RoundSQL - tImportePago = (ImportePago * tipoCambioPago).RoundSQL - End If - - 'If FluctuacionAnticipo <> 0 Then - ' tImportePago += FluctuacionAnticipo - 'End If - - If tImporteVenta <> tImportePago Then - If tImporteVenta < tImportePago Then - ConceptoContable = 64 - IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria - TipoMovimiento = True - 'CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria - Else - ConceptoContable = 65 - IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria - TipoMovimiento = False - ' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria - End If - Diferencia = tImporteVenta - tImportePago - - End If - - ' si tiene funcionalidad para que tome el TC de pago, que solo afecta a los impuestos - If FuncionalidadFluctuacionImpuestos Then - Dim TCImpuestos As Decimal = tipoCambioPago - - Diferencia -= (((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVentaValuacion) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el IVA - Diferencia -= (((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVentaValuacion) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el RetIVA - Diferencia -= (((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVentaValuacion) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el RetISR - Diferencia -= (((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVentaValuacion) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el IEPS - Diferencia = Diferencia.RoundSQL - End If - - ImporteMovimiento = Math.Abs(Diferencia) - ImporteMN = ImporteMovimiento - - - CveSubProyectoContabilizar = CveSubProyecto - Else - ImporteMovimiento = 0 - End If - - - Case 78 'Otros Ingresos - If ChkAjusteOI.Checked Then - ImporteMovimiento = gvr.FCTextBox("TxtComision").Text.ToDecimal - ImporteMN = ImporteMovimiento * tipoCambioPago.RoundSQL - - If gvr.FCTextBox("TxtComision").Text.ToDecimal < 0 Then - TipoMovimiento = False - ImporteMovimiento = ImporteMovimiento * -1 - ImporteMN = ImporteMN * -1 - Else - TipoMovimiento = True - End If - - ImporteMovimiento = ImporteMovimiento.RoundSQL - ImporteMN = ImporteMN.RoundSQL - TipoCambioGeneral = tipoCambioPago - CveSubProyectoContabilizar = CveSubProyecto - - IdCtaContable = UsuarioActual.Empresa.IdCuentaOtrosIngresos - - If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}" - - End If - - Case 134 'Pago Intermediario - If RblTipoPago.SelectedValue = "2" Then - ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - gvr.FCTextBox("TxtComision").Text.ToDecimal - ImporteMN = Math.Round(ImporteMovimiento * tipoCambioPago, 2) - CveSubProyectoContabilizar = CveSubProyecto - - If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}" - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ConceptoMovimiento, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoContabilizar, CveProveedor:=DdlProveedorPagoInt.SelectedValue.ToEntero, ImporteMX:=ImporteMN) Then - MsgError = "No se pudo insertar la póliza" - End If - End If - ImporteMovimiento = 0 - Case 30 - ImporteMovimiento = 0 - Case Else - ImporteMovimiento = 0 - End Select - - If MsgError <> "" Then - Exit For - End If - - If ImporteMovimiento <> 0 AndAlso MsgError = "" Then - 'Conta ContPAQ - If (IdCtaContable < 1 Or IdCuentaBancaria < 1) AndAlso UsuarioActual.CveEmpresa <> 119 Then - CuentasContablesInvalidas.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) - idCuentaContabilizacion = 0 - End If - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteMN, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto) Then - MsgError = "No se pudo insertar la póliza" - Exit For - End If - End If - - Next - - If gvr.FCCheckBox("ChkGenerarNC").Checked AndAlso ObjFactura IsNot Nothing Then - ObjFactura.DescuentoProntoPago = gvr.DataKey("DescuentoProntoPago").ToDecimal() - ListaFacturasGenerarNC.Add(ObjFactura) - End If + If gvr.FCCheckBox("ChkGenerarNC").Checked AndAlso ObjFactura IsNot Nothing Then + ObjFactura.DescuentoProntoPago = gvr.DataKey("DescuentoProntoPago").ToDecimal() + ListaFacturasGenerarNC.Add(ObjFactura) End If End If @@ -1480,7 +1170,7 @@ Partial Class Ventas_ClientesAbonar CveSubProyectoContabilizar = CveSubProyectoMaximo - If tipoCambioPago > 1 AndAlso CveMoneda = 2 Then + If CveMoneda = 2 Then 'If IdCuentaBancariaComplementaria > 0 Then If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES tipoCambioPago = TxtTCDolares.Text.ToDecimal @@ -1522,11 +1212,8 @@ Partial Class Ventas_ClientesAbonar End If End If - End If - If RblTipoPago.SelectedValue = "3" AndAlso MsgError = "" Then - MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, CveIE, TxtImporte.Text.ToDecimal, tipoCambioPago, tipoCambioVenta, -1, TxtObservaciones.Text, DdlIngreso.SelectedItem.Text) End If @@ -1557,7 +1244,6 @@ Partial Class Ventas_ClientesAbonar Alert(String.Format("No se puede contabilizar la Prepoliza debido a que las siguientes cuentas son invalidas: {0}", CuentasContablesInvalidas)) End If End If - Else MsgError = "No se pudo insertar la póliza" End If @@ -1572,7 +1258,6 @@ Partial Class Ventas_ClientesAbonar For Each Fac As Modelos.Factura In ListaFacturasGenerarNC Dim ListaNC As New List(Of Modelos.Factura) ListaNC.Add(Fac) - Dim Resp = GenerarNC(ObjIE.IniciaTransacSQL(), ObjConta, ListaNC) If Resp IsNot Nothing AndAlso Resp.Respuesta IsNot Nothing AndAlso Resp.Respuesta.CveVenta > 0 Then @@ -1667,20 +1352,6 @@ Partial Class Ventas_ClientesAbonar MsgError = "Error al Agregar la Póliza de Armonización Contable" End If - 'BITACORA - 'If MsgError = "" Then - - ' If CveIESustitucion > 0 And ComplementoSustitucionGenerado Then - ' If Not ObjEvento.AddEventoBitacora($"Complemento de pago Cancelado por sustitución con Folio
    {TxtFolio.Text}", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIESustitucion) Then - ' MsgError = "Ocurrió un error al agregar la bitacora" - ' End If - ' If Not ObjEvento.AddEventoBitacora($"Complemento de pago Generado por Sustitución de {FolioIECancelado}", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then - ' MsgError = "Ocurrió un error al agregar la bitacora" - ' End If - ' End If - - 'End If - Catch ex As Exception MsgError = "Ocurrió un error al guardar el movimiento" OnError("Ocurrió un error al guardar el movimiento", ex) @@ -1718,7 +1389,7 @@ Partial Class Ventas_ClientesAbonar Else If ObjConta IsNot Nothing Then ObjConta.RollBack() ObjIE.RollBack() - Alert(MsgError, TipoMensaje.MsgAdvertencia) + ' Alert(MsgError, TipoMensaje.MsgAdvertencia) End If ObjIE.Dispose() @@ -2398,7 +2069,6 @@ Partial Class Ventas_ClientesAbonar DdlCuenta.SelectedValue = "-1" DdlTipoTransaccion.SelectedValue = "-1" - 'CveIESustitucion = "-1" CFDIRelacionadoSustitucion = "-1" FechaCorteIE = DateTime.Now.ToDate IDPoliza = -1 @@ -2476,7 +2146,21 @@ Partial Class Ventas_ClientesAbonar Deudores.Dispose() DdlIngreso.DataBind() - DdlIngreso.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlIngreso.Items.Insert(0, New ListItem("-", "-1")) + Return dtt + End Function + + Private Function CargaPrestamos(tCveMoneda As Integer) As DataTable + Dim dtt As DataTable = Nothing + Dim Deudores As New ClsMovimientos + If Deudores.GetDocumentosxPagarDetalle(CveCliente, tCveMoneda, 2, UsuarioActual.CveEmpresa) Then + DdlPrestamo.DataSource = Deudores.DtResultados '.FiltraParametros("CveCliente > 0 AND Saldo > 0 AND CveIE > 0") + dtt = Deudores.DtResultados + End If + Deudores.Dispose() + + DdlPrestamo.DataBind() + DdlPrestamo.Items.Insert(0, New ListItem("-", "-1")) Return dtt End Function @@ -2626,8 +2310,6 @@ Partial Class Ventas_ClientesAbonar 'For i = 0 To CveVentas.Count - 1 Dim ObjBancos As New ClsBancos - - 'If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, If(CveIESustitucion > 0, 2, 1), UsuarioActual.CveEmpresa, -1) Then If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, 1, UsuarioActual.CveEmpresa, -1) Then If Not ObjBancos.DtResultados.Rows.Count > 0 Then ObjBancos.Dispose() @@ -2638,8 +2320,6 @@ Partial Class Ventas_ClientesAbonar ObjBancos.IniciaTransacSQL() - - 'If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente, CFDIRelacionado:=CFDIRelacionadoSustitucion, EsRegeneracion:=If(CveIESustitucion > 0, True, False)) Then If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente, CFDIRelacionado:=CFDIRelacionadoSustitucion, EsRegeneracion:=False) Then ObjBancos.Commit() ComplementoSustitucionGenerado = True @@ -3025,7 +2705,7 @@ Partial Class Ventas_ClientesAbonar Private Sub DdlIngreso_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlIngreso.SelectedIndexChanged 'saco la moneda de la selección - hdnIngresoImporte.Value = 0 + HdnIngresoImporte.Value = 0 If DdlIngreso.SelectedValue.ToEntero > 0 Then Dim Banco As New ClsBancos @@ -3033,7 +2713,7 @@ Partial Class Ventas_ClientesAbonar CveMonedaPago = Banco.CveMoneda Dim Deudores As New ClsMovimientos If Deudores.GetIngresosSaldosDetalle(CveCliente, -1, UsuarioActual.CveEmpresa) Then - hdnIngresoImporte.Value = Deudores.DtResultados.FiltroPrimeroValor("Saldo", String.Format("CveIE = {0}", DdlIngreso.Selectedvalue)) + HdnIngresoImporte.Value = Deudores.DtResultados.FiltroPrimeroValor("Saldo", String.Format("CveIE = {0}", DdlIngreso.SelectedValue)) End If Deudores.Dispose() End If From 4bd614d22ab619cb75350570563f2944e9d42049 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 24 Jan 2023 11:40:26 -0700 Subject: [PATCH 010/103] =?UTF-8?q?--=20mejora=20aplicaci=C3=B3n=20de=20pa?= =?UTF-8?q?go?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsPaginas.vb | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index fa71eb52f..acd0e8d9a 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4555,7 +4555,6 @@ Public Class ClsPaginas PaginaDict.Add("/Sistemas/CatContrasenia.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/PopUpBuscarClientes.aspx".ToUpper(), -1) PaginaDict.Add("/Compras/PopUpBuscarProveedor.aspx".ToUpper(), -1) - PaginaDict.Add("/Compras/PopUpBuscarCuentasProveedor.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/PopUpImprimir.aspx".ToUpper(), -1) PaginaDict.Add("/Contabilidad/PopUpAuxiliar.aspx".ToUpper(), -1) PaginaDict.Add("/Fiscal/PopUpConfiguracion.aspx".ToUpper(), -1) @@ -4798,7 +4797,7 @@ Public Class ClsPaginas PaginaDict.Add("/Bancos/PopUpBuscaPersonal.aspx".ToUpper(), 281) PaginaDict.Add("/Bancos/PopUpBuscarColectiva.aspx".ToUpper(), 281) PaginaDict.Add("/Bancos/PopUpBuscarProveedor.aspx".ToUpper(), 281) - PaginaDict.Add("/Bancos/PopUpBuscarCuentasProveedor.aspx".ToUpper(), 281) + 'PaginaDict.Add("/Bancos/PopUpBuscarCuentasProveedor.aspx".ToUpper(), 281) PaginaDict.Add("/Bancos/PopUpBuscarFolioC.aspx".ToUpper(), 281) PaginaDict.Add("/Bancos/PopUpBuscarClientes.aspx".ToUpper(), 281) 'PaginaDict.Add("/Bancos/CatTiposCuenta.aspx".ToUpper(), -1) @@ -4850,6 +4849,7 @@ Public Class ClsPaginas PaginaDict.Add("/Bancos/ProveedoresCreditos.aspx".ToUpper(), 528) PaginaDict.Add("/Bancos/RepSaldosPeriodo.aspx".ToUpper(), 884) PaginaDict.Add("/Bancos/PrestamoPersonal.aspx".ToUpper(), 890) + PaginaDict.Add("/Bancos/PopUpBuscarCuentasProveedor.aspx".ToUpper(), 679) #End Region #Region "CGame" @@ -4986,9 +4986,6 @@ Public Class ClsPaginas PaginaDict.Add("/Compras/CatTipoGasto.aspx".ToUpper(), 759) - - - #End Region 'CONTABILIDAD @@ -10429,12 +10426,12 @@ Public Class ClsPaginas ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 8, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 8, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True 'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * TCValuacionPago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 62, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 62, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True End If @@ -10444,12 +10441,12 @@ Public Class ClsPaginas ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 9, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 9, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True 'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * TCValuacionPago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 63, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 63, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True End If @@ -10467,12 +10464,12 @@ Public Class ClsPaginas End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 38, VentaActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 38, VentaActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True 'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * Pago.TCPago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 39, VentaActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 39, VentaActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True End If 'concepto pago From cbcecb6ca1cb8f752f00509feb2b1352dde9c0f0 Mon Sep 17 00:00:00 2001 From: MLopez Date: Tue, 24 Jan 2023 17:03:04 -0700 Subject: [PATCH 011/103] E140 Rep Ventas Autorizaciones Exportar Excel y PDF --- Ventas/RepVentasAutorizaciones.aspx | 10 ++++---- Ventas/RepVentasAutorizaciones.aspx.cs | 35 ++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/Ventas/RepVentasAutorizaciones.aspx b/Ventas/RepVentasAutorizaciones.aspx index f0af1eacd..d8c3d911e 100644 --- a/Ventas/RepVentasAutorizaciones.aspx +++ b/Ventas/RepVentasAutorizaciones.aspx @@ -16,7 +16,7 @@ - <%--
  • +<%--
  • Ver Dlls en pesos
  • @@ -25,13 +25,13 @@ Ver Grafica - + --%>
  • - PDF + Generar PDF
  • - Excel -
  • --%> + Exportar Excel + diff --git a/Ventas/RepVentasAutorizaciones.aspx.cs b/Ventas/RepVentasAutorizaciones.aspx.cs index f230309b6..63655bfe1 100644 --- a/Ventas/RepVentasAutorizaciones.aspx.cs +++ b/Ventas/RepVentasAutorizaciones.aspx.cs @@ -12,12 +12,42 @@ public partial class Ventas_RepVentasAutorizaciones : ClsPaginas get { return DtDatos = (DataTable)ViewState["DtDatos"]; } set { ViewState["DtDatos"] = value; } } + private bool Consultado { + get { return Consultado = (bool)ViewState["Consultado"]; } + set { ViewState["Consultado"] = value; } + } - #endregion - protected void Page_Load(object sender, EventArgs e) + #endregion + + protected void LnkExcel_Click(object sender, EventArgs e) + { + if (Consultado) + { + GvDatos.ExportToExcelG("RepVentasAutorizaciones" + DateTime.Now, "Reporte de Autorizaciones de Ventas", UsuarioActual); + } + else + { + Alert("Por favor realice una consulta primero."); + } + } + + protected void LnkPdf_Click(object sender, EventArgs e) + { + if (Consultado) { + GvDatos.GenerarReportePDF("Reporte de Autorizaciones de Ventas"); + } else { + Alert("Por favor realice una consulta primero."); + } + } + public override void VerifyRenderingInServerForm(System.Web.UI.Control control) + { + } + + protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { + Consultado = false; InicializaValores(); } } @@ -45,6 +75,7 @@ public partial class Ventas_RepVentasAutorizaciones : ClsPaginas protected void BtnConsultar_Click(object sender, EventArgs e) { Consulta(); + Consultado = true; } private void Consulta() From 252cd3839653289b83c771924b316b4cdf461d90 Mon Sep 17 00:00:00 2001 From: MLopez Date: Tue, 24 Jan 2023 17:14:25 -0700 Subject: [PATCH 012/103] IndicadorResumen mover Saldo CxP a la izquierda, mejorar texto --- General/RepIndicadorResumen.aspx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/General/RepIndicadorResumen.aspx b/General/RepIndicadorResumen.aspx index 6606fafa5..316e9e246 100644 --- a/General/RepIndicadorResumen.aspx +++ b/General/RepIndicadorResumen.aspx @@ -418,13 +418,17 @@
    + + +
    +
    - Saldo conjunto de Cuentas por Pagar + Saldo acumulado de Cuentas por Pagar
    @@ -434,6 +438,8 @@
    + +
    From 97b7faa2ea387571fbef042b58370fa00d7008e7 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 24 Jan 2023 19:50:52 -0700 Subject: [PATCH 013/103] --- cambios en round --- App_Code/Modelos.vb | 77 +++------------------------------------------ 1 file changed, 5 insertions(+), 72 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 17861b78e..b388fa640 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -2464,7 +2464,7 @@ Namespace Modelos If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsaComplementariaClientes) Then importeMX = importeMovimiento - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * TCCliente - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(TCCliente = 1, 0, importeMovimiento), TipoCambio:=TCCliente, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=(importeMovimiento * TCCliente - importeMovimiento).RoundSQL, ImporteME:=If(TCCliente = 1, 0, importeMovimiento), TipoCambio:=TCCliente, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If @@ -2636,7 +2636,7 @@ Namespace Modelos If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsaComplementariaClientes) Then importeMX = importeMovimiento - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * tipoCambio - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=(importeMovimiento * tipoCambio - importeMovimiento).RoundSQL, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If End If @@ -3452,16 +3452,6 @@ Namespace Modelos End If importeMovimiento = 0 - 'Case 103 'Descuento - ' 'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida. - ' If ObjFactura.CveTipoAmortizacionAnticipo <> 1 Then - ' importeMovimiento = (ObjFactura.Descuento * ValorMultiplicador) - ' importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador - ' FechaMovimiento = ObjFactura.FechaPago - ' If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" - ' IdCtaContable = 0 - ' End If - Case 8 'Ret IVA por Trasladar If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoRetencion <> 4 Then 'SI NO ES RETENCION DE IVA DE SERVICIOS importeMovimiento = (ObjFactura.RetIVA * ValorMultiplicador) @@ -3490,31 +3480,6 @@ Namespace Modelos End If - Case 313 'Ret Iva Servicios - If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoRetencion = 4 Then 'SI TIENE RETENCION DE IVA DE SERVICIOS - importeMovimiento = ObjFactura.RetIVA * ValorMultiplicador - importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador - FechaMovimiento = ObjFactura.FechaPago - CveSubProyectoContabilizar = CveSubProyectoVenta - If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" - - If ValorMultiplicador = -1 AndAlso ObjFactura.Alfa3 = "DEV" AndAlso ObjFactura.TipoDocto = "Dev" Then - TipoMovimiento = Not TipoMovimiento - ConceptoContable = 314 - importeMovimiento = importeMovimiento * -1 - importeMX = importeMX * -1 - End If - - 'OBTENER CUENTAS - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - 'Conta ContPAQ - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero - End If - End If - - End If - Case 9 'Ret ISR por Trasladar If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then importeMovimiento = (ObjFactura.RetISR * ValorMultiplicador) @@ -3545,7 +3510,7 @@ Namespace Modelos Case 13 'Iva por Trasladar If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then importeMovimiento = (ObjFactura.IVA * ValorMultiplicador) - importeMX = Math.Round(importeMovimiento * tipoCambio * Multiplicador, 2) + importeMX = (importeMovimiento * tipoCambio * Multiplicador).RoundSQL FechaMovimiento = ObjFactura.FechaPago PorcentajeImpuesto = TmpDTDetalle.MAX("PorcentajeIVA").ToDecimal @@ -3564,43 +3529,11 @@ Namespace Modelos If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" End If - 'If ObjFactura.TipoDocto = "Egs" Then - - ' importeMovimiento = ObjFactura.IVA * ValorMultiplicador - ' importeMX = Math.Round(importeMovimiento * tipoCambio * Multiplicador, 2) - ' FechaMovimiento = ObjFactura.FechaPago - ' PorcentajeImpuesto = TmpDTDetalle.MAX("PorcentajeIVA").ToDecimal - - ' If importeMovimiento <> 0 Then - ' 'IVA X TRASLADAR - ' IdCtaIVAXTrasladar = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar) - ' Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString()) - - ' If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=-1, ImporteMX:=importeMX * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto) Then - ' ErrorPrepoliza = True - ' Exit For - ' End If - - ' 'IVA PAGADO - ' IdCtaIVATrasladado = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado) - ' Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString()) - - ' If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=-1, ImporteMX:=importeMX * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto) Then - ' ErrorPrepoliza = True - ' Exit For - ' End If - ' End If - - - ' importeMovimiento = 0 - ' importeMX = 0 - 'End If - Case 38 'IEPS por Trasladar If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then importeMovimiento = (ObjFactura.IEPS * ValorMultiplicador) - importeMX = Math.Round(importeMovimiento * tipoCambio * Multiplicador, 2) + importeMX = (importeMovimiento * tipoCambio * Multiplicador).RoundSQL FechaMovimiento = ObjFactura.Fecha CveSubProyectoContabilizar = CveSubProyectoVenta @@ -4290,7 +4223,7 @@ Namespace Modelos If Not OcurrioError Then IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero - ValorInventario = Math.Round(DtCostos.SUM("Total", "").ToDecimal, 2, MidpointRounding.AwayFromZero) + ValorInventario = (DtCostos.SUM("Total", "").ToDecimal).RoundSQL If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, True, ValorInventario, Me.SerieFolio, 68, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=Me.CveSubProyecto) Then OcurrioError = True End If From d07a1e74295f9306a7dd174299f53a59bc2138ef Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 24 Jan 2023 19:51:30 -0700 Subject: [PATCH 014/103] -- cambio en permiso paginas y acomodo visual de buscadores --- Bancos/PopUpBuscarCuentasProveedor.aspx | 24 ++++++------ Site.master | 52 +++++++++++-------------- Site.master.vb | 7 ++-- 3 files changed, 37 insertions(+), 46 deletions(-) diff --git a/Bancos/PopUpBuscarCuentasProveedor.aspx b/Bancos/PopUpBuscarCuentasProveedor.aspx index 61cf9512b..5100e2023 100644 --- a/Bancos/PopUpBuscarCuentasProveedor.aspx +++ b/Bancos/PopUpBuscarCuentasProveedor.aspx @@ -7,7 +7,7 @@ - + @@ -52,33 +52,33 @@
    -
    +
    - + - + - + - + - + @@ -88,28 +88,28 @@ - + - + - + - + - + diff --git a/Site.master b/Site.master index e21684d8e..c67e7ac23 100644 --- a/Site.master +++ b/Site.master @@ -149,13 +149,7 @@ -
    - +
    -
    - -
    - - - - - - +
    +
    +
    + + + + +
    + +
    -
    -
    - - - - - - +
    +
    +
    + + + + +
    + +
    -
    -
    - - - - +
    +
    + +
    + + + + +
    - - +
    -
    -
    - - - - - - +
    +
    +
    + + + + +
    + +
    @@ -1931,7 +1939,7 @@
    - + @@ -1939,7 +1947,7 @@
    - + @@ -1948,12 +1956,6 @@ - <%-- - - - - - --%>
    @@ -1974,13 +1976,13 @@
    -
    - +
    - +
    @@ -1991,8 +1993,16 @@
    + Pago múltiples facturas Pagar múltiples facturas +   - + + " + style="display: inline-block; margin-right: -20px; width: 150px;" /> + " + style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"> + @@ -2003,11 +2013,7 @@
    -
    -
    - Pago múltiples facturas Pagar múltiples facturas      - -
    + <%--
    -
    +
    --%>
    @@ -2068,7 +2074,7 @@ - + @@ -2086,10 +2092,7 @@
    -
    - -
    @@ -2102,6 +2105,11 @@ + " + style="display: inline-block; margin-right: -20px; width: 150px;" /> + " + style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"> @@ -2111,15 +2119,7 @@
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - -
    -
    - +
    diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index ebaf93626..759929266 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -513,7 +513,7 @@ Partial Class Clientes Set(value As Integer) ViewState("CveLineaAdicional") = value End Set - End Property + End Property Private Property FechaIngLineaAdicional As DateTime Get If ViewState("FechaIngLineaAdicional") Is Nothing Then @@ -526,13 +526,13 @@ Partial Class Clientes Set(value As DateTime) ViewState("FechaIngLineaAdicional") = value End Set - End Property - - - - + End Property + + + + #End Region - + #Region "Documentacion" Private Property DTDocumentacion As DataTable Get @@ -2964,14 +2964,14 @@ Partial Class Clientes #Region "G R I D V I E W S" Protected Sub GVHistorial_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVHistorial.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - Dim HLSendMail As HtmlAnchor = DirectCast(e.Row.FindControl("HLSendMail"), HtmlAnchor) - 'Dim HLRemision As HtmlAnchor = DirectCast(e.Row.FindControl("HLRemision"), HtmlAnchor) - + Dim HLSendMail As HtmlAnchor = DirectCast(e.Row.FindControl("HLSendMail"), HtmlAnchor) + 'Dim HLRemision As HtmlAnchor = DirectCast(e.Row.FindControl("HLRemision"), HtmlAnchor) + If e.Row.RowIndex = 0 Then e.Row.BackColor = Drawing.Color.LightGray HLSendMail.Visible = False 'HLRemision.Visible = False - End If + End If Dim Liga As String = String.Format("< a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">", e.Row.DBCampo("CveVenta")) HLSendMail.HRef = String.Format("javascript:(function mail(){{$get('HdnTipoDocto').value='{0}';$get('HdnCveVenta').value='{1}';$get('HdnFolioVenta').value='{2}';$get('TxtParaMail').value='{3}';$get('HdnSerieFolio').value='{4}';$get('HdnSubProyecto').value='{5}';$('#ModalDivMail').modal();void(0);}})();", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveVenta"), e.Row.DBCampo("folio"), e.Row.DBCampo("Correo"), e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("SubProyecto")) e.Row.FCLiteral("LtlFactura").Text = String.Format("{1}", e.Row.DBCampo("CveVenta"), e.Row.DBCampo("Folio")) @@ -2992,8 +2992,8 @@ Partial Class Clientes e.Row.Cells(7).Width = Unit.Pixel(90) e.Row.Cells(8).Width = Unit.Pixel(80) e.Row.Cells(9).Width = Unit.Pixel(70) - End If - + End If + If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(6).ForeColor = Drawing.Color.Red If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxC" Then e.Row.Cells(4).ForeColor = Drawing.Color.Red If e.Row.DBCampo("Original").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldoOriginal"), Literal).Text = "" @@ -4239,23 +4239,23 @@ Partial Class Clientes Try Dim File As Byte() If Archivo.Exists Then - Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta)) - If ArchivoSti.Exists Then - Dim listass As New List(Of ReportParameter) - For Each item As CrystalParametro In lista - listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString())) - Next - - Dim lrds As New List(Of ReportDataSource) - Dim rds As New ReportDataSource - rds.Name = "Datos" - rds.Value = DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha") - lrds.Add(rds) - - File = StreamBytesStimulsoft("Facturas", $"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", lrds, listass, NombreArchivo:="Estado de cuenta", Formato:=Formato) - Else - File = ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato) - End If + Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta)) + If ArchivoSti.Exists Then + Dim listass As New List(Of ReportParameter) + For Each item As CrystalParametro In lista + listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString())) + Next + + Dim lrds As New List(Of ReportDataSource) + Dim rds As New ReportDataSource + rds.Name = "Datos" + rds.Value = DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha") + lrds.Add(rds) + + File = StreamBytesStimulsoft("Facturas", $"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", lrds, listass, NombreArchivo:="Estado de cuenta", Formato:=Formato) + Else + File = ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato) + End If Else File = ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/RepClientesCxC.rpt"), DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato) End If @@ -4300,8 +4300,8 @@ Partial Class Clientes Dim listass As New List(Of ReportParameter) For Each item As CrystalParametro In lista listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString())) - Next - ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) + Next + ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) Else ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) End If @@ -4353,8 +4353,8 @@ Partial Class Clientes Dim listass As New List(Of ReportParameter) For Each item As CrystalParametro In lista listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString())) - Next - ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) + Next + ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) Else ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) End If @@ -4362,56 +4362,6 @@ Partial Class Clientes ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/RepClientesCxC.rpt"), DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) End If End If - End Sub - - Public Sub ImprimirExcelStimulsoft(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional RDSName As String = "Datos", Optional Content_Disposition As String = "attachment") - Dim lrds As New List(Of ReportDataSource) - Dim rds As New ReportDataSource - rds.Name = RDSName - rds.Value = DtDatos - lrds.Add(rds) - - ImprimirbytesExcel(StreamBytesStimulsoft("Facturas", RutaReporte, lrds, Parametros, NombreArchivo:=NombreArchivo, Formato:="EXCEL"), NombreArchivo, "EXCEL", Content_Disposition:=Content_Disposition) - End Sub - Public Sub ImprimirbytesExcel(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False, Optional Content_Disposition As String = "attachment") - 'limpio ReportViwer - Dim mimeType As String = Nothing - Dim extension As String = Nothing - - 'If Descarga Then - ' Try - ' bytes = bytes - ' File.WriteAllBytes(String.Format("{0}PDF/whatever.gif", UsuarioActual.Empresa.Ruta), img) - ' Catch ex As Exception - ' If UsuarioActual.CveRol = 1 Then - ' Alert(ex.Message, TipoMensaje.MsgAdvertencia) - ' Else - ' Alert("Ocurrió un error al generar la descarga. Favor de contactar a soporte tecnico cod'IMPDFclspag'", TipoMensaje.MsgAdvertencia) - ' End If - ' End Try - 'End If - - Try - bytes = bytes - Response.Buffer = True - Response.Clear() - Response.ContentType = "application/vnd.ms-excel" - Response.ClearHeaders() - Response.AddHeader("content-disposition", String.Format("{0}; filename=""{1}.{2}""", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xlsx"))) - Response.BinaryWrite(bytes) ' create the file - Response.Flush() ' send it to the client to download - bytes = Nothing - HttpContext.Current.Response.SuppressContent = True - HttpContext.Current.ApplicationInstance.CompleteRequest() - 'HttpContext.Current.Response.End() - Catch ex As Exception - - If UsuarioActual.CveRol = 1 Then - Alert($"Error: {ex.Message} | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))}", TipoMensaje.MsgAdvertencia) - Else - Alert("Ocurrió un error al generar la descarga. Favor de contactar a soporte tecnico cod:'IMPDFclspag'", TipoMensaje.MsgAdvertencia) - End If - End Try End Sub Private Sub MandaCorreoEstadoCuenta(CveUsuario As Integer, CveEmpresa As Integer, CveCliente As Integer, File As Byte(), Para As String, Asunto As String, Body As String, Optional GuardarBitacora As Boolean = False) @@ -7125,9 +7075,13 @@ Partial Class Clientes DdlIncoterm.DataBind() DdlClavePedimento.Items.Clear() - DdlClavePedimento.DataSource = GlobalDTClavePedimento() + Using ObjGrales As New ClsGenerales + If ObjGrales.GetSATClavePedimento() Then + DdlClavePedimento.DataSource = GlobalDTClavePedimento() + DdlClavePedimento.DataBind() + End If + End Using DdlClavePedimento.Items.Insert(0, New ListItem("Seleccione", "-1")) - DdlClavePedimento.DataBind() DdlMotivoTraslado.Items.Clear() DdlMotivoTraslado.DataSource = GlobalDTSATMotivoTraslado() @@ -9964,7 +9918,7 @@ Partial Class Clientes Alert("Puntuación Inicializada") End If Acum.Dispose() - End Sub + End Sub #End Region Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs) If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then @@ -10506,11 +10460,16 @@ Partial Class Clientes ' Exit Sub 'End If + If DdlTipoLineaAdicionalModal.SelectedValue.ToEntero() <= 0 Then + Alert("Debe seleccionar el tipo de linea adicional", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + Dim ObjVentas As New ClsVentas - If CveLineaAdicional > 0 Then - - If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then - TxtFechaVencimientoLineaAdicionalModal.Text = FechaIngLineaAdicional.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy") + If CveLineaAdicional > 0 Then + + If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then + TxtFechaVencimientoLineaAdicionalModal.Text = FechaIngLineaAdicional.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy") End If If Not ObjVentas.UpdateLineasAdicionales(CveLineaAdicional, TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal, @@ -10520,9 +10479,9 @@ Partial Class Clientes Else Alert("Linea Adicional Actualizada Correctamente") End If - Else - If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then - TxtFechaVencimientoLineaAdicionalModal.Text = Now.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy") + Else + If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then + TxtFechaVencimientoLineaAdicionalModal.Text = Now.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy") End If If Not ObjVentas.AddLineasAdicionales(TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal, @@ -10551,7 +10510,7 @@ Partial Class Clientes CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToEntero - FechaIngLineaAdicional = GvRow.DataKey("FechaIng").ToDateTime() + FechaIngLineaAdicional = GvRow.DataKey("FechaIng").ToDateTime() TxtLineaAdicionalModal.Text = GvRow.DataKey("LineaAdicional") DdlProveedorLineaAdicionalModal.txtText.Value = GvRow.DataKey("Proveedor") DdlProveedorLineaAdicionalModal.txtValue.Value = GvRow.DataKey("CveProveedor") @@ -10596,7 +10555,7 @@ Partial Class Clientes Protected Sub DdlTipoLineaAdicionalModal_SelectedIndexChanged(sender As Object, e As EventArgs) DvLineaAdicionalDiasVenciemientoModal.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, True, False) - DvFechaVencimiento.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, False, True) + DvFechaVencimiento.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, False, True) UpLineaAdicionalmodal.Update() End Sub diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 6f69118b0..81acbd393 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2280,6 +2280,14 @@ Partial Class Ventas ViewState("SaldoLineaAdicional") = value End Set End Property + Private Property SaldoIngresosLineaAdicional As Decimal + Get + Return (IfNull(ViewState("SaldoIngresosLineaAdicional"), "0", ViewState("SaldoIngresosLineaAdicional"))).ToString().ToDecimal() + End Get + Set(value As Decimal) + ViewState("SaldoIngresosLineaAdicional") = value + End Set + End Property Private Property CveCategoriaLineaAdicional As Integer Get @@ -2298,6 +2306,14 @@ Partial Class Ventas ViewState("CveMonedaLineaAdicional") = value End Set End Property + Private Property HabilitoFacturacionIngresoLineaAdicional As Boolean + Get + Return If(IsNothing(ViewState("HabilitoFacturacionIngresoLineaAdicional")), False, CType(ViewState("HabilitoFacturacionIngresoLineaAdicional"), Boolean)) + End Get + Set(value As Boolean) + ViewState("HabilitoFacturacionIngresoLineaAdicional") = value + End Set + End Property #End Region @@ -8839,6 +8855,11 @@ Partial Class Ventas Exit Sub End If + If DdlLineaAdicional.SelectedValue.ToEntero() > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then + Alert("No se puede seleccionar una linea adicional de crédito si no se genera una remisón.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + 'SI TIENE ANTICIPOS Y ESTA AMORTIZADO AL 100% EL DOCUMENTO (SALDO = 0) | NO VALIDA PU DEL CONCEPTO If Not (LblAmortizacion.Text.ToDouble > 0 And TxtTotal.Text.ToDouble <= 0) Then If Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "Ant", "DPe") Then @@ -9057,18 +9078,6 @@ Partial Class Ventas Alert("El saldo de la linea adicional debe ser mayor a cero", TipoMensaje.MsgAdvertencia) Exit Sub End If - - 'VERIFICA QUE LA MONEDA DE LA LINEA ADICIONAL SEA LA MISMA QUE LA VENTA - If Me.CveMonedaLineaAdicional <> DdlMoneda.SelectedValue.ToEntero() Then - Alert("La moneda de la linea adicional de crédito debe ser la misma que la factura.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - 'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE - If Me.SaldoLineaAdicional <= TxtTotal.Text.ToDecimal() Then - Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia) - Exit Sub - End If End If @@ -9406,6 +9415,30 @@ Partial Class Ventas Exit Sub End If + If UsuarioActual.Empresa.Funcionalidad(705) = "1" AndAlso DdlLineaAdicional.SelectedValue.ToEntero() > 0 Then + 'VERIFICA QUE LA MONEDA DE LA LINEA ADICIONAL SEA LA MISMA QUE LA VENTA + If Me.CveMonedaLineaAdicional <> ObjFactura.CveMoneda Then + Alert("La moneda de la linea adicional de crédito debe ser la misma que la factura.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + 'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE + If ObjFactura.TipoDocto = "Rem" AndAlso Me.SaldoLineaAdicional <= ObjFactura.Total Then + Alert("El saldo de la linea adicional debe ser mayor o igual al de la remisión", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + If ObjFactura.TipoDocto = "Ing" AndAlso (DtRemisionesPS Is Nothing OrElse DtRemisionesPS.Rows.Count = 0) Then + Alert("No se puede generar un ingreso con una linea adicional de credito si este no viene de una remisión", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + If ObjFactura.TipoDocto = "Ing" AndAlso Me.SaldoIngresosLineaAdicional <= ObjFactura.Total Then + Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + End If + 'If Not CveEmpresaCRM > 0 Then ' If ObjFactura.Cliente.AplicaComercioExterior Then ' If Not ValidaComercioExterior() Then @@ -18659,28 +18692,40 @@ Partial Class Ventas End Sub Private Sub CalculaLineasAdicionales() - If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") AndAlso UsuarioActual.Empresa.Funcionalidad(705) = "1" Then + If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "PA") AndAlso UsuarioActual.Empresa.Funcionalidad(705) = "1" Then DdlLineaAdicional.DataSource = Nothing Using ObjVentas As New ClsVentas + 'SI ES VENTA EXISTENTE , SI SE VA EDITAR SOLO MOSTRAR LAS CON SALDO, FECHA DE VENCIMIENTO VIGENTE O LA LINEA ACTUAL If CveVenta > 0 Then - If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then + If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then If ObjVentas.DtResultados.Rows.Count > 0 Then TrLineaAdicional.Visible = True DdlLineaAdicional.DataSource = ObjVentas.DtResultados.FiltraParametros($"(Saldo > 0 AND FechaVencimiento <= '{Now.ToString("dd/MM/yyyy")}') OR CveLineaAdicional = {Me.CveLineaAdicionalVenta}") End If End If Else - If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, ConSaldo:=1, FechaVencimientoConsulta:=Now) Then - If ObjVentas.DtResultados.Rows.Count > 0 Then - TrLineaAdicional.Visible = True - DdlLineaAdicional.DataSource = ObjVentas.DtResultados + 'SI SE ESTA FACTURANDO UNA REMISION DEBE SELECCIONAR LA LINEA ADICIONAL DE ESTA + If Me.CveLineaAdicionalVenta > 0 Then + If ObjVentas.GetLineasAdicionalesSaldo(Me.CveLineaAdicionalVenta, CveCliente, -1, -1, UsuarioActual.CveEmpresa, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then + If ObjVentas.DtResultados.Rows.Count > 0 Then + TrLineaAdicional.Visible = True + DdlLineaAdicional.DataSource = ObjVentas.DtResultados + End If + End If + Else + If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, ConSaldo:=1, FechaVencimientoConsulta:=Now) Then + If ObjVentas.DtResultados.Rows.Count > 0 Then + TrLineaAdicional.Visible = True + DdlLineaAdicional.DataSource = ObjVentas.DtResultados + End If End If End If End If End Using DdlLineaAdicional.DataBind() + DdlLineaAdicional.Items.Insert(0, New ListItem("Seleccione", "-1")) If Me.CveLineaAdicionalVenta > 0 Then @@ -31616,6 +31661,13 @@ Partial Class Ventas DdlMoneda.SelectedValue = GlobalDTMonedas.FiltroPrimeroValor("CveMoneda", $"Abreviatura = '{dtSeleccionadas.FiltroPrimeroValor("Abreviatura")}'") DdlMoneda.Enabled = False CambiaMoneda() + + If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then + Me.CveLineaAdicionalVenta = dtSeleccionadas.FiltroPrimeroValor("CveLineaAdicional", "CveLineaAdicional > 0").ToEntero() + CalculaLineasAdicionales() + End If + + DdlUsoCFDI.SelectedValueExist(dtSeleccionadas.FiltroPrimeroValor("CveUsoCFDI")) DdlMetodoPago33.SelectedValueExist(dtSeleccionadas.FiltroPrimeroValor("CveMetodoPago")) CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero()) @@ -36097,42 +36149,76 @@ Partial Class Ventas RBLPago.Enabled = False Using ObjVentas As New ClsVentas - If ObjVentas.GetLineasAdicionalesSaldo(DdlLineaAdicional.SelectedValue.ToEntero(), CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, FechaVencimientoConsulta:=MinFecha) Then + If ObjVentas.GetLineasAdicionalesSaldo(DdlLineaAdicional.SelectedValue.ToEntero(), CveCliente, -1, -1, UsuarioActual.CveEmpresa, FechaVencimientoConsulta:=MinFecha) Then If ObjVentas.DtResultados.Rows.Count > 0 Then Dim RowLinea As DataRow = ObjVentas.DtResultados.Rows(0) If RowLinea IsNot Nothing Then - TxtFechaPago.Text = RowLinea("FechaVencimiento").ToString().ToDateTime().ToString("dd/MM/yyyy") + If CveVenta <= 0 Then + TxtFechaPago.Text = RowLinea("FechaVencimiento").ToString().ToDateTime().ToString("dd/MM/yyyy") - 'AL FACTURAR CON LINEA ADICIONAL TIPO PO, SE SUMARÁN LOS DIAS DE VENCIMIENTO A LA FECHA ACTUAL - If RowLinea("TipoLinea").ToString() = "2" Then - TxtFechaPago.Text = Now.AddDays(RowLinea("DiasVencimiento").ToString().ToEntero()).ToString("dd/MM/yyyy") - TxtFechaPago.Enabled = False - imgCalendario.Visible = False + 'AL FACTURAR CON LINEA ADICIONAL TIPO PO, SE SUMARÁN LOS DIAS DE VENCIMIENTO A LA FECHA ACTUAL + If RowLinea("TipoLinea").ToString() = "2" Then + TxtFechaPago.Text = Now.AddDays(RowLinea("DiasVencimiento").ToString().ToEntero()).ToString("dd/MM/yyyy") + TxtFechaPago.Enabled = False + imgCalendario.Visible = False + End If + + TxtOrdenCompra.Text = RowLinea("LineaAdicionalComercializador").ToString() End If Me.CveCategoriaLineaAdicional = RowLinea("CveCategoria").ToString().ToEntero() Me.CveMonedaLineaAdicional = RowLinea("CveMoneda").ToString().ToEntero() Me.SaldoLineaAdicional = RowLinea("Saldo").ToString().ToDecimal() + Me.SaldoIngresosLineaAdicional = RowLinea("SaldoIngresos").ToString().ToDecimal() + + If CveVenta <= 0 Then + If DdlTipoComprobante.SelectedValue.Contiene("PA") Then + 'SI NO TIENE LA OPCION DE FACTURAR LA PERMITE + If DdlTipoComprobante.Items.FindByValue("Rem") Is Nothing Then + DdlTipoComprobante.Items.Insert(0, New ListItem("Remisión", "Rem")) + HabilitoFacturacionIngresoLineaAdicional = True + End If + DdlTipoComprobante.SelectedValueExist("Rem") + End If + End If + End If Else Alert("No se pudieron obtener datos de la linea adicional", TipoMensaje.MsgAdvertencia) Me.SaldoLineaAdicional = 0 + Me.SaldoIngresosLineaAdicional = 0 Me.CveCategoriaLineaAdicional = 0 End If Else Alert("No se pudieron obtener datos de la linea adicional", TipoMensaje.MsgAdvertencia) Me.SaldoLineaAdicional = 0 + Me.SaldoIngresosLineaAdicional = 0 Me.CveCategoriaLineaAdicional = 0 End If End Using Else Me.SaldoLineaAdicional = 0 + Me.SaldoIngresosLineaAdicional = 0 Me.CveCategoriaLineaAdicional = 0 - TxtFechaPago.Text = Now.ToString("dd/MM/yyyy") + + If CveVenta <= 0 Then + TxtFechaPago.Text = Now.ToString("dd/MM/yyyy") + TxtOrdenCompra.Text = "" + + 'SI SE HABILITO LA FACTURACION DESDE LA LINEA ADICIONAL DEBE QUITARLO + If HabilitoFacturacionIngresoLineaAdicional Then + DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem")) + DdlTipoComprobante.SelectedValueExist("PA") + + UpParametros.Update() + End If + End If + End If UpParametros.Update() UPCondicionesPago.Update() + UPObservaciones.Update() End Sub Protected Sub LnkUpdateLineaAdicional_Click(sender As Object, e As EventArgs) 'VALIDAR LINEAS ADICIONALES From c2de24b19e7b9091a9f66881eb635b5dc814ec81 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 25 Jan 2023 14:56:27 -0700 Subject: [PATCH 017/103] PrePolizde de movimiento de garantias, correcion de cancelacion de usados --- App_Code/Modelos.vb | 68 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 54 insertions(+), 14 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 17861b78e..e6eeb845a 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -2109,10 +2109,10 @@ Namespace Modelos If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then For Each RowSalida As DataRow In DtMovimientos.Rows Dim Cantidad As Decimal = RowSalida("Cantidad").ToString().ToDecimal() * -1 - Dim Puntos As Decimal = RowSalida("Puntos").ToString().ToDecimal() + Dim Puntos As Decimal = RowSalida("Puntos").ToString().ToDecimal() * -1 - Dim ImporteCargo As Decimal = RowSalida("ImporteCargo").ToString().ToDecimal() - Dim ImporteBonificacion As Decimal = RowSalida("ImporteBonificacion").ToString().ToDecimal() + Dim ImporteCargo As Decimal = RowSalida("ImporteCargo").ToString().ToDecimal() * -1 + Dim ImporteBonificacion As Decimal = RowSalida("ImporteBonificacion").ToString().ToDecimal() * -1 Dim FacturadoBonificacion = False Dim CveVentaBonificacion As Integer = -1 @@ -2194,6 +2194,10 @@ Namespace Modelos For Each Dr As DataRow In factura.DtMovimientosUsados.Rows + If factura.EsGarantia Then + ImporteConcepto = Dr("PU").ToString().ToDecimal() + End If + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, Observaciones:=Dr("Observaciones").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then 'Mensaje = "Error al guardar los movimientos" Resultado = False @@ -2591,27 +2595,63 @@ Namespace Modelos CveMovimientoReferencia = CveMovimiento End If - If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then - Dim Importe68 As Decimal = 0 + If ObjFactura.EsGarantia Then + If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then + Dim Importe68 As Decimal = ObjInventario.DtResultados.SUMD("Total").RoundSQL * ValorMultiplicador - Dim IdCtaContable68 = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero + Dim IdCtaContable68 = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto68, Importe68, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable68, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoReferencia, ImporteMX:=Importe68, Contabilizable:=False) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto68, Importe68, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable68, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoReferencia, ImporteMX:=Importe68, Contabilizable:=False) Then + ErrorPrepoliza = True + End If + + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + ErrorPrepoliza = True + End If + + Dim Importe318 As Decimal = (Math.Abs(importeMovimiento) - Math.Abs(Importe68)) * ValorMultiplicador + + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, Importe318, Referencia, 318, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Importe318, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + ErrorPrepoliza = True + End If + + Else ErrorPrepoliza = True End If + Else + If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then + Dim Importe68 As Decimal = 0 + Dim IdCtaContable68 = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero + + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto68, Importe68, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable68, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoReferencia, ImporteMX:=Importe68, Contabilizable:=False) Then + ErrorPrepoliza = True + End If + + If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + ErrorPrepoliza = True + End If + Else + ErrorPrepoliza = True + End If + + Else + ErrorPrepoliza = True + End If + End If + + Else + If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + ErrorPrepoliza = True + End If Else ErrorPrepoliza = True End If End If - If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then - ErrorPrepoliza = True - End If - Else - ErrorPrepoliza = True - End If + importeMovimiento = 0 ObjFactura.SeGuardoPrePoliza = True From 1f73a40972c4cd92c7ebb070b56f6bda452fb45f Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 25 Jan 2023 14:57:37 -0700 Subject: [PATCH 018/103] global dt generales cat sessiones --- Sistemas/CatSesiones.aspx | 1 + Sistemas/CatSesiones.aspx.vb | 14 ++++++++++++++ Ventas/Clientes.aspx.vb | 9 ++------- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Sistemas/CatSesiones.aspx b/Sistemas/CatSesiones.aspx index 663e54e63..a311a8d4f 100644 --- a/Sistemas/CatSesiones.aspx +++ b/Sistemas/CatSesiones.aspx @@ -60,6 +60,7 @@ +    diff --git a/Sistemas/CatSesiones.aspx.vb b/Sistemas/CatSesiones.aspx.vb index b75094412..a5cd054d6 100644 --- a/Sistemas/CatSesiones.aspx.vb +++ b/Sistemas/CatSesiones.aspx.vb @@ -99,12 +99,26 @@ Partial Class Sistemas_CatSesiones CargaDTInvPSSeccionesAlmacen() ElseIf DdlVariable.SelectedItem.Value = "GlobalDTTipoTransacciones" Then CargaGlobalDTTipoTransacciones() + ElseIf DdlVariable.SelectedItem.Value = "GlobalSATGenerales" Then + CargaSATGenerales() End If End Sub + Private Sub CargaSATGenerales() + Using ObjGrales As New ClsGenerales + If ObjGrales.GetSATUsosCFDI Then Application("GlobalDTSATUsosCFDI") = ObjGrales.DtResultados + If ObjGrales.GetSATFraccionArancelaria Then Application("GlobalDTFraccionArancelaria") = ObjGrales.DtResultados.AsEnumerable() + If ObjGrales.GetSATIncoterm Then Application("GlobalDTIncoterm") = ObjGrales.DtResultados + If ObjGrales.GetSATTipoOperacion Then Application("GlobalDTTipoOperacion") = ObjGrales.DtResultados + If ObjGrales.GetSATMotivoTraslado Then Application("GlobalDTSATMotivoTraslado") = ObjGrales.DtResultados + If ObjGrales.GetSATUnidadesAduana Then Application("GlobalDTUnidadAduana") = ObjGrales.DtResultados + If ObjGrales.GetSATClavePedimento Then Application("GlobalDTClavePedimento") = ObjGrales.DtResultados + End Using + End Sub + Private Sub CargaGlobalDTTipoTransacciones() Using ObjBancos As New ClsBancos If ObjBancos.GetBancos_TiposTransaccion(-1) Then Application("GlobalDTTipoTransacciones") = ObjBancos.DtResultados Else Application("GlobalDTTipoTransacciones") = Nothing diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 759929266..a93c2dc7f 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -7074,13 +7074,8 @@ Partial Class Clientes DdlIncoterm.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlIncoterm.DataBind() - DdlClavePedimento.Items.Clear() - Using ObjGrales As New ClsGenerales - If ObjGrales.GetSATClavePedimento() Then - DdlClavePedimento.DataSource = GlobalDTClavePedimento() - DdlClavePedimento.DataBind() - End If - End Using + DdlClavePedimento.Items.Clear() + DdlClavePedimento.DataSource = GlobalDTClavePedimento() DdlClavePedimento.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlMotivoTraslado.Items.Clear() From 3a44a2adb5d133b66cd8669d47eadb09a896c05a Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 25 Jan 2023 17:58:04 -0700 Subject: [PATCH 019/103] -- mejora en globalDT --- App_Code/ClsPaginas.vb | 48 ++++++++++++++++++++---------------------- Ashx/SIGWeb.ashx | 20 +++--------------- 2 files changed, 26 insertions(+), 42 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index acd0e8d9a..4fe732926 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -373,35 +373,35 @@ Public Class ClsPaginas End Set End Property - Property GlobalDTFraccionArancelaria() As DataTable + Public Shared Property GlobalDTFraccionArancelaria() As EnumerableRowCollection(Of DataRow) Get Dim AppNombre As String = "GlobalDTFraccionArancelaria" - If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then Dim ObjGrales As New ClsGenerales - If ObjGrales.GetSATFraccionArancelaria() Then Application(AppNombre) = ObjGrales.DtResultados.AsEnumerable() + If ObjGrales.GetSATFraccionArancelaria() Then HttpContext.Current.Application(AppNombre) = ObjGrales.DtResultados.AsEnumerable() ObjGrales.Dispose() End If - GlobalDTFraccionArancelaria = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable + GlobalDTFraccionArancelaria = DirectCast(HttpContext.Current.Application(AppNombre), EnumerableRowCollection(Of DataRow)) End Get - Set(value As DataTable) + Set(value As EnumerableRowCollection(Of DataRow)) Dim AppNombre As String = "GlobalDTFraccionArancelaria" - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTIncoterm() As DataTable + Public Shared Property GlobalDTIncoterm() As DataTable Get Dim AppNombre As String = "GlobalDTIncoterm" - If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then Dim ObjGrales As New ClsGenerales - If ObjGrales.GetSATIncoterm() Then Application(AppNombre) = ObjGrales.DtResultados + If ObjGrales.GetSATIncoterm() Then HttpContext.Current.Application(AppNombre) = ObjGrales.DtResultados ObjGrales.Dispose() End If - GlobalDTIncoterm = DirectCast(Application(AppNombre), DataTable) + GlobalDTIncoterm = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) Dim AppNombre As String = "GlobalDTIncoterm" - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set End Property @@ -816,57 +816,55 @@ Public Class ClsPaginas End Property #Region "C A R T A P O R T E " - Property GlobalDTMaterialPeligroso(Optional CveMaterialPeligroso As Integer = -1) As DataTable + Public Shared Property GlobalDTMaterialPeligroso(Optional CveMaterialPeligroso As Integer = -1) As DataTable Get Dim AppNombre As String = "GlobalDTMaterialPeligroso" - 'sino existe, recarga los datos - If Application(AppNombre) Is Nothing Then + If HttpContext.Current.Application(AppNombre) Is Nothing Then Dim Obj As New ClsGenerales - If Obj.GetMaterialPeligroso() Then Application(AppNombre) = Obj.DtResultados + If Obj.GetMaterialPeligroso() Then HttpContext.Current.Application(AppNombre) = Obj.DtResultados Obj.Dispose() End If If CveMaterialPeligroso > 0 Then Dim Str As New StringBuilder Str.AppendFormat("CveMaterialPeligroso = {0}", CveMaterialPeligroso) - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) GlobalDTMaterialPeligroso = Dv.ToTable Dv.Dispose() Else - GlobalDTMaterialPeligroso = DirectCast(Application(AppNombre), DataTable) + GlobalDTMaterialPeligroso = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If End Get Set(value As DataTable) Dim AppNombre As String = "GlobalDTMaterialPeligroso" - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTEmbalajes(Optional CveEmbalaje As Integer = -1) As DataTable + Public Shared Property GlobalDTEmbalajes(Optional CveEmbalaje As Integer = -1) As DataTable Get Dim AppNombre As String = "GlobalDTEmbalajes" - 'sino existe, recarga los datos - If Application(AppNombre) Is Nothing Then + If HttpContext.Current.Application(AppNombre) Is Nothing Then Dim Obj As New ClsGenerales - If Obj.GetEmbalajes() Then Application(AppNombre) = Obj.DtResultados + If Obj.GetEmbalajes() Then HttpContext.Current.Application(AppNombre) = Obj.DtResultados Obj.Dispose() End If If CveEmbalaje > 0 Then Dim Str As New StringBuilder Str.AppendFormat("CveEmbalaje = {0}", CveEmbalaje) - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) GlobalDTEmbalajes = Dv.ToTable Dv.Dispose() Else - GlobalDTEmbalajes = DirectCast(Application(AppNombre), DataTable) + GlobalDTEmbalajes = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If End Get Set(value As DataTable) Dim AppNombre As String = "GlobalDTEmbalajes" - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set End Property #End Region diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index b78140971..7a420e7c8 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -1271,14 +1271,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Private Function GETSATMaterialPeligroso(ByVal context As HttpContext) As String Dim retorno As String = "" - - If context.Application("GlobalDTMaterialPeligroso") Is Nothing Then - Dim ObjGrales As New ClsGenerales - If ObjGrales.GetMaterialPeligroso Then context.Application("GlobalDTMaterialPeligroso") = ObjGrales.DtResultados Else context.Application("GlobalDTMaterialPeligroso") = Nothing - ObjGrales.Dispose() - End If - - Dim DTUM = DirectCast(context.Application("GlobalDTMaterialPeligroso"), DataTable).AsEnumerable + Dim DTUM = DirectCast(ClsPaginas.GlobalDTMaterialPeligroso, DataTable).AsEnumerable Dim DtPSRetorno As DataTable Dim Name = IfNull(context.Request("Name"), "-1").ToString @@ -1308,14 +1301,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Private Function GETSATEmbalajes(ByVal context As HttpContext) As String Dim retorno As String = "" - - If context.Application("GlobalDTEmbalajes") Is Nothing Then - Dim ObjGrales As New ClsGenerales - If ObjGrales.GetEmbalajes Then context.Application("GlobalDTEmbalajes") = ObjGrales.DtResultados Else context.Application("GlobalDTEmbalajes") = Nothing - ObjGrales.Dispose() - End If - - Dim DTUM = DirectCast(context.Application("GlobalDTEmbalajes"), DataTable).AsEnumerable + Dim DTUM = DirectCast(ClsPaginas.GlobalDTEmbalajes, DataTable).AsEnumerable Dim DtPSRetorno As DataTable Dim Name = IfNull(context.Request("Name"), "-1").ToString @@ -1349,7 +1335,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Private Function GetFraccionArancelaria(ByVal context As HttpContext) As String Dim retorno As String = "" - Dim DT = DirectCast(context.Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow)) + Dim DT = ClsPaginas.GlobalDTFraccionArancelaria Dim DtRetorno As DataTable Dim Name = IfNull(context.Request("Name"), "-1").ToString From fa688b00b5602894cd64c8b8228b65625e19a7b8 Mon Sep 17 00:00:00 2001 From: MLopez Date: Wed, 25 Jan 2023 23:00:04 -0700 Subject: [PATCH 020/103] Carga Presupuesto de archivo Excel en Contratos --- App_Code/modExtensiones.vb | 18 +++++++-- Contratos/Presupuestos.aspx | 58 +++++++++++++++++++++++++++ Contratos/Presupuestos.aspx.vb | 72 ++++++++++++++++++++++++++++++++++ 3 files changed, 144 insertions(+), 4 deletions(-) diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 5fe30068f..b57e902d4 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -2462,11 +2462,12 @@ Namespace Extensiones End If End Sub + 'Usa la librería ClosedXML - Public Sub ExportToExcelx(GridView As GridView, NombreArchivoXLSX As String) + Public Sub ExportToExcelX(GridView As GridView, NombreArchivoXLSX As String) If GridView IsNot Nothing AndAlso GridView.Rows.Count > 0 Then - NombreArchivoXLSX = Regex.Replace(NombreArchivoXLSX.Replace("["c, "").Replace("]"c, ""), "[:\/?*]", String.Empty) + NombreArchivoXLSX = ValidFileName(NombreArchivoXLSX, 31) Dim dt As New DataTable(NombreArchivoXLSX) Dim i As Integer = 0 Dim ArrColumnasVisibles As New List(Of Integer) 'solo recorro las columnas visibles @@ -2509,8 +2510,17 @@ Namespace Extensiones 'Next Next Using wb As New XLWorkbook() - wb.Worksheets.Add(dt) + Dim WS As IXLWorksheet = wb.Worksheets.Add(NombreArchivoXLSX) + Dim RangoColTitulos As IXLCells = WS.FirstRow().CellsUsed() + WS.FirstCell().InsertTable(dt, False) + + 'Estilo + RangoColTitulos.Style.Fill.SetBackgroundColor(XLColor.FromArgb(75, 119, 190)) + RangoColTitulos.Style.Font.SetBold(True) + RangoColTitulos.Style.Font.FontColor = XLColor.White + + WS.Columns().AdjustToContents() HttpContext.Current.Response.Clear() HttpContext.Current.Response.Buffer = True @@ -2527,7 +2537,7 @@ Namespace Extensiones End If End Sub - 'usa la librería de gembox + 'Usa la librería GemBox Public Sub ExportToExcelG(Gv As GridView, NombreArchivoXLSx As String, Optional Titulo As String = "Reporte", Optional Usuario As Usuario = Nothing, Optional Filtros As String = "", Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100) Dim sw As New StringWriter() diff --git a/Contratos/Presupuestos.aspx b/Contratos/Presupuestos.aspx index 605b68381..bfb6aca06 100644 --- a/Contratos/Presupuestos.aspx +++ b/Contratos/Presupuestos.aspx @@ -20,6 +20,9 @@
  • Autorizar
  • +
  • + Cargar Presupuesto +
  • Modificar Presupuesto
  • @@ -282,6 +285,61 @@
    + diff --git a/OI/CircularDetalleB.aspx.cs b/OI/CircularDetalleB.aspx.cs index 84886f3f2..cb9eb243b 100644 --- a/OI/CircularDetalleB.aspx.cs +++ b/OI/CircularDetalleB.aspx.cs @@ -1,4 +1,5 @@ using System; +using System.Activities.Expressions; using System.Collections.Generic; using System.Data; using System.IO; @@ -8,10 +9,31 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Extensiones; +using Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution; +using MoreLinq; public partial class OI_CircularDetalleB : ClsPaginas { public const string iddivAgregarPara = "iddivAgregarPara"; + enum EnuEnvioTipo { Usuarios,Proveedores,Personal,Clientes } + + + private EnuEnvioTipo EnvioTipo + { + get + { + if (ViewState["EnvioTipo"] == null) + { + ViewState["EnvioTipo"] = EnuEnvioTipo.Usuarios; + } + return (EnuEnvioTipo)ViewState["EnvioTipo"]; + } + set + { + ViewState["EnvioTipo"] =(EnuEnvioTipo) value; + } + } + private DataTable DtUsuarios { get @@ -39,7 +61,11 @@ public partial class OI_CircularDetalleB : ClsPaginas { if (!IsPostBack) { - if(Request["CveCircular"] != null) + + CargaCombos(); + ConsultaCorreos(); + + if (Request["CveCircular"] != null) { CveCircular = Request["CveCircular"].ToString().ToEntero(); } @@ -54,10 +80,14 @@ public partial class OI_CircularDetalleB : ClsPaginas { BtnGuardar.Text = "Guardar"; } - cargarFiltroUsuarios(); + + } } + + + private void CargaDatos() { if (CveCircular > 0) @@ -84,38 +114,162 @@ public partial class OI_CircularDetalleB : ClsPaginas ObjOI.Dispose(); } } - private void cargarFiltroUsuarios() + + + + private void CargaCombos() { DdlRoles.DataSource = get_GlobalDTRoles(UsuarioActual.CveEmpresa); DdlRoles.DataBind(); DdlRoles.Items.Insert(0, new ListItem("Todos", "-1")); - DdlSucursales.DataSource = get_GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa); - DdlSucursales.DataBind(); - DdlSucursales.Items.Insert(0, new ListItem("Todos", "-1")); + CargarCentrosDeCosto(null, DdlSubProyecto, null,LblSubProyecto); + CargarCentrosDeCosto(null, DdlSubProyectoPersonal, null, LblSubProyectoPersonal); + + DdlCveClasificacionProveedor.DataSource = get_GlobalDTProveedorClasificacion(UsuarioActual.CveEmpresa); + DdlCveClasificacionProveedor.DataBind(); + DdlCveClasificacionProveedor.Items.Insert(0, new ListItem("Todas", "-1")); + + DdlClasificacion.DataSource = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa); + DdlClasificacion.DataBind(); + DdlClasificacion.Items.Insert(0, new ListItem("Todos", "-1")); + + } + private void ResetCombos() + { + + DdlRoles.SelectedValueExist(-1); + DdlSubProyecto.SelectedValueExist(-1); + DdlCveClasificacionProveedor.SelectedValueExist(-1); + DdlSubProyectoPersonal.SelectedValueExist(-1); + DdlClasificacion.SelectedValueExist(-1); + + RLBTipoEnvioTipo.SelectedValue ="1"; + } - GVUsuarios.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("Estatus =1 ", "Rol ASC"); - GVUsuarios.DataBind(); - UpUsuarios.Update(); + private void ConsultaCorreos() + { + + int intTipoConsulta = 1; + + DVModalFiltrosUsuarios.Visible = false; + DVModalFiltrosProveedores.Visible = false; + DVModalFiltrosPersonal.Visible = false; + DVModalFiltrosCliente.Visible = false; + + switch (RLBTipoEnvioTipo.SelectedValue.ToEntero()) + { + case 1: + DVModalFiltrosUsuarios.Visible = true; + GVUsuarios.Columns[2].Visible = true; + intTipoConsulta = 1; + break; + case 2: + DVModalFiltrosProveedores.Visible = true; + GVUsuarios.Columns[2].Visible = false; + intTipoConsulta = 2; + break; + case 3: + DVModalFiltrosPersonal.Visible = true; + GVUsuarios.Columns[2].Visible = false; + intTipoConsulta = 3; + break; + case 4: + DVModalFiltrosCliente.Visible = true; + GVUsuarios.Columns[2].Visible = false; + intTipoConsulta = 4; + break; + default: + DVModalFiltrosUsuarios.Visible = true; + GVUsuarios.Columns[2].Visible = true; + intTipoConsulta = 1; + break; + } + + ClsOIEventos ObjOI = new ClsOIEventos(); + + if (ObjOI.GetCircularCorreos(intTipoConsulta, UsuarioActual.CveEmpresa,DdlRoles.SelectedValue.ToEntero(),DdlSubProyecto.SelectedValue.ToEntero(), DdlCveClasificacionProveedor.SelectedValue.ToEntero(), DdlSubProyectoPersonal.SelectedValue.ToEntero(),DdlClasificacion.SelectedValue.ToEntero())) + { + + if (ObjOI.DtResultados.Rows.Count >= 1000) + { + DataTable dt = ObjOI.DtResultados.Clone(); + + foreach (DataRow row in ObjOI.DtResultados.AsEnumerable().Take(2000)) + { + dt.ImportRow(row); + } + + GVUsuarios.DataSource = dt; + + Alert($"{ObjOI.DtResultados.Rows.Count } registros se limito a 2000 registros, se recomienda usar los filtros.", ModExtensiones.TipoMensaje.ToastAdventencia); + } + else + { + GVUsuarios.DataSource = ObjOI.DtResultados; + } + + } + else + { + GVUsuarios.DataSource = null; + } + + + RegistraScript("CveRol = -1; CveSucursal = -1;usuariotext = \"\";"); + + + ObjOI.Dispose(); + GVUsuarios.DataBind(); + UpModalSeleccionCorreos.Update(); + } protected void GVUsuarios_RowDataBound(object sender, GridViewRowEventArgs e) { - if (e.Row.RowType == DataControlRowType.DataRow) + //if (e.Row.RowType == DataControlRowType.DataRow) + //{ + // string CveRol = e.Row.DBCampo("CveRol"); + // string CveSubProyecto = e.Row.DBCampo("CveSubProyecto"); + // e.Row.CssClass = "items"; + // e.Row.Attributes.Add("data-rol", CveRol); + // e.Row.Attributes.Add("data-sucursal", CveRol); + //} + + if(e.Row.RowType == DataControlRowType.Header) { - string CveRol = e.Row.DBCampo("CveRol"); - string CveSubProyecto = e.Row.DBCampo("CveSubProyecto"); - e.Row.CssClass = "items"; - e.Row.Attributes.Add("data-rol", CveRol); - e.Row.Attributes.Add("data-sucursal", CveRol); + switch (RLBTipoEnvioTipo.SelectedValue.ToEntero()) + { + case 1: + e.Row.Cells[1].Text = "Usuario"; + break; + case 2: + e.Row.Cells[1].Text = "Proveedor"; + break; + case 3: + e.Row.Cells[1].Text = "Personal"; + break; + case 4: + e.Row.Cells[1].Text = "Cliente"; + break; + default: + e.Row.Cells[1].Text = "Usuario"; + break; + } } + + + } protected void LnkAgregar_Click(object sender, EventArgs e) { this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarPara)); + ResetCombos(); + ConsultaCorreos(); + UpModalSeleccionCorreos.Update(); } @@ -336,5 +490,63 @@ public partial class OI_CircularDetalleB : ClsPaginas return new byte[] { }; } - -} \ No newline at end of file + + + protected void RLBTipoEnvioTipo_SelectedIndexChanged(object sender, EventArgs e) + { + + //switch (RLBTipoEnvioTipo.SelectedValue.ToEntero()) + //{ + // case 1: + // EnvioTipo = EnuEnvioTipo.Usuarios; + // break; + // case 2: + // EnvioTipo = EnuEnvioTipo.Proveedores; + // break; + // case 3: + // EnvioTipo = EnuEnvioTipo.Personal; + // break; + // case 4: + // EnvioTipo = EnuEnvioTipo.Clientes; + // break; + // default: + // EnvioTipo = EnuEnvioTipo.Usuarios; + // break; + //} + + + ConsultaCorreos(); + + + } + + protected void DdlRoles_SelectedIndexChanged(object sender, EventArgs e) + { + ConsultaCorreos(); + } + + protected void DdlSubProyecto_SelectedIndexChanged(object sender, EventArgs e) + { + ConsultaCorreos(); + } + + protected void DdlCveClasificacionProveedor_SelectedIndexChanged(object sender, EventArgs e) + { + ConsultaCorreos(); + } + + protected void DdlSubProyectoPersonal_SelectedIndexChanged(object sender, EventArgs e) + { + ConsultaCorreos(); + } + + protected void DdlClasificacion_SelectedIndexChanged(object sender, EventArgs e) + { + // ConsultaCorreos(); + } + + protected void LnlActualizarCorreos_Click(object sender, EventArgs e) + { + ConsultaCorreos(); + } +} diff --git a/OS/RepServicioDomicilio.aspx.vb b/OS/RepServicioDomicilio.aspx.vb index 33a77efd2..42c9ac8da 100644 --- a/OS/RepServicioDomicilio.aspx.vb +++ b/OS/RepServicioDomicilio.aspx.vb @@ -805,7 +805,7 @@ Partial Class OS_RepServicioDomicilio Dim CveOsDetalle As Integer = HFCveOsDetalle.Value.ToEntero - Dim CveSubProyectoTecnico As Integer = If(DdlTecnicoAsignar.SelectedValue.ToEntero > 0, GlobalDTUsuarios(DdlTecnicoAsignar.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero, -1) + Dim CveSubProyectoTecnico As Integer = If(DdlTecnicoAsignar.SelectedValue.ToEntero > 0, GlobalDTUsuarios(DdlTecnicoAsignar.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0 ").ToEntero, -1) If TipoAccion = OSModalTipoAccion.Asignacion AndAlso Not CveSubProyectoTecnico > 0 Then diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 0c9c53526..b676fa27d 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -2747,7 +2747,7 @@ Partial Class Clientes CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero(), ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero(), CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), CobranzaExt:=TxtCobranzaExt.Text, CobranzaCorreo:=TxtCobranzaCorreo.Text.Trim, Horario:=TxtHorario.Text.Trim, PortalFacturacion:=TxtPortalFacturacion.Text.Trim, Documentacion:=TxtDocumentacion.Text.Trim, DiasEspecifico:=TxtDiasEspecifico.Text.Trim, UsuarioPortal:=TxtUsuarioPortalFacturacion.Text, ContraseñaPortal:=TxtContraseñaPortalFacturacion.Text, DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero(), - CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(), + CveFormaPago:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(), CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()), @@ -2841,7 +2841,7 @@ Partial Class Clientes CveCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero(), DdlCorporativo.SelectedValue.ToEntero(), CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero(), CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero(), CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero(), ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero(), CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), CobranzaExt:=TxtCobranzaExt.Text, CobranzaCorreo:=TxtCobranzaCorreo.Text.Trim, Horario:=TxtHorario.Text.Trim, PortalFacturacion:=TxtPortalFacturacion.Text.Trim, Documentacion:=TxtDocumentacion.Text.Trim, DiasEspecifico:=TxtDiasEspecifico.Text.Trim, UsuarioPortal:=TxtUsuarioPortalFacturacion.Text, ContraseñaPortal:=TxtContraseñaPortalFacturacion.Text, - DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero(), CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, + DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero(), CveFormaPago:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(), CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), From 980b0e14eb2d738df8712217c1696a36f1dbc26e Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Thu, 26 Jan 2023 16:12:42 -0700 Subject: [PATCH 027/103] Traspaso almacen error en existencia por conversion a entero --- Inventarios/TraspasoAlmacen.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 97ff5f072..e651739bc 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -968,7 +968,7 @@ Partial Class Inventarios_TraspasoAlmacen End If End If - Existencia -= gvr.FCTextBox("TxtCantidad2").Text.ToEntero() + Existencia -= gvr.FCTextBox("TxtCantidad2").Text.ToDecimal() If Existencia < 0 Then ErrorExistencia = True From a93574b082f7e3b015cbaac17a9267b0e7e20062 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 27 Jan 2023 06:29:34 -0700 Subject: [PATCH 028/103] -- cambios en globalDT --- Acumuladores/CatGarantiasMeses.aspx.vb | 14 +- App_Code/ClsPaginas.vb | 266 +-- App_Code/Modelos.vb | 2292 ++++-------------------- Inventarios/RecepcionUsados.aspx.vb | 18 +- Ventas/PV.aspx.vb | 18 +- 5 files changed, 460 insertions(+), 2148 deletions(-) diff --git a/Acumuladores/CatGarantiasMeses.aspx.vb b/Acumuladores/CatGarantiasMeses.aspx.vb index 0f204a538..190f4dd6c 100644 --- a/Acumuladores/CatGarantiasMeses.aspx.vb +++ b/Acumuladores/CatGarantiasMeses.aspx.vb @@ -72,22 +72,12 @@ Partial Class Acumuladores_CatFoliosGarantia Private Sub CargaCombos() - 'Dim ObjPS As New ClsProductosServicios - - 'If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then - ' DdlMarca.DataSource = ObjPS.DtResultados - ' DdlMarca.DataBind() - ' DdlMarca.Items.Insert(0, New ListItem("Todos", "-1")) - ' DdlMarca.SelectedValue = "-1" - 'End If - 'ObjPS.Dispose() - DdlMarca.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa) DdlMarca.DataBind() DdlMarca.Items.Insert(0, New ListItem("Todos", "-1")) DdlMarca.SelectedValue = "-1" - DdlTipoUso.DataSource = GlobalDTAcumTiposUso() + DdlTipoUso.DataSource = GlobalDTAcumTiposUso(UsuarioActual.CveEmpresa) DdlTipoUso.DataBind() DdlTipoUso.Items.Insert(0, New ListItem("Todos", "-1")) DdlTipoUso.SelectedValue = "-1" @@ -124,7 +114,7 @@ Partial Class Acumuladores_CatFoliosGarantia DdlMarca.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa) DdlMarcaM.DataBind() - DdlTipoUsoM.DataSource = GlobalDTAcumTiposUso() + DdlTipoUsoM.DataSource = GlobalDTAcumTiposUso(UsuarioActual.CveEmpresa) DdlTipoUsoM.DataBind() End Sub diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index a730c53b0..30f81f474 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1129,43 +1129,45 @@ Public Class ClsPaginas Application("GlobalDTModulos") = value End Set End Property - Property GlobalDTMonedas() As DataTable + Public Shared Property GlobalDTMonedas() As DataTable Get - GlobalDTMonedas = DirectCast(Application("GlobalDTMonedas"), DataTable) + Dim AppNombre As String = "GlobalDTMonedas" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjMonedas As New ClsMonedas + If ObjMonedas.GetMonedas() Then HttpContext.Current.Application(AppNombre) = ObjMonedas.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing + ObjMonedas.Dispose() + End If + GlobalDTMonedas = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTMonedas") = value + Dim AppNombre As String = "GlobalDTMonedas" + HttpContext.Current.Application(AppNombre) = value End Set End Property Property GlobalDTMonedasAlias() As DataTable Get - GlobalDTMonedasAlias = DirectCast(Application("GlobalDTMonedasAlias"), DataTable) + Dim AppNombre As String = "GlobalDTMonedasAlias" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjMonedas As New ClsMonedas + If ObjMonedas.GetMonedasAlias() Then HttpContext.Current.Application(AppNombre) = ObjMonedas.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing + ObjMonedas.Dispose() + End If + GlobalDTMonedasAlias = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTMonedasAlias") = value + Dim AppNombre As String = "GlobalDTMonedasAlias" + HttpContext.Current.Application(AppNombre) = value End Set + End Property - 'Property GlobalDTSucursales(Optional CveEmpresa As Integer = -1) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim Dv As New DataView(DirectCast(Application("GlobalDTSucursales"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " Sucursal", DataViewRowState.CurrentRows) - ' GlobalDTSucursales = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTSucursales = DirectCast(Application("GlobalDTSucursales"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' Application("GlobalDTSucursales") = value - ' End Set - 'End Property - Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable + + + Public Shared Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable Get Dim AppNombre As String = "GlobalDTSATUsosCFDI" - 'sino existe, recarga los datos - If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then Dim ObjGrales As New ClsGenerales - If ObjGrales.GetSATUsosCFDI() Then Application(AppNombre) = ObjGrales.DtResultados + If ObjGrales.GetSATUsosCFDI() Then HttpContext.Current.Application(AppNombre) = ObjGrales.DtResultados ObjGrales.Dispose() End If @@ -1177,40 +1179,40 @@ Public Class ClsPaginas Tipo.AppendFormat("AND RegimenFiscalReceptor LIKE '%{0}%'", RegimenFiscalReceptor) End If - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows) GlobalDTSATUsosCFDI = Dv.ToTable Dv.Dispose() Else - GlobalDTSATUsosCFDI = DirectCast(Application(AppNombre), DataTable) + GlobalDTSATUsosCFDI = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If End Get Set(value As DataTable) Dim AppNombre As String = "GlobalDTSATUsosCFDI" - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set End Property - Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable + Public Shared Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida-{0}", CveEmpresa) 'sino existe, recarga los datos - If DirectCast(Application(AppNombre), DataTable) Is Nothing Or (DirectCast(Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(Application(AppNombre), DataTable).Rows.Count = 0) Then + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then Dim ObjUnidadesMedida As New ClsUnidadesMedida() - If ObjUnidadesMedida.GetUnidadesMedida(CveEmpresa) Then Application(AppNombre) = ObjUnidadesMedida.DtResultados + If ObjUnidadesMedida.GetUnidadesMedida(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUnidadesMedida.DtResultados ObjUnidadesMedida.Dispose() End If If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows) GlobalDTUnidadesMedida = Dv.ToTable Dv.Dispose() Else - GlobalDTUnidadesMedida = DirectCast(Application(AppNombre), DataTable) + GlobalDTUnidadesMedida = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If End Get Set(value As DataTable) Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida-{0}", CveEmpresa) - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set End Property Property GlobalDTUnidadesMedidaAlias(Optional CveEmpresa As Integer = -1) As DataTable @@ -4134,30 +4136,45 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property - Property GlobalDTAcumTiposDefecto() As DataTable + Public Shared Property GlobalDTAcumTiposDefecto(CveEmpresa As Integer) As DataTable Get - GlobalDTAcumTiposDefecto = DirectCast(Application("GlobalDTAcumTiposDefecto"), DataTable) - End Get - Set(value As DataTable) - Application("GlobalDTAcumTiposDefecto") = value - End Set - End Property - Property GlobalDTAcumTiposUso() As DataTable - Get - GlobalDTAcumTiposUso = DirectCast(Application("GlobalDTAcumTiposUso"), DataTable) - End Get - Set(value As DataTable) - Application("GlobalDTAcumTiposUso") = value - End Set - End Property + Dim AppNombre As String = String.Format("GlobalDTAcumTiposDefecto-{0}", CveEmpresa) + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjAcumuladores As New ClsAcumuladores() + If ObjAcumuladores.TiposDefectoGet(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjAcumuladores.DtResultados + ObjAcumuladores.Dispose() + End If + GlobalDTAcumTiposDefecto = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + End Get + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTAcumTiposDefecto-{0}", CveEmpresa) + HttpContext.Current.Application(AppNombre) = value + End Set + End Property + Public Shared Property GlobalDTAcumTiposUso(CveEmpresa As Integer) As DataTable + Get + Dim AppNombre As String = String.Format("GlobalDTAcumTiposUso-{0}", CveEmpresa) + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjAcumuladores As New ClsAcumuladores() + If ObjAcumuladores.TiposUsoGet(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjAcumuladores.DtResultados + ObjAcumuladores.Dispose() + End If + GlobalDTAcumTiposUso = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + + End Get + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTAcumTiposUso-{0}", CveEmpresa) + HttpContext.Current.Application(AppNombre) = value + End Set + End Property Property GlobalDTAcumGarantiasMesesTipoUso(CveEmpresa As Integer, CveMarca As Integer) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTAcumGarantiasMesesTipoUso-{0}", CveEmpresa) If Application(AppNombre) Is Nothing Then Dim ObjAcumuladores As New ClsAcumuladores() - If ObjAcumuladores.GarantiasMesesGet(-1, -1) Then Application(AppNombre) = ObjAcumuladores.DtResultados.FiltraParametros("", DistinctColumns:={"CveMarca", "CveTipoUso", "TipoUso"}) + If ObjAcumuladores.GarantiasMesesGet(-1, CveEmpresa) Then Application(AppNombre) = ObjAcumuladores.DtResultados.FiltraParametros("", DistinctColumns:={"CveMarca", "CveTipoUso", "TipoUso"}) ObjAcumuladores.Dispose() End If @@ -4192,17 +4209,6 @@ Public Class ClsPaginas End If - 'If CveMarca <> -1 Then - ' Dim Str As StringBuilder = New StringBuilder() - ' If CveMarca <> -1 Then Str.AppendFormat("CveMarca = {0}", CveMarca) - - ' Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - ' GlobalDTCultivosCuadro = Dv.ToTable - ' Dv.Dispose() - 'Else - - 'End If - GlobalDTCultivosCuadro = DirectCast(Application(AppNombre), DataTable) End Get @@ -4212,79 +4218,23 @@ Public Class ClsPaginas End Set End Property - - - - Property GlobalDTAcumTamaños() As DataTable + Public Shared Property GlobalDTAcumTamaños(CveEmpresa As Integer) As DataTable Get - GlobalDTAcumTamaños = DirectCast(Application("GlobalDTAcumTamaños"), DataTable) + Dim AppNombre As String = String.Format("GlobalDTAcumTamaños-{0}", CveEmpresa) + + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Using ObjAcumuladores As New ClsAcumuladores() + If ObjAcumuladores.TamañoGet(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjAcumuladores.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing + End Using + End If + GlobalDTAcumTamaños = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTAcumTamaños") = value + Dim AppNombre As String = String.Format("GlobalDTAcumTamaños-{0}", CveEmpresa) + HttpContext.Current.Application(AppNombre) = value End Set End Property -#Region "GDT'S RASTREO" - Property GlobalDTDispositivos(CveCliente As Integer) As DataTable - Get - Dim Str As StringBuilder = New StringBuilder() - - If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente) - - - If CveCliente <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTDispositivos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTDispositivos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTDispositivos = DirectCast(Application("GlobalDTDispositivos"), DataTable) - End If - - End Get - Set(value As DataTable) - Application("GlobalDTDispositivos") = value - End Set - End Property - - Public Sub RecargaGlobalDTDispositivos(GPS As ClsGPS) - If GPS.DispositivosGet(-1, -1, -1, -1) Then - GlobalDTDispositivos(-1) = GPS.DtResultados - End If - End Sub - - Property GlobalDTDispositivosUsuarios(CveCliente As Integer, Optional CveUsuario As Integer = -1) As DataTable - Get - If Application("GlobalDTDispositivosUsuarios") Is Nothing Then - Dim ObjGPS As New ClsGPS - If ObjGPS.DispositivosUsuariosGet(-1, -1, -1, -1, -1) Then - Application("GlobalDTDispositivosUsuarios") = ObjGPS.DtResultados - End If - ObjGPS.Dispose() - End If - - Dim Str As StringBuilder = New StringBuilder() - - If CveUsuario <> -1 Then Str.AppendFormat("CveUsuario = {0}", CveUsuario) - If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente) - - - If CveUsuario <> -1 OrElse CveCliente <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTDispositivosUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTDispositivosUsuarios = Dv.ToTable - Dv.Dispose() - Else - GlobalDTDispositivosUsuarios = DirectCast(Application("GlobalDTDispositivosUsuarios"), DataTable) - End If - - End Get - Set(value As DataTable) - Application("GlobalDTDispositivosUsuarios") = value - End Set - End Property - -#End Region - - Property GlobalDTClientesVendedoresSubProyectos(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveSubProyecto As Integer = -1) As DataTable Get @@ -4346,6 +4296,66 @@ Public Class ClsPaginas #End Region +#Region "GDT'S RASTREO" + Property GlobalDTDispositivos(CveCliente As Integer) As DataTable + Get + Dim Str As StringBuilder = New StringBuilder() + + If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente) + + + If CveCliente <> -1 Then + Dim Dv As New DataView(DirectCast(Application("GlobalDTDispositivos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + GlobalDTDispositivos = Dv.ToTable + Dv.Dispose() + Else + GlobalDTDispositivos = DirectCast(Application("GlobalDTDispositivos"), DataTable) + End If + + End Get + Set(value As DataTable) + Application("GlobalDTDispositivos") = value + End Set + End Property + + Public Sub RecargaGlobalDTDispositivos(GPS As ClsGPS) + If GPS.DispositivosGet(-1, -1, -1, -1) Then + GlobalDTDispositivos(-1) = GPS.DtResultados + End If + End Sub + + Property GlobalDTDispositivosUsuarios(CveCliente As Integer, Optional CveUsuario As Integer = -1) As DataTable + Get + If Application("GlobalDTDispositivosUsuarios") Is Nothing Then + Dim ObjGPS As New ClsGPS + If ObjGPS.DispositivosUsuariosGet(-1, -1, -1, -1, -1) Then + Application("GlobalDTDispositivosUsuarios") = ObjGPS.DtResultados + End If + ObjGPS.Dispose() + End If + + Dim Str As StringBuilder = New StringBuilder() + + If CveUsuario <> -1 Then Str.AppendFormat("CveUsuario = {0}", CveUsuario) + If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente) + + + If CveUsuario <> -1 OrElse CveCliente <> -1 Then + Dim Dv As New DataView(DirectCast(Application("GlobalDTDispositivosUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + GlobalDTDispositivosUsuarios = Dv.ToTable + Dv.Dispose() + Else + GlobalDTDispositivosUsuarios = DirectCast(Application("GlobalDTDispositivosUsuarios"), DataTable) + End If + + End Get + Set(value As DataTable) + Application("GlobalDTDispositivosUsuarios") = value + End Set + End Property + +#End Region + Public Enum SisParametros As Integer URL = 1 DirectorioSitio = 2 @@ -10515,8 +10525,8 @@ Public Class ClsPaginas If Pago.TipoPago = "I" AndAlso Not ErrorMovtos Then ' I N G R E S O S X C O M P R O B A R Dim Ret As New ConceptosRetenciones If UsuarioActual.Empresa.TipoContabilidad = 2 Then - If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero - If Pago.CveMonedaPago > 1 AndAlso ObjConta.GetRetCuenta(207, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero + 'If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero + 'If Pago.CveMonedaPago > 1 AndAlso ObjConta.GetRetCuenta(207, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero If UsuarioActual.CveEmpresa.Contiene(119) Then If Pago.FechaDocumentoRelacionado.Year <= 2017 Then diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index b388fa640..65ab8a54b 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -498,8 +498,8 @@ Namespace Modelos Me.TipoCambio = 0 Me.ConvertirPesos = False Me.CveMoneda = 1 - Me.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda} ") - Me.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda} ") + Me.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda} ") + Me.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda} ") Me.RefDocto = "" ' Me.CveMesa = -1 Me.Fecha = Now @@ -2146,7 +2146,7 @@ Namespace Modelos For Each drow As DataRow In factura.DtDetalle.Rows If drow("CveTamaño").ToString.ToEntero > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={drow("CveTamaño").ToString.ToEntero}") + Dim DrTamanio As DataRow = ClsPaginas.GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CveTamaño={drow("CveTamaño").ToString.ToEntero}") If DrTamanio IsNot Nothing Then Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal() Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal() @@ -2212,7 +2212,7 @@ Namespace Modelos If factura.Cliente.EsDistribuidor AndAlso factura.CveConceptoMovimiento = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}") + Dim DrTamanio As DataRow = ClsPaginas.GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}") If DrTamanio IsNot Nothing Then Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal() Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal() @@ -7196,7 +7196,7 @@ Namespace Modelos End Sub Public Sub SetMoneda() If CveMoneda > 0 Then - Dim dr As DataRow = GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda ={0}", CveMoneda)) + Dim dr As DataRow = ClsPaginas.GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda ={0}", CveMoneda)) If Not IsNothing(dr) Then Moneda = dr("Moneda").ToString() MonedaSAT = dr("AbreviaturaSAT").ToString() @@ -7212,7 +7212,7 @@ Namespace Modelos End Sub Public Sub SetMoneda(ObjClsPaginas As ClsPaginas) If Not IsNothing(ObjClsPaginas) Then - Dim dr As DataRow = ObjClsPaginas.GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda ={0}", CveMoneda)) + Dim dr As DataRow = ClsPaginas.GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda ={0}", CveMoneda)) If Not IsNothing(dr) Then Moneda = dr("Moneda").ToString() MonedaSAT = dr("AbreviaturaSAT").ToString() @@ -7351,14 +7351,7 @@ Namespace Modelos #End Region #Region "G L O B A L - D T" - Property GlobalDTAcumTamaños() As DataTable - Get - GlobalDTAcumTamaños = DirectCast(HttpContext.Current.Application("GlobalDTAcumTamaños"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAcumTamaños") = value - End Set - End Property + Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double Get If GlobalTipoCambio <= 0 Then @@ -7407,14 +7400,7 @@ Namespace Modelos End Set End Property - 'Property GlobalValidarCFDI As Boolean - ' Get - ' GlobalValidarCFDI = CBool(HttpContext.Current.Application("GlobalValidarCFDI")) - ' End Get - ' Set(value As Boolean) - ' HttpContext.Current.Application("GlobalValidarCFDI") = value - ' End Set - 'End Property + Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1) As DataTable Get Dim Str As New StringBuilder @@ -7435,90 +7421,6 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTUsuarios") = value End Set End Property - Property GlobalDTNomConceptos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTNomConceptos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTNomConceptos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTNomConceptos = DirectCast(HttpContext.Current.Application("GlobalDTNomConceptos"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTNomConceptos") = value - End Set - End Property - Property GlobalDTTiposGastos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTiposGastos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTiposGastos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTiposGastos = DirectCast(HttpContext.Current.Application("GlobalDTTiposGastos"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTiposGastos") = value - End Set - End Property - Property GlobalDTMFActividad(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveActividad As Integer = -1) As DataTable - Get - - Dim dt As DataTable = Nothing - Dim ObjMF As New ClsMF - - If ObjMF.GetActividad(CveActividad, CveEmpresa, Estatus) Then - dt = ObjMF.DtResultados - End If - - ObjMF.Dispose() - GlobalDTMFActividad = dt - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTActividad") = value - End Set - End Property - Property GlobalDTMFOperador(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveOperador As Integer = -1) As DataTable - Get - - Dim dt As DataTable = Nothing - Dim ObjMF As New ClsMF - - If ObjMF.GetOperador(CveOperador, CveEmpresa, Estatus) Then - dt = ObjMF.DtResultados - End If - - ObjMF.Dispose() - GlobalDTMFOperador = dt - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOperador") = value - End Set - End Property - Property GlobalDTMFEstatus(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable - Get - - Dim dt As DataTable = Nothing - Dim ObjMF As New ClsMF - - If ObjMF.GetEstatus(CveEstatus, Estatus, CveEmpresa) Then - dt = ObjMF.DtResultados - End If - - ObjMF.Dispose() - GlobalDTMFEstatus = dt - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstatus") = value - End Set - End Property Property DtFacturaDefault() As DataTable Get DtFacturaDefault = DirectCast(HttpContext.Current.Application("DtFacturaDefault"), DataTable) @@ -7535,162 +7437,6 @@ Namespace Modelos HttpContext.Current.Application("Directorio") = value End Set End Property - Property GlobalDTPSATPS() As DataTable - Get - GlobalDTPSATPS = DirectCast(HttpContext.Current.Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow)).CopyToDataTable - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPSATPS") = value - End Set - End Property - -#Region "GLOBALES DE SAT COMERCIO EXTERIOR" - - Property GlobalDTClavePedimento() As DataTable - Get - GlobalDTClavePedimento = DirectCast(HttpContext.Current.Application("GlobalDTClavePedimento"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTClavePedimento") = value - End Set - End Property - - Property GlobalDTFraccionArancelaria() As DataTable - Get - GlobalDTFraccionArancelaria = DirectCast(HttpContext.Current.Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow)).CopyToDataTable - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTFraccionArancelaria") = value - End Set - End Property - - Property GlobalDTIncoterm() As DataTable - Get - GlobalDTIncoterm = DirectCast(HttpContext.Current.Application("GlobalDTIncoterm"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTIncoterm") = value - End Set - End Property - - Property GlobalDTTipoOperacion() As DataTable - Get - GlobalDTTipoOperacion = DirectCast(HttpContext.Current.Application("GlobalDTTipoOperacion"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoOperacion") = value - End Set - End Property - - Property GlobalDTSATMotivoTraslado() As DataTable - Get - GlobalDTSATMotivoTraslado = DirectCast(HttpContext.Current.Application("GlobalDTSATMotivoTraslado"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSATMotivoTraslado") = value - End Set - End Property - - Property GlobalDTUnidadAduana() As DataTable - Get - GlobalDTUnidadAduana = DirectCast(HttpContext.Current.Application("GlobalDTUnidadAduana"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTUnidadAduana") = value - End Set - End Property - - Property GlobalDTPais() As DataTable - Get - GlobalDTPais = DirectCast(HttpContext.Current.Application("GlobalDTPais"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPais") = value - End Set - End Property - - Property GlobalDTEstado(ClaveSATPais As String) As DataTable - Get - If ClaveSATPais <> "-1" Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEstado"), DataTable), String.Format("ClaveSATPais = '{0}'", ClaveSATPais), "", DataViewRowState.CurrentRows) - GlobalDTEstado = Dv.ToTable - Dv.Dispose() - Else - GlobalDTEstado = DirectCast(HttpContext.Current.Application("GlobalDTEstado"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstado") = value - End Set - End Property - - Property GlobalDTMunicipio(ClaveSATEstado As String) As DataTable - Get - If ClaveSATEstado <> "-1" Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTMunicipio"), DataTable), String.Format("ClaveSATEstado = '{0}'", ClaveSATEstado), "", DataViewRowState.CurrentRows) - GlobalDTMunicipio = Dv.ToTable - Dv.Dispose() - Else - GlobalDTMunicipio = DirectCast(HttpContext.Current.Application("GlobalDTMunicipio"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMunicipio") = value - End Set - End Property - - Property GlobalDTColonia(ClaveSATMunicipio As String) As DataTable - Get - If ClaveSATMunicipio <> "-1" Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTColonia"), DataTable), String.Format("ClaveSATMunicipio = '{0}'", ClaveSATMunicipio), "", DataViewRowState.CurrentRows) - GlobalDTColonia = Dv.ToTable - Dv.Dispose() - Else - GlobalDTColonia = DirectCast(HttpContext.Current.Application("GlobalDTColonia"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTColonia") = value - End Set - End Property - -#End Region - - Property GlobalDTPSATUM() As DataTable - Get - GlobalDTPSATUM = DirectCast(HttpContext.Current.Application("GlobalDTPSATUM"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPSATUM") = value - End Set - End Property - Property GlobalDTNomConceptosFunciones() As DataTable - Get - GlobalDTNomConceptosFunciones = DirectCast(HttpContext.Current.Application("GlobalDTNomConceptosFunciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTNomConceptosFunciones") = value - End Set - End Property - Property GlobalDTUsuarioResponsable() As DataTable - Get - GlobalDTUsuarioResponsable = DirectCast(HttpContext.Current.Application("GlobalDTUsuarioResponsable"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTUsuarioResponsable") = value - End Set - End Property - Property GlobalDTProveedoresCuentas(CveProveedor As Integer, Estatus As Boolean) As DataTable - Get - GlobalDTProveedoresCuentas = DirectCast(HttpContext.Current.Application("GlobalDTProveedoresCuentas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProveedoresCuentas") = value - End Set - End Property Public ReadOnly Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable Get @@ -7981,82 +7727,7 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTModulos") = value End Set End Property - Property GlobalDTMonedas() As DataTable - Get - GlobalDTMonedas = DirectCast(HttpContext.Current.Application("GlobalDTMonedas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMonedas") = value - End Set - End Property - Property GlobalDTMonedasAlias() As DataTable - Get - GlobalDTMonedasAlias = DirectCast(HttpContext.Current.Application("GlobalDTMonedasAlias"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMonedasAlias") = value - End Set - End Property - Property GlobalDTSucursales(Optional CveEmpresa As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSucursales"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " Sucursal", DataViewRowState.CurrentRows) - GlobalDTSucursales = Dv.ToTable - Dv.Dispose() - Else - GlobalDTSucursales = DirectCast(HttpContext.Current.Application("GlobalDTSucursales"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSucursales") = value - End Set - End Property - Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1) As DataTable - Get - If EsPersonaFisica <> -1 Then - Dim Tipo As String = "" - If EsPersonaFisica = 1 Then Tipo = "AplicaPersonaFisica = 1" Else Tipo = "AplicaPersonaMoral = 1" - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSATUsosCFDI"), DataTable), Tipo, " UsoCFDIDescripcion", DataViewRowState.CurrentRows) - GlobalDTSATUsosCFDI = Dv.ToTable - Dv.Dispose() - Else - GlobalDTSATUsosCFDI = DirectCast(HttpContext.Current.Application("GlobalDTSATUsosCFDI"), DataTable) - End If - - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTSATUsosCFDI") = value - End Set - End Property - 'Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedida"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows) - ' GlobalDTUnidadesMedida = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTUnidadesMedida = DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedida"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTUnidadesMedida") = value - ' End Set - 'End Property - 'Property GlobalDTUnidadesMedidaAlias(Optional CveEmpresa As Integer = -1) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - ' GlobalDTUnidadesMedidaAlias = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTUnidadesMedidaAlias = DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias") = value - ' End Set - 'End Property Property GlobalDTEstatusOrdenCompra() As DataTable Get GlobalDTEstatusOrdenCompra = DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenCompra"), DataTable) @@ -8239,99 +7910,99 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTPrecioListas") = value End Set End Property - Property GlobalDTMesas() As DataTable - Get - GlobalDTMesas = DirectCast(HttpContext.Current.Application("GlobalDTMesas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMesas") = value - End Set - End Property - Property GlobalDTTipoOrdenServicios(CveEmpresa As Integer) As DataTable - Get - GlobalDTTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTTipoOrdenServicios"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoOrdenServicios") = value - End Set - End Property - Property GlobalDTSubTipoOrdenServicios() As DataTable - Get - GlobalDTSubTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios") = value - End Set - End Property - Property GlobalDTCaracteristicasOrdenServicios() As DataTable - Get - GlobalDTCaracteristicasOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios") = value - End Set - End Property - Property GlobalDTOrdenesServiciosCaracteristicas() As DataTable - Get - GlobalDTOrdenesServiciosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas") = value - End Set - End Property - Property GlobalDTCaracteristicasOpciones() As DataTable - Get - GlobalDTCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOpciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCaracteristicasOpciones") = value - End Set - End Property - Property GlobalDTTipoCuentasEquipos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then + 'Property GlobalDTMesas() As DataTable + ' Get + ' GlobalDTMesas = DirectCast(HttpContext.Current.Application("GlobalDTMesas"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTMesas") = value + ' End Set + 'End Property + 'Property GlobalDTTipoOrdenServicios(CveEmpresa As Integer) As DataTable + ' Get + ' GlobalDTTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTTipoOrdenServicios"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTipoOrdenServicios") = value + ' End Set + 'End Property + 'Property GlobalDTSubTipoOrdenServicios() As DataTable + ' Get + ' GlobalDTSubTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios") = value + ' End Set + 'End Property + 'Property GlobalDTCaracteristicasOrdenServicios() As DataTable + ' Get + ' GlobalDTCaracteristicasOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios") = value + ' End Set + 'End Property + 'Property GlobalDTOrdenesServiciosCaracteristicas() As DataTable + ' Get + ' GlobalDTOrdenesServiciosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas") = value + ' End Set + 'End Property + 'Property GlobalDTCaracteristicasOpciones() As DataTable + ' Get + ' GlobalDTCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOpciones"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTCaracteristicasOpciones") = value + ' End Set + 'End Property + 'Property GlobalDTTipoCuentasEquipos(CveEmpresa As Integer) As DataTable + ' Get + ' If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoCuentasEquipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoCuentasEquipos = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoCuentasEquipos") = value - End Set - End Property - Property GlobalDTTipoCuentasEquiposCaracteristicas(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) + ' GlobalDTTipoCuentasEquipos = Dv.ToTable + ' Dv.Dispose() + ' Else + ' GlobalDTTipoCuentasEquipos = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable) + ' End If + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTipoCuentasEquipos") = value + ' End Set + 'End Property + 'Property GlobalDTTipoCuentasEquiposCaracteristicas(CveEmpresa As Integer) As DataTable + ' Get + ' If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoCuentasEquiposCaracteristicas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoCuentasEquiposCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas") = value - End Set - End Property - Property GlobalDTTipoCuentasEquiposOpciones(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) + ' GlobalDTTipoCuentasEquiposCaracteristicas = Dv.ToTable + ' Dv.Dispose() + ' Else + ' GlobalDTTipoCuentasEquiposCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable) + ' End If + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas") = value + ' End Set + 'End Property + 'Property GlobalDTTipoCuentasEquiposOpciones(CveEmpresa As Integer) As DataTable + ' Get + ' If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoCuentasEquiposOpciones = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoCuentasEquiposOpciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones") = value - End Set - End Property + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) + ' GlobalDTTipoCuentasEquiposOpciones = Dv.ToTable + ' Dv.Dispose() + ' Else + ' GlobalDTTipoCuentasEquiposOpciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable) + ' End If + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones") = value + ' End Set + 'End Property ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1) As DataTable Get Dim ObjPS As New ClsProductosServicios @@ -8356,48 +8027,48 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTInvMetodosInventario") = value End Set End Property - Property GlobalDTAFCaracteristicasOpciones() As DataTable - Get - GlobalDTAFCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones") = value - End Set - End Property - Property GlobalDTAFCaracteristicas() As DataTable - Get - GlobalDTAFCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAFCaracteristicas") = value - End Set - End Property - Property GlobalDTAFCaracteristicasClasificaciones() As DataTable - Get - GlobalDTAFCaracteristicasClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones") = value - End Set - End Property - Property GlobalDTImpuestosLocales(CvePS As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CvePS > 0 Then Str.AppendFormat("CvePS = {0}", CvePS) - If CveEmpresa > 0 Then Str.AppendFormat("{0} CveEmpresa = {1}", If(CvePS > 0, " AND ", ""), CveEmpresa) + 'Property GlobalDTAFCaracteristicasOpciones() As DataTable + ' Get + ' GlobalDTAFCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones") = value + ' End Set + 'End Property + 'Property GlobalDTAFCaracteristicas() As DataTable + ' Get + ' GlobalDTAFCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicas"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTAFCaracteristicas") = value + ' End Set + 'End Property + 'Property GlobalDTAFCaracteristicasClasificaciones() As DataTable + ' Get + ' GlobalDTAFCaracteristicasClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones") = value + ' End Set + 'End Property + 'Property GlobalDTImpuestosLocales(CvePS As Integer, CveEmpresa As Integer) As DataTable + ' Get + ' Dim Str As New StringBuilder + ' If CvePS > 0 Then Str.AppendFormat("CvePS = {0}", CvePS) + ' If CveEmpresa > 0 Then Str.AppendFormat("{0} CveEmpresa = {1}", If(CvePS > 0, " AND ", ""), CveEmpresa) - If CvePS > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTImpuestosLocales = Dv.ToTable - Dv.Dispose() - Else - GlobalDTImpuestosLocales = DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTImpuestosLocales") = value - End Set - End Property + ' If CvePS > 0 Then + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + ' GlobalDTImpuestosLocales = Dv.ToTable + ' Dv.Dispose() + ' Else + ' GlobalDTImpuestosLocales = DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable) + ' End If + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTImpuestosLocales") = value + ' End Set + 'End Property 'Bancos Property GlobalDTBancos() As DataTable Get @@ -8453,65 +8124,65 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTTipoTransacciones") = value End Set End Property - Property GlobalDTEstatusIE() As DataTable - Get - GlobalDTEstatusIE = DirectCast(HttpContext.Current.Application("GlobalDTEstatusIE"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstatusIE") = value - End Set - End Property - Property GlobalDTBancosIE() As DataTable - Get - GlobalDTBancosIE = DirectCast(HttpContext.Current.Application("GlobalDTBancosIE"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTBancosIE") = value - End Set - End Property - Property GlobalDTTipoCuenta() As DataTable - Get - GlobalDTTipoCuenta = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuenta"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoCuenta") = value - End Set - End Property - 'Fin Bancos + 'Property GlobalDTEstatusIE() As DataTable + ' Get + ' GlobalDTEstatusIE = DirectCast(HttpContext.Current.Application("GlobalDTEstatusIE"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTEstatusIE") = value + ' End Set + 'End Property + 'Property GlobalDTBancosIE() As DataTable + ' Get + ' GlobalDTBancosIE = DirectCast(HttpContext.Current.Application("GlobalDTBancosIE"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTBancosIE") = value + ' End Set + 'End Property + 'Property GlobalDTTipoCuenta() As DataTable + ' Get + ' GlobalDTTipoCuenta = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuenta"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTipoCuenta") = value + ' End Set + 'End Property + ''Fin Bancos - 'Fin EstadoCIvil - 'TipoPerioso - Property GlobalDTTipoPeriodo() As DataTable - Get - GlobalDTTipoPeriodo = DirectCast(HttpContext.Current.Application("GlobalDTTipoPeriodo"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoPeriodo") = value - End Set - End Property - 'Fin TipoPeriodo + ''Fin EstadoCIvil + ''TipoPerioso + 'Property GlobalDTTipoPeriodo() As DataTable + ' Get + ' GlobalDTTipoPeriodo = DirectCast(HttpContext.Current.Application("GlobalDTTipoPeriodo"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTipoPeriodo") = value + ' End Set + 'End Property + ''Fin TipoPeriodo 'Periodos - Property GlobalDTNominasPeriodos(CveTipoPeriodo As Integer, CvePeriodo As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveTipoPeriodo <> -1 Then Str.AppendFormat(" {0} CveTipoPeriodo = {1}", If(Str.Length > 0, "AND", ""), CveTipoPeriodo) - If CvePeriodo <> -1 Then Str.AppendFormat(" {0} CvePeriodo = {1}", If(Str.Length > 0, "AND", ""), CvePeriodo) - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTNominasPeriodos = Dv.ToTable - Dv.Dispose() + 'Property GlobalDTNominasPeriodos(CveTipoPeriodo As Integer, CvePeriodo As Integer, CveEmpresa As Integer) As DataTable + ' Get + ' Dim Str As New StringBuilder + ' If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) + ' If CveTipoPeriodo <> -1 Then Str.AppendFormat(" {0} CveTipoPeriodo = {1}", If(Str.Length > 0, "AND", ""), CveTipoPeriodo) + ' If CvePeriodo <> -1 Then Str.AppendFormat(" {0} CvePeriodo = {1}", If(Str.Length > 0, "AND", ""), CvePeriodo) + ' If Str.Length > 0 Then + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + ' GlobalDTNominasPeriodos = Dv.ToTable + ' Dv.Dispose() - Else - GlobalDTNominasPeriodos = DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable) - End If + ' Else + ' GlobalDTNominasPeriodos = DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable) + ' End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTNominasPeriodos") = value - End Set - End Property + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTNominasPeriodos") = value + ' End Set + 'End Property 'Fin Periodos 'Fin Ruta @@ -8634,78 +8305,78 @@ Namespace Modelos End Set End Property 'EstatusFactura - Property GlobalDTCompEstatusFactura() As DataTable - Get - GlobalDTCompEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTCompEstatusFactura"), DataTable).FiltraParametros("Estatus = 'Activo'") - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCompEstatusFactura") = value - End Set - End Property - Property GlobalDTContratosSecciones() As DataTable - Get - GlobalDTContratosSecciones = DirectCast(HttpContext.Current.Application("GlobalDTContratosSecciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTContratosSecciones") = value - End Set - End Property - Property GlobalDTContratos() As DataTable - Get - GlobalDTContratos = DirectCast(HttpContext.Current.Application("GlobalDTContratos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTContratos") = value - End Set - End Property - Property GlobalDTContratosTipos() As DataTable - Get - GlobalDTContratosTipos = DirectCast(HttpContext.Current.Application("GlobalDTContratosTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTContratosTipos") = value - End Set - End Property - Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoAlmacen = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable) - End If + 'Property GlobalDTCompEstatusFactura() As DataTable + ' Get + ' GlobalDTCompEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTCompEstatusFactura"), DataTable).FiltraParametros("Estatus = 'Activo'") + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTCompEstatusFactura") = value + ' End Set + 'End Property + 'Property GlobalDTContratosSecciones() As DataTable + ' Get + ' GlobalDTContratosSecciones = DirectCast(HttpContext.Current.Application("GlobalDTContratosSecciones"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTContratosSecciones") = value + ' End Set + 'End Property + 'Property GlobalDTContratos() As DataTable + ' Get + ' GlobalDTContratos = DirectCast(HttpContext.Current.Application("GlobalDTContratos"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTContratos") = value + ' End Set + 'End Property + 'Property GlobalDTContratosTipos() As DataTable + ' Get + ' GlobalDTContratosTipos = DirectCast(HttpContext.Current.Application("GlobalDTContratosTipos"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTContratosTipos") = value + ' End Set + 'End Property + 'Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable + ' Get + ' If CveEmpresa <> -1 Then + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) + ' GlobalDTTipoAlmacen = Dv.ToTable + ' Dv.Dispose() + ' Else + ' GlobalDTTipoAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable) + ' End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoAlmacen") = value - End Set - End Property - Property GlobalDTInvConceptos() As DataTable - Get + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTipoAlmacen") = value + ' End Set + 'End Property + 'Property GlobalDTInvConceptos() As DataTable + ' Get - Return DirectCast(HttpContext.Current.Application("GlobalDTInvConceptos"), DataTable) + ' Return DirectCast(HttpContext.Current.Application("GlobalDTInvConceptos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTInvConceptos") = value - End Set - End Property - Property GlobalDTSeccionAlmacen(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTSeccionAlmacen = Dv.ToTable - Dv.Dispose() - Else - GlobalDTSeccionAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable) - End If + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTInvConceptos") = value + ' End Set + 'End Property + 'Property GlobalDTSeccionAlmacen(CveEmpresa As Integer) As DataTable + ' Get + ' If CveEmpresa <> -1 Then + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) + ' GlobalDTSeccionAlmacen = Dv.ToTable + ' Dv.Dispose() + ' Else + ' GlobalDTSeccionAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable) + ' End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSeccionAlmacen") = value - End Set - End Property + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTSeccionAlmacen") = value + ' End Set + 'End Property Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) @@ -8771,46 +8442,46 @@ Namespace Modelos HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTNom_Periodos() As DataTable - Get - GlobalDTNom_Periodos = DirectCast(HttpContext.Current.Application("GlobalDTNom_Periodos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTNom_Periodos") = value - End Set - End Property - Property GlobalDTVtaFormaPago() As DataTable - Get - GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaFormaPago"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaFormaPago") = value - End Set - End Property - Property GlobalDTVtaMetodoPago() As DataTable - Get - GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaMetodoPago"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaMetodoPago") = value - End Set - End Property - Property GlobalDTVtaTiposRelacion() As DataTable - Get - GlobalDTVtaTiposRelacion = DirectCast(HttpContext.Current.Application("GlobalDTVtaTiposRelacion"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaTiposRelacion") = value - End Set - End Property - Property GlobalDTTiposDocumentos() As DataTable - Get - GlobalDTTiposDocumentos = DirectCast(HttpContext.Current.Application("GlobalDTTiposDocumentos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTiposDocumentos") = value - End Set - End Property + 'Property GlobalDTNom_Periodos() As DataTable + ' Get + ' GlobalDTNom_Periodos = DirectCast(HttpContext.Current.Application("GlobalDTNom_Periodos"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTNom_Periodos") = value + ' End Set + 'End Property + 'Property GlobalDTVtaFormaPago() As DataTable + ' Get + ' GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaFormaPago"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTVtaFormaPago") = value + ' End Set + 'End Property + 'Property GlobalDTVtaMetodoPago() As DataTable + ' Get + ' GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaMetodoPago"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTVtaMetodoPago") = value + ' End Set + 'End Property + 'Property GlobalDTVtaTiposRelacion() As DataTable + ' Get + ' GlobalDTVtaTiposRelacion = DirectCast(HttpContext.Current.Application("GlobalDTVtaTiposRelacion"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTVtaTiposRelacion") = value + ' End Set + 'End Property + 'Property GlobalDTTiposDocumentos() As DataTable + ' Get + ' GlobalDTTiposDocumentos = DirectCast(HttpContext.Current.Application("GlobalDTTiposDocumentos"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTiposDocumentos") = value + ' End Set + 'End Property Public ReadOnly Property GlobalTipoCambioUltimaFluctuacion(Optional Fecha As Date = MinFecha) As ClsPaginas.MTipoCambioFluctuacion Get @@ -8847,1008 +8518,6 @@ Namespace Modelos End Get End Property - Property GlobalDTCobranzaEstatus(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTCobranzaEstatus = Dv.ToTable - Dv.Dispose() - Else - GlobalDTCobranzaEstatus = DirectCast(HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus") = value - End Set - End Property - - -#Region "***********************************************************************DT EVENTOS****************************************************************************************" - Property GlobalDTTiposEventos() As DataTable - Get - GlobalDTTiposEventos = DirectCast(HttpContext.Current.Application("GlobalDTTiposEventos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTiposEventos") = value - End Set - End Property - - Property GlobalDTEventos() As DataTable - Get - GlobalDTEventos = DirectCast(HttpContext.Current.Application("GlobalDTEventos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEventos") = value - End Set - End Property - - Property GlobalDTOIEventoTarea() As DataTable - Get - GlobalDTOIEventoTarea = DirectCast(HttpContext.Current.Application("GlobalDTOIEventoTarea"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIEventoTarea") = value - End Set - End Property - - Property GlobalDTOIEstatusEventos() As DataTable - Get - GlobalDTOIEstatusEventos = DirectCast(HttpContext.Current.Application("GlobalDTOIEstatusEventos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIEstatusEventos") = value - End Set - End Property -#End Region - -#Region " **********************************************************************DT PROSPECTOS*************************************************************************************" - Property GlobalDTProspectosCaracteristicasClasificaciones() As DataTable - Get - GlobalDTProspectosCaracteristicasClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicasClasificaciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosCaracteristicasClasificaciones") = value - End Set - End Property - Property GlobalDTProspectosTiposCaracteristicas() As DataTable - Get - GlobalDTProspectosTiposCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosTiposCaracteristicas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosTiposCaracteristicas") = value - End Set - End Property - Property GlobalDTProspectosCaracteristicas(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosCaracteristicas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicas"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosCaracteristicas") = value - End Set - End Property - - Property GlobalDTProspectosCaracteristicasOpciones() As DataTable - Get - GlobalDTProspectosCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicasOpciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosCaracteristicasOpciones") = value - End Set - End Property -#End Region - -#Region "***********************************************************************DT ACTIVOS FIJOS**********************************************************************************" - Property GlobalDTActivoFijos(CveEmpresa As Integer, Optional CveSubTipoActivoFijo As Integer = -1, Optional CveActivoFijo As Integer = -1) As DataTable - Get - Dim dt As DataTable = Nothing - 'Dim Str As New StringBuilder - 'Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - 'If CveSubTipoActivoFijo <> -1 Then Str.AppendFormat(" AND CveSubTipoActivoFijo = {0}", CveSubTipoActivoFijo) - - Dim ObjAF As New ClsAF - 'If ObjAF.GetActivosFijos(CveActivoFijo, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, -1, "-1", -1, -1, -1, -1, -1) Then - If ObjAF.GetActivosFijos(CveActivoFijo, CveEmpresa, "-1", "-1", -1, CveSubTipoActivoFijo, "-1", -1, -1, -1, -1, -1, "", -1) Then - dt = ObjAF.DtResultados - End If - - ObjAF.Dispose() - GlobalDTActivoFijos = dt - - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTActivoFijos") = value - End Set - End Property - Property GlobalDTEstadoActivoFijo() As DataTable - Get - GlobalDTEstadoActivoFijo = DirectCast(HttpContext.Current.Application("GlobalDTEstadoActivoFijo"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstadoActivoFijo") = value - End Set - End Property - Property GlobalDTMarcaActivoFijo(CveEmpresa As Integer) As DataTable - Get - Dim dt As DataTable = Nothing - - Dim ObjAF As New ClsAF - - If ObjAF.GetMarcasActivosFijos(CveEmpresa) Then - dt = ObjAF.DtResultados - End If - - ObjAF.Dispose() - GlobalDTMarcaActivoFijo = dt - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMarcaActivoFijo") = value - End Set - End Property - Property GlobalDTModeloActivoFijo(CveEmpresa As Integer, CveMarca As Integer) As DataTable - Get - Dim dt As DataTable = Nothing - - Dim ObjAF As New ClsAF - - If ObjAF.GetModelosActivosFijos(CveEmpresa, CveMarca) Then - dt = ObjAF.DtResultados - End If - - ObjAF.Dispose() - GlobalDTModeloActivoFijo = dt - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTModeloActivoFijo") = value - End Set - End Property - - Property GlobalDTSubTipoActivoFijo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubTipoActivoFijo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTSubTipoActivoFijo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTSubTipoActivoFijo = DirectCast(HttpContext.Current.Application("GlobalDTSubTipoActivoFijo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSubTipoActivoFijo") = value - End Set - End Property - Property GlobalDTTipoActivoFijo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoActivoFijo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoActivoFijo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoActivoFijo = DirectCast(HttpContext.Current.Application("GlobalDTTipoActivoFijo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoActivoFijo") = value - End Set - End Property - -#End Region - -#Region "***********************************************************************DT GENERALES**************************************************************************************" - Property GlobalDTGralPaises() As DataTable - Get - GlobalDTGralPaises = DirectCast(HttpContext.Current.Application("GlobalDTGralPaises"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralPaises") = value - End Set - End Property - Property GlobalDTGralEstados(CvePais As Integer) As DataTable - Get - GlobalDTGralEstados = DirectCast(HttpContext.Current.Application("GlobalDTGralEstados"), DataTable).FiltraParametros(String.Format("CvePais ={0}", CvePais)) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralEstados") = value - End Set - End Property - Property GlobalDTGralMunicipios(CveEstado As Integer) As DataTable - Get - GlobalDTGralMunicipios = DirectCast(HttpContext.Current.Application("GlobalDTGralMunicipios"), DataTable).FiltraParametros(String.Format("CveEstado ={0}", CveEstado)) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralMunicipios") = value - End Set - End Property - - Property GlobalDTGralPoblaciones() As DataTable - Get - GlobalDTGralPoblaciones = DirectCast(HttpContext.Current.Application("GlobalDTGralPoblaciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralPoblaciones") = value - End Set - End Property - Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable - - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTGralCategorias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTGralCategorias = Dv.ToTable - Dv.Dispose() - Else - GlobalDTGralCategorias = DirectCast(HttpContext.Current.Application("GlobalDTGralCategorias"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralCategorias") = value - End Set - End Property - Property GlobalDTGralCategorias2(CveEmpresa As Integer) As DataTable - - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCategorias2"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTGralCategorias2 = Dv.ToTable - Dv.Dispose() - Else - GlobalDTGralCategorias2 = DirectCast(HttpContext.Current.Application("GlobalDTCategorias2"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCategorias2") = value - End Set - End Property - - Property GlobalDTGralEscolaridades() As DataTable - Get - GlobalDTGralEscolaridades = DirectCast(HttpContext.Current.Application("GlobalDTGralEscolaridades"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralEscolaridades") = value - End Set - End Property - - Property GlobalDTGralColectivas(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTGralColectivas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTGralColectivas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTGralColectivas = DirectCast(HttpContext.Current.Application("GlobalDTGralColectivas"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralColectivas") = value - End Set - End Property - -#End Region - -#Region "***********************************************************************DT PROSPECTOS*************************************************************************************" - Property GlobalDTProspectosSupervisores(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSupervisores"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSupervisores = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSupervisores = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSupervisores"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSupervisores") = value - End Set - End Property - Property GlobalDTProspectosCoordinadores(CveSupervisor As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveSupervisor <> -1 Then Str.AppendFormat(" {0} CveSupervisor = {1}", If(Str.Length > 0, "AND", ""), CveSupervisor) - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosCoordinadores"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosCoordinadores = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProspectosCoordinadores = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCoordinadores"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosCoordinadores") = value - End Set - End Property - Property GlobalDTProspectosApoyos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosApoyos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosApoyos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyos"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosApoyos") = value - End Set - End Property - Property GlobalDTProspectosClasificaciones(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosClasificaciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosClasificaciones = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTProspectosClasificaciones"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosClasificaciones") = value - End Set - End Property - Property GlobalDTProspectosEventosTipo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEventosTipo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosEventosTipo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosEventosTipo = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEventosTipo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEventosTipo") = value - End Set - End Property - Property GlobalDTProspectosEvento(CveEventoTipo As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveEventoTipo <> -1 Then Str.AppendFormat(" {0} CveEventoTipo = {1}", If(Str.Length > 0, "AND", ""), CveEventoTipo) - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEvento"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEvento = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosEvento = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEvento"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEvento") = value - End Set - End Property - Property GlobalDTProspectosEstatus(CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEstatus"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEstatus = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosEstatus = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEstatus"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEstatus") = value - End Set - End Property - Property GlobalDTProspectosApoyosTipos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyosTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosApoyosTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosApoyosTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyosTipos"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosApoyosTipos") = value - End Set - End Property - Property GlobalDTProspectosApoyosTipos() As DataTable - Get - GlobalDTProspectosApoyosTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyosTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosApoyosTipos") = value - End Set - End Property - Property GlobalDTProspectosEncuestas(CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEncuestas = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProspectosEncuestas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestas"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEncuestas") = value - End Set - End Property - Property GlobalDTProspectosEncuestasPreguntas(CveEncuesta As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveEncuesta <> -1 Then Str.AppendFormat(" {0} CveEncuesta = {1}", If(Str.Length > 0, "AND", ""), CveEncuesta) - - - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasPreguntas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEncuestasPreguntas = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProspectosEncuestasPreguntas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasPreguntas"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEncuestasPreguntas") = value - End Set - End Property - Property GlobalDTProspectosEncuestasRespuestas(CvePregunta As Integer, CveEncuesta As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveEncuesta <> -1 Then Str.AppendFormat(" {0} CveEncuesta = {1}", If(Str.Length > 0, "AND", ""), CveEncuesta) - If CvePregunta <> -1 Then Str.AppendFormat(" {0} CvePregunta = {1}", If(Str.Length > 0, "AND", ""), CvePregunta) - - - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasRespuestas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEncuestasRespuestas = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProspectosEncuestasRespuestas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasRespuestas"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEncuestasRespuestas") = value - End Set - End Property - Property GlobalDTProspectosTipos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosTipos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosTipos") = value - End Set - End Property - -#Region " DT PROSPECTOS SOLICITUDES" - Property GlobalDTProspectosSolicitudes(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudes"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSolicitudes = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSolicitudes = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudes"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSolicitudes") = value - End Set - End Property - Property GlobalDTProspectosSolicitudesEstatus(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSolicitudesEstatus = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSolicitudesEstatus = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesEstatus"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSolicitudesEstatus") = value - End Set - End Property - Property GlobalDTProspectosSolicitudesTipos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSolicitudesTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSolicitudesTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos") = value - End Set - End Property - 'Property GlobalDTProspectosSolicitudesTipos() As DataTable - ' Get - ' GlobalDTProspectosSolicitudesTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos") = value - ' End Set - 'End Property - Property GlobalDTProspectosSolicitudesApoyos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSolicitudesApoyos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSolicitudesApoyos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos") = value - End Set - End Property - -#End Region -#End Region - -#Region "**********************************************DT AMORTIZACIÓN CONTABLE PLAN DE DESARROLLO********************************************************************************" - -#Region "***********************************************************************DT AMORTIZACIÓN CONTABLE*********************************************************************************************" - - Property GlobalDTAC_RubrosIngreso() As DataTable - Get - GlobalDTAC_RubrosIngreso = DirectCast(HttpContext.Current.Application("GlobalDTAC_RubrosIngreso"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_RubrosIngreso") = value - End Set - End Property - Property GlobalDTAC_FuentesRecaudacion(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesRecaudacion"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTAC_FuentesRecaudacion = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_FuentesRecaudacion = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesRecaudacion"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_FuentesRecaudacion") = value - End Set - End Property - - Property GlobalDTAC_FuentesFinanciamiento() As DataTable - Get - GlobalDTAC_FuentesFinanciamiento = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento") = value - End Set - End Property - Property GlobalDTAC_OG() As DataTable - Get - GlobalDTAC_OG = DirectCast(HttpContext.Current.Application("GlobalDTAC_OG"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_OG") = value - End Set - End Property - 'Property GlobalDTAC_ClasificadorOG(CveEmpresa As Integer) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificadorOG"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - ' GlobalDTAC_ClasificadorOG = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTAC_ClasificadorOG = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificadorOG"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTAC_ClasificadorOG") = value - ' End Set - 'End Property - Property GlobalDTAC_Ubicaciones() As DataTable - Get - GlobalDTAC_Ubicaciones = DirectCast(HttpContext.Current.Application("GlobalDTAC_Ubicaciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Ubicaciones") = value - End Set - End Property - Property GlobalDTAC_UnidadesAdministrativas(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_UnidadesAdministrativas"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTAC_UnidadesAdministrativas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_UnidadesAdministrativas = DirectCast(HttpContext.Current.Application("GlobalDTAC_UnidadesAdministrativas"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_UnidadesAdministrativas") = value - End Set - End Property - Property GlobalDTAC_ClasificacionFuncional(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionFuncional"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_ClasificacionFuncional = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_ClasificacionFuncional = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionFuncional"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ClasificacionFuncional") = value - End Set - End Property - Property GlobalDTAC_ClasificacionGeografica(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionGeografica"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_ClasificacionGeografica = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_ClasificacionGeografica = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionGeografica"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ClasificacionGeografica") = value - End Set - End Property - Property GlobalDTAC_Cuentas() As DataTable - Get - GlobalDTAC_Cuentas = DirectCast(HttpContext.Current.Application("GlobalDTAC_Cuentas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Cuentas") = value - End Set - End Property - Property GlobalDTAC_Finalidad() As DataTable - Get - GlobalDTAC_Finalidad = DirectCast(HttpContext.Current.Application("GlobalDTAC_Finalidad"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Finalidad") = value - End Set - End Property - 'Property GlobalDTAC_FuenteFinanciamiento() As DataTable - ' Get - ' GlobalDTAC_FuenteFinanciamiento = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuenteFinanciamiento"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTAC_FuenteFinanciamiento") = value - ' End Set - 'End Property - Property GlobalDTAC_FuentesFinanciamiento(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTAC_FuentesFinanciamiento = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_FuentesFinanciamiento = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento") = value - End Set - End Property - Property GlobalDTAC_FuentesFinanciamientoCONAC() As DataTable - Get - GlobalDTAC_FuentesFinanciamientoCONAC = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamientoCONAC"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamientoCONAC") = value - End Set - End Property - Property GlobalDTAC_Funcion() As DataTable - Get - GlobalDTAC_Funcion = DirectCast(HttpContext.Current.Application("GlobalDTAC_Funcion"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Funcion") = value - End Set - End Property - Property GlobalDTAC_Programas() As DataTable - Get - GlobalDTAC_Programas = DirectCast(HttpContext.Current.Application("GlobalDTAC_Programas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Programas") = value - End Set - End Property - Property GlobalDTAC_ProgramasCONAC() As DataTable - Get - GlobalDTAC_ProgramasCONAC = DirectCast(HttpContext.Current.Application("GlobalDTAC_ProgramasCONAC"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ProgramasCONAC") = value - End Set - End Property - Property GlobalDTAC_ProyectosProceso() As DataTable - Get - GlobalDTAC_ProyectosProceso = DirectCast(HttpContext.Current.Application("GlobalDTAC_ProyectosProceso"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ProyectosProceso") = value - End Set - End Property - Property GlobalDTAC_SubFuncion() As DataTable - Get - GlobalDTAC_SubFuncion = DirectCast(HttpContext.Current.Application("GlobalDTAC_SubFuncion"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_SubFuncion") = value - End Set - End Property - Property GlobalDTAC_SubProgramas() As DataTable - Get - GlobalDTAC_SubProgramas = DirectCast(HttpContext.Current.Application("GlobalDTAC_SubProgramas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_SubProgramas") = value - End Set - End Property - Property GlobalDTAC_ClasificacionAdministrativa(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionAdministrativa"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_ClasificacionAdministrativa = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_ClasificacionAdministrativa = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionAdministrativa"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ClasificacionAdministrativa") = value - End Set - End Property - Property GlobalDTAC_TipoGasto() As DataTable - Get - GlobalDTAC_TipoGasto = DirectCast(HttpContext.Current.Application("GlobalDTAC_TipoGasto"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_TipoGasto") = value - End Set - End Property - - Property GlobalDTAC_ProgramaOperativo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ProgramaOperativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_ProgramaOperativo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_ProgramaOperativo = DirectCast(HttpContext.Current.Application("GlobalDTAC_ProgramaOperativo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ProgramaOperativo") = value - End Set - End Property - - Property GlobalDTAC_MatrizIngresos() As DataTable - Get - GlobalDTAC_MatrizIngresos = DirectCast(HttpContext.Current.Application("GlobalDTAC_MatrizIngresos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_MatrizIngresos") = value - End Set - End Property - - Property GlobalDTAC_MatrizEgresos() As DataTable - Get - GlobalDTAC_MatrizEgresos = DirectCast(HttpContext.Current.Application("GlobalDTAC_MatrizEgresos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_MatrizEgresos") = value - End Set - End Property - - -#End Region - - Property GlobalDTAC_PD_EjeRector(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_EjeRector"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_EjeRector = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_EjeRector = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_EjeRector"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_EjeRector") = value - End Set - End Property - - Property GlobalDTAC_PD_Programas(CveEjeRector As Integer) As DataTable - Get - If CveEjeRector <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Programas"), DataTable), String.Format("CveEjeRector = {0}", CveEjeRector), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_Programas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_Programas = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Programas"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_Programas") = value - End Set - End Property - - Property GlobalDTAC_PD_Estrategias(CveProgramas As Integer) As DataTable - Get - If CveProgramas <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Estrategias"), DataTable), String.Format("CvePrograma = {0}", CveProgramas), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_Estrategias = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_Estrategias = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Estrategias"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_Estrategias") = value - End Set - End Property - - Property GlobalDTAC_PD_LineasAccion(CveEstrategias As Integer) As DataTable - Get - If CveEstrategias <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_LineasAccion"), DataTable), String.Format("CveEstrategia = {0}", CveEstrategias), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_LineasAccion = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_LineasAccion = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_LineasAccion"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_LineasAccion") = value - End Set - End Property - - Property GlobalDTAC_PD_Metas(CveLineasAccion As Integer) As DataTable - Get - If CveLineasAccion <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Metas"), DataTable), String.Format("CveLineaAccion = {0}", CveLineasAccion), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_Metas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_Metas = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Metas"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_Metas") = value - End Set - End Property -#End Region - -#Region "***********************************************************************GLOBAL DT ORDENES DE COMPRA***********************************************************************" - - Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable - Get - - Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa) - 'sino existe, recarga los datos - If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then - - Dim ObjOC As New ClsOC - If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, CveEmpresa) Then - HttpContext.Current.Application(AppNombre) = ObjOC.DtResultados - Else - HttpContext.Current.Application(AppNombre) = Nothing - End If - - ObjOC.Dispose() - - End If - - Dim filtro As New StringBuilder - filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa) - If CveUsuario > 0 Then - filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario) - End If - If Tipo <> "" Then - filtro.AppendFormat(" AND Tipo='{0}'", Tipo) - End If - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows) - GlobalDTOCEstatusUsuarios = Dv.ToTable - Dv.Dispose() - - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa) - HttpContext.Current.Application(AppNombre) = value - End Set - End Property - - - Property GlobalDTOCEstatus(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTOCEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTOCEstatus = Dv.ToTable - Dv.Dispose() - Else - GlobalDTOCEstatus = DirectCast(HttpContext.Current.Application("GlobalDTOCEstatus"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOCEstatus") = value - End Set - End Property - - - 'Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim filtro As New StringBuilder - ' filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa) - ' If CveUsuario > 0 Then - ' filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario) - ' End If - ' If Tipo <> "" Then - ' filtro.AppendFormat(" AND Tipo='{0}'", Tipo) - ' End If - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTOCEstatusUsuarios"), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows) - ' GlobalDTOCEstatusUsuarios = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTOCEstatusUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTOCEstatusUsuarios"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTOCEstatusUsuarios") = value - ' End Set - 'End Property - - -#End Region - -#Region "F I N A N Z A S " - Property GlobalDTFinan_RazonesFinancieras() As DataTable - Get - GlobalDTFinan_RazonesFinancieras = DirectCast(HttpContext.Current.Application("GlobalDTFinan_RazonesFinancieras"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTFinan_RazonesFinancieras") = value - End Set - End Property -#End Region #Region "***********************************************************************GLOBAL DT CONTABILIDAD****************************************************************************" @@ -9914,357 +8583,7 @@ Namespace Modelos End Property #End Region -#Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************" - Property GlobalDTAsistenciaDetalle() As DataTable - Get - GlobalDTAsistenciaDetalle = DirectCast(HttpContext.Current.Application("GlobalDTAsistenciaDetalle"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAsistenciaDetalle") = value - End Set - End Property - Property GlobalDTAsistenciasInasistencias() As DataTable - Get - GlobalDTAsistenciasInasistencias = DirectCast(HttpContext.Current.Application("GlobalDTAsistenciasInasistencias"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAsistenciasInasistencias") = value - End Set - End Property - Property GlobalDTEstatusPersonal() As DataTable - Get - GlobalDTEstatusPersonal = DirectCast(HttpContext.Current.Application("GlobalDTEstatusPersonal"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstatusPersonal") = value - End Set - End Property - Property GlobalDTRHPersonal(CveEmpresa As Integer) As DataTable - Get - Dim ObjPersonal As New ClsRH - ObjPersonal.GetPersonal(-1, CveEmpresa) - GlobalDTRHPersonal = ObjPersonal.DtResultados - ObjPersonal.Dispose() - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTRHPersonal") = value - End Set - End Property - - - Property GlobalDTDepartamentos() As DataTable - Get - GlobalDTDepartamentos = DirectCast(HttpContext.Current.Application("GlobalDTDepartamentos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTDepartamentos") = value - End Set - End Property - Property GlobalDTRHPuestos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTRHPuestos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTRHPuestos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTRHPuestos = DirectCast(HttpContext.Current.Application("GlobalDTRHPuestos"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTRHPuestos") = value - End Set - End Property - Property GlobalDTEscolaridad() As DataTable - Get - GlobalDTEscolaridad = DirectCast(HttpContext.Current.Application("GlobalDTEscolaridad"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEscolaridad") = value - End Set - End Property - Property GlobalDTEstadoCivil() As DataTable - Get - GlobalDTEstadoCivil = DirectCast(HttpContext.Current.Application("GlobalDTEstadoCivil"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstadoCivil") = value - End Set - End Property - Property GlobalDTDocumentos() As DataTable - Get - GlobalDTDocumentos = DirectCast(HttpContext.Current.Application("GlobalDTDocumentos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTDocumentos") = value - End Set - End Property - Property GlobalDTGenero() As DataTable - Get - GlobalDTGenero = DirectCast(HttpContext.Current.Application("GlobalDTGenero"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGenero") = value - End Set - End Property - Property GlobalDTMotivoBaja() As DataTable - Get - GlobalDTMotivoBaja = DirectCast(HttpContext.Current.Application("GlobalDTMotivoBaja"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMotivoBaja") = value - End Set - End Property - Property GlobalDTTiposContrato() As DataTable - Get - GlobalDTTiposContrato = DirectCast(HttpContext.Current.Application("GlobalDTTiposContrato"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTiposContrato") = value - End Set - End Property - Property GlobalDTRutas() As DataTable - Get - GlobalDTRutas = DirectCast(HttpContext.Current.Application("GlobalDTRutas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTRutas") = value - End Set - End Property - Property GlobalDTTurno() As DataTable - Get - GlobalDTTurno = DirectCast(HttpContext.Current.Application("GlobalDTTurno"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTurno") = value - End Set - End Property - Property GlobalDTJornadas() As DataTable - Get - GlobalDTJornadas = DirectCast(HttpContext.Current.Application("GlobalDTJornadas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTJornadas") = value - End Set - End Property - Property GlobalDTMotivosHorasExtras() As DataTable - Get - GlobalDTMotivosHorasExtras = DirectCast(HttpContext.Current.Application("GlobalDTMotivosHorasExtras"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMotivosHorasExtras") = value - End Set - End Property - Property GlobalDTTipoBuzon() As DataTable - Get - GlobalDTTipoBuzon = DirectCast(HttpContext.Current.Application("GlobalDTTipoBuzon"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoBuzon") = value - End Set - End Property -#End Region - -#Region "*********** D T - C O M B U S T I B L E S ***********" - - - - Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As New StringBuilder - StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCombustibles"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTCombustibles = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTCombustibles = DirectCast(HttpContext.Current.Application("GlobalDTCombustibles"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCombustibles") = value - End Set - End Property - - Property GlobalDTCombustiblesTipos(Optional CveCombustibleTipo As Integer = -1) As DataTable - Get - - If CveCombustibleTipo <> -1 Then - - Dim StrSQL As New StringBuilder - If CveCombustibleTipo <> -1 Then StrSQL.AppendFormat("CveCombustibleTipo = {0}", CveCombustibleTipo) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCombustiblesTipos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTCombustiblesTipos = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTCombustiblesTipos = DirectCast(HttpContext.Current.Application("GlobalDTCombustiblesTipos"), DataTable) - End If - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTCombustiblesTipos") = value - End Set - End Property -#End Region - -#Region "*********** D T - M A N T E N I M I E N T O S ***********" - - Property GlobalDTMantenimientosTipos() As DataTable - Get - GlobalDTMantenimientosTipos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMantenimientosTipos") = value - End Set - End Property - - Property GlobalDTMantenimientos() As DataTable - Get - GlobalDTMantenimientos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMantenimientos") = value - End Set - End Property - - Property GlobalDTMantenimientosTipos(Optional CveMantenimientoTipo As Integer = -1) As DataTable - Get - - If CveMantenimientoTipo <> -1 Then - - Dim StrSQL As New StringBuilder - If CveMantenimientoTipo <> -1 Then StrSQL.AppendFormat("CveMantenimientoTipo = {0}", CveMantenimientoTipo) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTMantenimientosTipos = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTMantenimientosTipos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable) - End If - End Get - Set(ByVal value As DataTable) - - HttpContext.Current.Application("GlobalDTMantenimientosTipos") = value - End Set - End Property - -#End Region - - -#Region "*********** D T - T A L L E R E S ***********" - - Property GlobalDTTalleresTipos() As DataTable - Get - GlobalDTTalleresTipos = DirectCast(HttpContext.Current.Application("GlobalDTTalleresTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTalleresTipos") = value - End Set - End Property - - Property GlobalDTTalleres() As DataTable - Get - GlobalDTTalleres = DirectCast(HttpContext.Current.Application("GlobalDTTalleres"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTalleres") = value - End Set - End Property - -#End Region - -#Region "*********** D T - D I S T R I B U I D O R E S ***********" - - Property GlobalDTDistribuidoresTipos() As DataTable - Get - GlobalDTDistribuidoresTipos = DirectCast(HttpContext.Current.Application("GlobalDTDistribuidoresTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTDistribuidoresTipos") = value - End Set - End Property - - Property GlobalDTDistribuidores() As DataTable - Get - GlobalDTDistribuidores = DirectCast(HttpContext.Current.Application("GlobalDTDistribuidores"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTDistribuidores") = value - End Set - End Property - -#End Region - - - Property GlobalDTOIRevision(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTOIRevision"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTOIRevision = Dv.ToTable - Dv.Dispose() - Else - GlobalDTOIRevision = DirectCast(HttpContext.Current.Application("GlobalDTOIRevision"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIRevision") = value - End Set - End Property - Property GlobalDTOIAgendaTipo() As DataTable - Get - GlobalDTOIAgendaTipo = DirectCast(HttpContext.Current.Application("GlobalDTOIAgendaTipo"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIAgendaTipo") = value - End Set - End Property - Property GlobalDTOIAgenda() As DataTable - Get - GlobalDTOIAgenda = DirectCast(HttpContext.Current.Application("GlobalDTOIAgenda"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIAgenda") = value - End Set - End Property - Property GlobalDTVtaCondicionesEntrega(Optional CveEmpresa As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTVtaCondicionesEntrega"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTVtaCondicionesEntrega = Dv.ToTable - Dv.Dispose() - Else - GlobalDTVtaCondicionesEntrega = DirectCast(HttpContext.Current.Application("GlobalDTVtaCondicionesEntrega"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaCondicionesEntrega") = value - End Set - End Property - Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable - - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTPaqueteriaGuiaTipos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTPaqueteriaGuiaTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTPaqueteriaGuiaTipos = DirectCast(HttpContext.Current.Application("GlobalDTPaqueteriaGuiaTipos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPaqueteriaGuiaTipos") = value - End Set - End Property Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1, Optional PorcentajeIVA As Double = -1) As DataTable @@ -10286,14 +8605,7 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTClasificacionPorcentaje") = value End Set End Property - Property GlobalDTPaqueterias() As DataTable - Get - GlobalDTPaqueterias = DirectCast(HttpContext.Current.Application("GlobalDTPaqueterias"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPaqueterias") = value - End Set - End Property + Public Property CveContratoSecciones As String Public Property CveEstatus As Integer diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 5081269e9..02167a020 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -492,7 +492,7 @@ Partial Class Inventarios_RecepcionUsados Dim CveTamanio As Integer = 1 Dim CveUM As Integer = -1 Dim PU As Decimal = 0 - Dim RowTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0 AND CvePSCargo={CvePS}") + Dim RowTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CvePSCargo > 0 AND CvePSCargo={CvePS}") Dim CodigoPS As String = "" Dim UnidaMedida As String = "" @@ -1044,8 +1044,8 @@ Partial Class Inventarios_RecepcionUsados End If Dim PU As Decimal = 0 - If GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0 AND CvePSCargo={DdlProducto2.SelectedValue}").Rows.Count > 0 Then - PU = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0 AND CvePSCargo={DdlProducto2.SelectedValue}").Rows(0)("Cargo").ToString.ToDecimal + If GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltraParametros($" CvePSCargo > 0 AND CvePSCargo={DdlProducto2.SelectedValue}").Rows.Count > 0 Then + PU = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltraParametros($" CvePSCargo > 0 AND CvePSCargo={DdlProducto2.SelectedValue}").Rows(0)("Cargo").ToString.ToDecimal End If AddNew(DdlProducto2.SelectedValue.ToEntero, DdlProducto2.SelectedItem.Text, DdlUnidad.SelectedValue.ToEntero, DdlUnidad.SelectedItem.Text, txtCantidad.Text.ToDouble, PU, @@ -1318,7 +1318,7 @@ Partial Class Inventarios_RecepcionUsados If EsDistribuidor AndAlso RBLOpcion.SelectedValue.ToEntero = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}") + Dim DrTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}") If DrTamanio IsNot Nothing Then Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal() Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal() @@ -2815,7 +2815,7 @@ Partial Class Inventarios_RecepcionUsados IVA = SubTotal * PorcentajeIVA Dim Descuento As Decimal = 0 - Dim ImporteCargo As Decimal = GlobalDTAcumTamaños().FiltroPrimeroValor("Cargo", String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa)).ToDecimal() + Dim ImporteCargo As Decimal = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Cargo", String.Format("CveTamaño = {0} ", CveTamaño)).ToDecimal() 'SI ES AJUSTE O GARANTIA SOLO DEBE SUMAR EL IMPORTE DE LA GARANTIA SI NO RECIBIO USADO If RblUsadosAjuste.SelectedValue = "1" AndAlso ImporteCargo <= 0 Then @@ -3207,7 +3207,7 @@ Partial Class Inventarios_RecepcionUsados Protected Sub CargaTipoDeUso() DdlTipoUso.Items.Clear() - DdlTipoUso.DataSource = GlobalDTAcumTiposUso.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") + DdlTipoUso.DataSource = GlobalDTAcumTiposUso(UsuarioActual.CveEmpresa) DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlTipoUso.DataBind() End Sub @@ -3217,7 +3217,7 @@ Partial Class Inventarios_RecepcionUsados End Sub Protected Sub CargaTipoDefecto() - DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") + DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto(UsuarioActual.CveEmpresa) DdlTipoDefecto.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlTipoDefecto.DataBind() End Sub @@ -3259,7 +3259,7 @@ Partial Class Inventarios_RecepcionUsados End If End If - Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}") + Dim DrCargo As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CveTamaño = {CveTamaño}") If DrCargo IsNot Nothing Then CargoVendido = DrCargo("Cargo").ToString.ToDecimal @@ -3386,7 +3386,7 @@ Partial Class Inventarios_RecepcionUsados If ObjPS.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) Then CveTamaño = ObjPS.DtResultados.FiltroPrimeroValor("CveTamaño").ToEntero End If - Dim drDatos As DataRow = GlobalDTAcumTamaños().FiltroPrimero(String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa)) + Dim drDatos As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveTamaño = {0} ", CveTamaño)) Dim Importe As Decimal = 0 Dim drTamañoPS As DataRow = Nothing diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 2b53dc42e..818a55fb5 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -5182,7 +5182,7 @@ Partial Class PV ' End If 'Next If DdlRecepcionUsados.SelectedValue.ToEntero() > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo = {DdlRecepcionUsados.SelectedValue}") + Dim DrTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CvePSCargo = {DdlRecepcionUsados.SelectedValue}") Entregado += (1D * DrTamanio("Cargo").ToString().ToDecimal) UltimoEntregado += (DrTamanio("Cargo").ToString().ToDecimal) @@ -7049,13 +7049,13 @@ Partial Class PV DdlFacturas.Items.Insert(0, New ListItem("Sin Factura", "-1")) - DdlTipoUso.DataSource = GlobalDTAcumTiposUso.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") + DdlTipoUso.DataSource = GlobalDTAcumTiposUso(UsuarioActual.CveEmpresa) DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1")) - DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") + DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto(UsuarioActual.CveEmpresa) DdlTipoDefecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - Dim DtTamanios = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0") + Dim DtTamanios = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltraParametros($" CvePSCargo > 0") CargaModelos() CargaBCIAjuste() @@ -7448,7 +7448,7 @@ Partial Class PV End If End If - Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} And CveTamaño = {CveTamaño}") + Dim DrCargo As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CveTamaño = {CveTamaño}") If DrCargo IsNot Nothing Then CargoVendido = DrCargo("Cargo").ToString.ToDecimal @@ -7577,7 +7577,7 @@ Partial Class PV If TmpDT.Select($"Consec={ConsecutivoVenta}").Length > 0 Then Dim Dr As DataRow = TmpDT.Select($"Consec={ConsecutivoVenta}")(0) Dim CvePSCargo As Integer = -1 - Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {Dr("CveTamaño").ToString.ToEntero}").FiltroPrimero("") + Dim DrCargo As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltraParametros($" CveTamaño = {Dr("CveTamaño").ToString.ToEntero}").FiltroPrimero("") If DrCargo IsNot Nothing Then CvePSCargo = DrCargo("CvePSCargo").ToString.ToEntero CargoActual = DrCargo("Cargo").ToString.ToDouble @@ -7875,7 +7875,7 @@ Partial Class PV ' End If 'Next - Dim DrTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo = {DdlRecepcionUsados.SelectedValue}") + Dim DrTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CvePSCargo = {DdlRecepcionUsados.SelectedValue}") If DdlRecepcionUsados.SelectedValue.ToEntero() > 0 Then TotalCargos += CantidadUsado * DrTamanio("Cargo").ToString().ToDecimal @@ -8039,7 +8039,7 @@ Partial Class PV Dim ListaPScargo As New List(Of MConceptoUsado) - Dim DTTamanios As DataTable = GlobalDTAcumTamaños() + Dim DTTamanios As DataTable = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa) Dim DTCvePSCostos = DTTamanios.FiltraParametros("", "", {"CvePSCargo"}) @@ -8470,7 +8470,7 @@ Partial Class PV End Sub Protected Sub DdlRecepcionUsados_SelectedIndexChanged(sender As Object, e As EventArgs) If DdlRecepcionUsados.SelectedValue.ToEntero() > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo = {DdlRecepcionUsados.SelectedValue}") + Dim DrTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CvePSCargo = {DdlRecepcionUsados.SelectedValue}") DdlBCIUsado.DataSource = DTBCIUsados.FiltraParametros(String.Format("CveTamaño = {0}", DrTamanio("CveTamaño"))) Else DdlBCIUsado.Items.Clear() From 6dacecba3f7960cdbe8c10d0cfa2bf05e31f6b8f Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 27 Jan 2023 07:13:56 -0700 Subject: [PATCH 029/103] -- cambia de vendedor a cliente, y sus ventas --- App_Code/ClsVtaVendedores.vb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/App_Code/ClsVtaVendedores.vb b/App_Code/ClsVtaVendedores.vb index 848ce0461..e6bd8101b 100644 --- a/App_Code/ClsVtaVendedores.vb +++ b/App_Code/ClsVtaVendedores.vb @@ -261,6 +261,26 @@ Public Class ClsVtaVendedores Return Retorno End Function + + Public Function CambioClientesVendedor(CveCliente As Integer, CveVendedor As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_ClientesVendedorCambio") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al guardar los cambios de Vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not disposedValue Then From 0009c5b7a46e11ce75f14cd4aa86f746184264c5 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 27 Jan 2023 07:14:13 -0700 Subject: [PATCH 030/103] -- mejora en globaldt --- General/SaldosIniciales.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index fac6f797e..f26103631 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -730,7 +730,7 @@ Partial Class General_SaldosIniciales Dim CveClasificacion As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString().ToEntero() Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"UnidadMedida = '{UnidadMedida}' OR Abreviatura = '{UnidadMedida}'").ToString().ToEntero() Dim CveSATPS As Integer = ClsPaginas.GlobalDTPSATPS("-1", CodigoSAT:=SATClavePS).FiltroPrimeroValor("CveSATPS", "").ToEntero() - Dim CveTamaño As Integer = GlobalDTAcumTamaños.FiltroPrimeroValor("CveTamaño", $"Tamaño = '{Tamaño}' AND CveEmpresa = {UsuarioActual.CveEmpresa}").ToString().ToEntero() + Dim CveTamaño As Integer = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTamaño", $"Tamaño = '{Tamaño}' ").ToString().ToEntero() Dim CveClasificacion2 As Integer = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion2}'").ToString().ToEntero() Dim CveClasificacionDetalle As Integer = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CveClasificacionDetalle", $"ClasificacionDetalle = '{Linea}'").ToString().ToEntero() From 84939359d0d43c134b2da7a09e1b686389036139 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 27 Jan 2023 07:14:40 -0700 Subject: [PATCH 031/103] =?UTF-8?q?simplificaci=C3=B3n=20de=20GlobalDT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Global.asax | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Global.asax b/Global.asax index 82b26aad6..7c4e7e04d 100644 --- a/Global.asax +++ b/Global.asax @@ -374,11 +374,11 @@ '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'M O N E D A S - Using ObjMonedas As New ClsMonedas() - If ObjMonedas.GetMonedas() Then Application("GlobalDTMonedas") = ObjMonedas.DtResultados Else Application("GlobalDTMonedas") = Nothing - If ObjMonedas.GetMonedasAlias() Then Application("GlobalDTMonedasAlias") = ObjMonedas.DtResultados Else Application("GlobalDTMonedasAlias") = Nothing + 'Using ObjMonedas As New ClsMonedas() + ' 'If ObjMonedas.GetMonedas() Then Application("GlobalDTMonedas") = ObjMonedas.DtResultados Else Application("GlobalDTMonedas") = Nothing + ' If ObjMonedas.GetMonedasAlias() Then Application("GlobalDTMonedasAlias") = ObjMonedas.DtResultados Else Application("GlobalDTMonedasAlias") = Nothing - End Using + 'End Using GuardaLogAsax(String.Format("Globalasax 22:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ @@ -520,13 +520,13 @@ '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'A C U M U L A D O R E S - Using ObjAcumuladores As New ClsAcumuladores() - If ObjAcumuladores.TamañoGet(-1, -1) Then Application("GlobalDTAcumTamaños") = ObjAcumuladores.DtResultados Else Application("GlobalDTAcumTamaños") = Nothing - If ObjAcumuladores.TiposDefectoGet(-1, -1) Then Application("GlobalDTAcumTiposDefecto") = ObjAcumuladores.DtResultados Else Application("GlobalDTAcumTiposDefecto") = Nothing - If ObjAcumuladores.TiposUsoGet(-1, -1) Then Application("GlobalDTAcumTiposUso") = ObjAcumuladores.DtResultados Else Application("GlobalDTAcumTiposUso") = Nothing - 'If ObjAcumuladores.GarantiasMesesGet(-1, -1) Then Application("GlobalDTAcumGarantiasMesesTipoUso") = ObjAcumuladores.DtResultados.FiltraParametros("", DistinctColumns:={"CveMarca", "CveTipoUso", "TipoUso"}) Else Application("GlobalDTAcumGarantiasMesesTipoUso") = Nothing - End Using - GuardaLogAsax(String.Format("Globalasax 34:{0}", DateTime.Now)) + 'Using ObjAcumuladores As New ClsAcumuladores() + ' If ObjAcumuladores.TamañoGet(-1, -1) Then Application("GlobalDTAcumTamaños") = ObjAcumuladores.DtResultados Else Application("GlobalDTAcumTamaños") = Nothing + ' If ObjAcumuladores.TiposDefectoGet(-1, -1) Then Application("GlobalDTAcumTiposDefecto") = ObjAcumuladores.DtResultados Else Application("GlobalDTAcumTiposDefecto") = Nothing + ' If ObjAcumuladores.TiposUsoGet(-1, -1) Then Application("GlobalDTAcumTiposUso") = ObjAcumuladores.DtResultados Else Application("GlobalDTAcumTiposUso") = Nothing + ' 'If ObjAcumuladores.GarantiasMesesGet(-1, -1) Then Application("GlobalDTAcumGarantiasMesesTipoUso") = ObjAcumuladores.DtResultados.FiltraParametros("", DistinctColumns:={"CveMarca", "CveTipoUso", "TipoUso"}) Else Application("GlobalDTAcumGarantiasMesesTipoUso") = Nothing + 'End Using + 'GuardaLogAsax(String.Format("Globalasax 34:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ '------------------------------------------------------------------------------S I S T E M A ---------------------------------------------------------------------------------- From 07c93ec42d45dcde40805be1d9e018f64ae6c60f Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 27 Jan 2023 12:24:54 -0700 Subject: [PATCH 032/103] E141 Cambios de log de ejecucion de tarea programada --- Ashx/E141.ashx | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/Ashx/E141.ashx b/Ashx/E141.ashx index 95c0d6c4f..e1a263008 100644 --- a/Ashx/E141.ashx +++ b/Ashx/E141.ashx @@ -383,7 +383,10 @@ Public Class E141 : Implements IHttpHandler 'TAREAS PROGRAMADAS Select Case Metodo Case "CrearActualizarProductos" + + GuardaLogAD("NP-Inicia actualizacion de productos", "LogE141") respuesta = CrearActualizarProductos(If(FiltrarTodos = "1", True, False)) + GuardaLogAD("NP-Finaliza actualizacion de productos", "LogE141") If respuesta Then retorno = "True" Else @@ -392,7 +395,9 @@ Public Class E141 : Implements IHttpHandler Case "CrearActualizarProductosJson" retorno = CrearActualizarProductosJson(If(FiltrarTodos = "1", True, False)) Case "ActualizarPrecios" + GuardaLogAD("AP-Inicia actualizacion de precios", "LogE141") respuesta = ActualizarPrecios(If(FiltrarTodos = "1", True, False)) + GuardaLogAD("AP-Finaliza actualizacion de precios", "LogE141") If respuesta Then retorno = "True" Else @@ -401,7 +406,9 @@ Public Class E141 : Implements IHttpHandler Case "ActualizarPreciosJson" retorno = ActualizarPreciosJson(If(FiltrarTodos = "1", True, False)) Case "ActualizarExistencias" + GuardaLogAD("AE-Inicia actualizacion de existencias", "LogE141") respuesta = ActualizarExistencias() + GuardaLogAD("AE-Finaliza actualizacion de existencias", "LogE141") If respuesta Then retorno = "True" Else @@ -410,7 +417,9 @@ Public Class E141 : Implements IHttpHandler Case "ActualizarExistenciasJson" retorno = ActualizarExistenciasJson(If(FiltrarTodos = "1", True, False)) Case "ActualizarVendedores" + GuardaLogAD("AV-Inicia actualizacion de vendedores", "LogE141") respuesta = ActualizarVendedores(If(FiltrarTodos = "1", True, False)) + GuardaLogAD("AV-Finaliza actualizacion de vendedores", "LogE141") If respuesta Then retorno = "True" Else @@ -1923,7 +1932,12 @@ Public Class E141 : Implements IHttpHandler Dim respuesta = JObject.Parse(resp) If respuesta("status").ToString() = "success" Then CountPeticionesExitosas += 1 + GuardaLogAD("NP-Creacion/actualizacion de productos exitosa", "LogE141") + Else + GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${respuesta.ToString()}", "LogE141") End If + Else + GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${resp}", "LogE141") End If Else @@ -1958,7 +1972,12 @@ Public Class E141 : Implements IHttpHandler Dim respuesta = JObject.Parse(resp) If respuesta("status").ToString() = "success" Then CountPeticionesExitosas += 1 + GuardaLogAD("NP-Creacion/actualizacion de productos exitosa", "LogE141") + Else + GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${respuesta.ToString()}", "LogE141") End If + Else + GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${resp}", "LogE141") End If Threading.Thread.Sleep(1000) @@ -2071,8 +2090,13 @@ Public Class E141 : Implements IHttpHandler If IsValidJson(resp) Then Dim respuesta = JObject.Parse(resp) If respuesta("status").ToString() = "success" Then + GuardaLogAD("AP-Actualizacion de precios exitosa", "LogE141") CountPeticionesExitosas += 1 + Else + GuardaLogAD($"AP-No se pudo actualizar precios ${respuesta.ToString()}", "LogE141") End If + Else + GuardaLogAD($"AP-No se pudo actualizar precios ${resp}", "LogE141") End If Else @@ -2103,7 +2127,12 @@ Public Class E141 : Implements IHttpHandler Dim respuesta = JObject.Parse(resp) If respuesta("status").ToString() = "success" Then CountPeticionesExitosas += 1 + GuardaLogAD("AP-Actualizacion de precios exitosa", "LogE141") + Else + GuardaLogAD($"AP-No se pudo actualizar precios ${respuesta.ToString()}", "LogE141") End If + Else + GuardaLogAD($"AP-No se pudo actualizar precios ${resp}", "LogE141") End If Threading.Thread.Sleep(1000) @@ -2186,7 +2215,12 @@ Public Class E141 : Implements IHttpHandler Dim respuesta = JObject.Parse(resp) If respuesta("status").ToString() = "success" Then CountPeticionesExitosas += 1 + GuardaLogAD("AE-Actualizacion de existencias exitosa", "LogE141") + Else + GuardaLogAD($"AE-No se pudo actualizar existencias ${respuesta.ToString()}", "LogE141") End If + Else + GuardaLogAD($"AE-No se pudo actualizar existencias ${resp}", "LogE141") End If Else @@ -2217,7 +2251,12 @@ Public Class E141 : Implements IHttpHandler Dim respuesta = JObject.Parse(resp) If respuesta("status").ToString() = "success" Then CountPeticionesExitosas += 1 + GuardaLogAD("AE-Actualizacion de existencias exitosa", "LogE141") + Else + GuardaLogAD($"AE-No se pudo actualizar existencias ${respuesta.ToString()}", "LogE141") End If + Else + GuardaLogAD($"AE-No se pudo actualizar existencias ${resp}", "LogE141") End If Threading.Thread.Sleep(1000) End While @@ -2338,7 +2377,12 @@ Public Class E141 : Implements IHttpHandler Dim respuesta = JObject.Parse(resp) If respuesta("status").ToString() = "success" Then CountPeticionesExitosas += 1 + GuardaLogAD("AV-Actualizacion de vendedores exitosa", "LogE141") + Else + GuardaLogAD($"AV-No se pudo actualizar vendedores ${respuesta.ToString()}", "LogE141") End If + Else + GuardaLogAD($"AV-No se pudo actualizar vendedores ${resp}", "LogE141") End If End If From 59b7743779e408a1d589cc7bb3059ee316f6b402 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 27 Jan 2023 12:26:53 -0700 Subject: [PATCH 033/103] E13. Contrato y descripcion de ventas (Parte 1) --- App_Code/ClsMovimientos.vb | 9 ++++--- App_Code/ClsVentas.vb | 3 ++- CxC/RepCxC.aspx | 8 ++++++ CxC/RepCxC.aspx.vb | 14 +++++++++++ Ventas/Ventas.aspx | 32 +++++++++++++++++++++--- Ventas/Ventas.aspx.vb | 51 +++++++++++++++++++++++++++++++++++--- 6 files changed, 106 insertions(+), 11 deletions(-) diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index 0cbfb0931..cf9c2e04c 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -249,7 +249,7 @@ Public Class ClsMovimientos TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1", Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional FechaCorte As Date = Nothing, Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1, Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1, Optional CveMoneda As Integer = -1, - Optional TieneLineaAdicional As Integer = -1) As Boolean + Optional TieneLineaAdicional As Integer = -1, Optional CveContrato As Integer = -1) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -284,7 +284,8 @@ Public Class ClsMovimientos .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente .Add("@AplicaAnticiposPagados", SqlDbType.Int).Value = AplicaAnticiposPagados .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda - .Add("@TieneLineaAdicional", SqlDbType.Int).Value = TieneLineaAdicional + .Add("@TieneLineaAdicional", SqlDbType.Int).Value = TieneLineaAdicional + .Add("@CveContrato", SqlDbType.Int).Value = CveContrato End With Try @@ -335,7 +336,8 @@ Public Class ClsMovimientos CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1", Optional FechaVI As String = "-1", Optional FechaVF As String = "1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1, - Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1, Optional TieneLineaAdicional As Integer = -1) As Boolean + Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1, + Optional TieneLineaAdicional As Integer = -1, Optional CveContrato As Integer = -1) As Boolean Dim Retorno As Boolean = False DS = New DataSet @@ -379,6 +381,7 @@ Public Class ClsMovimientos .Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente .Add("@AplicaAnticiposPagados", SqlDbType.Int).Value = AplicaAnticiposPagados .Add("@TieneLineaAdicional", SqlDbType.Int).Value = TieneLineaAdicional + .Add("@CveContrato", SqlDbType.Int).Value = CveContrato End With Try diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 67d37fb3b..4b7dd81fb 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -418,7 +418,7 @@ Public Class ClsVentas Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1", - Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1) As Boolean + Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasAdd") @@ -517,6 +517,7 @@ Public Class ClsVentas .Add("@DevolucionImportePagado", SqlDbType.Money).Value = DevolucionImportePagado .Add("@EsGarantia", SqlDbType.Bit).Value = EsGarantia .Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional + .Add("@DescripcionVenta", SqlDbType.VarChar).Value = DescripcionVenta .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue End With 'SqlTypes.SqlDateTime.Null diff --git a/CxC/RepCxC.aspx b/CxC/RepCxC.aspx index d574ce5a0..e66c3446e 100644 --- a/CxC/RepCxC.aspx +++ b/CxC/RepCxC.aspx @@ -362,6 +362,14 @@
    +
    + Contrato: +
    +
    + + + +
    diff --git a/CxC/RepCxC.aspx.vb b/CxC/RepCxC.aspx.vb index 487a913fc..59a32dac7 100644 --- a/CxC/RepCxC.aspx.vb +++ b/CxC/RepCxC.aspx.vb @@ -172,6 +172,20 @@ Partial Class RepCxC ' Next 'End If 'ObjSisUsuarios.Dispose() + If UsuarioActual.CveEmpresa = 13 Then + CargaContratos() + End If + + End Sub + + Private Sub CargaContratos() + Dim ObjContratos As New ClsContratos + If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, CveCliente:=-1) Then + DdlContrato.DataSource = ObjContratos.DtResultados + End If + + ObjContratos.Dispose() + DdlContrato.DataBind() End Sub diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 8ee7e4337..043bfd18a 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -512,7 +512,7 @@ Empresa:  - Enviar Mail: + Enviar Mail: @@ -907,6 +907,32 @@
    + + + +
    +
    + + Descripción +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + +
    +
    +
    +
    +
    @@ -2578,7 +2604,7 @@
    Destino:
    - +
    @@ -2615,7 +2641,7 @@
    - +
    diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 81acbd393..32ecd1137 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -3463,6 +3463,13 @@ Partial Class Ventas UPObservaciones.Update() End If + If UsuarioActual.CveEmpresa = 13 Then + UpDescripcionVenta.Visible = True + If CveVenta <= 0 Then + TxtDescripcionVenta.Enabled = True + End If + End If + End If End Sub @@ -4813,6 +4820,11 @@ Partial Class Ventas End If End If + If UsuarioActual.CveEmpresa = 13 Then + UpDescripcionVenta.Visible = True + TxtDescripcionVenta.Text = DbRowVenta("DescripcionVenta").ToString() + End If + HplDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto")))) Case "Egs" @@ -9418,22 +9430,30 @@ Partial Class Ventas If UsuarioActual.Empresa.Funcionalidad(705) = "1" AndAlso DdlLineaAdicional.SelectedValue.ToEntero() > 0 Then 'VERIFICA QUE LA MONEDA DE LA LINEA ADICIONAL SEA LA MISMA QUE LA VENTA If Me.CveMonedaLineaAdicional <> ObjFactura.CveMoneda Then + TmpDT = TmpDTError.Copy() + CalculaTotalesVenta(RecalcularTotalOriginal:=False) Alert("La moneda de la linea adicional de crédito debe ser la misma que la factura.", TipoMensaje.MsgAdvertencia) Exit Sub End If 'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE If ObjFactura.TipoDocto = "Rem" AndAlso Me.SaldoLineaAdicional <= ObjFactura.Total Then + TmpDT = TmpDTError.Copy() + CalculaTotalesVenta(RecalcularTotalOriginal:=False) Alert("El saldo de la linea adicional debe ser mayor o igual al de la remisión", TipoMensaje.MsgAdvertencia) Exit Sub End If If ObjFactura.TipoDocto = "Ing" AndAlso (DtRemisionesPS Is Nothing OrElse DtRemisionesPS.Rows.Count = 0) Then + TmpDT = TmpDTError.Copy() + CalculaTotalesVenta(RecalcularTotalOriginal:=False) Alert("No se puede generar un ingreso con una linea adicional de credito si este no viene de una remisión", TipoMensaje.MsgAdvertencia) Exit Sub End If If ObjFactura.TipoDocto = "Ing" AndAlso Me.SaldoIngresosLineaAdicional <= ObjFactura.Total Then + TmpDT = TmpDTError.Copy() + CalculaTotalesVenta(RecalcularTotalOriginal:=False) Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia) Exit Sub End If @@ -9775,6 +9795,24 @@ Partial Class Ventas End If + If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso ErrorList.Count = 0 AndAlso ObjFactura.TipoDocto = "Ing" Then + Dim RowVenta As DataRow = Nothing + If ObjVentas.GetVenta(ObjFactura.CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then + RowVenta = ObjVentas.DtResultados.Rows(0) + Else + ErrorList.Add("No se pudieron validar los datos de la venta") + End If + + If RowVenta IsNot Nothing Then + 'SI FUE VENTA DE CONTADO VALIDA QUE SE HAYA PAGADO EN SU TOTALIDAD + If RowVenta("CondicionesPago").ToString().ToEntero() = 0 AndAlso RowVenta("Saldo").ToString().ToDecimal() > 0.01D Then + ErrorList.Add("La venta no fue pagada en su totalidad") + End If + Else + ErrorList.Add("No se pudieron validar los datos de la venta") + End If + End If + 'MARCA PARA NO SURTIR VENTA DE COTNRATO DE CONSIGNACION DE VENTA | [IPP] : PARCHE If ErrorList.Count = 0 Then If ObjFactura.CveVenta > 0 And CveAlmacenExistenciasContrato > 0 And DdlTipoComprobante.SelectedValue = "Ing" Then @@ -13041,6 +13079,11 @@ Partial Class Ventas End If + Dim DescripcionVenta As String = "" + If factura.TipoDocto = "Ing" AndAlso UsuarioActual.CveEmpresa = 13 Then + DescripcionVenta = TxtDescripcionVenta.Text + End If + If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC, factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC, factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento, @@ -13057,7 +13100,7 @@ Partial Class Ventas DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False), Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible, - CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero()) Then + CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta) Then ErrorList.Add("Ocurrió un error al Generar la Venta.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico") Else If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then @@ -22341,9 +22384,9 @@ Partial Class Ventas CargaAnticipos(CveCliente) End If - If CveVenta <= 0 Then - CalculaLineasAdicionales() - End If + 'If CveVenta <= 0 Then + ' CalculaLineasAdicionales() + 'End If End Sub Private Sub btnBuscarPrecio_Click(sender As Object, e As EventArgs) Handles btnBuscarPrecio.Click From b3ace3dc5ae6aab738fc9bb585c52363ff8ae5b0 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 27 Jan 2023 15:35:21 -0700 Subject: [PATCH 034/103] =?UTF-8?q?--=20activaci=C3=B3n=20de=20liga=20a=20?= =?UTF-8?q?ventas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contabilidad/RegPrePolizaS.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 9c536f0ec..1d6d0e9a1 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -584,7 +584,7 @@ Partial Class ContabilidadC_RegPrePolizaS Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero - If CveConceptoContable.Contiene(1, 2, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 272) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta")) + If CveConceptoContable.Contiene(1, 2, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 272, 150, 251, 301) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta")) If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra")) If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen")) If CveConceptoContable.Contiene(30, 204, 66, 92) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE")) From 0a38dc0095dd5ba53844aab3240cd48135332abc Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 27 Jan 2023 16:42:09 -0700 Subject: [PATCH 035/103] - liga prepoliza, cambio a mayuscula --- Bancos/IE.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index d3b746536..dad351faf 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -925,7 +925,7 @@ Partial Class Bancos_IE LblCuenta.Text = ObjIE.BancoNumCuentaMoneda ViewState("CvePrePoliza") = ObjIE.DtResultados.Rows(0)("CvePrePoliza").ToString.ToEntero - HpLPrePoliza.NavigateUrl = String.Format("/Contabilidad/RegPrePoliza.aspx?CvePrepoliza={0}", ViewState("CvePrePoliza")) + HpLPrePoliza.NavigateUrl = String.Format("/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}", ViewState("CvePrePoliza")) HpLPrePoliza.Visible = True TxtFechaDocumento.Text = ObjIE.FechaDocumento.ToShortDateString TxtFolio.Text = ObjIE.Folio From a995cbf951f6b0ecb6e784b1ffa87d0e75363520 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Fri, 27 Jan 2023 19:25:02 -0700 Subject: [PATCH 036/103] RepServicioDomicilio mejoras, compras requeriri vinculacion de nc a facturas caundoe s acumuladora. --- App_Code/ClsContabilidad.vb | 3 +- App_Code/ClsOS.vb | 14 +- App_Code/ClsSisUsuarios.vb | 3 +- Compras/Compras.aspx.vb | 44 ++ Contabilidad2/RepBalanzaComprobacion.aspx | 38 +- Contabilidad2/RepBalanzaComprobacion.aspx.vb | 2 +- OS/RepServicioDomicilio.aspx | 67 ++- OS/RepServicioDomicilio.aspx.vb | 144 +++++- Planeacion/CatSubProyectos.aspx.vb | 13 +- RH/Reclutamiento.aspx.vb | 4 + Ventas/Clientes.aspx.vb | 518 +++++++++---------- 11 files changed, 539 insertions(+), 311 deletions(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index d61a22728..e0a31b773 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -3866,7 +3866,7 @@ Public Class ClsContabilidad Return Retorno End Function - Public Function GetBalanzaComprobacion(FechaI As Date, FechaF As Date, TipoCuentas As Integer, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer, Optional Sat As Integer = 0) As Boolean + Public Function GetBalanzaComprobacion(FechaI As Date, FechaF As Date, TipoCuentas As Integer, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer, Optional Sat As Integer = 0, Optional NivelCuenta As Integer = -1) As Boolean Dim Retorno = False @@ -3880,6 +3880,7 @@ Public Class ClsContabilidad .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@SAT", SqlDbType.Int).Value = Sat + .Add("@NivelCuenta", SqlDbType.Int).Value = NivelCuenta End With SqlAdapter.SelectCommand.CommandTimeout = 0 diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb index 04e539117..cad410eeb 100644 --- a/App_Code/ClsOS.vb +++ b/App_Code/ClsOS.vb @@ -726,7 +726,7 @@ Public Class ClsOS End Function - Public Function UpdateOrdenesServiciosFinaliza(CveOS As Integer, CveOSDetalle As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean + Public Function UpdateOrdenesServiciosFinaliza(CveOS As Integer, CveOSDetalle As Integer, CvePS As Integer, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OS_OrdenesServiciosFinalizaUpdate") @@ -736,6 +736,7 @@ Public Class ClsOS .Add("@CveOSDetalle", SqlDbType.Int).Value = CveOSDetalle .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Opcion", SqlDbType.Int).Value = Opcion End With @@ -744,7 +745,16 @@ Public Class ClsOS Retorno = True Catch ex As Exception - OnError("Ocurrió un error al guardar los cambios en La Orden de Servicio.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + + If Opcion = 1 Then + OnError("Ocurrió un error al finalizar la orden de servicio.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ElseIf Opcion = 2 Then + OnError("Ocurrió un error al cencelar la orden de servicio.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + Else + OnError("Ocurrió un error al finalizar la orden de servicio.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End If + + End Try Return Retorno diff --git a/App_Code/ClsSisUsuarios.vb b/App_Code/ClsSisUsuarios.vb index 352595214..115bacd73 100644 --- a/App_Code/ClsSisUsuarios.vb +++ b/App_Code/ClsSisUsuarios.vb @@ -1316,7 +1316,7 @@ Public Class ClsSisUsuarios Return Retorno End Function - Public Function GetPermisosPorUsuarioProcesos(CveUsuario As Integer, CvePadre As Integer, CveRol As Integer, CveModulo As Integer, CveProceso As Integer, Optional CveUsuarioActual As Integer = -1) As Boolean + Public Function GetPermisosPorUsuarioProcesos(CveUsuario As Integer, CvePadre As Integer, CveRol As Integer, CveModulo As Integer, CveProceso As Integer, Optional CveUsuarioActual As Integer = -1, Optional CveEmpresa As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Sis_PermisosPorUsuarioProcesosGet") @@ -1327,6 +1327,7 @@ Public Class ClsSisUsuarios .Add("@CveModulo", SqlDbType.Int).Value = CveModulo .Add("@CveProceso", SqlDbType.Int).Value = CveProceso .Add("@CveUsuarioActual", SqlDbType.Int).Value = CveUsuarioActual + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa 'Opcional si se envia en -1 se cargan los usuarios de la empresa de los usuarios enviados End With Try diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 004593a48..6e0bcca33 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -4198,6 +4198,13 @@ Partial Class Compras_Compras '------------------ INICIA VALIDACIONES ------------------ + If Not ValidaVincuacionNotaFactura() Then + Alert("Se requiere que la nota este aplciada a las facturas", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + + If Not ValidaSeleccionAnticipo() Then Alert("El proveedor tiene anticipos sin aplicar, favor de especiar uno.", TipoMensaje.MsgAdvertencia) Exit Sub @@ -8327,6 +8334,34 @@ Partial Class Compras_Compras End If End Sub + Private Function ValidaVincuacionNotaFactura() As Boolean + + Dim Respuesta As Boolean = False + + + If DdlTipoComprobante.SelectedValue.Contiene("NC") Then + If UsuarioActual.Empresa.Funcionalidad(531).ToString.ToEntero = 1 Then + + For Each GvRow As GridViewRow In GvFacturaNC.Rows + If GvRow.RowType = DataControlRowType.DataRow Then + If GvRow.FCCheckBox("ChkFacturaNC").Checked Then + Respuesta = True + Exit For + End If + End If + Next + + Else + Respuesta = True + End If + Else + Respuesta = True + End If + + + Return Respuesta + + End Function Private Function AjustaCombustibles() As Boolean @@ -16127,6 +16162,15 @@ Partial Class Compras_Compras End If + + If CveFactura > 0 Then + If DdlTipoComprobante.SelectedValue = "NC" Then + NCSeleccionFacturasRelacionadas(UUIDSList) + End If + End If + + + UPCondicionesPago.Update() End Sub diff --git a/Contabilidad2/RepBalanzaComprobacion.aspx b/Contabilidad2/RepBalanzaComprobacion.aspx index 3386193c7..877a335dd 100644 --- a/Contabilidad2/RepBalanzaComprobacion.aspx +++ b/Contabilidad2/RepBalanzaComprobacion.aspx @@ -30,7 +30,7 @@
    -
    +
    @@ -44,7 +44,7 @@
    -
    +
    @@ -58,7 +58,7 @@
    - + @@ -76,23 +76,31 @@

    @@ -662,6 +664,8 @@
    @@ -722,32 +726,8 @@
    -
    - -
    - -<%--
    -
    - -
    - -
    - - - - -
    -
    - - - - -
    -
    --%> - -
    + + + +
    diff --git a/OS/RepServicioDomicilio.aspx.vb b/OS/RepServicioDomicilio.aspx.vb index 42c9ac8da..b5b44b6ad 100644 --- a/OS/RepServicioDomicilio.aspx.vb +++ b/OS/RepServicioDomicilio.aspx.vb @@ -255,6 +255,22 @@ Partial Class OS_RepServicioDomicilio End Property + Private Property DTTecnicos As DataTable + Get + If ViewState("DTTecnicos") Is Nothing Then + ViewState("DTTecnicos") = New DataTable + End If + + Return DirectCast(ViewState("DTTecnicos"), DataTable) + End Get + + Set(ByVal value As DataTable) + ViewState("DTTecnicos") = value + End Set + End Property + + + Enum OSModalTipoAccion Agregar @@ -268,7 +284,7 @@ Partial Class OS_RepServicioDomicilio Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then - + CargaUsuariosTecnicos() CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyectoEtiqueta) LblSubProyectoFiltro.Text = LblSubProyectoEtiqueta.Text ' LblModalSubProyectoLabel.Text = LblSubProyectoEtiqueta.Text @@ -281,10 +297,15 @@ Partial Class OS_RepServicioDomicilio cargaDropsModal() CargaClientePublicoGeneral() + If UsuarioActual.TienePermisoProceso(348) Then DVModalAsignacion.Visible = True End If + If UsuarioActual.TienePermisoProceso(352) Then + LnkCancelarOrden.Visible = True + End If + 'RegistraScript(" PrimeraCargaCalendario = true;") @@ -293,6 +314,18 @@ Partial Class OS_RepServicioDomicilio End If End Sub + Private Sub CargaUsuariosTecnicos() + + DTTecnicos = New DataTable + + Dim ObjUsuarios As New ClsSisUsuarios + If ObjUsuarios.GetPermisosPorUsuarioProcesos(-1, -1, -1, -1, 351, UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) Then + DTTecnicos = ObjUsuarios.DtResultados.FiltraParametros(" CveProcesoUsuarioAcceso > 0") + End If + ObjUsuarios.Dispose() + + End Sub + #Region "CARGAS" #End Region @@ -323,7 +356,7 @@ Partial Class OS_RepServicioDomicilio End Sub Private Sub CargaTecnicos() - DdlTecnico.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa) + DdlTecnico.DataSource = DTTecnicos 'GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa) DdlTecnico.DataBind() DdlTecnico.Items.Insert(0, New ListItem("Todos", "-1")) End Sub @@ -352,7 +385,7 @@ Partial Class OS_RepServicioDomicilio 'ObjOS.Dispose() - DdlTecnicoAsignar.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True'") + DdlTecnicoAsignar.DataSource = DTTecnicos 'GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True'") DdlTecnicoAsignar.DataBind() DdlTecnicoAsignar.Items.Insert(0, New ListItem("Seleccione uno", "-1")) @@ -716,6 +749,9 @@ Partial Class OS_RepServicioDomicilio HLkFolio.Text = ObjOS.Folio.ToString HLkFolio.NavigateUrl = $"/OS/OrdenesServicios.aspx?CveOS={ObjOS.CveOS}" + HLKPDF.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=OS&CVEOS={0}", ObjOS.CveOS))}" + + HFCveOS.Value = ObjOS.CveOS.ToString HFCveOsDetalle.Value = ObjOS.CveOSDetalle.ToString TxtDescripcion.Text = ObjOS.Descripcion @@ -743,18 +779,31 @@ Partial Class OS_RepServicioDomicilio FechaInicioOriginal = ObjOS.FechaInicio TxtModalFechaOS.Text = ObjOS.FechaInicio.ToString.ToDate.ToString("dd/MM/yyyy HH:mm") DvModalSubProyecto.Visible = True + LblModalOStitulo.Text = "Actualizar Orden de Servicio" 'TSTimeSelector.Hour = If(ObjOS.FechaInicio.Hour > 12, ObjOS.FechaInicio.Hour - 12, ObjOS.FechaInicio.Hour) 'TSTimeSelector.Minute = ObjOS.FechaInicio.Minute 'TSTimeSelector.AmPm = If(ObjOS.FechaInicio.Hour > 12, MKB.TimePicker.TimeSelector.AmPmSpec.PM, MKB.TimePicker.TimeSelector.AmPmSpec.AM) End If + + Dim TipoEstatus As Integer = 0 + TipoEstatus = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("TipoEstatus", String.Format("CveEstatusOrdenServicio = {0}", ObjOS.CveEstatusOrdenServicio), "CveEstatusOrdenServicio ASC").ToEntero + + LnkModalAsignar.Visible = If(TipoEstatus.Contiene(5), False, True) + LnkCancelarOrden.Visible = If(TipoEstatus.Contiene(5), False, True) + + If (TipoEstatus = 5) Then + LblModalOStitulo.Text = "Orden Cancelada" + End If + RegistraScript("$('#DVModalOS').modal('show');") End If + ObjOS.Dispose() - LblModalOStitulo.Text = "Actualizar Orden de Servicio" + ElseIf False Then ' Anterior @@ -1255,7 +1304,7 @@ Partial Class OS_RepServicioDomicilio DdlTecnicoAsignarHorario.Items.Clear() - DdlTecnicoAsignarHorario.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True'") + DdlTecnicoAsignarHorario.DataSource = DTTecnicos 'GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True'") DdlTecnicoAsignarHorario.DataBind() DdlTecnicoAsignarHorario.Items.Insert(0, New ListItem("Seleccione uno", "-1")) DdlTecnicoAsignarHorario.SelectedValueExist("-1") @@ -1393,4 +1442,89 @@ Partial Class OS_RepServicioDomicilio End Sub + + Protected Sub LnkCancelarOrden_Click(sender As Object, e As EventArgs) + + + + RegistraScript($"$('#{TxtModalCancelarOrdenMotivo.ClientID}').focus();;$('#DVModalCancelacionOrden').modal('show');") + + + TxtModalCancelarOrdenMotivo.Focus() + TxtModalCancelarOrdenMotivo.Text = "" + UpmodalCacelaOrden.Update() + + + + End Sub + + + 'Protected Sub BtnGuardarEventoBitacora_Click(sender As Object, e As EventArgs) Handles BtnGuardarEventoBitacora.Click + ' Dim ObjEventoBitacora As New ClsOIEventos + + ' Dim FileExtension As String = "-1" + ' Dim filesgral As List(Of Archivo) = Anexo.getfiles().Archivos + ' Dim filemove As String = "" + + ' For Each fileItem As Archivo In filesgral + ' FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "") + ' filemove = fileItem.filename + ' Next + + ' If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveOS, -1, -1, -1, -1) Then + ' If filemove <> "" Then + ' filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) + ' End If + + ' GvEB.DataSource = ObjEventoBitacora.DtResultados + ' TxtEventoDescripcion.Text = "" + ' Anexo.Text = "[]" + ' Alert("La bitácora/observación se guardó correctamente", TipoMensaje.MsgInformacion) + ' RegistraScript("$('#ModalBitacora').modal('hide')", "hidemodal") + ' End If + ' ObjEventoBitacora.Dispose() + ' GvEB.DataBind() + + ' UPEventoBitacora.Update() + ' CargaEventoBitacora() + ' UPAddEventoBitacora.Update() + 'End Sub + + + + Protected Sub LnkmodalCancelarORdenServicio_Click(sender As Object, e As EventArgs) + + Dim TieneError As Boolean = True + + Dim CveOS As Integer = HFCveOS.Value.ToEntero + + + Dim objOS As New ClsOS + Dim ObjEventoBitacora As New ClsOIEventos(objOS.IniciaTransacSQL) + + + If objOS.UpdateOrdenesServiciosFinaliza(CveOS, -1, -1, UsuarioActual.CveEmpresa, Opcion:=2) Then 'Opcion:=2 Es para cancelar + If ObjEventoBitacora.AddEventoBitacora($"Motivo Cancelación: {TxtModalCancelarOrdenMotivo.Text.Trim}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveOS, -1, -1, -1, -1) Then + TieneError = False + End If + End If + + If TieneError Then + objOS.RollBack() + Else + objOS.Commit() + End If + + objOS.Dispose() + + + If Not TieneError Then + Alert("Orden Cancelada Correctamente", TipoMensaje.MsgInformacion, "location.reload(true);") + RegistraScript("$('#DVModalCancelacionOrden').modal('hide');") + RegistraScript("$('#DVModalFinalizarOrden').modal('hide');") + End If + + + + End Sub End Class diff --git a/Planeacion/CatSubProyectos.aspx.vb b/Planeacion/CatSubProyectos.aspx.vb index 3fcafaebd..3e06969e5 100644 --- a/Planeacion/CatSubProyectos.aspx.vb +++ b/Planeacion/CatSubProyectos.aspx.vb @@ -206,13 +206,20 @@ Partial Class CatSubProyectos End If End Sub - Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting - Dim ObjSubProyectos As New ClsSubProyectos + Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting + + Dim ObjSubProyectos As New ClsSubProyectos + + ObjSubProyectos.IniciaTransacSQL() + If ObjSubProyectos.RemoveSubProyecto(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then + ObjSubProyectos.Commit() GvDatos.EditIndex = -1 ViewState("DTSubProyectos") = ObjSubProyectos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) GlobalDTSubProyectos(UsuarioActual.CveEmpresa) = ObjSubProyectos.DtResultados - Alert("El SubProyecto se eliminó correctamente.", TipoMensaje.MsgInformacion) + Alert("El SubProyecto se eliminó correctamente.", TipoMensaje.MsgInformacion) + Else + ObjSubProyectos.RollBack() End If ObjSubProyectos.Dispose() diff --git a/RH/Reclutamiento.aspx.vb b/RH/Reclutamiento.aspx.vb index 8f96ec1af..2a4efd573 100644 --- a/RH/Reclutamiento.aspx.vb +++ b/RH/Reclutamiento.aspx.vb @@ -804,6 +804,10 @@ Partial Class RH_Reclutamiento If Not Page.IsPostBack Then + + + + CrearEstructuraTablasTemporales() DDLEstadoCivil4.DataSource = GlobalDTEstadoCivil diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index b676fa27d..da137665e 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -12,9 +12,9 @@ Imports Newtonsoft.Json Imports Newtonsoft.Json.Linq Partial Class Clientes - Inherits ClsPaginas - - 'Configuración + Inherits ClsPaginas + + 'Configuración #Region "P R O P I E D A D E S" Private Const NumeroDecimales As Integer = 2 Private CveVentaDeduccion As Integer @@ -643,21 +643,21 @@ Partial Class Clientes Set(value As String) ViewState("AdjuntoDocumentacion") = value End Set - End Property - 'Private ReadOnly Property CvePersonal As Integer - ' Get - ' If ViewState("CvePersonal") Is Nothing Then - ' Return -1 - ' Else - ' Return ViewState("CvePersonal").ToString().Toentero() - ' End If - ' End Get - 'End Property - + End Property + 'Private ReadOnly Property CvePersonal As Integer + ' Get + ' If ViewState("CvePersonal") Is Nothing Then + ' Return -1 + ' Else + ' Return ViewState("CvePersonal").ToString().Toentero() + ' End If + ' End Get + 'End Property + #End Region - - - + + + #Region " A C U M U L A D O R E S" Property CveVentaNota As Integer Get @@ -697,10 +697,10 @@ Partial Class Clientes Set(value As String) ViewState("SerieNotaAcumulador") = value End Set - End Property - + End Property + #End Region - + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then @@ -960,12 +960,12 @@ Partial Class Clientes ChkPermiso5.Enabled = False ChkPermiso6.Enabled = False - End Sub - - - + End Sub + + + #Region " PERMISOS PAGINAS " - + Private Sub MostrarTxtDireccionesClienteEnvio() If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then @@ -1002,18 +1002,18 @@ Partial Class Clientes If Not ChkEsDistribuidor.Checked Then BtnGuardar.Visible = PermiteEditar() End If - End Sub - - + End Sub + + #End Region - - + + #Region "C A R G A S" - - - - - + + + + + Private Sub CreaDtPago() DtPagos = New DataTable DtPagos.Columns.Add("CveTipoMovimiento", GetType(String)) @@ -1207,9 +1207,9 @@ Partial Class Clientes Select Case HdnCuenta.Value Case "1" - CargaDdlCuentasContables(DdlCtaContableClientes, 1)'UsuarioActual.Empresa.Funcionalidad(246).Toentero() + CargaDdlCuentasContables(DdlCtaContableClientes, 1)'UsuarioActual.Empresa.Funcionalidad(246).Toentero() Case "2" - CargaDdlCuentasContables(DdlCtaContableAnticipos, 1)' UsuarioActual.Empresa.Funcionalidad(237).Toentero() + CargaDdlCuentasContables(DdlCtaContableAnticipos, 1)' UsuarioActual.Empresa.Funcionalidad(237).Toentero() Case "3" CargaDdlCuentasContables(DdlCtaContableRetIVA, -1) Case "4" @@ -1217,11 +1217,11 @@ Partial Class Clientes Case "5" CargaDdlCuentasContables(DdlCtaContableFondoGarantia, -1) Case "6" - CargaDdlCuentasContables(DdlCtaContableCompClientes, 1)'UsuarioActual.Empresa.Funcionalidad(248).Toentero() + CargaDdlCuentasContables(DdlCtaContableCompClientes, 1)'UsuarioActual.Empresa.Funcionalidad(248).Toentero() Case "7" CargaDdlCuentasContables(DdlCtaContableCompAnticipos, -1) Case "8" - CargaDdlCuentasContables(DdlMonedaExtranjeraClientes, 1)'UsuarioActual.Empresa.Funcionalidad(247).Toentero() + CargaDdlCuentasContables(DdlMonedaExtranjeraClientes, 1)'UsuarioActual.Empresa.Funcionalidad(247).Toentero() Case "9" CargaDdlCuentasContables(DdlMonedaExtranjeraAnticipos, 1) 'UsuarioActual.Empresa.Funcionalidad(542).Toentero() End Select @@ -2148,11 +2148,11 @@ Partial Class Clientes DdlSucursalUsoCFDI.Items.Clear() DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente) DdlSucursalUsoCFDI.DataBind() - End Sub + End Sub #End Region - + #Region "V E R M Á S" - + Protected Sub BtnVerMasVentas_Click(sender As Object, e As EventArgs) If BtnVerMasVentas.Text = "Ver Más" Then CargaHistorial(-1) @@ -2182,12 +2182,12 @@ Partial Class Clientes CargaBancos(51) BtnVerMasBancos.Text = "Ver Más" End If - End Sub - + End Sub + #End Region - + #Region "B A N C O S" - 'CuentasxCobrar Activas (Pagos Recibidos) + 'CuentasxCobrar Activas (Pagos Recibidos) Private Sub CargaBancos(Optional SelectTop As Integer = 51, Optional CveClienteSucursal As Integer = -1) Dim ObjMovtos As New ClsMovimientos() 'CxC Activas @@ -2257,9 +2257,9 @@ Partial Class Clientes TxtParaMail.Text = TxtCobranzaCorreo.Text UpSendMail.Update() RegistraScript("$('#ModalDivMail').modal('show');") - End Sub + End Sub #End Region - + #Region "B T N ´ S" Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click Dim ObjClientes As New ClsClientes() @@ -2600,85 +2600,85 @@ Partial Class Clientes Dim errorContPaq As Boolean = False Dim IdContPaqi As Integer = 0 - Dim CodigoPersona As Integer = 0 - - + Dim CodigoPersona As Integer = 0 + + #Region "comentado" - 'If UsuarioActual.Empresa.Funcionalidad(522).ToString() = "1" Then - - ' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa) - - ' If ObjContPaqi.GetPersona(TxtRFC.Text) Then - - ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then - - ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").ToString().Toentero() - ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero() - - ' Dim Cont_EsProveedor As Integer = If(Boolean.Parse(ObjContPaqi.DtResultados.Rows(0)("EsProveedor").ToString()), 1, 0) - ' Dim Cont_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString() - ' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString() - - ' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then - ' errorContPaq = False - ' Else - ' errorContPaq = True - ' End If - - ' Else - ' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then - - ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString().Toentero() - ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero() - ' errorContPaq = False - ' Else - ' errorContPaq = True - ' End If - ' End If - ' End If - - - ' If Not errorContPaq Then - ' Dim IdContPaqiCliente As Integer - - ' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then - - ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then - - ' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString().Toentero() - - ' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then - ' errorContPaq = False - ' Else - ' errorContPaq = True - ' End If - ' Else - ' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then - ' errorContPaq = False - ' Else - ' errorContPaq = True - ' End If - ' End If - ' Else - ' errorContPaq = True - ' End If - ' End If - - - ' If Not errorContPaq Then - ' ObjContPaqi.Commit() - ' ObjContPaqi.Dispose() - ' Else - ' ObjContPaqi.RollBack() - ' ObjContPaqi.Dispose() - ' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError) - ' Exit Sub - ' End If - - - 'End If + 'If UsuarioActual.Empresa.Funcionalidad(522).ToString() = "1" Then + + ' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa) + + ' If ObjContPaqi.GetPersona(TxtRFC.Text) Then + + ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then + + ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").ToString().Toentero() + ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero() + + ' Dim Cont_EsProveedor As Integer = If(Boolean.Parse(ObjContPaqi.DtResultados.Rows(0)("EsProveedor").ToString()), 1, 0) + ' Dim Cont_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString() + ' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString() + + ' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then + ' errorContPaq = False + ' Else + ' errorContPaq = True + ' End If + + ' Else + ' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then + + ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString().Toentero() + ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero() + ' errorContPaq = False + ' Else + ' errorContPaq = True + ' End If + ' End If + ' End If + + + ' If Not errorContPaq Then + ' Dim IdContPaqiCliente As Integer + + ' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then + + ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then + + ' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString().Toentero() + + ' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then + ' errorContPaq = False + ' Else + ' errorContPaq = True + ' End If + ' Else + ' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then + ' errorContPaq = False + ' Else + ' errorContPaq = True + ' End If + ' End If + ' Else + ' errorContPaq = True + ' End If + ' End If + + + ' If Not errorContPaq Then + ' ObjContPaqi.Commit() + ' ObjContPaqi.Dispose() + ' Else + ' ObjContPaqi.RollBack() + ' ObjContPaqi.Dispose() + ' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError) + ' Exit Sub + ' End If + + + 'End If #End Region - + Dim LT As String = If(HDLT.Value.ToDouble <> 0, HDLT.Value, "0") Dim LG As String = If(HDLG.Value.ToDouble <> 0, HDLG.Value, "0") @@ -2933,11 +2933,11 @@ Partial Class Clientes ObjClientes.Dispose() objDoc.Dispose() RecargaGlobal() - End Sub - + End Sub + #End Region - - + + #Region "G L O B L A L" Private Sub RecargaGlobal() 'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT) @@ -2951,10 +2951,10 @@ Partial Class Clientes ' Application("GlobalDTCliente") = Objclientes.DtResultados 'End If 'Objclientes.Dispose() - End Sub + End Sub #End Region - - + + #Region "G R I D V I E W S" Protected Sub GVHistorial_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVHistorial.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -3095,11 +3095,11 @@ Partial Class Clientes End If End If - End Sub + End Sub #End Region - + #Region "R H" - + Private Sub CargaPersonalAsignado() Dim ObjPersonal As New ClsRH If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, CveCliente, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then @@ -3172,9 +3172,9 @@ Partial Class Clientes End If End If - End Sub + End Sub #End Region - + #Region "S U C U R S A L E S" Private Sub LbAgregarSucursal_Click(sender As Object, e As EventArgs) Handles LbAgregarSucursal.Click ChkEstatusSucursal.Checked = True @@ -3306,7 +3306,7 @@ Partial Class Clientes UpModalDivMapa.Update() - End Sub + End Sub #Region "G V S U C U R S A L E S" Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVSucursales.RowDataBound @@ -3428,9 +3428,9 @@ Partial Class Clientes Else CargaGrid("", 0) End If - End Sub + End Sub #End Region - + #Region "G V U S U A R I O S P O R T A L" Protected Sub GvUsuariosPortal_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvUsuariosPortal.RowCommand If e.CommandName = "RestablecerContraseña" Then @@ -3582,9 +3582,9 @@ Partial Class Clientes CargaGrid("", 1) End If - End Sub + End Sub #End Region - + #Region "O R D E N A M I E N T O" Private Sub CargaGrid(Orden As String, gvi As Integer) If gvi = 0 Then @@ -3616,12 +3616,12 @@ Partial Class Clientes UPPUsuarios.Update() End If - End Sub + End Sub #End Region - - + + #End Region - + #Region "U S U A R I O S" Protected Sub LbSolicitudPortal_Click(sender As Object, e As EventArgs) Handles LbEnviarActivacionPortal.Click Dim ObjUsuario As New ClsSisUsuarios @@ -3803,9 +3803,9 @@ Partial Class Clientes ChkPermiso5.Checked = False ChkPermiso6.Checked = False ChkPermiso7.Checked = False - End Sub + End Sub #End Region - + #Region "E V E N T O - B I T A C O R A" Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -4014,11 +4014,11 @@ Partial Class Clientes BtnActivaRegistroISR.Visible = True End If - End Sub + End Sub #End Region - + #Region " I M P R I M I R P D F" - + Protected Sub ChkAntIXCNC_CheckedChanged(sender As Object, e As EventArgs) DdlTipoDocto.ClearSelection() If ChkAntIXCNC.Checked Then @@ -4429,9 +4429,9 @@ Partial Class Clientes End Using End If - End Sub + End Sub #End Region - + #Region "E N V I O C O R R E O" Private Sub EnviaCorreo(Liga As String, LigaActivar As String) @@ -4499,11 +4499,11 @@ Partial Class Clientes a.GuardaLog() Dim Mail As New ClsSisMail() Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body) - End Sub + End Sub #End Region - + #Region " COTIZACIONES " - + Protected Sub BtnVerMasCot_Click(sender As Object, e As EventArgs) If BtnVerMasCot.Text = "Ver Más" Then CargaCotizaciones(-1) @@ -4573,11 +4573,11 @@ Partial Class Clientes HLFacturar.HRef = $"/Ventas/Ventas.aspx?CveCotizacion={e.Row.DBCampo("CveVenta")}" End If End If - End Sub + End Sub #End Region - + #Region "D I R E C C I O N E N V I O " - + Private Sub CargaCombosDirecionesClientesSAT() CargaDirClientePais() CargaDirClienteEstado() @@ -4800,12 +4800,12 @@ Partial Class Clientes End If CargaDireccionesEnvio() - End Sub - + End Sub + #End Region - + #Region " IMPORTAR SALDOS " - + Private Sub HLImportarSaldos_Click(sender As Object, e As EventArgs) Handles HLImportarSaldos.Click CargaClientesImportarSaldos() RegistraScript(String.Format("$('#{0}').modal();", "DivImportarSaldos")) @@ -4909,9 +4909,9 @@ Partial Class Clientes e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ChkSaldo(this,{0},{1});", e.Row.FCTextBox("TxtImporte").ClientID, e.Row.DBCampo("Saldo"))) e.Row.FCTextBox("TxtImporte").Attributes.Add("onKeyUp", String.Format("CambiaSaldo({0},this,{1});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"))) End If - End Sub + End Sub #End Region - + #Region "Cuentas/Equipos" Public Sub BtnAgregarCtaEquipo_Click(sender As Object, e As EventArgs) HdnModalidad.Value = "I" @@ -5499,9 +5499,9 @@ Partial Class Clientes End If Return Retorno - End Function + End Function #End Region - + #Region "GPS" Protected Sub btnCargaArrayDisp_Click(sender As Object, e As EventArgs) Handles btnCargaArrayDisp.Click If hdnArrayDispositivo.Value.Length > 0 Then @@ -5642,10 +5642,10 @@ Partial Class Clientes UpMoverDispositivo.Update() RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});") - End Sub - + End Sub + #End Region - + #Region "Sucursales" Public Sub CreaDTSucursales() @@ -5879,14 +5879,14 @@ Partial Class Clientes End If End If End If - End Sub - + End Sub + #End Region - + #Region "G P S" - - - + + + Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String) Try @@ -5957,16 +5957,16 @@ Partial Class Clientes End If ObjClientes.Dispose() - End Sub - - + End Sub + + #End Region - + #Region "C O N T R A T O S" - - - - + + + + Private Sub CargaDatosContrato() If CveCliente <= 0 Then Exit Sub @@ -6011,10 +6011,10 @@ Partial Class Clientes e.Row.CssClass = "Totales white" End If End If - End Sub - + End Sub + #End Region - + #Region "M E T O D O S " Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged If DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue <> "-1" Then @@ -6424,13 +6424,13 @@ Partial Class Clientes End If - End Sub - + End Sub + #End Region - + #Region "IMPRIMIR GVHistorial" - - + + Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs) Dim retorno As Byte() = Nothing Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") @@ -6505,18 +6505,18 @@ Partial Class Clientes ObjClientes.Dispose() Return retorno - End Function - - + End Function + + #End Region - + #Region "C O B R A N Z A" Public Sub Visitas_Click(sender As Object, e As EventArgs) RegistraScript(String.Format("$('#{0}').modal();", "DivVisitas")) - End Sub - + End Sub + #End Region - + #Region "Usuarios" Protected Sub GvUsuarios_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvUsuarios.RowDeleting Dim CveUsuario As Integer = GvUsuarios.Rows(e.RowIndex).DataKey("CveUsuario").ToEntero() @@ -6551,12 +6551,12 @@ Partial Class Clientes e.Row.Cells(5).Visible = False End If End If - End Sub + End Sub #End Region - - + + #Region "C U E N T A S - B A N C A R I A S" - + Private Sub CargaCuentasBancarias(Optional RecargaGlobal As Boolean = False) If CveCliente <= 0 Then Exit Sub @@ -6729,8 +6729,8 @@ Partial Class Clientes TxtNumeroCuenta2.Text = "" TxtConvenioCIE2.Text = "" TxtReferencia2.Text = "" - End Sub - + End Sub + #Region "GRIDVIEW - CUENTAS BANCARIAS" Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -6786,10 +6786,10 @@ Partial Class Clientes GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1, True) = Nothing End If - End Sub - + End Sub + #End Region - + Private Sub CargaPSGridCuentasBancos() If CveCliente > 0 Then GvBancosCuentas.DataSource = DTCuentasBancos @@ -6847,9 +6847,9 @@ Partial Class Clientes divestatus.Visible = True UpAddBancos.Update() RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddCuentasBancarias")) - End Sub + End Sub #End Region - + #Region "C L I E N T E S P A G O S R E A L I Z A D O S I M P R I M I R P D F/Excel" Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click GenerarPDF("Excel") @@ -6871,11 +6871,11 @@ Partial Class Clientes ImprimirPDF("Empresas\Grales\Formatos\RepClientesPagosBancos.rdlc", DTCobrosRealizados, params, "RepClientesPagosBancos_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato) - End Sub + End Sub #End Region - + #Region "VENTAS" - + Public Function imprimirFacturaVenta(CveVenta As Integer) As Byte() Dim ObjVentas As New ClsVentas Dim Vta As Modelos.Factura = Nothing @@ -7106,10 +7106,10 @@ Partial Class Clientes ObjVentas.Dispose() Return PdfFactura(Vta) - End Function - + End Function + #End Region - + #Region "COMERCIO EXTERIOR" Public Sub CargaCombosComercioExterior() @@ -7233,12 +7233,12 @@ Partial Class Clientes End Sub Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs) CargaColonia() - End Sub - + End Sub + #End Region - + #Region "D O C U M E N T A C I O N " - + Private Sub CargaDocumentacionCliente() Dim objRH As New ClsEdocumentacion() @@ -7876,12 +7876,12 @@ Partial Class Clientes RegistraScript("Download('" & baseUrl & "')") - End Sub - + End Sub + #End Region - + #Region "D O C U M E N T O S V E N T A S" - + Private Sub CargaDocumentosVenta(tCveCliente As Integer) Dim objInv As New ClsEdocumentacion @@ -8052,11 +8052,11 @@ Partial Class Clientes objRH.Dispose() - End Sub - - + End Sub + + #End Region - + #Region "PERSONA FISICA" Protected Sub LnkPersonaFisica_Click(sender As Object, e As EventArgs) RegistraScript("$('#DivModalPersonaFisica').modal();") @@ -8081,9 +8081,9 @@ Partial Class Clientes ObjCliente.Dispose() UpDatos.Update() - End Sub + End Sub #End Region - + #Region "USUARIOS PLATAFORMA CLIENTE - 6 " Protected Sub CargaUsuariosPortalCliente() Dim objUsuario As ClsSisUsuarios = New ClsSisUsuarios @@ -8092,19 +8092,19 @@ Partial Class Clientes GvUsuarios.DataBind() End If objUsuario.Dispose() - End Sub + End Sub #End Region - + #Region " DEVOLVER DINERO ANT/NC " Private Sub InicializaDevolverDinero() If UsuarioActual.TienePermisoProceso(247) Then GVAnticipos.Columns(6).Visible = True End If - End Sub + End Sub #End Region - + #Region "MODAL GRAFICA/PEDIDOS" - + Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs) If CargaDatatables() Then RegistraScript("$('#DivModalGrafica').modal('show')") @@ -8441,13 +8441,13 @@ Partial Class Clientes RegistraScript($"CargaGraficaCompratamientoSaldoMensual({Dt5.ToJson},{Dt6.ToJson.Replace($"{Chr(34)}True{Chr(34)}", "true").Replace($"{Chr(34)}False{Chr(34)}", "false")})", "55") UPModalProd.Update() - End Sub - - + End Sub + + #End Region - + #Region "TAB - COMPORTAMIENTO DE VENTAS" - + Private Sub CargaGrupo() DdlGrupo.Items.Insert(0, New ListItem("Categoria", "3")) DdlGrupo.Items.Insert(1, New ListItem("Clasificacion", "4")) @@ -8631,12 +8631,12 @@ Partial Class Clientes ObjVentas.Dispose() GvComportamientoVenta.DataBind() UpDatosComportamientoVenta.Update() - End Sub - + End Sub + #End Region - + #Region "DISPOSITIVOS" - + Protected Sub LnkMoverDispositivo_Click(sender As Object, e As EventArgs) Dim CveDispositivo As Integer = HdnCveDispositivoMover.Value.ToEntero() Dim CveCliente As Integer = DdlClienteDispositivo.SelectedValue.ToEntero() @@ -8674,10 +8674,10 @@ Partial Class Clientes CargaEventoBitacora() NombreDispositivo = "" RegistraScript("$('#DivMoverDispositivo').modal('hide');") - End Sub - + End Sub + #End Region - + #Region "CRM" Protected Sub CargaDatosCRM() Dim ObjCRM = New ClsCRM() @@ -8777,9 +8777,9 @@ Partial Class Clientes Alert("Se Unificó correctamente al Cliente con la Empresa CRM.") End If End If - End Sub + End Sub #End Region - + #Region "PORCENTAJE PRECIO DE MARCAS" Private Sub LnkPorcentajeMarcas_Click(sender As Object, e As EventArgs) Handles LnkPorcentajeMarcas.Click RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajeMarcas")) @@ -9004,9 +9004,9 @@ Partial Class Clientes ObjPS.Dispose() - End Sub + End Sub #End Region - + #Region "PORCENTAJE PRECIO DE PRODUCTOS" Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios")) @@ -9242,12 +9242,12 @@ Partial Class Clientes Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs) DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero(), DdlProducto2) - End Sub + End Sub #End Region - + #Region " A C U M U L A D O R E S" - - + + Protected Sub LnkFacturaUsadosCargos_Click(sender As Object, e As EventArgs) 'CveVentaNota = 0 @@ -9890,11 +9890,11 @@ Partial Class Clientes ' ObjFactura.Timbre = PreParaTimbre(ObjFactura) - End Sub - - + End Sub + + #End Region - + #Region "C L I E N T E S G R I D S I M P R I M I R P D F/Excel" Private Sub LnkCotizacionesPDF_Click(sender As Object, e As EventArgs) Handles LnkCotizacionesPDF.Click ImprimeGridsProveedores("PDF", DtCotizaciones, "RepClientesCotizaciones") From cc7782e9786875dea8c4147667d33539f5495543 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 28 Jan 2023 07:09:26 -0700 Subject: [PATCH 037/103] =?UTF-8?q?--globldttama=C3=B1os?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 6f69118b0..89cb8d03a 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -13278,7 +13278,7 @@ Partial Class Ventas Else - Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CvePSCargo={CvePSCargo}") + Dim DrTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CvePSCargo={CvePSCargo}") If DrTamanio IsNot Nothing Then 'OBTIENE LOS IMPORTES ORIGINALES EN BASE A LO QUE HABIA EN EL MOVIMIENTO @@ -29034,7 +29034,7 @@ Partial Class Ventas Dim CvePSCargo As Integer = RowUsado("CvePS").ToString().ToEntero() Dim Obs = "" 'SI ES ACUMULADOR LAS OBSERVACIOENS DEBEN SER EL NOMBRE DEL ACUMULADOR - If GlobalDTAcumTamaños().FiltroPrimero($"CvePSCargo = {CvePSCargo}") IsNot Nothing Then + If GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CvePSCargo = {CvePSCargo}") IsNot Nothing Then Obs = RowUsado("CodigoPS").ToString() Else Obs = RowUsado("Obs").ToString() @@ -29122,7 +29122,7 @@ Partial Class Ventas Dim CvePSCargo As Integer = RowUsado("CvePS").ToString().ToEntero() Dim Obs = "" 'SI ES ACUMULADOR LAS OBSERVACIOENS DEBEN SER EL NOMBRE DEL ACUMULADOR - If GlobalDTAcumTamaños().FiltroPrimero($"CvePSCargo = {CvePSCargo}") IsNot Nothing Then + If GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CvePSCargo = {CvePSCargo}") IsNot Nothing Then Obs = RowUsado("CodigoPS").ToString() End If 'SI TIENE BCI EN LAS OBSERVACIONES AGREGARLO A LA FACTURA @@ -29307,7 +29307,7 @@ Partial Class Ventas For Each RowCargo As DataRow In TmpDT.FiltraParametros("EsCargo = True", Orderby:="PU").Rows Dim CantidadCargo = RowCargo("Cantidad").ToString().ToDecimal() - Dim ImportePU As Decimal = GlobalDTAcumTamaños().FiltroPrimeroValor("Bonificacion", $"CvePSCargo={RowCargo("CvePS")}").ToDecimal() + Dim ImportePU As Decimal = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Bonificacion", $"CvePSCargo={RowCargo("CvePS")}").ToDecimal() Dim TotalCalculableImpuestosCargo As Decimal = (CantidadCargo * ImportePU) Dim TotalCargo As Decimal = TotalCalculableImpuestosCargo + (TotalCalculableImpuestosCargo * RowCargo("PorcentajeIVA").ToString().ToDecimal).RoundSQL(2) @@ -29404,7 +29404,7 @@ Partial Class Ventas Dim CvePSCargo As Integer = RowUsado("CvePS").ToString().ToEntero() Dim Obs = "" 'SI ES ACUMULADOR LAS OBSERVACIOENS DEBEN SER EL NOMBRE DEL ACUMULADOR - If GlobalDTAcumTamaños().FiltroPrimero($"CvePSCargo = {CvePSCargo}") IsNot Nothing Then + If GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CvePSCargo = {CvePSCargo}") IsNot Nothing Then Obs = RowUsado("CodigoPS").ToString() 'Else ' Obs = RowUsado("Obs").ToString() @@ -31249,7 +31249,7 @@ Partial Class Ventas Private Function CalculaUsadosCotizacion(ByRef SbVentasDetalle As StringBuilder, ByVal DTSeleccionadas As DataTable, ByVal DtCotizaciones As DataTable) As List(Of MVentaDetalleCotizacion) Dim Retorno As New List(Of MVentaDetalleCotizacion) - Dim DTTamanios As DataTable = GlobalDTAcumTamaños() + Dim DTTamanios As DataTable = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa) Dim DTCvePSCostos As DataTable = DTTamanios.FiltraParametros("", "", {"CvePSCargo"}) @@ -32835,7 +32835,7 @@ Partial Class Ventas Exit Sub End If - Dim DTTamanios As DataTable = GlobalDTAcumTamaños() + Dim DTTamanios As DataTable = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa) Dim DTCvePSCostos As DataTable DTCvePSCostos = DTTamanios.FiltraParametros("", "", {"CvePSCargo"}) @@ -33001,7 +33001,7 @@ Partial Class Ventas If ClienteEsDistribuidor AndAlso Not factura.EsGarantia Then For Each drow As DataRow In factura.DtDetalle.Rows If drow("CveTamaño").ToString.ToEntero > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={drow("CveTamaño").ToString.ToEntero}") + Dim DrTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CveTamaño={drow("CveTamaño").ToString.ToEntero}") If DrTamanio IsNot Nothing Then Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal() Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal() From 1d3fea7607dfd0ae98e0459a8ff2bf5014a2fc29 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 28 Jan 2023 07:10:15 -0700 Subject: [PATCH 038/103] --mejora pago prepolizaventa --- App_Code/ClsPaginas.vb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 30f81f474..59b3e072a 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -9888,6 +9888,8 @@ Public Class ClsPaginas Pago.CveConceptoPago = If(Pago.CveConceptoPago = -1, 17, Pago.CveConceptoPago) 'si viene en parametro lo toma com primera opcion, sino el 17 If CompraActual.CveTipoConceptoProveedor = 2 Then Pago.CveConceptoPago = 308 'cuando es acreedor + ' + If Pago.CveConceptoPago = 272 And CompraActual.CveMoneda = 2 Then Pago.CveConceptoPago = 304 'pago nota de crédito ME If CompraActual.CveMoneda <> 1 Then Select Case Pago.CveConceptoPago Case 17 : Pago.CveConceptoPago = 312 @@ -10558,14 +10560,13 @@ Public Class ClsPaginas 'si tiene otros gastos/ingresos ImporteMovimiento = Pago.OtroGastoIngreso If Not ErrorMovtos AndAlso ImporteMovimiento <> 0 Then - Dim tOtCveCon As Integer = 211 - Dim tOtTipoMovto As Boolean = False + Dim tOtCveCon As Integer = 78 + Dim tOtTipoMovto As Boolean = True If ImporteMovimiento < 0 Then - tOtTipoMovto = True : tOtCveCon = 78 + tOtTipoMovto = False : tOtCveCon = 211 ImporteMovimiento = Math.Abs(ImporteMovimiento) End If If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tOtTipoMovto, ImporteMovimiento, ImporteMovimiento, tOtCveCon, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveSubProyecto:=VentaActual.CveSubProyecto, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True - End If If Not ErrorMovtos AndAlso TCValuacionVenta <> TCValuacionPago Then From 40063d03fdff9208a6fbdfc86a25020004983934 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 28 Jan 2023 07:10:42 -0700 Subject: [PATCH 039/103] =?UTF-8?q?extensi=C3=B3n=20nueva=20para=20dropdow?= =?UTF-8?q?nlist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/modExtensiones.vb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index b57e902d4..06ff258ec 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -3468,6 +3468,22 @@ Namespace Extensiones End Sub + Public Sub SelectedTextExist(Obj As DropDownList, Valor As Object) + + If (Obj.Items.FindByText(Valor.ToString()) IsNot Nothing) Then Obj.SelectedValue = Obj.Items.FindByText(Valor.ToString()).Value + + End Sub + + Public Sub SelectedTextLikeIfExist(ByRef Rbl As DropDownList, ByRef Valor As String) + If Valor <> "" Then + For Each item As ListItem In Rbl.Items + If item.Text.Contains(Valor) Then + item.Selected = True + End If + Next + End If + End Sub + Public Sub SelectedValuesIfExist(ByRef Rbl As RadioButtonList, ByRef Value As String) Try Dim valores As String() = Value.Split(CType(",", Char())) From 4391f467279a590d4ec92bb821ce59c129521ad0 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 28 Jan 2023 07:10:53 -0700 Subject: [PATCH 040/103] nueva liga --- Contabilidad/RegPrePolizaS.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 1d6d0e9a1..748b09afa 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -585,7 +585,7 @@ Partial Class ContabilidadC_RegPrePolizaS Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero If CveConceptoContable.Contiene(1, 2, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 272, 150, 251, 301) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta")) - If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra")) + If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 341, 342, 304, 272, 259) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra")) If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen")) If CveConceptoContable.Contiene(30, 204, 66, 92) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE")) From e9031fd3bceabd02e737e9e27049b6f4c500444a Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 28 Jan 2023 08:09:33 -0700 Subject: [PATCH 041/103] -- que no pierda seleccion de NC, al cambiar de NC a DEV o viceversa --- Compras/Compras.aspx.vb | 206 ++++------------------------------------ 1 file changed, 16 insertions(+), 190 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 6e0bcca33..c930cd759 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1639,7 +1639,7 @@ Partial Class Compras_Compras NCSeleccionFacturasRelacionadas(UUIDSList) End If - If CveFactura > 0 AndAlso Serie Isnot nothing AndAlso Serie.ToUpper = "NL" AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + If CveFactura > 0 AndAlso Serie IsNot Nothing AndAlso Serie.ToUpper = "NL" AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then EsDevolucionApoyoLogistico = True DdlTipoComprobante.Items.Clear() DdlTipoComprobante.Items.Add(New ListItem("Devolución", "DEV")) @@ -4194,23 +4194,18 @@ Partial Class Compras_Compras Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click - - '------------------ INICIA VALIDACIONES ------------------ - If Not ValidaVincuacionNotaFactura() Then + If Not ValidaVinculacionNotaFactura() Then Alert("Se requiere que la nota este aplciada a las facturas", TipoMensaje.MsgAdvertencia) Exit Sub End If - - If Not ValidaSeleccionAnticipo() Then Alert("El proveedor tiene anticipos sin aplicar, favor de especiar uno.", TipoMensaje.MsgAdvertencia) Exit Sub End If - Dim TotalRealDevolucion As Decimal = 0 Dim EstatusCredito As Integer = 0 @@ -5567,11 +5562,8 @@ Partial Class Compras_Compras Dim indice = 0 Dim ImporteConcepto As Decimal = 0 - - If DdlTipoComprobante.SelectedValue = "Fac" Then - For Each tCveAlmacen As Integer In ListAlmacenes If GvInv.Rows(indice).FCDropDownList("DdlRecibirInv").SelectedValue = "1" Then Continue For @@ -5643,17 +5635,17 @@ Partial Class Compras_Compras ImporteConcepto = If(DdlMoneda.SelectedValue.ToEntero = 1, PUInv, PUInv * TipoCambioGuardar) - If(DdlMoneda.SelectedValue.ToEntero = 1, tDescuento, tDescuento * TipoCambioGuardar) 'si no es por serie lote ImporteConcepto = If(UsuarioActual.Empresa.UsaAC, ImporteConcepto * IVA, ImporteConcepto) - If Dr("CveAlmacen").ToString.ToEntero = tCveAlmacen Then - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, CantidadInv, CveUnidad, Dr("CvePS").ToString.ToEntero, ImporteConcepto, -1, PUTC:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, Dr("PU").ToString.ToDecimal), CostoIndirecto:=CostoIndirecto, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then - ErrorMovInv = True - Exit For - End If + If Dr("CveAlmacen").ToString.ToEntero = tCveAlmacen Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, CantidadInv, CveUnidad, Dr("CvePS").ToString.ToEntero, ImporteConcepto, -1, PUTC:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, Dr("PU").ToString.ToDecimal), CostoIndirecto:=CostoIndirecto, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then + ErrorMovInv = True + Exit For End If - End If + End If - i = i + 1 + + i = i + 1 contadorAlamcen = contadorAlamcen + 1 Next End If @@ -6099,16 +6091,10 @@ Partial Class Compras_Compras ErrorPrepoliza = True End If - - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, importeMN, 41, Referencia, Concepto, CtaProveedorAcreedores, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If - - - - If importeMovimiento <> 0 Then Dim Pago As New CompraPago Pago.ImportePago = importeMovimiento @@ -7113,75 +7099,6 @@ Partial Class Compras_Compras AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) End If Next - - 'If RBLTipoDeudor.SelectedValue.ToEntero = 1 Then - ' For Each rw As GridViewRow In GvDeudores.Rows - ' If rw.FCCheckBox("Chk").Checked Then - - ' importeMovimiento = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal - ' OtrosGastosIngresos = rw.FCTextBox("TxtDeudoresOtrosGastosIngresos").Text.ToDecimal - - ' importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL - ' Dim OtrosGastosIngresosMN As Decimal = (OtrosGastosIngresos * tipoCambioActual * Multiplicador).RoundSQL - ' IdCtaContable = CtaProveedorDeudores - ' Dim tCveProveedor As Integer = rw.DataKey("CveProveedor").ToEntero - - ' 'Conta ContPAQ - ' If IdCtaContable = 0 Then - ' CuentasContablesInvalidas.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) - ' idCuentaContabilizacion = 0 - ' End If - - - ' If OtrosGastosIngresos = 0 Then - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=tCveProveedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then - ' ErrorPrepoliza = True : Exit For - ' End If - ' Else - - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, (importeMovimiento + OtrosGastosIngresos), Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=tCveProveedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then - ' ErrorPrepoliza = True : Exit For - ' End If - ' End If - - - - ' Dim Pago As New CompraPago With {.ImportePago = importeMovimiento, .CveIE = CveIE, .CveMonedaPago = rw.DataKey("CveMoneda").ToEntero} - ' AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) - ' End If - ' Next - 'Else - ' For Each rw As GridViewRow In GvDeudores.Rows - ' If rw.FCCheckBox("Chk").Checked Then - ' importeMovimiento = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal - ' OtrosGastosIngresos = rw.FCTextBox("TxtDeudoresOtrosGastosIngresos").Text.ToDecimal - - ' importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL - ' Dim OtrosGastosIngresosMN As Decimal = (OtrosGastosIngresos * tipoCambioActual * Multiplicador).RoundSQL - - ' IdCtaContable = CtaProveedorDeudores - ' Dim tCveProveedor As Integer = rw.DataKey("CveProveedor").ToEntero - - ' If OtrosGastosIngresos = 0 Then - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 254, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=tCveProveedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then - ' ErrorPrepoliza = True - ' Exit For - ' End If - ' Else - ' adasdasdasd - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, (importeMovimiento + OtrosGastosIngresos), Referencia, 254, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=tCveProveedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then - ' ErrorPrepoliza = True - ' Exit For - ' End If - ' End If - - - ' Dim Pago As New CompraPago With {.ImportePago = importeMovimiento, .CveIE = CveIE, .CveMonedaPago = rw.DataKey("CveMoneda").ToEntero} - ' AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) - ' End If - ' Next - 'End If - importeMovimiento = 0 OtrosGastosIngresos = 0 @@ -7254,60 +7171,6 @@ Partial Class Compras_Compras ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) - ''CveCon = 272 - '''PAGO A FACTURA POR NC - 'If TipoCambioFactura > 1 Then CveCon = 304 - 'If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, CveCon, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then - - ' Dim CveConceptoContableComplementaria As Integer = 206 - ' If Gvr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor - - ' IdCtaContable = CtaProveedorComplementaria - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then - ' ErrorPrepoliza = True - ' Exit For - ' End If - 'Else - ' ErrorPrepoliza = True - ' Exit For - 'End If - - 'importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador - 'IdCtaContable = CtaProveedorExtranjera - 'If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then - ' IdCtaContable = CtaProveedorComplementaria - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMNNC - importeMovimientoNC, Referencia, 235, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then - ' ErrorPrepoliza = True - ' Exit For - ' End If - 'Else - ' ErrorPrepoliza = True - ' Exit For - ' Exit For - 'End If - - '' FLUCTUACION CAMBIARIA - 'If tipoCambioActual <> TipoCambioFactura AndAlso Not ChkNCInvNC.Checked Then ' que no se esté afectando mercancía en tránsto - ' importeMovimiento = (importeMovimientoNC * TipoCambioFactura) - (importeMovimientoNC * tipoCambioActual) - - ' If importeMovimiento > 0 Then - ' ConceptoContable = 64 : TipoMovimiento = True - ' IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria - ' ElseIf importeMovimiento < 0 Then - ' ConceptoContable = 65 : TipoMovimiento = False - ' IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria - ' End If - - ' importeMovimiento = importeMovimiento.Abs.RoundSQL() - ' importeMN = importeMovimiento - ' If importeMovimiento <> 0 Then - - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then - ' ErrorPrepoliza = True - ' Exit For - ' End If - ' End If - 'End If End If Next @@ -8334,11 +8197,9 @@ Partial Class Compras_Compras End If End Sub - Private Function ValidaVincuacionNotaFactura() As Boolean + Private Function ValidaVinculacionNotaFactura() As Boolean Dim Respuesta As Boolean = False - - If DdlTipoComprobante.SelectedValue.Contiene("NC") Then If UsuarioActual.Empresa.Funcionalidad(531).ToString.ToEntero = 1 Then @@ -8350,15 +8211,12 @@ Partial Class Compras_Compras End If End If Next - Else Respuesta = True End If Else Respuesta = True End If - - Return Respuesta End Function @@ -10075,19 +9933,14 @@ Partial Class Compras_Compras nodeCFDIRelacionados = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces) If nodeCFDIRelacionados IsNot Nothing Then - For Each CFDIRelacionados As XmlNode In nodeCFDIRelacionados UUIDSLista.Add("" & CFDIRelacionados.Attributes("UUID").Value.ToString & "") Next - End If - UUIDSList = UUIDSLista End If - - Dim node As XmlNode node = XMLDoc.SelectSingleNode(String.Format("//{0}:Emisor", Prefijo), namespaces) @@ -10117,7 +9970,6 @@ Partial Class Compras_Compras End If End If - node = XMLDoc.SelectSingleNode(String.Format("//{0}:Impuestos", Prefijo), namespaces) If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then Dim nodeRetenciones As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:Comprobante/{0}:Impuestos/{0}:Retenciones/{0}:Retencion", Prefijo), namespaces) @@ -10128,9 +9980,7 @@ Partial Class Compras_Compras For Each retencion As XmlNode In nodeRetenciones If retencion.Attributes("Impuesto").Value = "002" Then RetencionIVA += retencion.Attributes("Importe").Value.ToDecimal - If retencion.Attributes("Impuesto").Value = "001" Then RetencionISR += retencion.Attributes("Importe").Value.ToDecimal - Next GvOC1.Columns(6).Visible = True GvOC2.Columns(4).Visible = True @@ -10138,9 +9988,7 @@ Partial Class Compras_Compras For Each retencion As XmlNode In nodeRetenciones If retencion.Attributes("impuesto").Value = "IVA" Then RetencionIVA += retencion.Attributes("importe").Value.ToDecimal - If retencion.Attributes("impuesto").Value = "ISR" Then RetencionISR += retencion.Attributes("importe").Value.ToDecimal - Next End If SumaTotalRetenciones += RetencionIVA @@ -10157,23 +10005,15 @@ Partial Class Compras_Compras If traslado.Attributes("Impuesto").Value = "002" Then TrasladoIVA += traslado.Attributes("Importe").Value.ToDecimal If traslado.Attributes("Impuesto").Value = "003" Then TrasladoIEPS += traslado.Attributes("Importe").Value.ToDecimal End If - - - Next - Else For Each traslado As XmlNode In nodeTraslados - - If traslado.Attributes("Importe") IsNot Nothing Then If traslado.Attributes("impuesto").Value = "IVA" Then TrasladoIVA += traslado.Attributes("importe").Value.ToDecimal If traslado.Attributes("impuesto").Value = "IEPS" Then TrasladoIEPS += traslado.Attributes("importe").Value.ToDecimal End If - - Next End If @@ -10199,9 +10039,7 @@ Partial Class Compras_Compras OtrosImpuestos = ValorXML(node, "TotaldeTraslados", "0").ToDecimal '2022.06.04-- se quitan los datos de retenciones de impuestos locales, generan conflicto. RMF 'OtrosImpuestosRetenciones = ValorXML(node, "TotaldeRetenciones", "0").ToDecimal - End If - End If End Sub @@ -16133,7 +15971,6 @@ Partial Class Compras_Compras Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs) - If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then If DdlTipoComprobante.SelectedValue = "NC" Then @@ -16155,22 +15992,12 @@ Partial Class Compras_Compras DivReembolso.Visible = False RBLPago.Items(2).Enabled = False UpPS.Update() + If CveFactura > 0 Then NCSeleccionFacturasRelacionadas(UUIDSList) End If - - - End If - If CveFactura > 0 Then - If DdlTipoComprobante.SelectedValue = "NC" Then - NCSeleccionFacturasRelacionadas(UUIDSList) - End If - End If - - - UPCondicionesPago.Update() End Sub @@ -19929,7 +19756,6 @@ Partial Class Compras_Compras End If Next - End If End If @@ -20578,15 +20404,15 @@ Partial Class Compras_Compras End Function - Private Sub NCSeleccionFacturasRelacionadas(UUIDSListRelacioandos As List(Of String)) + Private Sub NCSeleccionFacturasRelacionadas(UUIDSListRelacionados As List(Of String)) - If UUIDSListRelacioandos.Count > 0 Then + If UUIDSListRelacionados.Count > 0 Then Dim SaldoNota As Decimal = TxtTotal.Text.ToDecimal Dim SaldoNotaPorAplicar As Decimal = SaldoNota Dim CountAplicacion As Integer = 0 Dim sbNoencontrados As New StringBuilder - For Each UUID As String In UUIDSListRelacioandos + For Each UUID As String In UUIDSListRelacionados UUID = UUID.ToUpper Dim UUIDEncontrado As Boolean = False @@ -20602,7 +20428,7 @@ Partial Class Compras_Compras Dim TeminarAmortizacion As Boolean = False - For Each UUID As String In UUIDSListRelacioandos + For Each UUID As String In UUIDSListRelacionados For Each GvRow As GridViewRow In GvFacturaNC.Rows @@ -20652,7 +20478,7 @@ Partial Class Compras_Compras MsgSalida = $"Folios Fiscales no encontradas o sin saldo: {sbNoencontrados }

    " End If - MsgSalida = $"{MsgSalida} Se seleccionó $ {(SaldoNota - SaldoNotaPorAplicar).FormatoNumero} de $ {SaldoNota.FormatoNumero} a {CountAplicacion} factura {If(CountAplicacion > 0, "s", "")}." + MsgSalida = $"{MsgSalida} Se seleccionó $ {(SaldoNota - SaldoNotaPorAplicar).FormatoNumero} de $ {SaldoNota.FormatoNumero} a {CountAplicacion} factura{If(CountAplicacion > 1, "s", "")}." Alert(MsgSalida, TipoMensaje) From 7e4a52e5b22e22390a4bdd2937e6153a1e4c5837 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 28 Jan 2023 10:31:06 -0700 Subject: [PATCH 042/103] -- parametro objetoimpuesto --- Ventas/ProductosServicios.aspx.vb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 906b22afb..95cffc511 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -3083,7 +3083,7 @@ Partial Class ProductosyServicios End If If Agregar Then - If Not ObjPS.AddPS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, txtcodigo2.text.trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, + If Not ObjPS.AddPS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, TxtCodigo2.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, DdlProveedor.txtValue.Value.ToEntero, True, ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, CveEmpresaFranquicia, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, @@ -3092,6 +3092,7 @@ Partial Class ProductosyServicios PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero, CveClasificacionDetalle:=CveTipo, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, CveModelo:=CveModelo, CveMedida:=CveMedida, CveRinTamaño:=CveRin, ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, + CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) > 0 Then 'Alert(String.Format("Error al agregar el nuevo producto en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa"))) @@ -3102,7 +3103,7 @@ Partial Class ProductosyServicios If ObjPS.GetPS(-1, -1, CveEmpresaFranquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper) Then Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS", String.Format(" Codigo = '{0}'", TxtCodigo.Text.Trim.ToUpper)).ToEntero() - If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, txtcodigo2.text.trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, + If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, TxtCodigo2.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, @@ -3111,6 +3112,7 @@ Partial Class ProductosyServicios CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveClasificacionDetalle:=CveTipo, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, CveModelo:=CveModelo, CveMedida:=CveMedida, CveRinTamaño:=CveRin, ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, + CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) Then From fc994d95431a50bae50eac708a89aa943a324398 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 28 Jan 2023 10:42:18 -0700 Subject: [PATCH 043/103] =?UTF-8?q?--=20parametro=20cveempresa=20en=20comp?= =?UTF-8?q?radetalle=20--=20limpieza=20de=20codigo=20muy=20posiblemente=20?= =?UTF-8?q?duplicado.=20--=20optmimzaci=C3=B3n=20de=20gvantcipo=5Frowdatab?= =?UTF-8?q?ound?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsCompras.vb | 3 +- Compras/Compras.aspx.vb | 114 +++++++++++++++++++----------------- Compras/Proveedores.aspx.vb | 2 +- 3 files changed, 62 insertions(+), 57 deletions(-) diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index e92fdf12d..4eaf92097 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -173,12 +173,13 @@ Public Class ClsCompras Return Retorno End Function - Public Function GetCompraDetalle(CveCompra As Integer) As Boolean + Public Function GetCompraDetalle(CveCompra As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_CompraDetalleGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveCompra", SqlDbType.Int).Value = CveCompra + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index c930cd759..f24ff7b5b 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1462,9 +1462,7 @@ Partial Class Compras_Compras BtnGuardar.Enabled = False 'TdIVA.Visible = True 'DdlIVA.Enabled = False - CargaGvBitacora() - InventarioMov() - HabilitaNCInv() + DivConsignaciones.Visible = False ' 2018/05/25 - Muestra Boton Agregar Guia @@ -2830,11 +2828,10 @@ Partial Class Compras_Compras ImgDownPDF.Visible = True : ImgDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Fact&EXT=pdf&CveFactura={0}&RFC={1}", dr("CveFactura"), dr("RFC").ToString.Replace("&", "%26%")))) End If - TxtRembolsoNumero.Enabled = If(IdPoliza > 0, False, True) 'CargaDetalle - If ObjCompra.GetCompraDetalle(CveCompra) Then + If ObjCompra.GetCompraDetalle(CveCompra, UsuarioActual.CveEmpresa) Then TmpDT = ObjCompra.DtResultados TmpDTOriginal = ObjCompra.DtResultados.Copy @@ -2902,61 +2899,61 @@ Partial Class Compras_Compras CalculaTotales(True) - If UsuarioActual.Empresa.UsaInventarios Then - DtInv = TmpDT.FiltraParametros(String.Format("CveTipoPS = 2")).Copy + 'If UsuarioActual.Empresa.UsaInventarios Then + ' DtInv = TmpDT.FiltraParametros(String.Format("CveTipoPS = 2")).Copy - If dr("Inventario").ToString = "1" Then + ' If dr("Inventario").ToString = "1" Then - CveMovimientoAlmacen = dr("CveMovimiento").ToString.ToEntero + ' CveMovimientoAlmacen = dr("CveMovimiento").ToString.ToEntero - Dim Inv As New ClsInventarios - If Inv.GetMovimientosDetalle(dr("CveMovimiento").ToString.ToEntero, UsuarioActual.CveEmpresa) Then - 'Dim TempParametros = Encripta(String.Format("OP=Alm&CveMovimiento={0}", dr("CveMovimiento"))) - 'ImgImprimirAlmacen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", TempParametros) + ' Dim Inv As New ClsInventarios + ' If Inv.GetMovimientosDetalle(dr("CveMovimiento").ToString.ToEntero, UsuarioActual.CveEmpresa) Then + ' 'Dim TempParametros = Encripta(String.Format("OP=Alm&CveMovimiento={0}", dr("CveMovimiento"))) + ' 'ImgImprimirAlmacen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", TempParametros) - ImgImprimirAlmacen.Visible = True - ImgImprimirAlmacen.NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", dr("CveMovimiento")) + ' ImgImprimirAlmacen.Visible = True + ' ImgImprimirAlmacen.NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", dr("CveMovimiento")) - Dim drt As DataRow - 'actualizo el almacen - For Each dri As DataRow In DtInv.Rows + ' Dim drt As DataRow + ' 'actualizo el almacen + ' For Each dri As DataRow In DtInv.Rows - drt = Inv.DtResultados.FiltroPrimero(String.Format("CvePS = {0} AND Cantidad = {1}", dri("CvePS"), dri("Cantidad"))) - If drt IsNot Nothing Then - Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dri("Consec").ToString.ToEntero}")(0) 'Charlie - TmpDr("CveAlmacen") = drt("CveAlmacen") 'Charlie + ' drt = Inv.DtResultados.FiltroPrimero(String.Format("CvePS = {0} AND Cantidad = {1}", dri("CvePS"), dri("Cantidad"))) + ' If drt IsNot Nothing Then + ' Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dri("Consec").ToString.ToEntero}")(0) 'Charlie + ' TmpDr("CveAlmacen") = drt("CveAlmacen") 'Charlie - dri("CveAlmacen") = drt("CveAlmacen") + ' dri("CveAlmacen") = drt("CveAlmacen") - End If + ' End If - Next + ' Next - End If + ' End If - 'Proceso Super Tramposo de Charlie - If Inv.GetMovimientosDetalle(dr("CveMovimiento").ToString.ToEntero, UsuarioActual.CveEmpresa, CveCompra:=-123) Then - Dim drt As DataRow - For Each dri As DataRow In DtInv.Rows - drt = Inv.DtResultados.FiltroPrimero(String.Format("CvePS = {0} AND Cantidad = {1}", dri("CvePS"), dri("Cantidad"))) - If drt IsNot Nothing Then - Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dri("Consec").ToString.ToEntero}")(0) - TmpDr("CveAlmacen") = drt("CveAlmacen") - End If - Next - End If + ' ''Proceso Super Tramposo de Charlie + ' 'If Inv.GetMovimientosDetalle(dr("CveMovimiento").ToString.ToEntero, UsuarioActual.CveEmpresa, CveCompra:=-123) Then + ' ' Dim drt As DataRow + ' ' For Each dri As DataRow In DtInv.Rows + ' ' drt = Inv.DtResultados.FiltroPrimero(String.Format("CvePS = {0} AND Cantidad = {1}", dri("CvePS"), dri("Cantidad"))) + ' ' If drt IsNot Nothing Then + ' ' Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dri("Consec").ToString.ToEntero}")(0) + ' ' TmpDr("CveAlmacen") = drt("CveAlmacen") + ' ' End If + ' ' Next + ' 'End If - Inv.Dispose() + ' Inv.Dispose() - End If + ' End If - CargaGvInv() + ' CargaGvInv() - 'Ocultamos "Recibir Aqui" - GvInv.Columns(6).Visible = False - GvInv.Columns(7).Visible = False + ' 'Ocultamos "Recibir Aqui" + ' GvInv.Columns(6).Visible = False + ' GvInv.Columns(7).Visible = False - End If + 'End If End If DdlTipoComprobante.Enabled = False @@ -3204,6 +3201,9 @@ Partial Class Compras_Compras End If End If CargaComplementosPago() + CargaGvBitacora() + InventarioMov() + HabilitaNCInv() Else Alert("La compra solicitada no se encontró. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) @@ -10080,12 +10080,14 @@ Partial Class Compras_Compras e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("chkAnt(this,{0},{1},{2});", e.Row.FCTextBox("TxtAnticipo").ClientID, e.Row.DBCampo("Saldo"), If(CveCompra > 0, Saldo, ImporteAmortizacion), e.Row.DBCampo("CveMoneda").ToEntero, If(Not e.Row.DBCampo("TCCompra").ToDouble > 1, GlobalTipoCambio(e.Row.DBCampo("Fecha").ToDate), e.Row.DBCampo("TCCompra").ToDouble), DdlMoneda.SelectedValue.ToEntero)) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO + Dim tTCFecha As Double = If(Not e.Row.DBCampo("TCCompra").ToDouble > 1, GlobalTipoCambio(e.Row.DBCampo("Fecha").ToDate), e.Row.DBCampo("TCCompra").ToDouble) + If UsuarioActual.Empresa.CveEmpresa.Contiene(13, 83) Then e.Row.FCTextBox("TxtAnticipo").Attributes.Add("onKeyUp", String.Format("FnCambiaAnt({0},this,{1},{2},{3},{4},{5},{6});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), If(CveCompra > 0, Saldo, ImporteAmortizacion), e.Row.DBCampo("CveMoneda").ToEntero, - If(Not e.Row.DBCampo("TCCompra").ToDouble > 1, GlobalTipoCambio(e.Row.DBCampo("Fecha").ToDate), e.Row.DBCampo("TCCompra").ToDouble), + tTCFecha, DdlMoneda.SelectedValue.ToEntero, e.Row.FCTextBox("TxtComision").ClientID)) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO @@ -10094,7 +10096,7 @@ Partial Class Compras_Compras e.Row.DBCampo("Saldo"), If(CveCompra > 0, Saldo, ImporteAmortizacion), e.Row.DBCampo("CveMoneda").ToEntero, - If(Not e.Row.DBCampo("TCCompra").ToDouble > 1, GlobalTipoCambio(e.Row.DBCampo("Fecha").ToDate), e.Row.DBCampo("TCCompra").ToDouble), + tTCFecha, DdlMoneda.SelectedValue.ToEntero, e.Row.FCTextBox("TxtAnticipo").ClientID)) Else @@ -10102,7 +10104,7 @@ Partial Class Compras_Compras e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), If(CveCompra > 0, Saldo, ImporteAmortizacion), e.Row.DBCampo("CveMoneda").ToEntero, - If(Not e.Row.DBCampo("TCCompra").ToDouble > 1, GlobalTipoCambio(e.Row.DBCampo("Fecha").ToDate), e.Row.DBCampo("TCCompra").ToDouble), + tTCFecha, DdlMoneda.SelectedValue.ToEntero, e.Row.FCTextBox("TxtComision").ClientID)) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO @@ -10111,7 +10113,7 @@ Partial Class Compras_Compras e.Row.DBCampo("Saldo"), If(CveCompra > 0, Saldo, ImporteAmortizacion), e.Row.DBCampo("CveMoneda").ToEntero, - If(Not e.Row.DBCampo("TCCompra").ToDouble > 1, GlobalTipoCambio(e.Row.DBCampo("Fecha").ToDate), e.Row.DBCampo("TCCompra").ToDouble), + tTCFecha, DdlMoneda.SelectedValue.ToEntero, e.Row.FCTextBox("TxtAnticipo").ClientID)) End If @@ -14034,7 +14036,7 @@ Partial Class Compras_Compras Dim TipoCambioGuardar As Decimal = 1 Dim tcvealmacen As Integer = 0 - If ObjCompra.GetCompraDetalle(CveCompra) Then + If ObjCompra.GetCompraDetalle(CveCompra, UsuarioActual.CveEmpresa) Then If ObjCompra.DtResultados.Rows.Count > 0 Then TmpDT = ObjCompra.DtResultados End If @@ -15927,7 +15929,7 @@ Partial Class Compras_Compras Return False Else - If ObjCompras.GetCompraDetalle(CveCompra) Then + If ObjCompras.GetCompraDetalle(CveCompra, UsuarioActual.CveEmpresa) Then If ObjInv.GetMovimientosDetalle(-1, UsuarioActual.CveEmpresa, CveCompra) Then Dtcompra = ObjInv.DtResultados Dim TotalProductos = Dtcompra.SUM("Total").ToString.ToDecimal @@ -16752,12 +16754,14 @@ Partial Class Compras_Compras #Region "Historial de Modificacion" Private Sub CargaGvBitacora() ' COMENTADO POR IPP PARA SUBIR 5 ABRIL 2017 - Dim ObjGral As New ClsGenerales() - If ObjGral.GetHistorialBitacora(-1, -1, -1, -1, -1, CveCompra, -1, UsuarioActual.CveEmpresa) Then - GvBitacora.DataSource = ObjGral.DtResultados - GvBitacora.DataBind() + If CveCompra > 0 Then + Dim ObjGral As New ClsGenerales() + If ObjGral.GetHistorialBitacora(-1, -1, -1, -1, -1, CveCompra, -1, UsuarioActual.CveEmpresa) Then + GvBitacora.DataSource = ObjGral.DtResultados + End If + ObjGral.Dispose() End If - ObjGral.Dispose() + GvBitacora.DataBind() End Sub #End Region diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index d6440f523..6c4530de0 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -5625,7 +5625,7 @@ Partial Class Compras_Proveedores TxtSerieFolio.Text = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString() End If End If - If ObjCompras.GetCompraDetalle(CveCompra) Then + If ObjCompras.GetCompraDetalle(CveCompra, UsuarioActual.CveEmpresa) Then Dim StrPS As New StringBuilder() For Each Row As DataRow In ObjCompras.DtResultados.Rows If ObjCompras.DtResultados.Rows.Count > 1 Then From 3e173b1214c94673f748984f43791e092527a774 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Sat, 28 Jan 2023 11:19:15 -0700 Subject: [PATCH 044/103] =?UTF-8?q?Rep=20balanza=20de=20comprobaci=C3=B3n?= =?UTF-8?q?=20=20Texto=20nombres=20de=20niveles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contabilidad2/RepBalanzaComprobacion.aspx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Contabilidad2/RepBalanzaComprobacion.aspx b/Contabilidad2/RepBalanzaComprobacion.aspx index 877a335dd..91061853e 100644 --- a/Contabilidad2/RepBalanzaComprobacion.aspx +++ b/Contabilidad2/RepBalanzaComprobacion.aspx @@ -83,8 +83,8 @@
    - -
    + +
    @@ -97,8 +97,8 @@
    - - + +
    From 1397265a80cd4499102bd9307c6917e743b75e85 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Sat, 28 Jan 2023 11:32:36 -0700 Subject: [PATCH 045/103] =?UTF-8?q?RepServicioDomicilio,=20bloquear=20canc?= =?UTF-8?q?elacion=20y=20actualizaci=C3=B3n=20cuando=20servicio=20este=20f?= =?UTF-8?q?inalizado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OS/RepServicioDomicilio.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OS/RepServicioDomicilio.aspx.vb b/OS/RepServicioDomicilio.aspx.vb index b5b44b6ad..5766f4969 100644 --- a/OS/RepServicioDomicilio.aspx.vb +++ b/OS/RepServicioDomicilio.aspx.vb @@ -789,8 +789,8 @@ Partial Class OS_RepServicioDomicilio Dim TipoEstatus As Integer = 0 TipoEstatus = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("TipoEstatus", String.Format("CveEstatusOrdenServicio = {0}", ObjOS.CveEstatusOrdenServicio), "CveEstatusOrdenServicio ASC").ToEntero - LnkModalAsignar.Visible = If(TipoEstatus.Contiene(5), False, True) - LnkCancelarOrden.Visible = If(TipoEstatus.Contiene(5), False, True) + LnkModalAsignar.Visible = If(TipoEstatus.Contiene(4, 5), False, True) + LnkCancelarOrden.Visible = If(TipoEstatus.Contiene(4, 5), False, True) If (TipoEstatus = 5) Then LblModalOStitulo.Text = "Orden Cancelada" From 3f1226a3129e724c318f21a3c87253d24795b037 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Sat, 28 Jan 2023 11:40:58 -0700 Subject: [PATCH 046/103] Filtro por contrato en rep cxc y mostrar descripcion en personalizar en rep cxc detalle --- CxC/RepCxC.aspx.vb | 50 +++++++++++++++++++-------------------- CxC/RepCxCDetalle.aspx | 12 +++++++++- CxC/RepCxCDetalle.aspx.vb | 32 +++++++++++++++++++++---- Ventas/Ventas.aspx.vb | 16 ++++++------- 4 files changed, 72 insertions(+), 38 deletions(-) diff --git a/CxC/RepCxC.aspx.vb b/CxC/RepCxC.aspx.vb index 59a32dac7..f6030f5be 100644 --- a/CxC/RepCxC.aspx.vb +++ b/CxC/RepCxC.aspx.vb @@ -217,7 +217,7 @@ Partial Class RepCxC "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=CveCobranzaEstatus, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, - TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, AplicaAnticiposPagados:=AplicaAnticipos, CveMoneda:=DdlMoneda.SelectedValue.ToEntero(), TieneLineaAdicional:=DdlTieneLineaAdicional.SelectedValue.ToEntero()) Then + TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, AplicaAnticiposPagados:=AplicaAnticipos, CveMoneda:=DdlMoneda.SelectedValue.ToEntero(), TieneLineaAdicional:=DdlTieneLineaAdicional.SelectedValue.ToEntero(), CveContrato:=DdlContrato.SelectedValue.ToEntero()) Then GvDatos.DataSource = ObjMovtos.DtResultados DtDatos = ObjMovtos.DtResultados @@ -398,53 +398,53 @@ Partial Class RepCxC Dim AplicaAnticipos As Integer = If(ChkAnticipos.Checked, 1, 0) - Dim Liga1 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C1&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}", + Dim Liga1 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C1&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero()) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) - Dim Liga2 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C2&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}", + Dim Liga2 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C2&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero()) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) - Dim Liga3 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C3&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}", + Dim Liga3 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C3&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero()) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) - Dim Liga4 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C4&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}", + Dim Liga4 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C4&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero()) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) - Dim Liga5 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C5&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente{26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}", + Dim Liga5 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C5&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente{26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero()) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) - Dim Liga6 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C6&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}", + Dim Liga6 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C6&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero()) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) - Dim Liga7 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C7&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}", + Dim Liga7 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C7&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero()) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) - Dim Liga8 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C8&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}", + Dim Liga8 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C8&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero()) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) - Dim Liga9 As String = String.Format("/CxC/RepCxCDetalle.aspx.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}", + Dim Liga9 As String = String.Format("/CxC/RepCxCDetalle.aspx.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero()) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) - Dim Liga10 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}", + Dim Liga10 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero()) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) - Dim Liga11 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TPV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}", + Dim Liga11 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TPV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero()) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) - Dim LigaTot As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}", + Dim LigaTot As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}&AplicaAnticiposPagados={27}&TieneLineaAdicional={28}&CveContrato={29}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero()) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticipos, DdlTieneLineaAdicional.SelectedValue.ToEntero(), e.Row.DBCampo("CveContrato")) e.Row.FCHyperLink("HplSaldo").NavigateUrl = LigaTot diff --git a/CxC/RepCxCDetalle.aspx b/CxC/RepCxCDetalle.aspx index c30545abe..e13c957ac 100644 --- a/CxC/RepCxCDetalle.aspx +++ b/CxC/RepCxCDetalle.aspx @@ -345,6 +345,14 @@
    +
    + Contrato: +
    +
    + + + +
    @@ -538,6 +546,7 @@ + @@ -665,7 +674,8 @@ - + + diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb index 25f8386d7..ee74096fa 100644 --- a/CxC/RepCxCDetalle.aspx.vb +++ b/CxC/RepCxCDetalle.aspx.vb @@ -242,8 +242,8 @@ Partial Class RepCxCDetalle End If - End Sub - + End Sub + #Region "CARGAS" Private Sub CargaCombos() Dim CveCliente, CveVendedor, CveUsuario, CveSubProyecto, @@ -366,7 +366,7 @@ Partial Class RepCxCDetalle CargaClientes() If CveCliente > 0 Then DdlClientesWS.SelectedValue = CveCliente.ToString - DdlClientesWS.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("NombreComercial", $"CveCliente = {CveCliente}") + 'DdlClientesWS.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("NombreComercial", $"CveCliente = {CveCliente}") End If 'DdlClientes.SelectedValueExist(CveCliente) DdlUsuario.SelectedValueExist(CveUsuario) @@ -426,7 +426,23 @@ Partial Class RepCxCDetalle If UsuarioActual.CveEmpresa.Contiene(72, 80, 146, 119) Then ChkAnticipos.Visible = True - DdlTieneLineaAdicional.SelectedValueExist(If(Request("TieneLineaAdicional") IsNot Nothing, Request("TieneLineaAdicional").ToString, "-1").ToString) + DdlTieneLineaAdicional.SelectedValueExist(If(Request("TieneLineaAdicional") IsNot Nothing, Request("TieneLineaAdicional").ToString, "-1").ToString) + + If UsuarioActual.CveEmpresa = 13 Then + CargaContratos() + End If + DdlContrato.SelectedValueExist(If(Request("CveContrato") IsNot Nothing, Request("CveContrato").ToString, "-1").ToString) + + End Sub + Private Sub CargaContratos() + Dim ObjContratos As New ClsContratos + If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, CveCliente:=-1) Then + DdlContrato.DataSource = ObjContratos.DtResultados + End If + + ObjContratos.Dispose() + DdlContrato.DataBind() + End Sub Private Function CargaDatos() As DataSet @@ -852,9 +868,17 @@ Partial Class RepCxCDetalle SePersonalizo = 1 Else GvDatos.Columns(45).Visible = False + End If + + If ChkMostrarDescripcionVenta.Checked Then + GvDatos.Columns(46).Visible = True + SePersonalizo = 1 + Else + GvDatos.Columns(46).Visible = False End If + If SePersonalizo = 1 Then ImgExcelPersonalizado.Visible = True Else diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 32ecd1137..5d8e1464a 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -13354,7 +13354,7 @@ Partial Class Ventas Else - Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CvePSCargo={CvePSCargo}") + Dim DrTamanio As DataRow = ClsPaginas.GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CvePSCargo={CvePSCargo}") If DrTamanio IsNot Nothing Then 'OBTIENE LOS IMPORTES ORIGINALES EN BASE A LO QUE HABIA EN EL MOVIMIENTO @@ -29122,7 +29122,7 @@ Partial Class Ventas Dim CvePSCargo As Integer = RowUsado("CvePS").ToString().ToEntero() Dim Obs = "" 'SI ES ACUMULADOR LAS OBSERVACIOENS DEBEN SER EL NOMBRE DEL ACUMULADOR - If GlobalDTAcumTamaños().FiltroPrimero($"CvePSCargo = {CvePSCargo}") IsNot Nothing Then + If ClsPaginas.GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CvePSCargo = {CvePSCargo}") IsNot Nothing Then Obs = RowUsado("CodigoPS").ToString() Else Obs = RowUsado("Obs").ToString() @@ -29210,7 +29210,7 @@ Partial Class Ventas Dim CvePSCargo As Integer = RowUsado("CvePS").ToString().ToEntero() Dim Obs = "" 'SI ES ACUMULADOR LAS OBSERVACIOENS DEBEN SER EL NOMBRE DEL ACUMULADOR - If GlobalDTAcumTamaños().FiltroPrimero($"CvePSCargo = {CvePSCargo}") IsNot Nothing Then + If ClsPaginas.GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CvePSCargo = {CvePSCargo}") IsNot Nothing Then Obs = RowUsado("CodigoPS").ToString() End If 'SI TIENE BCI EN LAS OBSERVACIONES AGREGARLO A LA FACTURA @@ -29395,7 +29395,7 @@ Partial Class Ventas For Each RowCargo As DataRow In TmpDT.FiltraParametros("EsCargo = True", Orderby:="PU").Rows Dim CantidadCargo = RowCargo("Cantidad").ToString().ToDecimal() - Dim ImportePU As Decimal = GlobalDTAcumTamaños().FiltroPrimeroValor("Bonificacion", $"CvePSCargo={RowCargo("CvePS")}").ToDecimal() + Dim ImportePU As Decimal = ClsPaginas.GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Bonificacion", $"CvePSCargo={RowCargo("CvePS")}").ToDecimal() Dim TotalCalculableImpuestosCargo As Decimal = (CantidadCargo * ImportePU) Dim TotalCargo As Decimal = TotalCalculableImpuestosCargo + (TotalCalculableImpuestosCargo * RowCargo("PorcentajeIVA").ToString().ToDecimal).RoundSQL(2) @@ -29492,7 +29492,7 @@ Partial Class Ventas Dim CvePSCargo As Integer = RowUsado("CvePS").ToString().ToEntero() Dim Obs = "" 'SI ES ACUMULADOR LAS OBSERVACIOENS DEBEN SER EL NOMBRE DEL ACUMULADOR - If GlobalDTAcumTamaños().FiltroPrimero($"CvePSCargo = {CvePSCargo}") IsNot Nothing Then + If ClsPaginas.GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CvePSCargo = {CvePSCargo}") IsNot Nothing Then Obs = RowUsado("CodigoPS").ToString() 'Else ' Obs = RowUsado("Obs").ToString() @@ -31337,7 +31337,7 @@ Partial Class Ventas Private Function CalculaUsadosCotizacion(ByRef SbVentasDetalle As StringBuilder, ByVal DTSeleccionadas As DataTable, ByVal DtCotizaciones As DataTable) As List(Of MVentaDetalleCotizacion) Dim Retorno As New List(Of MVentaDetalleCotizacion) - Dim DTTamanios As DataTable = GlobalDTAcumTamaños() + Dim DTTamanios As DataTable = ClsPaginas.GlobalDTAcumTamaños(UsuarioActual.CveEmpresa) Dim DTCvePSCostos As DataTable = DTTamanios.FiltraParametros("", "", {"CvePSCargo"}) @@ -32930,7 +32930,7 @@ Partial Class Ventas Exit Sub End If - Dim DTTamanios As DataTable = GlobalDTAcumTamaños() + Dim DTTamanios As DataTable = ClsPaginas.GlobalDTAcumTamaños(UsuarioActual.CveEmpresa) Dim DTCvePSCostos As DataTable DTCvePSCostos = DTTamanios.FiltraParametros("", "", {"CvePSCargo"}) @@ -33096,7 +33096,7 @@ Partial Class Ventas If ClienteEsDistribuidor AndAlso Not factura.EsGarantia Then For Each drow As DataRow In factura.DtDetalle.Rows If drow("CveTamaño").ToString.ToEntero > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={drow("CveTamaño").ToString.ToEntero}") + Dim DrTamanio As DataRow = ClsPaginas.GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CveTamaño={drow("CveTamaño").ToString.ToEntero}") If DrTamanio IsNot Nothing Then Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal() Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal() From 8c51b7aee55afa5455af21ad856bca8de1c66f90 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Sat, 28 Jan 2023 11:59:09 -0700 Subject: [PATCH 047/103] RegPrePolzias Nombre archivo de resumen --- Contabilidad/RegPrePolizaS.aspx.vb | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 748b09afa..0edfc89d0 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -3293,7 +3293,24 @@ Partial Class ContabilidadC_RegPrePolizaS RutaReprote = $"{DirectorioEmpresas}Grales\Formatos\PolizasResumen.rdlc" End If - ImprimirbytesPDF(StreamPDF(RutaReprote, dtVC, params, "PrePoliza", Formato:=Tipo), "PrePoliza", Formato:=Tipo, Descarga:=True) + Dim TipoPolizaString = "" + + Select Case DdlTipoPoliza.SelectedValue.ToEntero + Case 1 + TipoPolizaString = "I" + Exit Select + Case 2 + TipoPolizaString = "E" + Exit Select + + Case Else + TipoPolizaString = "D" + Exit Select + + End Select + + + ImprimirbytesPDF(StreamPDF(RutaReprote, dtVC, params, "PrePoliza", Formato:=Tipo), $"P{TipoPolizaString}{TxtFolio.Text}", Formato:=Tipo, Descarga:=True) End If ObjConta.Dispose() From e5526bee6fdc817bf6909bea7b6998d78a5d47ef Mon Sep 17 00:00:00 2001 From: MLopez Date: Fri, 27 Jan 2023 18:51:18 -0700 Subject: [PATCH 048/103] Rep Compras AF: Cargar Fecha de Inicio --- Compras/RepComprasAF.aspx.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Compras/RepComprasAF.aspx.vb b/Compras/RepComprasAF.aspx.vb index 14d834ae7..1aca46c14 100644 --- a/Compras/RepComprasAF.aspx.vb +++ b/Compras/RepComprasAF.aspx.vb @@ -75,6 +75,8 @@ Partial Class Compras_RepComprasAF #Region "CARGAS" Private Sub CargaCombos() + txtFechaI.Text = $"01/{Now.Month}/{Now.Year}" + DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlProveedores.DataBind() From 14d25576596f5cd01d7a0aef4c41258ea1f1933e Mon Sep 17 00:00:00 2001 From: MLopez Date: Sat, 28 Jan 2023 13:05:12 -0700 Subject: [PATCH 049/103] =?UTF-8?q?Corregir=20typo,=20fix=20alineaci=C3=B3?= =?UTF-8?q?n=20dropdownlists?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/RepComprasAFDetalle.aspx | 2 +- Compras/RepComprasAFDetalle.aspx.vb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Compras/RepComprasAFDetalle.aspx b/Compras/RepComprasAFDetalle.aspx index 98c3f24f4..44f7a0879 100644 --- a/Compras/RepComprasAFDetalle.aspx +++ b/Compras/RepComprasAFDetalle.aspx @@ -143,7 +143,7 @@
    -
    SubTipo Activo Fijo:
    +
    SubTipo Fijo:
    diff --git a/Compras/RepComprasAFDetalle.aspx.vb b/Compras/RepComprasAFDetalle.aspx.vb index 9077f17ce..19de434b7 100644 --- a/Compras/RepComprasAFDetalle.aspx.vb +++ b/Compras/RepComprasAFDetalle.aspx.vb @@ -208,7 +208,7 @@ Partial Class Compras_RepComprasAFDetalle ObjClasificacion.Dispose() DdlClasificacion2.DataBind() - DdlClasificacion2.Items.Insert(0, New ListItem("Totas", "-1")) + DdlClasificacion2.Items.Insert(0, New ListItem("Todas", "-1")) DdlClasificacion2.Items.Insert(1, New ListItem("Sin Clasificación", "-2")) DdlClasificacion2.SelectedValueExist(-1) From 8a0eecfe4a75d5ac97eb91c5a78eb7c1ae3fa343 Mon Sep 17 00:00:00 2001 From: MLopez Date: Sat, 28 Jan 2023 13:11:16 -0700 Subject: [PATCH 050/103] =?UTF-8?q?E172=20Rep=20Compras=20AF:=20Opci=C3=B3?= =?UTF-8?q?n=20de=20filtrar=20por=20Tipo=20de=20compra=20(Insumo,=20Compra?= =?UTF-8?q?)=20-=20Cambios=20en=20BD:=20=20=20SE=20ACTUALIZ=C3=93=20PA=5FC?= =?UTF-8?q?omp=5FComprasAFGetRep=20EN=20SIG=5FResp=5FMLR=20y=20Ventas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsCompras.vb | 3 ++- Compras/RepComprasAF.aspx | 9 +++++++++ Compras/RepComprasAF.aspx.vb | 6 +++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index e92fdf12d..f176a9b72 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -659,7 +659,7 @@ Public Class ClsCompras Public Function GetRepComprasAF(FechaI As String, FechaF As String, CveProveedor As Integer, CveMoneda As Integer, CveEmpresa As Integer, Gpo As Integer, CveProyecto As Integer, CveSubProyecto As Integer, TipoCambio As Integer, TCEspecifico As Double, CveClasificacion As Integer, CveActivoFijo As Integer, CveTipoActivoFijo As Integer, CveSubTipoActivoFijo As Integer, CvePS As Integer, Optional CveUsuarioConsulta As Integer = -1, - Optional CveClasificacion2 As Integer = -1 + Optional CveClasificacion2 As Integer = -1, Optional CveTipoCompraAF As Integer = -1 ) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_ComprasAFGetRep") @@ -682,6 +682,7 @@ Public Class ClsCompras .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2 + .Add("@CveTipoCompraAF", SqlDbType.Int).Value = CveTipoCompraAF 'CveClasificacion diff --git a/Compras/RepComprasAF.aspx b/Compras/RepComprasAF.aspx index 875cfda95..686acf803 100644 --- a/Compras/RepComprasAF.aspx +++ b/Compras/RepComprasAF.aspx @@ -146,6 +146,15 @@
    +
    Tipo de Compra:
    +
    + + + + + +
    +
    diff --git a/Compras/RepComprasAF.aspx.vb b/Compras/RepComprasAF.aspx.vb index 1aca46c14..f51525715 100644 --- a/Compras/RepComprasAF.aspx.vb +++ b/Compras/RepComprasAF.aspx.vb @@ -186,7 +186,7 @@ Partial Class Compras_RepComprasAF If ObjCompras.GetRepComprasAF(FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero, DdlMonedas.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, DdlClasificacion.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, DdlTipoActivoFijo.SelectedValue.ToEntero, DdlSubTipoActivoFijo.SelectedValue.ToEntero, - CvePS, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero) Then + CvePS, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero, CveTipoCompraAF:=DdlTipoCompra.SelectedValue.ToEntero) Then DTDatos = ObjCompras.DtResultados GvDatos.DataSource = ObjCompras.DtResultados @@ -217,11 +217,11 @@ Partial Class Compras_RepComprasAF If e.Row.DBCampo("Orden") = "1" Then - Dim Liga As String = $"/Compras/RepComprasAFDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={ e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&CveProveedor={ e.Row.DBCampo("CveProveedor")}&CveActivoFijo={e.Row.DBCampo("CveActivoFijo")}&CveTipoActivoFijo={e.Row.DBCampo("CveTipoActivoFijo")}&CveSubTipoActivoFijo={e.Row.DBCampo("CveSubTipoActivoFijo")}&CveProyecto={ DdlProyecto.SelectedValue}&CveSubProyecto={DdlSubProyecto.SelectedValue}&CvePS={ If(CvePS > 0, CvePS.ToString, e.Row.DBCampo("CvePS").ToString) }&CveClasificacion={e.Row.DBCampo("CveClasificacion")}&CveMoneda={ e.Row.DBCampo("CveMoneda")}&FechaI={FechaI}&FechaF={FechaF}&PS={PS}&CveClasificacion2={e.Row.DBCampo("CveClasificacion2")}" + Dim Liga As String = $"/Compras/RepComprasAFDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={ e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&CveProveedor={ e.Row.DBCampo("CveProveedor")}&CveActivoFijo={e.Row.DBCampo("CveActivoFijo")}&CveTipoActivoFijo={e.Row.DBCampo("CveTipoActivoFijo")}&CveSubTipoActivoFijo={e.Row.DBCampo("CveSubTipoActivoFijo")}&CveProyecto={ DdlProyecto.SelectedValue}&CveSubProyecto={DdlSubProyecto.SelectedValue}&CvePS={ If(CvePS > 0, CvePS.ToString, e.Row.DBCampo("CvePS").ToString) }&CveClasificacion={e.Row.DBCampo("CveClasificacion")}&CveMoneda={ e.Row.DBCampo("CveMoneda")}&FechaI={FechaI}&FechaF={FechaF}&PS={PS}&CveClasificacion2={e.Row.DBCampo("CveClasificacion2")}&CveTipoCompraAF={DdlTipoCompra.SelectedValue}" e.Row.Cells(0).Text = String.Format("{2}", "Texto", Liga, e.Row.DataKey("GPO").ToString) Else e.Row.BackColor = Drawing.Color.LightGray - Dim Liga As String = $"/Compras/RepComprasAFDetalle.aspx?GPO=-1&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={ e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&CveProveedor={ e.Row.DBCampo("CveProveedor")}&CveActivoFijo={e.Row.DBCampo("CveActivoFijo")}&CveTipoActivoFijo={e.Row.DBCampo("CveTipoActivoFijo")}&CveSubTipoActivoFijo={e.Row.DBCampo("CveSubTipoActivoFijo")}&CveProyecto={ DdlProyecto.SelectedValue}&CveSubProyecto={DdlSubProyecto.SelectedValue}&CvePS={ If(CvePS > 0, CvePS.ToString, e.Row.DBCampo("CvePS").ToString)}&CveClasificacion={e.Row.DBCampo("CveClasificacion")}&CveMoneda={ e.Row.DBCampo("CveMoneda")}&FechaI={FechaI}&FechaF={FechaF}&PS={PS}&CveClasificacion2={e.Row.DBCampo("CveClasificacion2")}" + Dim Liga As String = $"/Compras/RepComprasAFDetalle.aspx?GPO=-1&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={ e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&CveProveedor={ e.Row.DBCampo("CveProveedor")}&CveActivoFijo={e.Row.DBCampo("CveActivoFijo")}&CveTipoActivoFijo={e.Row.DBCampo("CveTipoActivoFijo")}&CveSubTipoActivoFijo={e.Row.DBCampo("CveSubTipoActivoFijo")}&CveProyecto={ DdlProyecto.SelectedValue}&CveSubProyecto={DdlSubProyecto.SelectedValue}&CvePS={ If(CvePS > 0, CvePS.ToString, e.Row.DBCampo("CvePS").ToString)}&CveClasificacion={e.Row.DBCampo("CveClasificacion")}&CveMoneda={ e.Row.DBCampo("CveMoneda")}&FechaI={FechaI}&FechaF={FechaF}&PS={PS}&CveClasificacion2={e.Row.DBCampo("CveClasificacion2")}&CveTipoCompraAF={DdlTipoCompra.SelectedValue}" e.Row.Cells(0).Text = String.Format("{2}", "Texto", Liga, e.Row.DataKey("Moneda").ToString) From 9a2dc39386a51c4d6715dc6d720896e7b9f15da8 Mon Sep 17 00:00:00 2001 From: MLopez Date: Sat, 28 Jan 2023 13:12:55 -0700 Subject: [PATCH 051/103] =?UTF-8?q?E172=20Rep=20Compras=20AF=20Detalle:=20?= =?UTF-8?q?Opci=C3=B3n=20para=20filtrar=20por=20Tipo=20de=20Compra=20-=20C?= =?UTF-8?q?ambios=20en=20BD=20=20=20SE=20MODIFIC=C3=93=20PA=5FComp=5FCompr?= =?UTF-8?q?asAFDetalleGetRep=20EN=20SIG=5FResp=5FMLR=20y=20Ventas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsCompras.vb | 3 ++- Compras/RepComprasAFDetalle.aspx | 11 ++++++++++- Compras/RepComprasAFDetalle.aspx.vb | 3 ++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index f176a9b72..6341d821e 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -700,7 +700,7 @@ Public Class ClsCompras Public Function GetRepComprasAFDetalle(FechaI As String, FechaF As String, CveProveedor As Integer, CveMoneda As Integer, CveEmpresa As Integer, Gpo As Integer, CveProyecto As Integer, CveSubProyecto As Integer, TipoCambio As Integer, TCEspecifico As Double, CveClasificacion As Integer, CveActivoFijo As Integer, CveTipoActivoFijo As Integer, CveSubTipoActivoFijo As Integer, CvePS As Integer, - Anio As Integer, Mes As Integer, AnioMes As String, Optional CveUsuarioConsulta As Integer = -1, Optional CveClasificacion2 As Integer = -1) As Boolean + Anio As Integer, Mes As Integer, AnioMes As String, Optional CveUsuarioConsulta As Integer = -1, Optional CveClasificacion2 As Integer = -1, Optional CveTipoCompraAF As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_ComprasAFDetalleGetRep") @@ -726,6 +726,7 @@ Public Class ClsCompras .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2 + .Add("@CveTipoCompraAF", SqlDbType.Int).Value = CveTipoCompraAF 'CveClasificacion End With diff --git a/Compras/RepComprasAFDetalle.aspx b/Compras/RepComprasAFDetalle.aspx index 44f7a0879..c715eade2 100644 --- a/Compras/RepComprasAFDetalle.aspx +++ b/Compras/RepComprasAFDetalle.aspx @@ -186,7 +186,16 @@ -
    +
    + +
    Tipo de Compra
    +
    + + + + + +
    diff --git a/Compras/RepComprasAFDetalle.aspx.vb b/Compras/RepComprasAFDetalle.aspx.vb index 19de434b7..7b8a4c1d0 100644 --- a/Compras/RepComprasAFDetalle.aspx.vb +++ b/Compras/RepComprasAFDetalle.aspx.vb @@ -106,6 +106,7 @@ Partial Class Compras_RepComprasAFDetalle DdlProyecto.SelectedValueExist(Request.QueryString("CveProyecto").ToString) DdlSubProyecto.SelectedValueExist(Request.QueryString("CveSubProyecto").ToString) DdlProveedores.SelectedValueExist(Request.QueryString("CveProveedor").ToString) + DdlTipoCompra.SelectedValueExist(Request.QueryString("CveTipoCompraAF").ToString) DdlClasificacion.SelectedValueExist(Request.QueryString("CveClasificacion").ToString) DdlClasificacion2.SelectedValueExist(Request.QueryString("CveClasificacion2").ToString) @@ -284,7 +285,7 @@ Partial Class Compras_RepComprasAFDetalle If ObjCompras.GetRepComprasAFDetalle(FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero, DdlMonedas.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, DdlClasificacion.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, DdlTipoActivoFijo.SelectedValue.ToEntero, DdlSubTipoActivoFijo.SelectedValue.ToEntero, - CvePS, Anio.ToEntero, Mes.ToEntero, AnioMes, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero) Then + CvePS, Anio.ToEntero, Mes.ToEntero, AnioMes, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero, CveTipoCompraAF:=DdlTipoCompra.SelectedValue.ToEntero) Then DTDatos = ObjCompras.DtResultados GvDatos.DataSource = DTDatos From 27257bd717d4f573579f3d5f335b6cd1ebff4153 Mon Sep 17 00:00:00 2001 From: MLopez Date: Sat, 28 Jan 2023 13:26:44 -0700 Subject: [PATCH 052/103] =?UTF-8?q?Rep=20Compras=20AF:=20Corregir=20config?= =?UTF-8?q?uraci=C3=B3n=20de=20centros=20de=20costo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/RepComprasAF.aspx | 2 -- Compras/RepComprasAF.aspx.vb | 57 ++++++++---------------------------- 2 files changed, 12 insertions(+), 47 deletions(-) diff --git a/Compras/RepComprasAF.aspx b/Compras/RepComprasAF.aspx index 686acf803..4002fd32d 100644 --- a/Compras/RepComprasAF.aspx +++ b/Compras/RepComprasAF.aspx @@ -131,13 +131,11 @@
    -
    SubProyecto:
    -
    Proveedor:
    diff --git a/Compras/RepComprasAF.aspx.vb b/Compras/RepComprasAF.aspx.vb index f51525715..c0f2719c9 100644 --- a/Compras/RepComprasAF.aspx.vb +++ b/Compras/RepComprasAF.aspx.vb @@ -83,9 +83,6 @@ Partial Class Compras_RepComprasAF DdlMonedas.DataSource = GlobalDTMonedas() DdlMonedas.DataBind() - DdlProyecto.DataSource = GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1) - DdlProyecto.DataBind() - DdlTipoActivoFijo.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("", "TipoActivoFijo") DdlTipoActivoFijo.DataBind() @@ -101,44 +98,13 @@ Partial Class Compras_RepComprasAF DdlClasificacion2.DataSource = Nothing End If - ObjClasificacion.Dispose() DdlClasificacion2.DataBind() - - - DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa) DdlActivoFijo.DataBind() - If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then - DdlProyecto.Visible = False - 'LblSubProyecto.Text = "Sucursal" - LblProyecto.Visible = False - ' DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto) - 'DdlSubProyecto.DataBind() - 'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then - DdlProyecto.Visible = False - 'LblSubProyecto.Text = "Proyecto" - LblProyecto.Visible = False - - 'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - 'DdlSubProyecto.DataBind() - CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto) - - 'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Or UsuarioActual.Empresa.Tipo_CentroCosto = 0 Then - LblProyecto.Text = "Proyecto" - - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then - LblProyecto.Text = "Sucursal" - LblSubProyecto.Text = "Proyecto" - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then - LblProyecto.Text = "Proyecto" - LblSubProyecto.Text = "Sucursal" - End If + CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto) CargaPS(-1) @@ -153,18 +119,19 @@ Partial Class Compras_RepComprasAF End Sub Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged - CargaSubProyecto() + If DdlProyecto.SelectedValue = "-1" Then + DdlProyecto.Items.Clear() + DdlSubProyecto.Items.Clear() + CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto) + Else + CargaSubProyecto() + End If End Sub - Private Sub CargaSubProyecto() - - - CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto) - - 'DdlSubProyecto.Items.Clear() - 'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - 'DdlSubProyecto.DataBind() - 'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlSubProyecto.Items.Clear() + DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros(String.Format("CveProyecto = {0}", DdlProyecto.SelectedValue), "SubProyecto") + DdlSubProyecto.DataBind() + DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) End Sub Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click CargaDatos() From 79b7ed7f5a4d16cdd01453c6bbdc1eb649e5e696 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Sat, 28 Jan 2023 15:20:08 -0700 Subject: [PATCH 053/103] Combras bitacora inventario al eliminar compra con inventario, clientes cambiar vendedor. --- App_Code/ClsVentas.vb | 21 ++++++++++++++ Compras/Compras.aspx | 3 +- Compras/Compras.aspx.vb | 61 ++++++++++++++++++++++++++++++++++++++- Ventas/Clientes.aspx | 7 ++++- Ventas/Clientes.aspx.vb | 64 +++++++++++++++++++++++++++++++++++++++-- 5 files changed, 150 insertions(+), 6 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 4b7dd81fb..25f5e0936 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -5720,6 +5720,27 @@ Public Class ClsVentas End Function + Public Function CambioClientesVendedor(CveCliente As Integer, CveVendedor As Integer, CveEmpresa As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_ClientesVendedorCambio") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCliente", SqlDbType.VarChar).Value = CveCliente + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al cambiar al vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + + + End Function + + #Region "IDisposable Support" diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index c84d79087..b42713ae4 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -1289,7 +1289,8 @@
    - + diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 6e0bcca33..dcb19cede 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -8537,7 +8537,8 @@ Partial Class Compras_Compras Dim Comp As New ClsCompras() Dim ObjEventos As New ClsOIEventos(Comp.IniciaTransacSQL()) Dim ObjConta As New ClsContabilidad(Comp.IniciaTransacSQL()) - + Dim ObjInventarios As New ClsInventarios(Comp.IniciaTransacSQL()) + Dim ObjGral As New ClsGenerales(Comp.IniciaTransacSQL()) Dim ErrorCompra = False @@ -8564,6 +8565,64 @@ Partial Class Compras_Compras End If End If + + + Try + If ObjInventarios.GetInv_ComprasMov(CveCompra, UsuarioActual.CveEmpresa) Then + Dim DTInventarios As DataTable = ObjInventarios.DtResultados + If DTInventarios.Rows.Count > 0 Then + + Dim DTMovimientos As DataTable = DTInventarios.FiltraParametros("", "", {"CVeMovimiento"}) + + For Each diRow As DataRow In DTMovimientos.Rows + + Dim CveMovimientoActual As Integer = diRow("CveMovimiento").ToString.ToEntero + + Dim DTMovimientoActual As DataTable = DTInventarios.FiltraParametros($"CveMovimiento = {CveMovimientoActual} ") + + Dim detalleDescripcion As String = "" + Dim Description As String = "" + + Dim FolioMovimiento As String = "" + Dim ConceptoMovimiento As String = "" + + For Each dRowMovActual As DataRow In DTMovimientoActual.Rows + + If dRowMovActual("UM").ToString = "" Then + FolioMovimiento = dRowMovActual("Folio").ToString + ConceptoMovimiento = dRowMovActual("Concepto").ToString + + Description = String.Format("Eliminación Compra {6},Movimiento con Concepto: {0}, Almacen: {1}, Fecha: {2}, Folio: {3}, Usuario: {4}, Observaciones adicionales: {5}, Productos Información:
    ", + ConceptoMovimiento, + dRowMovActual("Almacen").ToString, + dRowMovActual("FechaMovto").ToString.ToDate.ToString("dd/MM/yyyy"), + FolioMovimiento, + dRowMovActual("Usuario").ToString, + dRowMovActual("Observaciones").ToString, + $"{TxtSerie.Text}-{TxtFolio.Text}") + Else + detalleDescripcion = String.Format("- Cant: {0}, PS: {1}, PU: {2}, UM: {3}
    ", dRowMovActual("Cantidad").ToString.ToEntero, dRowMovActual("CodigoPS"), dRowMovActual("PU"), dRowMovActual("UM")) + End If + + Next + + If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, + String.Format("{0}, Informacion = {1}", Description, detalleDescripcion), + "Inventarios", FolioMovimiento + " / " + ConceptoMovimiento) Then + ErrorCompra = True + Exit For + End If + Next + + End If + End If + Catch ex As Exception + ErrorCompra = True + End Try + + + + If Not ErrorCompra Then If Not Comp.DeleteCompra(CveCompra, False) Then ErrorCompra = True diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index f74b628bb..198088ed9 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -668,13 +668,18 @@
    -
    +
    + +
    + Actualziar +
    +
    diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 1a853f53b..c3e1a8dfe 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -644,6 +644,23 @@ Partial Class Clientes ViewState("AdjuntoDocumentacion") = value End Set End Property + + Property CveVendedorOriginal As Integer + Get + If ViewState("CveVendedorOriginal") Is Nothing Then + ViewState("CveVendedorOriginal") = -1 + End If + + Return DirectCast(ViewState("CveVendedorOriginal"), Integer) + + End Get + Set(value As Integer) + ViewState("CveVendedorOriginal") = value + End Set + End Property + + + 'Private ReadOnly Property CvePersonal As Integer ' Get ' If ViewState("CvePersonal") Is Nothing Then @@ -857,9 +874,15 @@ Partial Class Clientes Tab.ActiveTabIndex = Request("ATI").ToEntero() End If 'CargaCuentasyConceptos() - Else - 'Configuración de Modalidad Insert - CargaEstados() + + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + DVLnkCambiarVendedor.Visible = True + End If + + + Else + 'Configuración de Modalidad Insert + CargaEstados() BtnGuardar.Visible = PermiteGuardar() If UsuarioActual.Empresa.Funcionalidad(525) = "1" Then @@ -1591,6 +1614,7 @@ Partial Class Clientes Else DdlVendedor.SelectedValueExist(CveVendedor) End If + CveVendedorOriginal = CveVendedor 'TxtVendedor.Text = ObjClientes.Vendedor TxtPlazoCobranza.Text = ObjClientes.PlazoCobranza.ToString() @@ -10569,5 +10593,39 @@ Partial Class Clientes End Sub + + Protected Sub LnkCambiarVendedor_Click(sender As Object, e As EventArgs) + + If Not DdlVendedor.SelectedValue.ToEntero > 0 Then + Alert("Debe de seleccionar un Vendedor.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + + If CveVendedorOriginal = DdlVendedor.SelectedValue.ToEntero Then + Alert("Debe de seleccionar un vendedor distinto para actualizar.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + Dim ObjVentas As New ClsVentas + Dim ErrorCambio As Boolean = False + + If ObjVentas.CambioClientesVendedor(CveCliente, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + CveVendedorOriginal = DdlVendedor.SelectedValue.ToEntero + Else + ErrorCambio = True + End If + + ObjVentas.Dispose() + + If Not ErrorCambio Then + Alert("Vendedor Cambiado Correctamente.", TipoMensaje.MsgInformacion, $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}""") + End If + + + + + End Sub + End Class From e389f5246da2a130a29350684815034e949ecd07 Mon Sep 17 00:00:00 2001 From: rrene Date: Sun, 29 Jan 2023 13:39:28 -0700 Subject: [PATCH 054/103] =?UTF-8?q?carga=20layout=20liquidaci=C3=B3n=20E15?= =?UTF-8?q?8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/ClientesAbonar.aspx.vb | 118 +++++++++++++++++++--------------- 1 file changed, 67 insertions(+), 51 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 5a0c04c99..d078f30e8 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -296,7 +296,7 @@ Partial Class Ventas_ClientesAbonar RVTxtFechaDocumento.MaximumValue = Now.ToString("dd/MM/yyyy") - If UsuarioActual.CveEmpresa.Contiene(13, 83) Then + If UsuarioActual.CveEmpresa.Contiene(13, 83, 158) Then LnkAccionesModalSeleccionLayout.Visible = True End If @@ -864,15 +864,12 @@ Partial Class Ventas_ClientesAbonar 'inserto los movimientos de la conta para abonar al saldo If CvePrePoliza > 0 Then - Dim PorcentajePago As Decimal = 100 Dim CvePlantillaPoliza As Integer = 11 Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:

    " Dim idCuentaContabilizacion As Long = 1 Dim CveCuentaContabilizacion As Long = 1 Dim dtConceptos As DataTable = Nothing - Dim tipoCambioVenta As Decimal Dim tipoCambioPago As Decimal - Dim tipoCambioVentaValuacion As Decimal = 1 Dim TipoCambioGeneral As Decimal = 1 Dim CveSubProyectoContabilizar As Integer = -1 Dim CveSubProyectoMaximo As Integer = -1 @@ -886,6 +883,7 @@ Partial Class Ventas_ClientesAbonar Dim ImportePrestamo As Decimal = 0 Dim TCPrestamo As Decimal = 0 + If TxtPrestamoImporte.Text.ToDecimal <> 0 Then 'amortización del préstamo ImportePrestamo = TxtPrestamoImporte.Text.ToDecimal Dim tCveProv As Integer = DtPrestamos.FiltroPrimeroValor("CveProveedor", "CveIE=" & DdlPrestamo.SelectedValue) @@ -912,14 +910,14 @@ Partial Class Ventas_ClientesAbonar End If End If - If TxtPrestamoIntereses.Text.ToDecimal <> 0 AndAlso MsgError = "" Then - tipoCambioPago = If(TxtTCDolares.Visible, TxtTCDolares.Text.ToDecimal, TxtTCDolaresDolares.Text.ToDecimal) - Dim ImporteIntereses As Decimal = (TxtPrestamoIntereses.Text.ToDecimal * tipoCambioPago).RoundSQL - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteIntereses, ImporteIntereses, 51, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=11881, TipoCambio:=tipoCambioPago, CveClasificacion:=21927) Then - MsgError = "No se pudo insertar la póliza" - End If - End If + End If + If TxtPrestamoIntereses.Text.ToDecimal <> 0 AndAlso MsgError = "" Then + tipoCambioPago = If(TxtTCDolares.Visible, TxtTCDolares.Text.ToDecimal, TxtTCDolaresDolares.Text.ToDecimal) + Dim ImporteIntereses As Decimal = (TxtPrestamoIntereses.Text.ToDecimal * tipoCambioPago).RoundSQL + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteIntereses, ImporteIntereses, 51, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=11881, TipoCambio:=tipoCambioPago, CveClasificacion:=21927) Then + MsgError = "No se pudo insertar la póliza" + End If End If 'inserto las ventas que voy a pagar @@ -977,26 +975,6 @@ Partial Class Ventas_ClientesAbonar If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal - If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en Pesos y se va a pagar en Pesos - tipoCambioPago = 1 - tipoCambioVenta = 1 - PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / gvr.DataKey("Original").ToDecimal - ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos - tipoCambioPago = TxtTC.Text.ToDecimal - tipoCambioVenta = gvr.DataKey("TipoCambio").ToDecimal - tipoCambioVentaValuacion = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal) - PorcentajePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal) / gvr.DataKey("Original").ToDecimal - ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES - tipoCambioPago = If(CveMonedaFiltro = -1, TxtTCDolares.Text.ToDecimal, TxtTCDolaresDolares.Text.ToDecimal) - tipoCambioVenta = gvr.DataKey("TipoCambio").ToDecimal - tipoCambioVentaValuacion = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal) - PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / gvr.DataKey("Original").ToDecimal - ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES - tipoCambioPago = TxtTCDolares.Text.ToDecimal - tipoCambioVenta = 1 - PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / gvr.DataKey("Original").ToDecimal - End If - If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then EsAnticipoEspecial = True Pago.AplicaTraslado = False @@ -1109,7 +1087,7 @@ Partial Class Ventas_ClientesAbonar End If 'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo FluctuacionAnticipo = ((TCP - tipoCambioPago) * gvr.FCTextBox("TxtAmort").Text.ToDecimal).RoundSQL - MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort").Text.ToDecimal, TCP, tipoCambioVentaValuacion, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago) + MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort").Text.ToDecimal, TCP, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago) End If If MsgError = "" AndAlso gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero > 0 Then @@ -1130,12 +1108,13 @@ Partial Class Ventas_ClientesAbonar End If 'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo FluctuacionAnticipo += ((TCP - tipoCambioPago) * gvr.FCTextBox("TxtAmort2").Text.ToDecimal).RoundSQL - MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort2").Text.ToDecimal, TCP, tipoCambioVentaValuacion, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago) + MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort2").Text.ToDecimal, TCP, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago) End If If ImportePrestamo <> 0 Then If TCPrestamo > 0 Then FluctuacionAnticipo += ((TCPrestamo - tipoCambioPago) * ImportePrestamo).RoundSQL + ImportePrestamo = 0 End If End If Pago.ImporteFluctuacionAdicional = FluctuacionAnticipo @@ -1216,8 +1195,6 @@ Partial Class Ventas_ClientesAbonar End If - - End If If MsgError = "" AndAlso UsuarioActual.Empresa.Funcionalidad(220) <> "" Then @@ -1386,13 +1363,12 @@ Partial Class Ventas_ClientesAbonar StrMsg.AppendFormat("Nota de crédito generada correctamente.

    Folio: {1}
    ", RespuestaNotaCredito.Respuesta.CveVenta, RespuestaNotaCredito.Respuesta.SerieFolio) End If Next - Alert($"{StrMsg.ToString}

    {TextoComplementoPago}", TipoMensaje.MsgInformacion, If(ChkSeguirRegistrando.Checked, "location.href =""#""", "location.href =""/Bancos/RepCxCCliente.aspx""")) Else If ObjConta IsNot Nothing Then ObjConta.RollBack() ObjIE.RollBack() - ' Alert(MsgError, TipoMensaje.MsgAdvertencia) + Alert(MsgError, TipoMensaje.MsgAdvertencia) End If ObjIE.Dispose() @@ -1409,7 +1385,7 @@ Partial Class Ventas_ClientesAbonar End Sub - Private Function RegistraAmortizacionAnticipo(ByRef ObjMov As ClsContabilidad, CvePrePoliza As Integer, CveIE As Integer, Importe As Decimal, tipoCambioPago As Decimal, tipoCambioVenta As Decimal, CveVenta As Integer, ReferenciaVenta As String, ReferenciaPago As String) As String + Private Function RegistraAmortizacionAnticipo(ByRef ObjMov As ClsContabilidad, CvePrePoliza As Integer, CveIE As Integer, Importe As Decimal, tipoCambioPago As Decimal, CveVenta As Integer, ReferenciaVenta As String, ReferenciaPago As String) As String Dim MsgError As String = "" If CveMonedaPago = 2 Then @@ -2756,7 +2732,10 @@ Partial Class Ventas_ClientesAbonar End Sub Protected Sub ChkLiquidacion_CheckedChanged(sender As Object, e As EventArgs) + ActivaDesactivaLiquidacion() + End Sub + Private Sub ActivaDesactivaLiquidacion() If ChkLiquidacion.Checked Then TimTiempo.Enabled = True 'para que no me saque @@ -2811,7 +2790,6 @@ Partial Class Ventas_ClientesAbonar End If UPVentas.Update() - End Sub #End Region @@ -2833,31 +2811,36 @@ Partial Class Ventas_ClientesAbonar Dim CountRegistros As Integer = 0 Dim TotalSeleccion As Decimal = 0D - Dim SBNoEncotradosEnLista As New StringBuilder - Dim SBPagoMAyorASaldo As New StringBuilder + Dim SBNoEncontradosEnLista As New StringBuilder + Dim SBPagoMayorASaldo As New StringBuilder If TxtModalLayoutExcel.getfiles().Archivos.Count > 0 Then Dim file As Archivo = TxtModalLayoutExcel.getfiles().Archivos(0) Dim Directorio As String = Server.MapPath("~") & file.path Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV") - Dim DT As New DataTable + Dim DTExcel As New DataTable Dim ErrorArchivo = False Dim ErrorExcel = False - DT = ReadExcelFile(Directorio + file.filename, True) + DTExcel = ReadExcelFile(Directorio + file.filename, True) - If Not DT.Columns(0).ColumnName.ToUpper = "FOLIO" Then + If Not DTExcel.Columns(0).ColumnName.ToUpper = "FOLIO" Then Alert("El nombre de la primera columna debe ser 'Folio'. Favor de corregirlo", TipoMensaje.MsgAdvertencia) Exit Sub End If - If Not DT.Columns(1).ColumnName.ToUpper = "IMPORTE PAGO" Then - Alert("El nombre de la segunda columna debe ser 'Importe Pago'.Favor de corregirlo." & DT.Columns(1).ColumnName, TipoMensaje.MsgAdvertencia) + If Not DTExcel.Columns(1).ColumnName.ToUpper = "IMPORTE PAGO" Then + Alert("El nombre de la segunda columna debe ser 'Importe Pago'.Favor de corregirlo." & DTExcel.Columns(1).ColumnName, TipoMensaje.MsgAdvertencia) Exit Sub End If - For Each Drow As DataRow In DT.Rows + If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then + ChkLiquidacion.Checked = True + ActivaDesactivaLiquidacion() + End If + + For Each Drow As DataRow In DTExcel.Rows Dim SerieFolioBusqueda As String = Drow("Folio").ToString.Trim.ToUpper Dim ImportePago As Decimal = Drow("Importe Pago").ToString.ToDecimal.RoundSQL(2) @@ -2878,7 +2861,7 @@ Partial Class Ventas_ClientesAbonar If Diferencia < 0 Then If Math.Abs(Diferencia) > 0.01 Then - SBPagoMAyorASaldo.AppendLine($"Factura: {SerieFolioBusqueda} Importe de pago {ImportePago.ToString("###,###,###.00")} es mayor al saldo {SaldoGV.ToString("###,###,###.00")}
    ") + SBPagoMayorASaldo.AppendLine($"Factura: {SerieFolioBusqueda} Importe de pago {ImportePago.ToString("###,###,###.00")} es mayor al saldo {SaldoGV.ToString("###,###,###.00")}
    ") ProcesoOK = False Exit For Else @@ -2889,6 +2872,26 @@ Partial Class Ventas_ClientesAbonar GvRow.FCCheckBox("Chk").Checked = True GvRow.FCTextBox("TxtAbonar").Text = ImportePago.ToString("###,###,###.00") + If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then + + GvRow.FCDropDownList("DdlTG").SelectedTextExist(Drow("Tipo").ToString) + GvRow.FCTextBox("TxtLiqCol1").Text = Drow("Comisión").ToString + GvRow.FCTextBox("TxtLiqCol2").Text = Drow("Gastos").ToString + GvRow.FCTextBox("TxtLiqCol3").Text = Drow("Inspeccion").ToString + GvRow.FCTextBox("TxtLiqCol4").Text = Drow("Seguro").ToString + GvRow.FCTextBox("TxtLiqCol5").Text = Drow("AduanaMex").ToString + GvRow.FCTextBox("TxtLiqCol6").Text = Drow("Diversos").ToString + GvRow.FCTextBox("TxtLiqCol7").Text = Drow("AduanaUSA").ToString + GvRow.FCTextBox("TxtLiqCol8").Text = Drow("MaterialEmpaque").ToString + GvRow.FCTextBox("TxtLiqCol9").Text = Drow("Semilla").ToString + + GvRow.FCDropDownList("DdlAnti").SelectedTextLikeIfExist(Drow("FolioAnticipo1").ToString) + GvRow.FCTextBox("TxtAmort").Text = Drow("ImporteAnticipo1").ToString + GvRow.FCDropDownList("DdlAnti2").SelectedTextLikeIfExist(Drow("FolioAnticipo2").ToString) + GvRow.FCTextBox("TxtAmort2").Text = Drow("ImporteAnticipo2").ToString + + End If + TotalSeleccion = TotalSeleccion + ImportePago CountRegistros = CountRegistros + 1 @@ -2897,7 +2900,7 @@ Partial Class Ventas_ClientesAbonar Next If Not SerieFolioEncontrado Then - SBNoEncotradosEnLista.AppendLine($"{SerieFolioBusqueda}
    ") + SBNoEncontradosEnLista.AppendLine($"{SerieFolioBusqueda}
    ") End If End If Next @@ -2908,7 +2911,7 @@ Partial Class Ventas_ClientesAbonar If ProcesoOK Then - Alert($"Facturas seleccionadas: {CountRegistros}
    {SBNoEncotradosEnLista.ToString}") + Alert($"Facturas seleccionadas: {CountRegistros}
    {SBNoEncontradosEnLista.ToString}") RegistraScript("$('#ModalSeleccionLayout').modal('hide');") TxtImporte.Text = TotalSeleccion.ToString("###,###,###.00") @@ -2925,13 +2928,26 @@ Partial Class Ventas_ClientesAbonar End Sub + Public Sub SelectedTextLikeIfExist(ByRef Rbl As RadioButtonList, Value As String) + Try + For Each item As ListItem In Rbl.Items + If item.Value.Contains(Value) Then + item.Selected = True + End If + Next + Catch ex As Exception + End Try + End Sub Protected Sub LnkDescargaFormato_Click(sender As Object, e As EventArgs) Dim Directorio As String = "" - Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\LayoutSeleccion.xlsx" + Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\LayoutPagoCliente.xlsx" + If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then + Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\LayoutPagoClienteLiquidacion.xlsx" + End If If Not (Directorio = "") Then From d01e9c0a9397e1c6b6fe5093ab35b4c91ac7c555 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Mon, 30 Jan 2023 08:45:28 -0700 Subject: [PATCH 055/103] Clsventas CambioClientesVendedor CveCliente a Entero --- App_Code/ClsVentas.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 25f5e0936..1752b34e4 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -5725,7 +5725,7 @@ Public Class ClsVentas Dim Retorno As Boolean = False DataAdapter("PA_Vta_ClientesVendedorCambio") With SqlAdapter.SelectCommand.Parameters - .Add("@CveCliente", SqlDbType.VarChar).Value = CveCliente + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With From dae538be00a839925f42f0e78ca4dc8b55fd1b1c Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 30 Jan 2023 14:09:20 -0700 Subject: [PATCH 056/103] Edicion de metodo de pago en remisiones --- Ventas/Ventas.aspx.vb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 5d8e1464a..8bf4bc962 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -6063,10 +6063,10 @@ Partial Class Ventas End Sub Private Sub CargaFormaPago(CveMetodoPago As Integer) 'EN LA VERSION 4.0 NO PERMITE DESBLOEQUEAR RELACION METODO Y FOMA DE PAGO - If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then - 'permiso para desbloquear la relación entre Método de pago y forma de pago - If UsuarioActual.TienePermisoProceso(282) Then CveMetodoPago = -1 - End If + 'If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then + ' 'permiso para desbloquear la relación entre Método de pago y forma de pago + ' If UsuarioActual.TienePermisoProceso(282) Then CveMetodoPago = -1 + 'End If Dim dtt As DataTable = Nothing If CveMetodoPago > 0 Then @@ -21920,6 +21920,10 @@ Partial Class Ventas LblAmort.Text = TxtSubTotal.Text LimpiaEscondeContado() + If Not UsuarioActual.TienePermisoProceso(289) Then + DdlMetodoPago33.Enabled = True + End If + UPPVentas.Update() UpPS.Update() UpCliente.Update() From ac83d42bf73b53598ed7b310521ccea577795856 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 30 Jan 2023 14:10:15 -0700 Subject: [PATCH 057/103] Filtro de subproyecto en folios de garantia --- Inventarios/RecepcionUsados.aspx.vb | 6 ++++-- Ventas/PV.aspx.vb | 9 +-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 02167a020..40bf87dc4 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -3133,13 +3133,15 @@ Partial Class Inventarios_RecepcionUsados Private Sub CargaFolioAjuste() DdlFolioGarantia.Items.Clear() + Dim CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue}").ToEntero() Dim ObjAcum As New ClsAcumuladores - If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa, Estatus:=1, Area:=2) Then + If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa, Estatus:=1, CveSubProyecto:=CveSubProyecto, Area:=2) Then DdlFolioGarantia.DataSource = ObjAcum.DtResultados - DdlFolioGarantia.Items.Insert(0, New ListItem("Seleccione", "-1")) End If ObjAcum.Dispose() DdlFolioGarantia.DataBind() + DdlFolioGarantia.Items.Insert(0, New ListItem("Seleccione", "-1")) + End Sub Protected Sub DdlFolioGarantia_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlFolioGarantia.SelectedIndexChanged diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 818a55fb5..dece79162 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -7038,14 +7038,7 @@ Partial Class PV End Sub Private Sub CargaAjuste() - Dim ObjAcum As New ClsAcumuladores - If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa, Estatus:=1, Area:=1) Then - DdlFolioGarantia.DataSource = ObjAcum.DtResultados.Copy().FiltraParametros($"CveSubProyecto={DdlSubProyectoDatos.SelectedValue}") - End If - ObjAcum.Dispose() - DdlFolioGarantia.DataBind() - DdlFolioGarantia.Items.Insert(0, New ListItem("Seleccione", "-1")) - + CargaFoliosGarantia() DdlFacturas.Items.Insert(0, New ListItem("Sin Factura", "-1")) From 500be6b1eb898db54c1998278f9d141f454b1201 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Mon, 30 Jan 2023 17:09:51 -0700 Subject: [PATCH 058/103] Proveedores Carga de xml --- Compras/Proveedores.aspx.vb | 10 +++++++++- .../Reportes/RepSituacionFinanciera.rdlc | 16 ++++++++++------ Ventas/Clientes.aspx | 4 +++- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index d6440f523..88340dacc 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -717,7 +717,15 @@ Partial Class Compras_Proveedores Try Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) - XMLDoc.Load(UsuarioActual.Empresa.Ruta & "Compras\" & dr("RFCDe").ToString & "\" & dr("XML").ToString) + + + Dim SXML As String = File.ReadAllText(UsuarioActual.Empresa.Ruta & "Compras\" & dr("RFCDe").ToString & "\" & dr("XML").ToString) + 'SXML = SXML.TrimStart(vbCr, vbLf, vbNullChar) + 'SXML = SXML.TrimEnd(vbCr, vbLf, vbNullChar) + SXML = SXML.Trim(New Char() {""c}) + SXML = SXML.Replace("o;?", "") + + XMLDoc.LoadXml(SXML) Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix) Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3" Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable) diff --git a/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc b/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc index c783cb174..8fbc653f0 100644 --- a/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc +++ b/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc @@ -3035,32 +3035,36 @@ ReportParameter1 - =Sum(iif(Fields!Tipo.Value.ToString() = "A" OR Fields!Tipo.Value.ToString() = "B" OR Fields!Tipo.Value.ToString() = "C" OR Cint(Fields!TipoCuenta.Value) = 9 , Fields!ImporteActual.Value, 0) , "DataSet1") - =Sum(iif(Fields!Tipo.Value.ToString() = "A" OR Fields!Tipo.Value.ToString() = "B" OR Fields!Tipo.Value.ToString() = "C" OR Cint(Fields!TipoCuenta.Value) = 9 , Fields!ImporteAnterior.Value, 0) , "DataSet1") + =Sum( iif(Fields!Sup.Value = "ACTIVO NO CIRCULANTE" OR Fields!Sup.Value="ACTIVO CIRCULANTE" OR Cint(Fields!TipoCuenta.value) = 9 , Fields!ImporteAnterior.Value, 0), "DataSet1") - =Sum(iif(Fields!Tipo.Value.ToString() = "D" AND Cint(Fields!TipoCuenta.Value) = 3 , Fields!ImporteActual.Value, 0) , "DataSet1") + =Sum( iif(Fields!Sup.Value = "PASIVO CIRCULANTE" OR Fields!Sup.Value = "PASIVO NO CIRCULANTE" OR Fields!Sup.Value = "Pasivo a corto plazo", +Fields!ImporteActual.Value, 0), "DataSet1") - =Sum(iif(Fields!Tipo.Value.ToString() = "D" AND Cint(Fields!TipoCuenta.Value) = 3 , Fields!ImporteAnterior.Value, 0) , "DataSet1") + =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "PASIVO CIRCULANTE" OR Fields!Sup.Value = "PASIVO NO CIRCULANTE" , Fields!ImporteAnterior.Value, 0),"DataSet1") true =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" OR Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteActual.Value, 0),"DataSet1") - =Sum(iif(Fields!Tipo.Value.ToString() = "F" AND (Cint(Fields!TipoCuenta.Value) = 5 OR Cint(Fields!TipoCuenta.Value) = 6 OR Cint(Fields!TipoCuenta.Value) = 7 OR Cint(Fields!TipoCuenta.Value) = 8) , Fields!ImporteActual.Value, 0) , "DataSet1") + =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" +OR Fields!Sup.Value = "CAPITAL CONTABLE" +OR Fields!Sup.Value = "Capital Social" +OR Fields!Sup.Value = "Capital", +Fields!ImporteActual.Value, 0),"DataSet1") =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" OR Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteAnterior.Value, 0),"DataSet1") - =Sum(iif(Fields!Tipo.Value.ToString() = "F" AND (Cint(Fields!TipoCuenta.Value) = 5 OR Cint(Fields!TipoCuenta.Value) = 6 OR Cint(Fields!TipoCuenta.Value) = 7 OR Cint(Fields!TipoCuenta.Value) = 8) , Fields!ImporteAnterior.Value, 0) , "DataSet1") + =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" OR Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteActual.Value, 0),"DataSet1") =Variables!TotalPasivoActual.Value+Variables!TotalPatrimonioHActual.Value diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 198088ed9..f23ebb96f 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -677,7 +677,9 @@
    - Actualziar +
    From 9263cba81a8cb28d85fbfea4c2f2ba1fafa91987 Mon Sep 17 00:00:00 2001 From: MLopez Date: Mon, 30 Jan 2023 18:19:36 -0700 Subject: [PATCH 059/103] =?UTF-8?q?Fix=20compilaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CRM/RepAgendasBitacoras.aspx.cs | 2 +- Compras/EvaluacionProveedor.aspx.vb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/RepAgendasBitacoras.aspx.cs b/CRM/RepAgendasBitacoras.aspx.cs index 3a460798c..8f2242b97 100644 --- a/CRM/RepAgendasBitacoras.aspx.cs +++ b/CRM/RepAgendasBitacoras.aspx.cs @@ -103,6 +103,6 @@ public partial class CRM_AgendasBitacoras : ClsPaginas protected void LnkExcel_Click(object sender, EventArgs e) { - GVDatos.ExportToExcelx("RepAgendaBiracora.xls"); + GVDatos.ExportToExcelX("RepAgendaBiracora"); } } \ No newline at end of file diff --git a/Compras/EvaluacionProveedor.aspx.vb b/Compras/EvaluacionProveedor.aspx.vb index 460ed861b..517bedcec 100644 --- a/Compras/EvaluacionProveedor.aspx.vb +++ b/Compras/EvaluacionProveedor.aspx.vb @@ -118,7 +118,7 @@ Partial Class Compras_EvaluacionProveedor TxtSerieFolio.Text = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString() End If End If - If ObjCompras.GetCompraDetalle(CveCompra) Then + If ObjCompras.GetCompraDetalle(CveCompra, UsuarioActual.CveEmpresa) Then Dim StrPS As New StringBuilder() For Each Row As DataRow In ObjCompras.DtResultados.Rows If ObjCompras.DtResultados.Rows.Count > 1 Then From 7eafa124794db2de74f0f3ad10d6385f15b588b7 Mon Sep 17 00:00:00 2001 From: MLopez Date: Mon, 30 Jan 2023 21:38:30 -0700 Subject: [PATCH 060/103] =?UTF-8?q?Refactorizaci=C3=B3n/Mejoras=20en=20Glo?= =?UTF-8?q?balDTs=20CAMBIOS=20EN=20BD=20-=20Se=20MODIFIC=C3=93=20PA=5FProy?= =?UTF-8?q?ectosGet=20en=20SIG=5FResp=5FMLR=20=20=20(se=20le=20agreg=C3=B3?= =?UTF-8?q?=20el=20par=C3=A1metro:=20CveEmpresa)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsPaginas.vb | 397 +++++++++++++++++++++++------------- App_Code/ClsProyectos.vb | 3 +- App_Code/Modelos.vb | 2 +- Ashx/SIGFacturacion.ashx | 2 +- CxC/GestionCobranza.aspx.vb | 4 +- CxC/RepCxC.aspx.vb | 2 +- CxC/RepCxCDetalle.aspx.vb | 4 +- CxC/RepCxCPeriodo.aspx.cs | 2 +- Global.asax | 90 ++++---- 9 files changed, 305 insertions(+), 201 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 59b3e072a..c07323a4c 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1113,12 +1113,19 @@ Public Class ClsPaginas Application("GlobalDTClasificacionesPresupuestos") = value End Set End Property - Property GlobalDTMetodosPago() As DataTable + Public Shared Property GlobalDTMetodosPago() As DataTable Get - GlobalDTMetodosPago = DirectCast(Application("GlobalDTMetodosPago"), DataTable) + Dim AppNombre As String = "GlobalDTMetodosPago" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjMetodoPago As New ClsMetodosPagos + If ObjMetodoPago.GetMetodosPago() Then HttpContext.Current.Application(AppNombre) = ObjMetodoPago.DtResultados + ObjMetodoPago.Dispose() + End If + GlobalDTMetodosPago = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTMetodosPago") = value + Dim AppNombre As String = "GlobalDTMetodosPago" + HttpContext.Current.Application(AppNombre) = value End Set End Property Property GlobalDTModulos() As DataTable @@ -1337,67 +1344,72 @@ Public Class ClsPaginas Application("GlobalDTEstatusOrdenCompra") = value End Set End Property - Property GlobalDTLeyendasFiscales() As DataTable + Public Shared Property GlobalDTLeyendasFiscales() As DataTable Get - GlobalDTLeyendasFiscales = DirectCast(Application("GlobalDTLeyendasFiscales"), DataTable) + Dim AppNombre As String = "GlobalDTLeyendasFiscales" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjLeyendasFiscales As New ClsLeyendasFiscales + If ObjLeyendasFiscales.GetLeyendasFiscales() Then HttpContext.Current.Application(AppNombre) = ObjLeyendasFiscales.DtResultados + ObjLeyendasFiscales.Dispose() + End If + GlobalDTLeyendasFiscales = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTLeyendasFiscales") = value + Dim AppNombre As String = "GlobalDTLeyendasFiscales" + HttpContext.Current.Application(AppNombre) = value End Set End Property - - Property GlobalDTEstatusFactura() As DataTable + Public Shared Property GlobalDTEstatusFactura() As DataTable Get - GlobalDTEstatusFactura = DirectCast(Application("GlobalDTEstatusFactura"), DataTable) + Dim AppNombre As String = "GlobalDTEstatusFactura" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjEstatusFactura As New ClsEstatusFactura + If ObjEstatusFactura.GetEstatusFactura() Then HttpContext.Current.Application(AppNombre) = ObjEstatusFactura.DtResultados + ObjEstatusFactura.Dispose() + End If + GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTEstatusFactura") = value + Dim AppNombre As String = "GlobalDTEstatusFactura" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable + Public Shared Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable Get - - If DirectCast(Application("GlobalDTProyectos"), DataTable) Is Nothing Or (DirectCast(Application("GlobalDTProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(Application("GlobalDTProyectos"), DataTable).Rows.Count = 0) Then - Dim P As New ClsProyectos - If P.GetProyectos Then - Application("GlobalDTProyectos") = P.DtResultados - End If - P.Dispose() + Dim AppNombre As String = $"GlobalDTProyectos-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing OrElse DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0 Then + Dim ObjProyectos As New ClsProyectos + If ObjProyectos.GetProyectos(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjProyectos.DtResultados + ObjProyectos.Dispose() Dim msg As String = "aqui no se carga proyectos" - If Request IsNot Nothing Then - msg = msg & Request.ServerVariables("URL") + If HttpContext.Current.Request IsNot Nothing Then + msg += HttpContext.Current.Request.ServerVariables("URL") End If msg.GuardaLog() - End If - - If CveEmpresa <> -1 OrElse Estatus <> -1 Then 'OrElse CveProyecto <> -1 - - Dim StrSQL As New StringBuilder - If CveEmpresa <> -1 Then StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) - ' If CveProyecto <> -1 Then StrSQL.AppendFormat(" {0} CveProyecto = {1}", If(StrSQL.Length > 0, "AND", ""), CveProyecto) - If Estatus <> -1 Then StrSQL.AppendFormat(" {0} CveEstatus = {1}", If(StrSQL.Length > 0, "AND", ""), Estatus) - - Dim Dv As New DataView(DirectCast(Application("GlobalDTProyectos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) + If Estatus <> -1 Then 'OrElse CveProyecto <> -1 + 'Dim StrSQL As New StringBuilder + 'If Estatus <> -1 Then StrSQL.Append($"Estatus = {Estatus}") + 'If CveProyecto <> -1 Then StrSQL.Append(" {If(StrSQL.Length > 0, "AND", "")} CveProyecto = {CveProyecto}") + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveEstatus = {Estatus}", "", DataViewRowState.CurrentRows) GlobalDTProyectos = Dv.ToTable Dv.Dispose() - Else - GlobalDTProyectos = DirectCast(Application("GlobalDTProyectos"), DataTable) + GlobalDTProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If - End Get - Set(ByVal value As DataTable) + Set(value As DataTable) If value Is Nothing OrElse value.Rows.Count = 0 Then Dim msg As String = "aqui no se carga proyectos" - If Request IsNot Nothing Then - msg = msg & Request.ServerVariables("URL") + If HttpContext.Current.Request IsNot Nothing Then + msg += HttpContext.Current.Request.ServerVariables("URL") End If msg.GuardaLog() - End If - Application("GlobalDTProyectos") = value + Dim AppNombre As String = $"GlobalDTProyectos-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable @@ -1500,12 +1512,20 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property - Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable + Public Shared Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable Get - GlobalDTPrecioListas = DirectCast(Application("GlobalDTPrecioListas"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) + Dim AppNombre As String = $"GlobalDTPrecioListas-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjVentas As New ClsVentas + If ObjVentas.GetPrecioListas(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados + ObjVentas.Dispose() + End If + GlobalDTPrecioListas = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTPrecioListas") = value + Dim AppNombre As String = $"GlobalDTPrecioListas-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property 'Property GlobalDTMesas() As DataTable @@ -1918,12 +1938,19 @@ Public Class ClsPaginas End Set End Property 'Bancos - Property GlobalDTBancos() As DataTable + Public Shared Property GlobalDTBancos() As DataTable Get - GlobalDTBancos = DirectCast(Application("GlobalDTBancos"), DataTable) + Dim AppNombre As String = "GlobalDTBancos" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjBancos As New ClsBancos + If ObjBancos.GetBancos() Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados + ObjBancos.Dispose() + End If + GlobalDTBancos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTBancos") = value + Dim AppNombre As String = "GlobalDTBancos" + HttpContext.Current.Application(AppNombre) = value End Set End Property 'Property GlobalDTBancosCuentas(CveUsuario As Integer) As DataTable @@ -1970,24 +1997,34 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property - Property GlobalDTTipoTransacciones() As DataTable + Public Shared Property GlobalDTTipoTransacciones() As DataTable Get - If UsuarioActual.CveEmpresa = 66 Then - GlobalDTTipoTransacciones = DirectCast(Application("GlobalDTTipoTransacciones"), DataTable).FiltraParametros("Estatus = 1") - Else - GlobalDTTipoTransacciones = DirectCast(Application("GlobalDTTipoTransacciones"), DataTable) + Dim AppNombre As String = "GlobalDTTipoTransacciones" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjBancos As New ClsBancos + If ObjBancos.GetBancos_TiposTransaccion(-1) Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados + ObjBancos.Dispose() End If + GlobalDTTipoTransacciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTTipoTransacciones") = value + Dim AppNombre As String = "GlobalDTTipoTransacciones" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTBancosEstatusIE() As DataTable + Public Shared Property GlobalDTBancosEstatusIE() As DataTable Get - GlobalDTBancosEstatusIE = DirectCast(Application("GlobalDTBancosEstatusIE"), DataTable) + Dim AppNombre As String = "GlobalDTBancosEstatusIE" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjBancos As New ClsBancos + If ObjBancos.GetBancos_EstatusIE() Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados + ObjBancos.Dispose() + End If + GlobalDTBancosEstatusIE = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTBancosEstatusIE") = value + Dim AppNombre As String = "GlobalDTBancosEstatusIE" + HttpContext.Current.Application(AppNombre) = value End Set End Property Property GlobalDTBancosIE() As DataTable @@ -1998,12 +2035,19 @@ Public Class ClsPaginas Application("GlobalDTBancosIE") = value End Set End Property - Property GlobalDTTipoCuenta() As DataTable + Public Shared Property GlobalDTTipoCuenta() As DataTable Get - GlobalDTTipoCuenta = DirectCast(Application("GlobalDTTipoCuenta"), DataTable) + Dim AppNombre As String = "GlobalDTTipoCuenta" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjBancos As New ClsBancos + If ObjBancos.GetBancos_TiposCuenta() Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados + ObjBancos.Dispose() + End If + GlobalDTTipoCuenta = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTTipoCuenta") = value + Dim AppNombre As String = "GlobalDTTipoCuenta" + HttpContext.Current.Application(AppNombre) = value End Set End Property 'Fin Bancos @@ -2249,32 +2293,37 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property - Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable + Public Shared Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTTipoAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoAlmacen = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoAlmacen = DirectCast(Application("GlobalDTTipoAlmacen"), DataTable) + Dim AppNombre As String = $"GlobalDTTipoAlmacen-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim Objinventarios As New ClsInventarios + If Objinventarios.GetTiposAlmacenes() Then HttpContext.Current.Application(AppNombre) = Objinventarios.DtResultados + Objinventarios.Dispose() End If - + GlobalDTTipoAlmacen = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTTipoAlmacen") = value + Dim AppNombre As String = $"GlobalDTTipoAlmacen-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTInvConceptos() As DataTable + Public Shared Property GlobalDTInvConceptos() As DataTable Get - - Return DirectCast(Application("GlobalDTInvConceptos"), DataTable) - + Dim AppNombre As String = "GlobalDTInvConceptos" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim Objinventarios As New ClsInventarios + If Objinventarios.GetConceptos() Then HttpContext.Current.Application(AppNombre) = Objinventarios.DtResultados + Objinventarios.Dispose() + End If + GlobalDTInvConceptos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTInvConceptos") = value + Dim AppNombre As String = "GlobalDTInvConceptos" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) @@ -2343,31 +2392,26 @@ Public Class ClsPaginas End Set End Property - Property GlobalDTSeccionAlmacen(CveEmpresa As Integer, CveAlmacen As Integer) As DataTable + Public Shared Property GlobalDTSeccionAlmacen(CveEmpresa As Integer, CveAlmacen As Integer) As DataTable Get - Dim AppNombre As String = String.Format("GlobalDTSeccionAlmacen-{0}", CveEmpresa) + Dim AppNombre As String = $"GlobalDTSeccionAlmacen-{CveEmpresa}" 'sino existe, recarga los datos - If Application(AppNombre) Is Nothing Then + If HttpContext.Current.Application(AppNombre) Is Nothing Then Dim ObjInv As New ClsInventarios - If ObjInv.GetSeccionesAlmacenes(CveEmpresa, -1) Then Application(AppNombre) = ObjInv.DtResultados + If ObjInv.GetSeccionesAlmacenes(CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjInv.DtResultados ObjInv.Dispose() End If - If CveEmpresa <> -1 Then - Dim Str As New StringBuilder - - If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa) - If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen) - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + If CveAlmacen > 0 Then + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveAlmacen = {CveAlmacen}", "", DataViewRowState.CurrentRows) GlobalDTSeccionAlmacen = Dv.ToTable Dv.Dispose() Else - GlobalDTSeccionAlmacen = DirectCast(Application("GlobalDTSeccionAlmacen"), DataTable) + GlobalDTSeccionAlmacen = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If - End Get Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTSeccionAlmacen-{0}", CveEmpresa) - Application(AppNombre) = value + Dim AppNombre As String = $"GlobalDTSeccionAlmacen-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property @@ -2425,54 +2469,89 @@ Public Class ClsPaginas Application("GlobalDTNom_Periodos") = value End Set End Property - Public Property GlobalDTVtaFormaPago() As DataTable + Public Shared Property GlobalDTVtaFormaPago() As DataTable Get - GlobalDTVtaFormaPago = DirectCast(Application("GlobalDTVtaFormaPago"), DataTable) + Dim AppNombre As String = "GlobalDTVtaFormaPago" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjVentas As New ClsVentas + If ObjVentas.GetFormaPago() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados + ObjVentas.Dispose() + End If + GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTVtaFormaPago") = value + Dim AppNombre As String = "GlobalDTVtaFormaPago" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTVtaMetodoPago() As DataTable + Public Shared Property GlobalDTVtaMetodoPago() As DataTable Get - GlobalDTVtaMetodoPago = DirectCast(Application("GlobalDTVtaMetodoPago"), DataTable) + Dim AppNombre As String = "GlobalDTVtaMetodoPago" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjVentas As New ClsVentas + If ObjVentas.GetMetodoPago() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados + ObjVentas.Dispose() + End If + GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTVtaMetodoPago") = value + Dim AppNombre As String = "GlobalDTVtaMetodoPago" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTVtaTiposRelacion() As DataTable + Public Shared Property GlobalDTVtaTiposRelacion() As DataTable Get - GlobalDTVtaTiposRelacion = DirectCast(Application("GlobalDTVtaTiposRelacion"), DataTable) + Dim AppNombre As String = "GlobalDTVtaTiposRelacion" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjVentas As New ClsVentas + If ObjVentas.GetTiposRelacion() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados + ObjVentas.Dispose() + End If + GlobalDTVtaTiposRelacion = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTVtaTiposRelacion") = value + Dim AppNombre As String = "GlobalDTVtaTiposRelacion" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTTiposDocumentos() As DataTable + Public Shared Property GlobalDTTiposDocumentos() As DataTable Get - GlobalDTTiposDocumentos = DirectCast(Application("GlobalDTTiposDocumentos"), DataTable) + Dim AppNombre As String = "GlobalDTTiposDocumentos" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjVentas As New ClsVentas + If ObjVentas.GetTiposDocumentos() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados + ObjVentas.Dispose() + End If + GlobalDTTiposDocumentos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTTiposDocumentos") = value + Dim AppNombre As String = "GlobalDTTiposDocumentos" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTCobranzaEstatus(CveEmpresa As Integer) As DataTable + Public Shared Property GlobalDTVtaCobranzaEstatus(CveEmpresa As Integer, Optional CveCobranzaEstatus As Integer = -1) As DataTable Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTVtaCobranzaEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTCobranzaEstatus = Dv.ToTable + Dim AppNombre As String = $"GlobalDTVtaCobranzaEstatus-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjVentas As New ClsVentas + If ObjVentas.GetCobranzaEstatus(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados + ObjVentas.Dispose() + End If + If CveCobranzaEstatus <> -1 Then + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveCobranzaEstatus = {CveCobranzaEstatus}", "", DataViewRowState.CurrentRows) + GlobalDTVtaCobranzaEstatus = Dv.ToTable Dv.Dispose() Else - GlobalDTCobranzaEstatus = DirectCast(Application("GlobalDTVtaCobranzaEstatus"), DataTable) + GlobalDTVtaCobranzaEstatus = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If End Get Set(value As DataTable) - Application("GlobalDTVtaCobranzaEstatus") = value + Dim AppNombre As String = $"GlobalDTVtaCobranzaEstatus-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property - #Region "***********************************************************************DT EVENTOS****************************************************************************************" Property GlobalDTTiposEventos() As DataTable Get @@ -2492,21 +2571,48 @@ Public Class ClsPaginas End Set End Property - Property GlobalDTOIEventoTarea() As DataTable + Public Shared Property GlobalDTOIEventoTarea(CveEmpresa As Integer, Optional CveUsuario As Integer = -1) As DataTable Get - GlobalDTOIEventoTarea = DirectCast(Application("GlobalDTOIEventoTarea"), DataTable) + Dim AppNombre As String = $"GlobalDTOIEventoTarea-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjEventos As New ClsOIEventos + If ObjEventos.GetEventoTarea(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjEventos.DtResultados + ObjEventos.Dispose() + End If + If CveUsuario <> -1 Then + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveUsuario = {CveUsuario}", "", DataViewRowState.CurrentRows) + GlobalDTOIEventoTarea = Dv.ToTable + Dv.Dispose() + Else + GlobalDTOIEventoTarea = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + End If End Get Set(value As DataTable) - Application("GlobalDTOIEventoTarea") = value + Dim AppNombre As String = $"GlobalDTOIEventoTarea-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTOIEstatusEventos() As DataTable + Public Shared Property GlobalDTOIEstatusEventos(Optional CveEventoEstatus As Integer = -1) As DataTable Get - GlobalDTOIEstatusEventos = DirectCast(Application("GlobalDTOIEstatusEventos"), DataTable) + Dim AppNombre As String = "GlobalDTOIEstatusEventos" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjEventos As New ClsOIEventos + If ObjEventos.GetEstatusEventos(-1) Then HttpContext.Current.Application(AppNombre) = ObjEventos.DtResultados + ObjEventos.Dispose() + End If + If CveEventoEstatus > 0 Then + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveEventoEstatus = {CveEventoEstatus}", "", DataViewRowState.CurrentRows) + GlobalDTOIEstatusEventos = Dv.ToTable + Dv.Dispose() + Else + GlobalDTOIEstatusEventos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + End If End Get Set(value As DataTable) - Application("GlobalDTOIEstatusEventos") = value + Dim AppNombre As String = "GlobalDTOIEstatusEventos" + HttpContext.Current.Application(AppNombre) = value End Set End Property #End Region @@ -4030,50 +4136,53 @@ Public Class ClsPaginas End Get End Property - Property GlobalDTOIRevision(CveEmpresa As Integer) As DataTable + Public Shared Property GlobalDTOIRevision(CveEmpresa As Integer) As DataTable Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(Application("GlobalDTOIRevision"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTOIRevision = Dv.ToTable - Dv.Dispose() - Else - GlobalDTOIRevision = DirectCast(Application("GlobalDTOIRevision"), DataTable) + Dim AppNombre As String = $"GlobalDTOIRevision-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjEventos As New ClsOIEventos + If ObjEventos.GetRevisionesEventos(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjEventos.DtResultados + ObjEventos.Dispose() End If + GlobalDTOIRevision = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTOIRevision") = value + Dim AppNombre As String = $"GlobalDTOIRevision-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTOIAgendaTipo() As DataTable + + Public Shared Property GlobalDTOIAgendaTipo() As DataTable Get - GlobalDTOIAgendaTipo = DirectCast(Application("GlobalDTOIAgendaTipo"), DataTable) - End Get - Set(value As DataTable) - Application("GlobalDTOIAgendaTipo") = value - End Set - End Property - Property GlobalDTOIAgenda() As DataTable - Get - GlobalDTOIAgenda = DirectCast(Application("GlobalDTOIAgenda"), DataTable) - End Get - Set(value As DataTable) - Application("GlobalDTOIAgenda") = value - End Set - End Property - Property GlobalDTVtaCondicionesEntrega(Optional CveEmpresa As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(Application("GlobalDTVtaCondicionesEntrega"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTVtaCondicionesEntrega = Dv.ToTable - Dv.Dispose() - Else - GlobalDTVtaCondicionesEntrega = DirectCast(Application("GlobalDTVtaCondicionesEntrega"), DataTable) + Dim AppNombre As String = "GlobalDTOIAgendaTipo" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjEventos As New ClsOIEventos + If ObjEventos.GetAgendaTipo() Then HttpContext.Current.Application(AppNombre) = ObjEventos.DtResultados + ObjEventos.Dispose() End If + GlobalDTOIAgendaTipo = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTVtaCondicionesEntrega") = value + Dim AppNombre As String = "GlobalDTOIAgendaTipo" + HttpContext.Current.Application(AppNombre) = value + End Set + End Property + + Public Shared Property GlobalDTVtaCondicionesEntrega(Optional CveEmpresa As Integer = -1) As DataTable + Get + Dim AppNombre As String = $"GlobalDTVtaCondicionesEntrega-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjVentas As New ClsVentas + If ObjVentas.GetCondicionesEntrega(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados + ObjVentas.Dispose() + End If + GlobalDTVtaCondicionesEntrega = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + End Get + Set(value As DataTable) + Dim AppNombre As String = $"GlobalDTVtaCondicionesEntrega-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable diff --git a/App_Code/ClsProyectos.vb b/App_Code/ClsProyectos.vb index 38f6a15dd..f26258873 100644 --- a/App_Code/ClsProyectos.vb +++ b/App_Code/ClsProyectos.vb @@ -128,11 +128,12 @@ Public Class ClsProyectos SqlTransacc = Nothing End Sub - Public Function GetProyectos(Optional Opcion As Integer = -1) As Boolean + Public Function GetProyectos(CveEmpresa As Integer, Optional Opcion As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ProyectosGet") With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@Opcion", SqlDbType.Int).Value = Opcion End With Try diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index d1a3e66b5..25576d87b 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -7797,7 +7797,7 @@ Namespace Modelos If DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable).Rows.Count = 0) Then Dim P As New ClsProyectos - If P.GetProyectos Then + If P.GetProyectos(-1) Then HttpContext.Current.Application("GlobalDTProyectos") = P.DtResultados End If P.Dispose() diff --git a/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx index d9fa69a59..590b27b3c 100644 --- a/Ashx/SIGFacturacion.ashx +++ b/Ashx/SIGFacturacion.ashx @@ -1650,7 +1650,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState If DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable).Rows.Count = 0) Then Dim P As New ClsProyectos - If P.GetProyectos Then + If P.GetProyectos(-1) Then HttpContext.Current.Application("GlobalDTProyectos") = P.DtResultados End If P.Dispose() diff --git a/CxC/GestionCobranza.aspx.vb b/CxC/GestionCobranza.aspx.vb index 183098cf2..836c147bf 100644 --- a/CxC/GestionCobranza.aspx.vb +++ b/CxC/GestionCobranza.aspx.vb @@ -57,11 +57,11 @@ Partial Class Ventas_GestionCobranza DdlResponsableCobranza.DataBind() DdlResponsableCobranza.Items.Insert(0, New ListItem("Todos", "-1")) - DdlCobranzaEstatus.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa) + DdlCobranzaEstatus.DataSource = GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa) DdlCobranzaEstatus.DataBind() DdlCobranzaEstatus.Items.Insert(0, New ListItem("Todos", "-1")) - DdlCobranzaEstatusEdit.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa) + DdlCobranzaEstatusEdit.DataSource = GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa) DdlCobranzaEstatusEdit.DataBind() If ObjVentas.GetCobranzaTurnoEstatus(-1, UsuarioActual.CveEmpresa) Then diff --git a/CxC/RepCxC.aspx.vb b/CxC/RepCxC.aspx.vb index f6030f5be..4b47b850e 100644 --- a/CxC/RepCxC.aspx.vb +++ b/CxC/RepCxC.aspx.vb @@ -152,7 +152,7 @@ Partial Class RepCxC txtCorteA.Text = $"31/12/{Now.Year}" 'Carga Cobranza Estatus - DdlCobranzaEstatus.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa) + DdlCobranzaEstatus.DataSource = GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa) DdlCobranzaEstatus.DataBind() DdlCobranzaEstatus.Items.Insert(0, New ListItem("Todos", "-1")) diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb index ee74096fa..98befc41c 100644 --- a/CxC/RepCxCDetalle.aspx.vb +++ b/CxC/RepCxCDetalle.aspx.vb @@ -280,7 +280,7 @@ Partial Class RepCxCDetalle DdlTipoDocto.Items.Add(New ListItem("Ing X Comp", "IxC")) 'Carga Cobranza Estatus - DdlCobranzaEstatusFiltro.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa) + DdlCobranzaEstatusFiltro.DataSource = GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa) DdlCobranzaEstatusFiltro.DataBind() DdlCobranzaEstatusFiltro.Items.Insert(0, New ListItem("Todos", "-1")) @@ -1062,7 +1062,7 @@ Partial Class RepCxCDetalle DdlUsuarioCobranza.DataBind() DdlUsuarioCobranza.Items.Insert(0, New ListItem("Sin Cobrador", "-1")) - DdlCobranzaEstatus.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa) + DdlCobranzaEstatus.DataSource = GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa) DdlCobranzaEstatus.DataBind() DdlCobranzaEstatus.Items.Insert(0, New ListItem("Sin Estatus", "-1")) diff --git a/CxC/RepCxCPeriodo.aspx.cs b/CxC/RepCxCPeriodo.aspx.cs index ab35f80f1..83ab94427 100644 --- a/CxC/RepCxCPeriodo.aspx.cs +++ b/CxC/RepCxCPeriodo.aspx.cs @@ -81,7 +81,7 @@ public partial class CxC_RepCxCPeriodo : ClsPaginas txtCorteA.Text = $"31/12/{DateTime.Now.Year}"; //Carga Cobranza Estatus - DdlCobranzaEstatus.DataSource = get_GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa); + DdlCobranzaEstatus.DataSource = get_GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa); DdlCobranzaEstatus.DataBind(); DdlCobranzaEstatus.Items.Insert(0, new ListItem("Todos", "-1")); diff --git a/Global.asax b/Global.asax index 7c4e7e04d..4590b7858 100644 --- a/Global.asax +++ b/Global.asax @@ -193,27 +193,27 @@ 'B A N C O S - GuardaLogAsax(String.Format("Globalasax 12:{0}", DateTime.Now)) - Using ObjBancos As New ClsBancos - 'If ObjBancos.GetBancosCuentasUsuarios(-1) Then Application("GlobalDTBancosCuentas") = ObjBancos.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing - 'If ObjBancos.GetBancosCuentasUsuarios(-1) Then Application("GlobalDTBancosCuentas") = ObjBancos.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing - If ObjBancos.GetBancos_TiposTransaccion(-1) Then Application("GlobalDTTipoTransacciones") = ObjBancos.DtResultados Else Application("GlobalDTTipoTransacciones") = Nothing - If ObjBancos.GetBancos_EstatusIE() Then Application("GlobalDTBancosEstatusIE") = ObjBancos.DtResultados Else Application("GlobalDTBancosEstatusIE") = Nothing - If ObjBancos.GetBancos() Then Application("GlobalDTBancos") = ObjBancos.DtResultados Else Application("GlobalDTBancos") = Nothing - If ObjBancos.GetBancos_TiposCuenta() Then Application("GlobalDTTipoCuenta") = ObjBancos.DtResultados Else Application("GlobalDTTipoCuenta") = Nothing - End Using + 'GuardaLogAsax(String.Format("Globalasax 12:{0}", DateTime.Now)) + 'Using ObjBancos As New ClsBancos + 'If ObjBancos.GetBancosCuentasUsuarios(-1) Then Application("GlobalDTBancosCuentas") = ObjBancos.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing + 'If ObjBancos.GetBancosCuentasUsuarios(-1) Then Application("GlobalDTBancosCuentas") = ObjBancos.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing + 'If ObjBancos.GetBancos_TiposTransaccion(-1) Then Application("GlobalDTTipoTransacciones") = ObjBancos.DtResultados Else Application("GlobalDTTipoTransacciones") = Nothing + 'If ObjBancos.GetBancos_EstatusIE() Then Application("GlobalDTBancosEstatusIE") = ObjBancos.DtResultados Else Application("GlobalDTBancosEstatusIE") = Nothing + 'If ObjBancos.GetBancos() Then Application("GlobalDTBancos") = ObjBancos.DtResultados Else Application("GlobalDTBancos") = Nothing + 'If ObjBancos.GetBancos_TiposCuenta() Then Application("GlobalDTTipoCuenta") = ObjBancos.DtResultados Else Application("GlobalDTTipoCuenta") = Nothing + 'End Using - GuardaLogAsax(String.Format("Globalasax 13:{0}", DateTime.Now)) + 'GuardaLogAsax(String.Format("Globalasax 13:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'I N V E N T A R I O S - Using Objinventarios As New ClsInventarios - 'If Objinventarios.GetAlmacenes(-1, -1, -1, -1) Then Application("GlobalDTAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTAlmacen") = Nothing - If Objinventarios.GetSeccionesAlmacenes(-1, -1) Then Application("GlobalDTSeccionAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTSeccionAlmacen") = Nothing - If Objinventarios.GetTiposAlmacenes Then Application("GlobalDTTipoAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTTipoAlmacen") = Nothing - If Objinventarios.GetConceptos Then Application("GlobalDTInvConceptos") = Objinventarios.DtResultados Else Application("GlobalDTInvConceptos") = Nothing - End Using + 'Using Objinventarios As New ClsInventarios + 'If Objinventarios.GetAlmacenes(-1, -1, -1, -1) Then Application("GlobalDTAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTAlmacen") = Nothing + 'If Objinventarios.GetSeccionesAlmacenes(-1, -1) Then Application("GlobalDTSeccionAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTSeccionAlmacen") = Nothing + 'If Objinventarios.GetTiposAlmacenes Then Application("GlobalDTTipoAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTTipoAlmacen") = Nothing + 'If Objinventarios.GetConceptos Then Application("GlobalDTInvConceptos") = Objinventarios.DtResultados Else Application("GlobalDTInvConceptos") = Nothing + 'End Using GuardaLogAsax(String.Format("Globalasax 14:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ @@ -262,18 +262,16 @@ 'If ObjGrales.GetSATMunicipio("-1") Then Application("GlobalDTMunicipio") = ObjGrales.DtResultados Else Application("GlobalDTMunicipio") = Nothing 'If ObjGrales.GetSATColonia("-1") Then Application("GlobalDTColonia") = ObjGrales.DtResultados Else Application("GlobalDTColonia") = Nothing End Using -#End If - GuardaLogAsax(String.Format("Globalasax 16:{0}", DateTime.Now)) + 'GuardaLogAsax(String.Format("Globalasax 16:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'E V E N T O S - Using ObjEventos As New ClsOIEventos - If ObjEventos.GetEstatusEventos(-1) Then Application("GlobalDTOIEstatusEventos") = ObjEventos.DtResultados Else Application("GlobalDTOIEstatusEventos") = Nothing - If ObjEventos.GetRevisionesEventos(-1) Then Application("GlobalDTOIRevision") = ObjEventos.DtResultados Else Application("GlobalDTOIRevision") = Nothing - If ObjEventos.GetAgendaTipo() Then Application("GlobalDTOIAgendaTipo") = ObjEventos.DtResultados Else Application("GlobalDTOIAgendaTipo") = Nothing - If ObjEventos.GetEventoTarea(-1, -1) Then Application("GlobalDTOIEventoTarea") = ObjEventos.DtResultados Else Application("GlobalDTOIEventoTarea") = Nothing - End Using - + 'Using ObjEventos As New ClsOIEventos + 'If ObjEventos.GetEstatusEventos(-1) Then Application("GlobalDTOIEstatusEventos") = ObjEventos.DtResultados Else Application("GlobalDTOIEstatusEventos") = Nothing + 'If ObjEventos.GetRevisionesEventos(-1) Then Application("GlobalDTOIRevision") = ObjEventos.DtResultados Else Application("GlobalDTOIRevision") = Nothing + 'If ObjEventos.GetAgendaTipo() Then Application("GlobalDTOIAgendaTipo") = ObjEventos.DtResultados Else Application("GlobalDTOIAgendaTipo") = Nothing + 'If ObjEventos.GetEventoTarea(-1, -1) Then Application("GlobalDTOIEventoTarea") = ObjEventos.DtResultados Else Application("GlobalDTOIEventoTarea") = Nothing + 'End Using GuardaLogAsax(String.Format("Globalasax 17:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'V E N T A S @@ -289,11 +287,7 @@ If ObjVentas.GetCobranzaEstatus(-1, -1) Then Application("GlobalDTVtaCobranzaEstatus") = ObjVentas.DtResultados Else Application("GlobalDTVtaCobranzaEstatus") = Nothing End Using - GuardaLogAsax(String.Format("Globalasax 18:{0}", DateTime.Now)) - '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - - GuardaLogAsax(String.Format("Globalasax 19:{0}", DateTime.Now)) - + 'GuardaLogAsax(String.Format("Globalasax 19:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ''MF @@ -304,7 +298,7 @@ 'ObjMF.Dispose() - +#End If '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'C L A S I F I C A C I O N E S @@ -365,10 +359,10 @@ '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'M E T O D O S - D E - P A G O - Using ObjMetodoPago As New ClsMetodosPagos() - If ObjMetodoPago.GetMetodosPago() Then Application("GlobalDTMetodosPago") = ObjMetodoPago.DtResultados Else Application("GlobalDTMetodosPago") = Nothing - End Using - GuardaLogAsax(String.Format("Globalasax 21:{0}", DateTime.Now)) + 'Using ObjMetodoPago As New ClsMetodosPagos() + ' If ObjMetodoPago.GetMetodosPago() Then Application("GlobalDTMetodosPago") = ObjMetodoPago.DtResultados Else Application("GlobalDTMetodosPago") = Nothing + 'End Using + 'GuardaLogAsax(String.Format("Globalasax 21:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ @@ -379,34 +373,34 @@ ' If ObjMonedas.GetMonedasAlias() Then Application("GlobalDTMonedasAlias") = ObjMonedas.DtResultados Else Application("GlobalDTMonedasAlias") = Nothing 'End Using - GuardaLogAsax(String.Format("Globalasax 22:{0}", DateTime.Now)) + 'GuardaLogAsax(String.Format("Globalasax 22:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'L E Y E N D A S - F I S C A L E S - Using ObjLeyendasFiscales As New ClsLeyendasFiscales() - If ObjLeyendasFiscales.GetLeyendasFiscales() Then Application("GlobalDTLeyendasFiscales") = ObjLeyendasFiscales.DtResultados Else Application("GlobalDTLeyendasFiscales") = Nothing - End Using - GuardaLogAsax(String.Format("Globalasax 23:{0}", DateTime.Now)) + 'Using ObjLeyendasFiscales As New ClsLeyendasFiscales() + ' If ObjLeyendasFiscales.GetLeyendasFiscales() Then Application("GlobalDTLeyendasFiscales") = ObjLeyendasFiscales.DtResultados Else Application("GlobalDTLeyendasFiscales") = Nothing + 'End Using + 'GuardaLogAsax(String.Format("Globalasax 23:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'F A C T U R A S - Using ObjEstatusFactura As New ClsEstatusFactura() - If ObjEstatusFactura.GetEstatusFactura() Then Application("GlobalDTEstatusFactura") = ObjEstatusFactura.DtResultados Else Application("GlobalDTEstatusFactura") = Nothing + 'Using ObjEstatusFactura As New ClsEstatusFactura() + ' If ObjEstatusFactura.GetEstatusFactura() Then Application("GlobalDTEstatusFactura") = ObjEstatusFactura.DtResultados Else Application("GlobalDTEstatusFactura") = Nothing - End Using - GuardaLogAsax(String.Format("Globalasax 24:{0}", DateTime.Now)) + 'End Using + 'GuardaLogAsax(String.Format("Globalasax 24:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'P R O Y E C T O S - Using ObjProyectos As New ClsProyectos - If ObjProyectos.GetProyectos Then Application("GlobalDTProyectos") = ObjProyectos.DtResultados Else Application("GlobalDTProyectos") = Nothing - End Using - GuardaLogAsax(String.Format("Globalasax 25:{0}", DateTime.Now)) + 'Using ObjProyectos As New ClsProyectos + ' If ObjProyectos.GetProyectos Then Application("GlobalDTProyectos") = ObjProyectos.DtResultados Else Application("GlobalDTProyectos") = Nothing + 'End Using + 'GuardaLogAsax(String.Format("Globalasax 25:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'S U B P R O Y E C T O S From 83a795c5f2c277f8f37949cfdec43b746b1c545c Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 30 Jan 2023 21:41:17 -0700 Subject: [PATCH 061/103] .xls --- CRM/RepAgendasBitacoras.aspx.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/RepAgendasBitacoras.aspx.cs b/CRM/RepAgendasBitacoras.aspx.cs index 3a460798c..9fa4d9364 100644 --- a/CRM/RepAgendasBitacoras.aspx.cs +++ b/CRM/RepAgendasBitacoras.aspx.cs @@ -103,6 +103,6 @@ public partial class CRM_AgendasBitacoras : ClsPaginas protected void LnkExcel_Click(object sender, EventArgs e) { - GVDatos.ExportToExcelx("RepAgendaBiracora.xls"); + GVDatos.ExportToExcel ("RepAgendaBiracora.xls"); } } \ No newline at end of file From 5ce2554eabab2e69f0ec68e3c1a6c0539507765e Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 30 Jan 2023 21:45:52 -0700 Subject: [PATCH 062/103] limitado a porcentaje 1 en pago venta --- App_Code/ClsPaginas.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 59b3e072a..72326646c 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -10362,7 +10362,7 @@ Public Class ClsPaginas Public Function AplicaPrePolizaPagoVenta(VentaActual As Venta, Pago As VentaPago, CvePrePoliza As Integer, ByRef ObjConta As ClsContabilidad) As Boolean Dim ErrorMovtos As Boolean = False - Dim PorcentajePago As Decimal = Pago.ImportePago / VentaActual.Total + Dim PorcentajePago As Decimal = Pago.ImportePagoVenta / VentaActual.Total Dim ImporteMovimiento As Decimal = 0 Dim ImporteMN As Decimal = 0 Dim ImporteME As Decimal = 0 @@ -10372,6 +10372,7 @@ Public Class ClsPaginas Dim tFechaUltimaFluctuacion As Date Dim tImportePago, tImporteVenta As Decimal Dim CveConceptoContableComplementaria As Integer = 207 + If PorcentajePago > 1 Then PorcentajePago = 1 Pago.CveConceptoPago = If(Pago.CveConceptoPago = -1, 2, Pago.CveConceptoPago) 'si viene en parametro lo toma com primera opcion, sino el 2 From 4ad1d89087fd7c07307ad483bd69c8fdab08327d Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 31 Jan 2023 09:08:37 -0700 Subject: [PATCH 063/103] desaplicar pago de anticipo de compra --- Contabilidad/PopUpAuxiliar.aspx.vb | 50 +++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/Contabilidad/PopUpAuxiliar.aspx.vb b/Contabilidad/PopUpAuxiliar.aspx.vb index 111ae7686..21da35698 100644 --- a/Contabilidad/PopUpAuxiliar.aspx.vb +++ b/Contabilidad/PopUpAuxiliar.aspx.vb @@ -225,13 +225,21 @@ Partial Class PopUpAuxiliar e.Row.FCLinkButton("LnkDesAplicar").CommandName = "DesAplicarCompra" e.Row.FCLinkButton("imgD").Visible = False If e.Row.DBCampo("CveConceptoContable").Contiene("272") Then - e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveCompraAmortizacion")) + e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}|{3}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveCompraAmortizacion"), e.Row.DBCampo("CveIE")) Else - e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompraAmortizacion"), e.Row.DBCampo("CveCompra")) + e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}|{3}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompraAmortizacion"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveIE")) End If - End If - If e.Row.DBCampo("TipoReferencia").ToEntero = 1 Then + ElseIf e.Row.DBCampo("CveConceptoContable").Contiene("21") Then 'desaplicar anticipo de compra + + e.Row.FCLinkButton("LnkDesAplicar").Visible = True + e.Row.FCLinkButton("LnkDesAplicar").CommandName = "DesAplicarAnticipoCompra" + e.Row.FCLinkButton("imgD").Visible = False + e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveIE")) + + End If + + If e.Row.DBCampo("TipoReferencia").ToEntero = 1 Then e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Bancos/IE.aspx?CveIE={e.Row.DBCampo("CveReferencia").ToEntero}" 'If e.Row.DBCampo("CveReferencia").ToEntero > 0 Then ' e.Row.Cells(10).Text = "" @@ -519,6 +527,40 @@ Partial Class PopUpAuxiliar End If + If e.CommandName = "DesAplicarAnticipoCompra" Then + + Dim CvePrePoliza, CveCompra, CveIE As Integer + Dim TieneError = False + + Dim St As String() = e.CommandArgument.ToString.Split("|"c) + If St.Length > 0 Then + CvePrePoliza = St(0).ToEntero + CveCompra = St(1).ToEntero + CveIE = St(2).ToEntero + End If + + If CvePrePoliza > 0 Then + Dim Conta As New ClsContabilidad() + Conta.IniciaTransacSQL() + + If Not Conta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then + TieneError = True + End If + + If Not TieneError AndAlso Not Conta.DesAplicarPago(CvePrePoliza, 21, CveCompra, CveIE) Then + TieneError = True + End If + + If Not TieneError Then + Conta.Commit() + Alert("Pago Desaplicado.", TipoMensaje.ToastInformacion) + Else + Conta.RollBack() + Alert("Pago no fue desaplicado.", TipoMensaje.ToastError) + End If + End If + + End If End Sub End Class From c9f42f0941e2d26b826dadfa7bb0058e84730e5a Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 31 Jan 2023 09:16:42 -0700 Subject: [PATCH 064/103] -- ocultado de filtro de contratos --- CxC/RepCxC.aspx | 2 +- CxC/RepCxC.aspx.vb | 9 +++++---- CxC/RepCxCDetalle.aspx | 2 +- CxC/RepCxCDetalle.aspx.vb | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CxC/RepCxC.aspx b/CxC/RepCxC.aspx index e66c3446e..8b9913fba 100644 --- a/CxC/RepCxC.aspx +++ b/CxC/RepCxC.aspx @@ -365,7 +365,7 @@
    Contrato:
    -
    +
    diff --git a/CxC/RepCxC.aspx.vb b/CxC/RepCxC.aspx.vb index 4b47b850e..02e642962 100644 --- a/CxC/RepCxC.aspx.vb +++ b/CxC/RepCxC.aspx.vb @@ -4,7 +4,8 @@ Option Strict On Imports System.Data Imports System.IO Imports Extensiones -Imports Microsoft.Reporting.WebForms +Imports Microsoft.Reporting.WebForms + Partial Class RepCxC Inherits ClsPaginas @@ -181,9 +182,9 @@ Partial Class RepCxC Private Sub CargaContratos() Dim ObjContratos As New ClsContratos If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, CveCliente:=-1) Then - DdlContrato.DataSource = ObjContratos.DtResultados - End If - + DdlContrato.DataSource = ObjContratos.DtResultados + End If + divContrato.Visible = True ObjContratos.Dispose() DdlContrato.DataBind() diff --git a/CxC/RepCxCDetalle.aspx b/CxC/RepCxCDetalle.aspx index e13c957ac..694f59a17 100644 --- a/CxC/RepCxCDetalle.aspx +++ b/CxC/RepCxCDetalle.aspx @@ -348,7 +348,7 @@
    Contrato:
    -
    +
    diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb index 98befc41c..4edcd7ef5 100644 --- a/CxC/RepCxCDetalle.aspx.vb +++ b/CxC/RepCxCDetalle.aspx.vb @@ -439,7 +439,7 @@ Partial Class RepCxCDetalle If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, CveCliente:=-1) Then DdlContrato.DataSource = ObjContratos.DtResultados End If - + divContrato.Visible = True ObjContratos.Dispose() DdlContrato.DataBind() From b868c4a615d74f43f52b42943f1cf5c06064146e Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 31 Jan 2023 09:17:05 -0700 Subject: [PATCH 065/103] -- limpieza de globalDT --- App_Code/ClsPaginas.vb | 58 +- App_Code/Modelos.vb | 1069 +++++--------------------------- RMA/Garantias.aspx.vb | 2 +- Sistemas/CatSesiones.aspx.vb | 15 +- UserControl/TareaNueva.ascx.cs | 23 +- 5 files changed, 170 insertions(+), 997 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 560ea430e..6045b7c57 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1758,16 +1758,14 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property - Public Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable + Public Shared Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias-{0}", CveEmpresa) - If CveEmpresa <> -1 Then - 'sino existe, recarga los datos - If Application(AppNombre) Is Nothing Then - Dim ObjPS As New ClsProductosServicios - If ObjPS.GetPSEquivalencias(-1, CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados - ObjPS.Dispose() - End If + + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjPS As New ClsProductosServicios + If ObjPS.GetPSEquivalencias(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjPS.DtResultados + ObjPS.Dispose() End If If CvePS <> -1 OrElse CveUM <> -1 Then @@ -1776,16 +1774,16 @@ Public Class ClsPaginas If CveUM <> -1 Then StrSQL.AppendFormat(" AND CveUM = {0}", CveUM) If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) GlobalDTProductosServiciosEquivalencias = Dv.ToTable Dv.Dispose() Else - GlobalDTProductosServiciosEquivalencias = DirectCast(Application(AppNombre), DataTable) + GlobalDTProductosServiciosEquivalencias = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If End Get Set(value As DataTable) Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias-{0}", CveEmpresa) - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set End Property @@ -1967,34 +1965,34 @@ Public Class ClsPaginas ' Application("GlobalDTBancosCuentas") = value ' End Set 'End Property - Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1, Optional CveTipoCuenta As Integer = -1) As DataTable + Public Shared Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1, Optional CveTipoCuenta As Integer = -1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa) 'sino existe, recarga los datos If HttpContext.Current.Application(AppNombre) Is Nothing Then Using ObjBancos As New ClsBancos If ObjBancos.GetBancosCuentasUsuarios(-1, CveEmpresa) Then - Application(AppNombre) = ObjBancos.DtResultados + HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados Else - Application(AppNombre) = Nothing + HttpContext.Current.Application(AppNombre) = Nothing End If End Using End If - Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa) + Dim Str As String = String.Format("CveEmpresa = {0} ", CveEmpresa) If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario = {1}", Str, CveUsuario) If CveTipoCuenta > -1 Then Str = String.Format("{0} AND CveTipoCuenta = {1}", Str, CveTipoCuenta) If CveCuenta > -1 Then Str = String.Format("{0} AND CveCuenta = {1}", Str, CveCuenta) If Estatus > -1 Then Str = String.Format("{0} AND Estatus = '{1}'", Str, If(Estatus = 1, "Activo", "Inactivo")) - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str, "", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str, "", DataViewRowState.CurrentRows) GlobalDTBancosCuentas = Dv.ToTable Dv.Dispose() 'GlobalDTBancosCuentas = DirectCast(Application("GlobalDTBancosCuentas"), DataTable) End Get Set(value As DataTable) Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa) - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set End Property Public Shared Property GlobalDTTipoTransacciones() As DataTable @@ -2324,13 +2322,13 @@ Public Class ClsPaginas HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable + Public Shared Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) 'sino existe, recarga los datos - If Application(AppNombre) Is Nothing Then + If HttpContext.Current.Application(AppNombre) Is Nothing Then Dim ObjUsr As New ClsInventarios - If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then Application(AppNombre) = ObjUsr.DtResultados + If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados ObjUsr.Dispose() End If @@ -2341,31 +2339,15 @@ Public Class ClsPaginas If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus) If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen) - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) GlobalDTAlmacen = Dv.ToTable Dv.Dispose() End Get Set(value As DataTable) Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set - 'Get - ' Dim Str As New StringBuilder - ' Str.Append("1=1 AND ") - ' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa) - ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) - ' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus) - ' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen) - - ' Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - ' GlobalDTAlmacen = Dv.ToTable - ' Dv.Dispose() - - 'End Get - 'Set(value As DataTable) - ' Application("GlobalDTAlmacen") = value - 'End Set End Property Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1, Optional CveEstatus As Integer = 1) As DataTable Get diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 25576d87b..93bb76a17 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -332,7 +332,7 @@ Namespace Modelos Else IniciaValores() End If - SetMetodoPago(ObjsClsPaginas) + SetMetodoPago() Timbre = New CFDITimbre DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas End Sub @@ -2278,7 +2278,7 @@ Namespace Modelos If GenerarPrePoliza AndAlso CveMovimiento > 0 Then Dim Concepto As String = "Cancelación Usado" & factura.SerieFolio Dim CvePrePoliza = ObjConta.AddPrePolizas("Mod/CancSalUsados", 74, DtMovimientosEntrada.SUMD("Total"), DtMovimientosEntrada.SUMD("Total"), 1, tFecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero + Dim tCveSubProyecto = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero Dim tCveConcepto As Integer = 278 Dim ValorInventario As Decimal = 0 Dim MovAlmacen As Boolean = False 'debe quedar como el anterior, pero negativo @@ -2503,7 +2503,7 @@ Namespace Modelos If ValorMultiplicador = -1 AndAlso ConceptoContable = 291 Then If IdCtaContable <= 0 Then - CuentasContablesInvalidas.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) + CuentasContablesInvalidas.Append("
    " & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) idCuentaContabilizacion = 0 End If @@ -2599,7 +2599,7 @@ Namespace Modelos If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then Dim Importe68 As Decimal = ObjInventario.DtResultados.SUMD("Total").RoundSQL * ValorMultiplicador - Dim IdCtaContable68 = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero + Dim IdCtaContable68 = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto68, Importe68, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable68, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoReferencia, ImporteMX:=Importe68, Contabilizable:=False) Then ErrorPrepoliza = True @@ -2622,7 +2622,7 @@ Namespace Modelos If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then Dim Importe68 As Decimal = 0 - Dim IdCtaContable68 = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero + Dim IdCtaContable68 = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto68, Importe68, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable68, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoReferencia, ImporteMX:=Importe68, Contabilizable:=False) Then ErrorPrepoliza = True @@ -2687,7 +2687,7 @@ Namespace Modelos ImporteConcepto12 = importeMX.RoundSQL If importeMovimiento <> 0 Then If IdCtaContable <= 0 Then - CuentasContablesInvalidas.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) + CuentasContablesInvalidas.Append("
    " & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) idCuentaContabilizacion = 0 End If @@ -3332,20 +3332,20 @@ Namespace Modelos importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal) * ValorMultiplicador) importeMX = importeMovimiento * tipoCambio * Multiplicador FechaMovimiento = ObjFactura.FechaPago - Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}" + Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}" If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" 'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas If ObjFactura.TipoDocto.Contiene("Egs") Then - IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero + IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero Else - IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero + IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero End If If importeMovimiento <> 0 Then If IdCtaContable <= 0 Then - CuentasContablesInvalidas.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}")) + CuentasContablesInvalidas.Append("
    " & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}")) idCuentaContabilizacion = 0 End If @@ -3407,14 +3407,14 @@ Namespace Modelos importeMX = importeMovimiento * tipoCambio * Multiplicador FechaMovimiento = ObjFactura.FechaPago - Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}" + Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}" If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" 'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then - IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero + IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero Else - IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero + IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero End If If UsuarioActual.CveEmpresa = 119 Then @@ -3425,7 +3425,7 @@ Namespace Modelos If importeMovimiento <> 0 Then If IdCtaContable <= 0 Then - CuentasContablesInvalidas.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}")) + CuentasContablesInvalidas.Append("
    " & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}")) idCuentaContabilizacion = 0 End If @@ -3463,20 +3463,20 @@ Namespace Modelos importeMovimiento = (TmpDTDetalle.SUM("Descuento", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador importeMX = importeMovimiento * tipoCambio * Multiplicador FechaMovimiento = ObjFactura.FechaPago - Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}" + Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}" If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" 'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas If ObjFactura.TipoDocto.Contiene("Egs") Then - IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero() + IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero() Else - IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero() + IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero() End If If importeMovimiento <> 0 Then If IdCtaContable <= 0 Then - CuentasContablesInvalidas.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}")) + CuentasContablesInvalidas.Append("
    " & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}")) idCuentaContabilizacion = 0 End If @@ -3646,12 +3646,12 @@ Namespace Modelos Dim PorcentajeImpuestoPago As Decimal = TmpDTDetalle.MAX("PorcentajeIVA").ToDecimal - If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count = 1 Then - IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("IdCtaContable").ToString.ToEntero + If ClsPaginas.GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count = 1 Then + IdCtaContable = ClsPaginas.GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("IdCtaContable").ToString.ToEntero End If If IdCtaContable <= 0 Then - CuentasContablesInvalidas.AppendFormat("
    {0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("NumCuentaMoneda").ToString.ToEntero) + CuentasContablesInvalidas.AppendFormat("
    {0}", ClsPaginas.GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("NumCuentaMoneda").ToString.ToEntero) idCuentaContabilizacion = 0 End If @@ -3714,7 +3714,7 @@ Namespace Modelos If importeMovimiento <> 0 And Not ErrorPrepoliza Then If IdCtaContable <= 0 Then - CuentasContablesInvalidas.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) + CuentasContablesInvalidas.Append("
    " & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) idCuentaContabilizacion = 0 End If @@ -3969,7 +3969,7 @@ Namespace Modelos Private Function GenerarMovimientoGarantia(CveConceptoMovimiento As Integer, ConceptoPoliza As String, FechaMovimiento As DateTime, factura As Factura, ByRef ObjAcum As ClsAcumuladores, ByRef ObjInventario As ClsInventarios, ObjConta As ClsContabilidad, Optional Modulo As String = "Modelos/SDGA") As Boolean Dim OcurrioError As Boolean = False Try - Dim CveAlmacenGarantia As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=6).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={factura.CveSubProyecto}").ToEntero() + Dim CveAlmacenGarantia As Integer = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=6).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={factura.CveSubProyecto}").ToEntero() Dim DtGarantias As DataTable = Nothing If ObjAcum.GetGarantiasDetalle(factura.CveVenta) Then @@ -4248,7 +4248,7 @@ Namespace Modelos For Each RowInv As DataRow In DtCostosDistinct.Rows ValorInventario = DtCostos.SUM("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).ToString.ToDecimal - IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero + IdCtaContable = ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero Try If ValorInventario <> 0 Then If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, False, ValorInventario, Me.SerieFolio, 69, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=Me.CveSubProyecto) Then @@ -4262,7 +4262,7 @@ Namespace Modelos Next If Not OcurrioError Then - IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero + IdCtaContable = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero ValorInventario = (DtCostos.SUM("Total", "").ToDecimal).RoundSQL If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, True, ValorInventario, Me.SerieFolio, 68, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=Me.CveSubProyecto) Then OcurrioError = True @@ -4346,7 +4346,7 @@ Namespace Modelos If UsuarioActual.CveEmpresa = 1 Then DtEquivalencias = New DataTable - DtEquivalencias = GlobalDTProductosServiciosEquivalencias(CveProducto, -1, UsuarioActual.CveEmpresa) + DtEquivalencias = ClsPaginas.GlobalDTProductosServiciosEquivalencias(CveProducto, -1, UsuarioActual.CveEmpresa) Dim CveUnidadBase As Integer = DtEquivalencias.FiltroPrimeroValor("CveUM", "UnidadBase = 'True'").ToEntero Dim drUMBase As DataRow = DtEquivalencias.FiltroPrimero("UnidadBase = 'True'") @@ -4408,7 +4408,7 @@ Namespace Modelos End If 'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString()) - IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() + IdCtaContable = ClsPaginas.GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() 'If ValorInventario <> 0 Then If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario) Then @@ -4418,7 +4418,7 @@ Namespace Modelos cont += 1 Next End If - IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero() + IdCtaContable = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero() 'If TotalCosto <> 0 Then If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveSubProyecto:=factura.CveSubProyecto) Then @@ -4547,7 +4547,7 @@ Namespace Modelos End If 'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString()) - IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() + IdCtaContable = ClsPaginas.GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() 'If ValorInventario <> 0 Then If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario) Then @@ -4557,7 +4557,7 @@ Namespace Modelos cont += 1 Next End If - IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero() + IdCtaContable = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero() 'If TotalCosto <> 0 Then If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveSubProyecto:=factura.CveSubProyecto) Then @@ -5495,7 +5495,7 @@ Namespace Modelos DtCostos = ObjInventario.DtResultados Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"}) - Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {CveAlmacenMovimiento}").ToEntero + Dim IdCtaContableAlmacen As Integer = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {CveAlmacenMovimiento}").ToEntero Dim IdCtaContable As Integer = 0 If tmpCostos.Rows.Count > 0 Then @@ -5524,7 +5524,7 @@ Namespace Modelos ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado) End If - IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero + IdCtaContable = ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero If Not ErrorCancelar Then If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaDev, False, Multiplicador * ValorInventario, SerieFolio, 69, SerieFolio, Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimientoDevolucion, CveSubProyecto:=ObjFactura.CveSubProyecto, ImporteMX:=Multiplicador * ValorInventario, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero) Then @@ -6406,7 +6406,7 @@ Namespace Modelos Dim EsContabilizable As Boolean = False Dim Concepto As String = "Cancelación" Dim CvePrePoliza = ObjConta.AddPrePolizas("Mod/CancExAR1", 74, DtEntradaDetalle.SUMD("Total"), DtEntradaDetalle.SUMD("Total"), 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveSubProyecto").ToEntero + Dim tCveSubProyecto = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveSubProyecto").ToEntero If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorInventario, Concepto, 68, Concepto, Fecha, 0, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoSalidaDevRem, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto, Contabilizable:=EsContabilizable) Then ErrorCancelar = True @@ -7245,9 +7245,9 @@ Namespace Modelos End If End Sub Public Sub SetMetodoPago() - If CveMetodoPago > 0 AndAlso Not IsNothing(GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))) Then - MetodoPago = GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString() - ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString() + If CveMetodoPago > 0 AndAlso Not IsNothing(ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))) Then + MetodoPago = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString() + ClaveMetodoPagoSAT = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString() End If End Sub Public Sub SetMoneda(ObjClsPaginas As ClsPaginas) @@ -7262,9 +7262,9 @@ Namespace Modelos End Sub Public Sub SetMetodoPago(ObjClsPaginas As ClsPaginas) If Not IsNothing(ObjClsPaginas) Then - If Not IsNothing(ObjClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))) Then - MetodoPago = ObjClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString() - ClaveMetodoPagoSAT = ObjClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString() + If Not IsNothing(ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))) Then + MetodoPago = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString() + ClaveMetodoPagoSAT = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString() End If End If End Sub @@ -7478,111 +7478,7 @@ Namespace Modelos End Set End Property - Public ReadOnly Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable - Get - Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias-{0}", CveEmpresa) - - If CvePS <> -1 OrElse CveUM <> -1 Then - Dim StrSQL As New StringBuilder - If CvePS <> -1 Then StrSQL.AppendFormat(" AND CvePS = {0}", CvePS) - If CveUM <> -1 Then StrSQL.AppendFormat(" AND CveUM = {0}", CveUM) - If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) - GlobalDTProductosServiciosEquivalencias = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProductosServiciosEquivalencias = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) - End If - End Get - - End Property - Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProveedorClasificacion"), DataTable), String.Format("CveEmpresa ={0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProveedorClasificacion = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProveedorClasificacion = DirectCast(HttpContext.Current.Application("GlobalDTProveedorClasificacion"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProveedorClasificacion") = value - End Set - End Property - Property GlobalDTProveedorSucursales(CveProveedor As Integer) As DataTable - Get - If CveProveedor <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProveedorSucursales"), DataTable), String.Format("CveProveedor = {0}", CveProveedor), "", DataViewRowState.CurrentRows) - GlobalDTProveedorSucursales = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProveedorSucursales = DirectCast(HttpContext.Current.Application("GlobalDTProveedorSucursales"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProveedorSucursales") = value - End Set - End Property - Property GlobalDTRoles(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTRoles"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTRoles = Dv.ToTable - Dv.Dispose() - Else - GlobalDTRoles = DirectCast(HttpContext.Current.Application("GlobalDTRoles"), DataTable) - End If - - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTRoles") = value - End Set - End Property - Property GlobalDTNomSatBancos() As DataTable - Get - GlobalDTNomSatBancos = DirectCast(HttpContext.Current.Application("GlobalDTNomSatBancos"), DataTable) - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTNomSatBancos") = value - End Set - End Property - Property GlobalDTNomSatConceptos() As DataTable - Get - GlobalDTNomSatConceptos = DirectCast(HttpContext.Current.Application("GlobalDTNomSatConceptos"), DataTable) - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTNomSatConceptos") = value - End Set - End Property - Property GlobalDTNomSatRegimenContratacion() As DataTable - Get - GlobalDTNomSatRegimenContratacion = DirectCast(HttpContext.Current.Application("GlobalDTNomSatRegimenContratacion"), DataTable) - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTNomSatRegimenContratacion") = value - End Set - End Property - Property GlobalDTNomSatRiesgoPuesto() As DataTable - Get - GlobalDTNomSatRiesgoPuesto = DirectCast(HttpContext.Current.Application("GlobalDTNomSatRiesgoPuesto"), DataTable) - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTNomSatRiesgoPuesto") = value - End Set - End Property - Property GlobalDTNomSatTipoIncapacidad() As DataTable - Get - GlobalDTNomSatTipoIncapacidad = DirectCast(HttpContext.Current.Application("GlobalDTNomSatTipoIncapacidad"), DataTable) - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTNomSatTipoIncapacidad") = value - End Set - End Property Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable Get @@ -7598,236 +7494,8 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTEmpresas") = value End Set End Property - Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable - Get - Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa) - 'sino existe, recarga los datos - If HttpContext.Current.Application(AppNombre) Is Nothing Then - Dim ObjClasificaciones As New ClsClasificaciones - If ObjClasificaciones.GetClasificaciones(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClasificaciones.DtResultados - ObjClasificaciones.Dispose() - End If - If CveEmpresa <> -1 Then - Dim Str As New StringBuilder - Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria) - If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion) - If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) - GlobalDTClasificaciones = Dv.ToTable - Dv.Dispose() - Else - GlobalDTClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) - End If - - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa) - HttpContext.Current.Application(AppNombre) = value - End Set - End Property - Property GlobalDTClasificaciones2(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Str As New StringBuilder - Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificaciones2"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) - GlobalDTClasificaciones2 = Dv.ToTable - Dv.Dispose() - Else - GlobalDTClasificaciones2 = DirectCast(HttpContext.Current.Application("GlobalDTClasificaciones2"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTClasificaciones2") = value - End Set - End Property - Property GlobalDTClasificacionesSubProyectos(Optional CveClasificacion As Integer = -1, Optional CveEmpresa As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Str As New StringBuilder - Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) - GlobalDTClasificacionesSubProyectos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTClasificacionesSubProyectos = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto") = value - End Set - End Property - Property GlobalDTACClasificadorObjetoGasto(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Str As New StringBuilder - Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) - GlobalDTACClasificadorObjetoGasto = Dv.ToTable - Dv.Dispose() - Else - GlobalDTACClasificadorObjetoGasto = DirectCast(HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto") = value - End Set - End Property - Property GlobalDTClasificacionesDetalle(Optional CveEmpresa As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Str As New StringBuilder - Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesDetalle"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) - GlobalDTClasificacionesDetalle = Dv.ToTable - Dv.Dispose() - Else - GlobalDTClasificacionesDetalle = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesDetalle"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTClasificacionesDetalle") = value - End Set - End Property - Property GlobalDTSubFamilias(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Str As New StringBuilder - Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubFamilias"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) - GlobalDTSubFamilias = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTSubFamilias = DirectCast(HttpContext.Current.Application("GlobalDTSubFamilias"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSubFamilias") = value - End Set - End Property - Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTFamilias"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTFamilias = Dv.ToTable - Dv.Dispose() - Else - GlobalDTFamilias = DirectCast(HttpContext.Current.Application("GlobalDTFamilias"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTFamilias") = value - End Set - End Property - Property GlobalDTClasificacionesPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTClasificacionesPresupuestos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTClasificacionesPresupuestos = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos") = value - End Set - End Property - Property GlobalDTMetodosPago() As DataTable - Get - GlobalDTMetodosPago = DirectCast(HttpContext.Current.Application("GlobalDTMetodosPago"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMetodosPago") = value - End Set - End Property - Property GlobalDTModulos() As DataTable - Get - GlobalDTModulos = DirectCast(HttpContext.Current.Application("GlobalDTModulos"), DataTable) - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTModulos") = value - End Set - End Property - - Property GlobalDTEstatusOrdenCompra() As DataTable - Get - GlobalDTEstatusOrdenCompra = DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenCompra"), DataTable) - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTEstatusOrdenCompra") = value - End Set - End Property - Property GlobalDTLeyendasFiscales() As DataTable - Get - GlobalDTLeyendasFiscales = DirectCast(HttpContext.Current.Application("GlobalDTLeyendasFiscales"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTLeyendasFiscales") = value - End Set - End Property - Property GlobalDTEstatusFactura() As DataTable - Get - GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTEstatusFactura"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstatusFactura") = value - End Set - End Property - Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable - Get - - If DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable).Rows.Count = 0) Then - Dim P As New ClsProyectos - If P.GetProyectos(-1) Then - HttpContext.Current.Application("GlobalDTProyectos") = P.DtResultados - End If - P.Dispose() - - End If - - If CveEmpresa <> -1 OrElse Estatus <> -1 Then 'OrElse CveProyecto <> -1 - - Dim StrSQL As New StringBuilder - If CveEmpresa <> -1 Then StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) - ' If CveProyecto <> -1 Then StrSQL.AppendFormat(" {0} CveProyecto = {1}", If(StrSQL.Length > 0, "AND", ""), CveProyecto) - If Estatus <> -1 Then StrSQL.AppendFormat(" {0} CveEstatus = {1}", If(StrSQL.Length > 0, "AND", ""), Estatus) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProyectos = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProyectos = DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) - End If - - End Get - Set(ByVal value As DataTable) - If value Is Nothing OrElse value.Rows.Count = 0 Then - - End If - HttpContext.Current.Application("GlobalDTProyectos") = value - End Set - End Property - Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa) @@ -7942,107 +7610,7 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTProyectosUsuarios") = value End Set End Property - Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable - Get - GlobalDTPrecioListas = DirectCast(HttpContext.Current.Application("GlobalDTPrecioListas"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPrecioListas") = value - End Set - End Property - 'Property GlobalDTMesas() As DataTable - ' Get - ' GlobalDTMesas = DirectCast(HttpContext.Current.Application("GlobalDTMesas"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTMesas") = value - ' End Set - 'End Property - 'Property GlobalDTTipoOrdenServicios(CveEmpresa As Integer) As DataTable - ' Get - ' GlobalDTTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTTipoOrdenServicios"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTTipoOrdenServicios") = value - ' End Set - 'End Property - 'Property GlobalDTSubTipoOrdenServicios() As DataTable - ' Get - ' GlobalDTSubTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios") = value - ' End Set - 'End Property - 'Property GlobalDTCaracteristicasOrdenServicios() As DataTable - ' Get - ' GlobalDTCaracteristicasOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios") = value - ' End Set - 'End Property - 'Property GlobalDTOrdenesServiciosCaracteristicas() As DataTable - ' Get - ' GlobalDTOrdenesServiciosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas") = value - ' End Set - 'End Property - 'Property GlobalDTCaracteristicasOpciones() As DataTable - ' Get - ' GlobalDTCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOpciones"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTCaracteristicasOpciones") = value - ' End Set - 'End Property - 'Property GlobalDTTipoCuentasEquipos(CveEmpresa As Integer) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - ' GlobalDTTipoCuentasEquipos = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTTipoCuentasEquipos = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTTipoCuentasEquipos") = value - ' End Set - 'End Property - 'Property GlobalDTTipoCuentasEquiposCaracteristicas(CveEmpresa As Integer) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - ' GlobalDTTipoCuentasEquiposCaracteristicas = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTTipoCuentasEquiposCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas") = value - ' End Set - 'End Property - 'Property GlobalDTTipoCuentasEquiposOpciones(CveEmpresa As Integer) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - ' GlobalDTTipoCuentasEquiposOpciones = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTTipoCuentasEquiposOpciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones") = value - ' End Set - 'End Property ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1) As DataTable Get Dim ObjPS As New ClsProductosServicios @@ -8059,469 +7627,132 @@ Namespace Modelos - Property GlobalDTInvMetodosInventario() As DataTable - Get - GlobalDTInvMetodosInventario = DirectCast(HttpContext.Current.Application("GlobalDTInvMetodosInventario"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTInvMetodosInventario") = value - End Set - End Property - 'Property GlobalDTAFCaracteristicasOpciones() As DataTable + 'Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable ' Get - ' GlobalDTAFCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones") = value - ' End Set - 'End Property - 'Property GlobalDTAFCaracteristicas() As DataTable - ' Get - ' GlobalDTAFCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicas"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTAFCaracteristicas") = value - ' End Set - 'End Property - 'Property GlobalDTAFCaracteristicasClasificaciones() As DataTable - ' Get - ' GlobalDTAFCaracteristicasClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones") = value - ' End Set - 'End Property - 'Property GlobalDTImpuestosLocales(CvePS As Integer, CveEmpresa As Integer) As DataTable - ' Get - ' Dim Str As New StringBuilder - ' If CvePS > 0 Then Str.AppendFormat("CvePS = {0}", CvePS) - ' If CveEmpresa > 0 Then Str.AppendFormat("{0} CveEmpresa = {1}", If(CvePS > 0, " AND ", ""), CveEmpresa) - - ' If CvePS > 0 Then - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - ' GlobalDTImpuestosLocales = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTImpuestosLocales = DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTImpuestosLocales") = value - ' End Set - 'End Property - 'Bancos - Property GlobalDTBancos() As DataTable - Get - GlobalDTBancos = DirectCast(HttpContext.Current.Application("GlobalDTBancos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTBancos") = value - End Set - End Property - - - Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1) As DataTable - Get - Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa) - 'sino existe, recarga los datos - If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then - Dim ObjBancos As New ClsBancos - If ObjBancos.GetBancosCuentasUsuarios(-1, CveEmpresa) Then - HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados - Else - HttpContext.Current.Application(AppNombre) = Nothing - End If - ObjBancos.Dispose() - End If - - Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa) - If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario = {1}", Str, CveUsuario) - If CveCuenta > -1 Then Str = String.Format("{0} AND CveCuenta = {1}", Str, CveCuenta) - If Estatus > -1 Then Str = String.Format("{0} AND Estatus = '{1}'", Str, If(Estatus = 1, "Activo", "Inactivo")) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str, "", DataViewRowState.CurrentRows) - GlobalDTBancosCuentas = Dv.ToTable - Dv.Dispose() - 'GlobalDTBancosCuentas = DirectCast(Application("GlobalDTBancosCuentas"), DataTable) - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa) - HttpContext.Current.Application(AppNombre) = value - End Set - End Property - - - - Property GlobalDTTipoTransacciones() As DataTable - Get - If UsuarioActual.CveEmpresa = 66 Then - GlobalDTTipoTransacciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoTransacciones"), DataTable).FiltraParametros("Estatus = 1") - Else - GlobalDTTipoTransacciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoTransacciones"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoTransacciones") = value - End Set - End Property - 'Property GlobalDTEstatusIE() As DataTable - ' Get - ' GlobalDTEstatusIE = DirectCast(HttpContext.Current.Application("GlobalDTEstatusIE"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTEstatusIE") = value - ' End Set - 'End Property - 'Property GlobalDTBancosIE() As DataTable - ' Get - ' GlobalDTBancosIE = DirectCast(HttpContext.Current.Application("GlobalDTBancosIE"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTBancosIE") = value - ' End Set - 'End Property - 'Property GlobalDTTipoCuenta() As DataTable - ' Get - ' GlobalDTTipoCuenta = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuenta"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTTipoCuenta") = value - ' End Set - 'End Property - ''Fin Bancos - - ''Fin EstadoCIvil - ''TipoPerioso - 'Property GlobalDTTipoPeriodo() As DataTable - ' Get - ' GlobalDTTipoPeriodo = DirectCast(HttpContext.Current.Application("GlobalDTTipoPeriodo"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTTipoPeriodo") = value - ' End Set - 'End Property - ''Fin TipoPeriodo - - 'Periodos - 'Property GlobalDTNominasPeriodos(CveTipoPeriodo As Integer, CvePeriodo As Integer, CveEmpresa As Integer) As DataTable - ' Get - ' Dim Str As New StringBuilder - ' If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - ' If CveTipoPeriodo <> -1 Then Str.AppendFormat(" {0} CveTipoPeriodo = {1}", If(Str.Length > 0, "AND", ""), CveTipoPeriodo) - ' If CvePeriodo <> -1 Then Str.AppendFormat(" {0} CvePeriodo = {1}", If(Str.Length > 0, "AND", ""), CvePeriodo) - ' If Str.Length > 0 Then - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - ' GlobalDTNominasPeriodos = Dv.ToTable - ' Dv.Dispose() - - ' Else - ' GlobalDTNominasPeriodos = DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable) + ' Dim AppNombre As String = String.Format("GlobalDTCliente-{0}", CveEmpresa) + ' 'sino existe, recarga los datos + ' If HttpContext.Current.Application(AppNombre) Is Nothing Then + ' Dim ObjClientes As New ClsClientes + ' If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados + ' ObjClientes.Dispose() ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTNominasPeriodos") = value - ' End Set - 'End Property - 'Fin Periodos - 'Fin Ruta - 'Cliente - Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable - Get - Dim AppNombre As String = String.Format("GlobalDTCliente-{0}", CveEmpresa) - 'sino existe, recarga los datos - If HttpContext.Current.Application(AppNombre) Is Nothing Then - Dim ObjClientes As New ClsClientes - If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados - ObjClientes.Dispose() - End If - - - If CveEmpresa <> -1 Then - - Dim StrSQL As New StringBuilder - StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTCliente = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTCliente = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) - End If - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTCliente-{0}", CveEmpresa) - HttpContext.Current.Application(AppNombre) = value - 'Dim ObjClientes As New ClsClientes - 'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then Application(AppNombre) = ObjClientes.DtResultados - 'ObjClientes.Dispose() - End Set - End Property - Property GlobalDTClienteClasificaciones(CveEmpresa As Integer) As DataTable - Get - Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones-{0}", CveEmpresa) - 'sino existe, recarga los datos - If HttpContext.Current.Application(AppNombre) Is Nothing Then - Dim ObjClientes As New ClsClientes - If ObjClientes.GetClienteClasificacion(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados - ObjClientes.Dispose() - End If - If CveEmpresa <> -1 Then - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTClienteClasificaciones = Dv.ToTable - Dv.Dispose() - Else - GlobalDTClienteClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) - End If - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones-{0}", CveEmpresa) - HttpContext.Current.Application(AppNombre) = value - 'Dim ObjClientes As New ClsClientes - 'If ObjClientes.GetClienteClasificacion(CveEmpresa) Then Application(AppNombre) = ObjClientes.DtResultados - 'ObjClientes.Dispose() - End Set - End Property - Property GlobalDTEstatusOrdenServicios(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenServicios"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTEstatusOrdenServicios = Dv.ToTable - Dv.Dispose() - Else - GlobalDTEstatusOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenServicios"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstatusOrdenServicios") = value - End Set - End Property - 'Variables para Ventas - Property GlobalDTVendedores(CveEmpresa As Integer, Optional Estatus As Boolean = True, Optional VendedorTipo As Integer = 1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTVendedores"), DataTable), String.Format("CveEmpresa = {0} AND CveEstatus = {1} AND VendedorTipo = {2}", CveEmpresa, If(Estatus, 1, 0), VendedorTipo), "", DataViewRowState.CurrentRows) - GlobalDTVendedores = Dv.ToTable - Dv.Dispose() - Else - GlobalDTVendedores = DirectCast(HttpContext.Current.Application("GlobalDTVendedores"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVendedores") = value - End Set - End Property - Property GlobalDTClientesCorporativo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClientesCorporativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTClientesCorporativo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTClientesCorporativo = DirectCast(HttpContext.Current.Application("GlobalDTClientesCorporativo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTClientesCorporativo") = value - End Set - End Property - Property GlobalDTCompProveedores(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCompProveedores"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTCompProveedores = Dv.ToTable - Dv.Dispose() - Else - GlobalDTCompProveedores = DirectCast(HttpContext.Current.Application("GlobalDTCompProveedores"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCompProveedores") = value - End Set - End Property - 'EstatusFactura - 'Property GlobalDTCompEstatusFactura() As DataTable - ' Get - ' GlobalDTCompEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTCompEstatusFactura"), DataTable).FiltraParametros("Estatus = 'Activo'") - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTCompEstatusFactura") = value - ' End Set - 'End Property - 'Property GlobalDTContratosSecciones() As DataTable - ' Get - ' GlobalDTContratosSecciones = DirectCast(HttpContext.Current.Application("GlobalDTContratosSecciones"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTContratosSecciones") = value - ' End Set - 'End Property - 'Property GlobalDTContratos() As DataTable - ' Get - ' GlobalDTContratos = DirectCast(HttpContext.Current.Application("GlobalDTContratos"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTContratos") = value - ' End Set - 'End Property - 'Property GlobalDTContratosTipos() As DataTable - ' Get - ' GlobalDTContratosTipos = DirectCast(HttpContext.Current.Application("GlobalDTContratosTipos"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTContratosTipos") = value - ' End Set - 'End Property - 'Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable - ' Get ' If CveEmpresa <> -1 Then - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - ' GlobalDTTipoAlmacen = Dv.ToTable + + ' Dim StrSQL As New StringBuilder + ' StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) + ' If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus) + + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) + ' GlobalDTCliente = Dv.ToTable ' Dv.Dispose() + ' Else - ' GlobalDTTipoAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable) + ' GlobalDTCliente = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) ' End If - ' End Get ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTTipoAlmacen") = value + ' Dim AppNombre As String = String.Format("GlobalDTCliente-{0}", CveEmpresa) + ' HttpContext.Current.Application(AppNombre) = value + ' 'Dim ObjClientes As New ClsClientes + ' 'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then Application(AppNombre) = ObjClientes.DtResultados + ' 'ObjClientes.Dispose() ' End Set 'End Property - 'Property GlobalDTInvConceptos() As DataTable - ' Get - - ' Return DirectCast(HttpContext.Current.Application("GlobalDTInvConceptos"), DataTable) - - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTInvConceptos") = value - ' End Set - 'End Property - 'Property GlobalDTSeccionAlmacen(CveEmpresa As Integer) As DataTable + 'Property GlobalDTClienteClasificaciones(CveEmpresa As Integer) As DataTable ' Get + ' Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones-{0}", CveEmpresa) + ' 'sino existe, recarga los datos + ' If HttpContext.Current.Application(AppNombre) Is Nothing Then + ' Dim ObjClientes As New ClsClientes + ' If ObjClientes.GetClienteClasificacion(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados + ' ObjClientes.Dispose() + ' End If ' If CveEmpresa <> -1 Then - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - ' GlobalDTSeccionAlmacen = Dv.ToTable + + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) + ' GlobalDTClienteClasificaciones = Dv.ToTable ' Dv.Dispose() ' Else - ' GlobalDTSeccionAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable) + ' GlobalDTClienteClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + ' End If + ' End Get + ' Set(value As DataTable) + ' Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones-{0}", CveEmpresa) + ' HttpContext.Current.Application(AppNombre) = value + ' 'Dim ObjClientes As New ClsClientes + ' 'If ObjClientes.GetClienteClasificacion(CveEmpresa) Then Application(AppNombre) = ObjClientes.DtResultados + ' 'ObjClientes.Dispose() + ' End Set + 'End Property + + 'Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable + ' Get + ' Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) + ' 'sino existe, recarga los datos + ' If HttpContext.Current.Application(AppNombre) Is Nothing Then + ' Dim ObjUsr As New ClsInventarios + ' If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados + ' ObjUsr.Dispose() ' End If + ' Dim Str As New StringBuilder + ' Str.Append("1=1 AND ") + ' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa) + ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) + ' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus) + ' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen) + + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + ' GlobalDTAlmacen = Dv.ToTable + ' Dv.Dispose() ' End Get ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTSeccionAlmacen") = value + ' Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) + ' HttpContext.Current.Application(AppNombre) = value ' End Set + ' 'Get + + ' ' Dim Str As New StringBuilder + ' ' Str.Append("1=1 AND ") + ' ' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa) + ' ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) + ' ' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus) + ' ' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen) + + ' ' Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + ' ' GlobalDTAlmacen = Dv.ToTable + ' ' Dv.Dispose() + + ' 'End Get + ' 'Set(value As DataTable) + ' ' Application("GlobalDTAlmacen") = value + ' 'End Set 'End Property - Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable - Get - Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) - 'sino existe, recarga los datos - If HttpContext.Current.Application(AppNombre) Is Nothing Then - Dim ObjUsr As New ClsInventarios - If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados - ObjUsr.Dispose() - End If - - Dim Str As New StringBuilder - Str.Append("1=1 AND ") - If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa) - If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) - If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus) - If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTAlmacen = Dv.ToTable - Dv.Dispose() - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) - HttpContext.Current.Application(AppNombre) = value - End Set - 'Get - - ' Dim Str As New StringBuilder - ' Str.Append("1=1 AND ") - ' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa) - ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) - ' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus) - ' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen) - - ' Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - ' GlobalDTAlmacen = Dv.ToTable - ' Dv.Dispose() - - 'End Get - 'Set(value As DataTable) - ' Application("GlobalDTAlmacen") = value - 'End Set - End Property - Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable - Get - Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa) - 'sino existe, recarga los datos - If HttpContext.Current.Application(AppNombre) Is Nothing Then - Dim ObjUsr As New ClsSisUsuarios - If ObjUsr.GetAlmacen(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados - ObjUsr.Dispose() - End If - Dim Str As New StringBuilder - Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa) - If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTAlmacenUsuarios = Dv.ToTable - Dv.Dispose() - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa) - HttpContext.Current.Application(AppNombre) = value - End Set - End Property - 'Property GlobalDTNom_Periodos() As DataTable + 'Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable ' Get - ' GlobalDTNom_Periodos = DirectCast(HttpContext.Current.Application("GlobalDTNom_Periodos"), DataTable) + ' Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa) + ' 'sino existe, recarga los datos + ' If HttpContext.Current.Application(AppNombre) Is Nothing Then + ' Dim ObjUsr As New ClsSisUsuarios + ' If ObjUsr.GetAlmacen(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados + ' ObjUsr.Dispose() + ' End If + ' Dim Str As New StringBuilder + ' Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa) + ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) + + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + ' GlobalDTAlmacenUsuarios = Dv.ToTable + ' Dv.Dispose() ' End Get ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTNom_Periodos") = value - ' End Set - 'End Property - 'Property GlobalDTVtaFormaPago() As DataTable - ' Get - ' GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaFormaPago"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTVtaFormaPago") = value - ' End Set - 'End Property - 'Property GlobalDTVtaMetodoPago() As DataTable - ' Get - ' GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaMetodoPago"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTVtaMetodoPago") = value - ' End Set - 'End Property - 'Property GlobalDTVtaTiposRelacion() As DataTable - ' Get - ' GlobalDTVtaTiposRelacion = DirectCast(HttpContext.Current.Application("GlobalDTVtaTiposRelacion"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTVtaTiposRelacion") = value - ' End Set - 'End Property - 'Property GlobalDTTiposDocumentos() As DataTable - ' Get - ' GlobalDTTiposDocumentos = DirectCast(HttpContext.Current.Application("GlobalDTTiposDocumentos"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTTiposDocumentos") = value + ' Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa) + ' HttpContext.Current.Application(AppNombre) = value ' End Set 'End Property + Public ReadOnly Property GlobalTipoCambioUltimaFluctuacion(Optional Fecha As Date = MinFecha) As ClsPaginas.MTipoCambioFluctuacion Get @@ -8597,30 +7828,6 @@ Namespace Modelos End Set End Property - Property GlobalDTContaConceptosContables(CveConceptoContable As Integer) As DataTable - Get - Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables") - 'sino existe, recarga los datos - If HttpContext.Current.Application(AppNombre) Is Nothing Then - Using ObjContabilidad As New ClsContabilidad - If ObjContabilidad.GetConta_ConceptosContables() Then HttpContext.Current.Application(AppNombre) = ObjContabilidad.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing - End Using - - End If - If CveConceptoContable <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveConceptoContable = {0}", CveConceptoContable), "", DataViewRowState.CurrentRows) - GlobalDTContaConceptosContables = Dv.ToTable - Dv.Dispose() - Else - GlobalDTContaConceptosContables = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) - End If - - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables") - HttpContext.Current.Application(AppNombre) = value - End Set - End Property #End Region diff --git a/RMA/Garantias.aspx.vb b/RMA/Garantias.aspx.vb index 178f130fa..33ed5008a 100644 --- a/RMA/Garantias.aspx.vb +++ b/RMA/Garantias.aspx.vb @@ -62,7 +62,7 @@ Partial Class Ventas_Garantias Private Sub CargaCompra() Dim objCompras As New ClsCompras - If objCompras.GetCompraDetalle(DdlFolios.SelectedValue.ToEntero) Then + If objCompras.GetCompraDetalle(DdlFolios.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then ViewState("DTCompras") = objCompras.DtResultados GvPS.Visible = True BtnSolicitar.Visible = True diff --git a/Sistemas/CatSesiones.aspx.vb b/Sistemas/CatSesiones.aspx.vb index a5cd054d6..a554bcc80 100644 --- a/Sistemas/CatSesiones.aspx.vb +++ b/Sistemas/CatSesiones.aspx.vb @@ -364,13 +364,14 @@ Partial Class Sistemas_CatSesiones Private Sub CargaProyectos() 'Carga Proyectos - Dim ObjProyectos As New ClsProyectos - If ObjProyectos.GetProyectos Then - Application("GlobalDTProyectos") = ObjProyectos.DtResultados - Else - Application("GlobalDTProyectos") = Nothing - End If - ObjProyectos.Dispose() + 'Dim ObjProyectos As New ClsProyectos + 'If ObjProyectos.GetProyectos(UsuarioActual.CveEmpresa) Then + ' Application("GlobalDTProyectos") = ObjProyectos.DtResultados + 'Else + ' Application("GlobalDTProyectos") = Nothing + 'End If + 'ObjProyectos.Dispose() + GlobalDTProyectos(UsuarioActual.CveEmpresa) = Nothing 'Fin Carga Proyectos End Sub diff --git a/UserControl/TareaNueva.ascx.cs b/UserControl/TareaNueva.ascx.cs index 1ce591d19..b71d5a575 100644 --- a/UserControl/TareaNueva.ascx.cs +++ b/UserControl/TareaNueva.ascx.cs @@ -34,24 +34,7 @@ public partial class UserControl_TareaNueva : System.Web.UI.UserControl { dt = (System.Data.DataTable)Application["GlobalDTUsuarios"]; } return dt; } - //public DataTable GlobalDTOIRevision - protected System.Data.DataTable get_GlobalDTOIRevision(int CveEmpresa = -1) - { - System.Data.DataTable dt = null; - System.Text.StringBuilder Str = new System.Text.StringBuilder(); - - if (CveEmpresa != -1) - { - string StrSQL = string.Format("CveEmpresa = {0}", CveEmpresa); - System.Data.DataView Dv = new System.Data.DataView((System.Data.DataTable)Application["GlobalDTOIRevision"], StrSQL, "", System.Data.DataViewRowState.CurrentRows); - dt = Dv.ToTable(); - Dv.Dispose(); - } - else { dt = (System.Data.DataTable)Application["GlobalDTOIRevision"]; } - - return dt; - } - + protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) @@ -80,7 +63,7 @@ public partial class UserControl_TareaNueva : System.Web.UI.UserControl DdlPara.DataSource = GVUsuarios_TareaNueva.DataSource; DdlPara.DataBind(); - DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario)); + DdlTema.DataSource = ClsPaginas.get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario)); DdlTema.DataBind(); DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1")); GVUsuarios_TareaNueva.DataBind(); @@ -296,7 +279,7 @@ public partial class UserControl_TareaNueva : System.Web.UI.UserControl private void CargaTemas() { - DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario)); + DdlTema.DataSource = ClsPaginas.get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario)); DdlTema.DataBind(); DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1")); From 5441531637fe7baeedb436edfbe7cdbcae562a8d Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 31 Jan 2023 09:17:42 -0700 Subject: [PATCH 066/103] -- cambios en globalDT --- GPS/RepParadas.aspx.cs | 2 +- Inicio.aspx.vb | 24 +++++------------------- Inventarios/RecepcionAlmacen.aspx.vb | 8 +++----- OI/TareaDetalle.aspx.cs | 2 +- 4 files changed, 10 insertions(+), 26 deletions(-) diff --git a/GPS/RepParadas.aspx.cs b/GPS/RepParadas.aspx.cs index 1be65fd4a..c378183ef 100644 --- a/GPS/RepParadas.aspx.cs +++ b/GPS/RepParadas.aspx.cs @@ -197,6 +197,6 @@ public partial class GPS_RepParardas : ClsPaginas { //var table = new System.Web.UI.HtmlControls.HtmlTable(); // table.InnerHtml = DivIndicadores.InnerHtml; - GvDatos.ExportToExcelx("ReporteRutas"); + GvDatos.ExportToExcel("ReporteRutas"); } } \ No newline at end of file diff --git a/Inicio.aspx.vb b/Inicio.aspx.vb index d9299387d..835bd7d29 100644 --- a/Inicio.aspx.vb +++ b/Inicio.aspx.vb @@ -1506,26 +1506,14 @@ Partial Class Inicio Private Sub IniializaDdlsOpcionesAgenda() 'CLIENTES - If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then - DdlClientesWS.setEsWebService(True) - Else - DdlClientesWS.setEsWebService(False) - CargaClientes() - End If + DdlClientesWS.setEsWebService(True) 'PROVEEDORES - If (UsuarioActual.Empresa.Funcionalidad(105) = "1") Then - DdlProveedor.setEsWebService(True) - DdlProveedor.Attributes.Add("data-metodo", "getproveedores") - DdlProveedor.SelectedText = "Todos" - DdlProveedor.SelectedValue = "-1" - Else - DdlProveedor.setEsWebService(False) - DdlProveedor.ddl.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) - DdlProveedor.ddl.DataBind() - DdlProveedor.ddl.Items.Insert(0, New ListItem("Todos", "-1")) - End If + DdlProveedor.setEsWebService(True) + DdlProveedor.Attributes.Add("data-metodo", "getproveedores") + DdlProveedor.SelectedText = "Todos" + DdlProveedor.SelectedValue = "-1" DdlProveedor.ddl.AutoPostBack = False DdlClientesWS.ddl.AutoPostBack = False @@ -1579,8 +1567,6 @@ Partial Class Inicio Private Sub CargaClientes() If Not UsuarioActual.Empresa.Funcionalidad(105) = "1" Then DdlClientesWS.ddl.Items.Clear() - DdlClientesWS.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) - DdlClientesWS.DataBind() DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1")) End If End Sub diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 20274a117..e13af0eeb 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -1069,7 +1069,7 @@ Partial Class Inventarios_RecepcionAlmacen DtRecepcion = ObjInventario.DtResultados.Copy() 'VERIFICA LOS QUE TENGAN LAS CLASIFICACION DE USADOS - If ObjCompras.GetCompraDetalle(pCveCompra) Then + If ObjCompras.GetCompraDetalle(pCveCompra, UsuarioActual.CveEmpresa) Then If ObjCompras.DtResultados.COUNT("Cantidad", "CveClasificacion=20519") > 0 Then SumarImporteUsados = True ValidarRecepcionUsados = True @@ -3186,13 +3186,11 @@ Partial Class Inventarios_RecepcionAlmacen Dim DtComprasDetalle As DataTable = Nothing Dim DtTamanios As DataTable = Nothing - If ObjCompras.GetCompraDetalle(CveCompraSurtir) Then + If ObjCompras.GetCompraDetalle(CveCompraSurtir, UsuarioActual.CveEmpresa) Then DtComprasDetalle = ObjCompras.DtResultados.Copy() End If - If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then - DtTamanios = ObjAcum.DtResultados.Copy() - End If + DtTamanios = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa) For Each GvRow As GridViewRow In GvInv.Rows If GvRow.RowType = DataControlRowType.DataRow Then diff --git a/OI/TareaDetalle.aspx.cs b/OI/TareaDetalle.aspx.cs index ea868bc5d..e09084b6d 100644 --- a/OI/TareaDetalle.aspx.cs +++ b/OI/TareaDetalle.aspx.cs @@ -253,7 +253,7 @@ public partial class OI_TareaDetalle : ClsPaginas private void CargaEstatus() { - DdlEventoEstatus.DataSource = GlobalDTOIEstatusEventos;//get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario)); + DdlEventoEstatus.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario)); DDlEstatus.DataSource = DdlEventoEstatus.DataSource; DdlEventoEstatus.DataBind(); DDlEstatus.DataBind(); From b06176f6b4b3eb8914be349c0b53da8ea9571cc3 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 31 Jan 2023 09:18:04 -0700 Subject: [PATCH 067/103] -- siempre visible objeto de impuesto --- Ventas/ProductosServicios.aspx.vb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 95cffc511..41e4fcd44 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -360,12 +360,10 @@ Partial Class ProductosyServicios CargaCombosSeccionAlmacen() - If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then 'emisión 4.0 - DivObjetoImpuesto.Visible = True - DdlObjetoImpuesto.DataSource = GlobalDTSATObjetosImpuestos - DdlObjetoImpuesto.DataBind() - DdlObjetoImpuesto.SelectedValue = "2" 'se sugiere este valor, que sería el más utilizado - End If + DivObjetoImpuesto.Visible = True + DdlObjetoImpuesto.DataSource = GlobalDTSATObjetosImpuestos + DdlObjetoImpuesto.DataBind() + DdlObjetoImpuesto.SelectedValue = "2" 'se sugiere este valor, que sería el más utilizado CreaDtSeccionAlmacen() From c18da04b2cd2a205d788598b587ed5149fb382f9 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 31 Jan 2023 10:04:16 -0700 Subject: [PATCH 068/103] =?UTF-8?q?--=20correcci=C3=B3n=20de=20error=20en?= =?UTF-8?q?=20recepci=C3=B3n=20completa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/RecepcionAlmacen.aspx.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index e13af0eeb..c23c87baf 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -4355,8 +4355,9 @@ Partial Class Inventarios_RecepcionAlmacen CreaDtLoteDetalle() CreaDTInv(ObjInventario.DtResultados.FiltraParametros("CantidadCompra = 0")) BtnGuardar.Visible = True + 'cuando están todos los detalles de la compra, nos indica que se va a recibir la totalidad de la compra - If DtDatosDetalle.Rows.Count = DtDatosDetalle.Rows(0)("NumDetalles").ToString.ToEntero Then + If ObjInventario.DtResultados.Rows.Count = ObjInventario.DtResultados.Rows(0)("NumDetalles").ToString.ToEntero Then RecibidaCompleta = True End If From 31b64ff83467329ce78f24d01b00dac6e5194ff5 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Tue, 31 Jan 2023 13:08:11 -0700 Subject: [PATCH 069/103] 13 y 83 Formatos 4.0 --- Empresas/13/Formatos/Cotizacion.rdlc | 3463 ++++++++++++ Empresas/83/Formatos/Cotizacion.rdlc | 4484 +++++++++++++++ Empresas/83/Formatos/ReciboDePago.rdlc | 7008 ++++++++++++++++++++++++ 3 files changed, 14955 insertions(+) create mode 100644 Empresas/13/Formatos/Cotizacion.rdlc create mode 100644 Empresas/83/Formatos/Cotizacion.rdlc create mode 100644 Empresas/83/Formatos/ReciboDePago.rdlc diff --git a/Empresas/13/Formatos/Cotizacion.rdlc b/Empresas/13/Formatos/Cotizacion.rdlc new file mode 100644 index 000000000..46d275324 --- /dev/null +++ b/Empresas/13/Formatos/Cotizacion.rdlc @@ -0,0 +1,3463 @@ + + + + + + true + + + + + EXPLORACIONES MINERAS DEL DESIERTO S.A. + + + + + + + + + DE C.V. RFC: EMD950206SRA + + + + + + + + + Del Cobre No. 95 Col. Parque Industrial Hermosillo, Sonora. México, C.P. 83299 + + + + + + + + + Tel. 6622510249 + + + + + + + + + Régimen Fiscal: 601 - General de Ley Personas Morales + + + + + + + Textbox4 + 1.83923in + 1.10377in + 6.21276in + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo1 + FitProportional + 0.65302cm + 2.88998cm + 3.84225cm + 1 + + + + + + true + true + + + + + Nombre: + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteNombre.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 1.50708cm + + + 1.63629cm + + + 1.29788cm + + + 1.66402cm + + + 8.32569cm + + + 1.42482cm + + + 1.73271cm + + + 2.4815cm + + + + + 0.74994cm + + + + + true + + + + + Cantidad + + + + + + + Textbox34 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Codigo + + + + + + + Textbox15 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + C.U. SAT + + + + + + + Textbox75 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Clave + + + + + + + + + Producto + + + + + + + Textbox82 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Descripción + + + + + + + Textbox79 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + P.U. + + + + + + + Textbox84 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Impuestos + + + + + + + Textbox91 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Importe + + + + + + + + + + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.48536cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad1 + + + + #4f81bd + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SATClaveProdServ.Value + + + + + + + SATClaveProdServ + + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SATClaveUM.Value + + + + + + + SATClaveUM + + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value & " " & Fields!Obs.Value + + + + + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteIVA.Value + + + + + + + ImporteIVA + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value*Fields!PU.Value + + + + + + + Textbox88 + + + + #4f81bd + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 6.28717cm + 0.44641cm + 1.2353cm + 20.06999cm + 4 + + + + + + true + true + + + + + =Parameters!ClienteDatoExtra1.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 3.15414cm + + + + + 0.27059cm + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + 0.38492cm + + + + + true + true + + + + + =Replace(Parameters!Moneda.Value,"Pesos","Peso mexicano") + + + + + + + Textbox47 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + =Fields!ImpuestoLocal.Value + + + + 2.52863cm + + + true + true + + + + + =Fields!ImpuestoLocal.Value + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + 2.52863cm + + + true + true + + + + + Moneda + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + Before + + + + DataSet1 + 7.71422cm + 14.83363cm + 0.65551cm + 5.68277cm + 6 + + + + + + true + true + + + + + Folio Cotización + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!Serie.Value.ToString="",Parameters!Folio.Value,Parameters!Serie.Value & "-" &Parameters!Folio.Value) + + + + + + + Textbox3 + 2.79612cm + 17.39754cm + 0.41303cm + 3.066cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox12 + 3.22326cm + 17.39754cm + 0.42714cm + 3.066cm + 10 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Lugar de Expedición + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + 83299 + + + + + + + Textbox55 + 3.75976cm + 17.39754cm + 0.46681cm + 3.05452cm + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Forma de Pago + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FormaPago.Value + + + + + + + Textbox3 + 3.0229cm + 4.48098cm + 0.42944cm + 6.76133cm + 14 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Método de Pago + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value) + + + + + + + Textbox3 + 3.46998cm + 4.48098cm + 0.40122cm + 6.76133cm + 16 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Moneda + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Moneda.Value + + + + + + + + Tipo de Cambio + + + + + + + + =Parameters!TipoCambio.Value + + + + + + + + + + + Textbox3 + 3.95234cm + 4.48098cm + 0.43297cm + 6.76133cm + 18 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Datos del Cliente + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + R.F.C.: + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteRFC.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Uso CFDI: + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!UsoCFDI.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Domicilio: + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteDireccion.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + OBSERVACIONES GENERALES: + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + + Textbox3 + 7.54478cm + 5.057cm + 0.44003cm + 9.60024cm + 27 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ImporteLetra.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Importe Con Letra: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 9.1438cm + + + + + + + Textbox3 + 0.04232cm + 16.34905cm + 0.6cm + 3.95896cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Today + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 0.5cm + 1.27cm + + + + + + + + + DE C.V. RFC: CMN9810221L8 + + + + + + + + + Del Cobre No. 95 Col. Parque Industrial Hermosillo, Sonora. México, C.P. 83299 + + + + + + + + + Tel. 6622510249 + + + + + + + + + Régimen Fiscal: 601 - General de Ley Personas Morales + + + + + + + Textbox4 + 1.83923in + 1.10377in + 6.21276in + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Nombre: + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteNombre.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 1.50708cm + + + 1.63629cm + + + 1.29788cm + + + 1.66402cm + + + 8.32569cm + + + 1.42482cm + + + 1.73271cm + + + 2.4815cm + + + + + 0.74994cm + + + + + true + + + + + Cantidad + + + + + + + Textbox34 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Codigo + + + + + + + Textbox15 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + C.U. SAT + + + + + + + Textbox75 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Clave + + + + + + + + + Producto + + + + + + + Textbox82 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Descripción + + + + + + + Textbox79 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + P.U. + + + + + + + Textbox84 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Impuestos + + + + + + + Textbox91 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Importe + + + + + + + + + + + + + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.48536cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad1 + + + + #4f81bd + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SATClaveProdServ.Value + + + + + + + SATClaveProdServ + + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SATClaveUM.Value + + + + + + + SATClaveUM + + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value & " " & Fields!Obs.Value + + + + + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteIVA.Value + + + + + + + ImporteIVA + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value*Fields!PU.Value + + + + + + + Textbox88 + + + + #4f81bd + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 6.28717cm + 0.44641cm + 1.2353cm + 20.06999cm + 3 + + + + + + true + true + + + + + =Parameters!ClienteDatoExtra1.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 3.15414cm + + + + + 0.27059cm + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + 0.38492cm + + + + + true + true + + + + + =Replace(Parameters!Moneda.Value,"Pesos","Peso mexicano") + + + + + + + Textbox47 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + =Fields!ImpuestoLocal.Value + + + + 2.52863cm + + + true + true + + + + + =Fields!ImpuestoLocal.Value + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + 2.52863cm + + + true + true + + + + + Moneda + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + Before + + + + DataSet1 + 7.71422cm + 14.83363cm + 0.65551cm + 5.68277cm + 5 + + + + + + true + true + + + + + Folio Cotización + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!Serie.Value.ToString="",Parameters!Folio.Value,Parameters!Serie.Value & "-" &Parameters!Folio.Value) + + + + + + + Textbox3 + 2.79612cm + 17.39754cm + 0.41303cm + 3.066cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox12 + 3.22326cm + 17.39754cm + 0.42714cm + 3.066cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Lugar de Expedición + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + 83299 + + + + + + + Textbox55 + 3.75976cm + 17.39754cm + 0.46681cm + 3.05452cm + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Forma de Pago + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FormaPago.Value + + + + + + + Textbox3 + 3.0229cm + 4.48098cm + 0.42944cm + 6.76133cm + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Método de Pago + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value) + + + + + + + Textbox3 + 3.46998cm + 4.48098cm + 0.40122cm + 6.76133cm + 15 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Moneda + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Moneda.Value + + + + + + + + Tipo de Cambio + + + + + + + + =Parameters!TipoCambio.Value + + + + + + + + + + + Textbox3 + 3.95234cm + 4.48098cm + 0.43297cm + 6.76133cm + 17 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Datos del Cliente + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + R.F.C.: + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteRFC.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Uso CFDI: + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!UsoCFDI.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Domicilio: + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteDireccion.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + OBSERVACIONES GENERALES: + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + + Textbox3 + 7.54478cm + 5.057cm + 0.44003cm + 9.60024cm + 26 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ImporteLetra.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Importe Con Letra: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + LOGOPrisay + FitProportional + 0.12828in + 0.23387in + 0.92669in + 1.13041in + 29 + + + + + + 9.1438cm + + + + + + + Textbox3 + 0.04232cm + 16.34905cm + 0.6cm + 3.95896cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Today + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 0.5cm + 1.27cm + + + + + + + Textbox24 + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + U.M. + + + + + + + Textbox27 + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + DESCRIPCIÓN + + + + + + + Textbox26 + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + P/U + + + + + + + Textbox36 + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + IMPORTE + + + + + + + Textbox38 + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Parameters!Cantidad.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!UnidadMedida.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Descripcion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!PU.Value + + + + + + + Textbox37 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Parameters!Importe.Value + + + + + + + Textbox39 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + + + + + + + + + + + + + + + + + DataSet2 + 2.78114cm + 0.30837cm + 1.09cm + 20.35756cm + + + + + + + + + 2.47362cm + + + 2.03357cm + + + 2.09429cm + + + 2.14897cm + + + 1.89771cm + + + 1.86871cm + + + 2.20259cm + + + 2.90088cm + + + 2.70327cm + + + + + 0.54292cm + + + + + true + true + + + + + UUID + + + + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + true + true + + + + + SERIE + + + + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + FOLIO + + + + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + MONEDA + + + + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + NO.PARC. + + + + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + SALDO ANT. + + + + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + MONTO PAGADO + + + + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38069cm + + + + + true + true + + + + + =Fields!IdDocumento.Value + + + + + + + + 3 + + + + + + + + true + true + + + + + =Fields!Serie.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Folio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!MonedaDR.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!NumParcialidad.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImpSaldoAnt.Value + + + + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + Impuesto + + + + + + + Textbox108 + + = IIF( + Fields!Tra001ImporteDR.Value > 0 + OR Fields!Tra002ImporteDR.Value > 0 + OR Fields!Tra003ImporteDR.Value > 0 + OR Fields!Ret001ImporteDR.Value > 0 + OR Fields!Ret002ImporteDR.Value > 0 + OR Fields!Ret003ImporteDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + Tipo + + + + + + + Textbox109 + + = IIF( + Fields!Tra001ImporteDR.Value > 0 + OR Fields!Tra002ImporteDR.Value > 0 + OR Fields!Tra003ImporteDR.Value > 0 + OR Fields!Ret001ImporteDR.Value > 0 + OR Fields!Ret002ImporteDR.Value > 0 + OR Fields!Ret003ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Base + + + + + + + Textbox110 + + = IIF( + Fields!Tra001ImporteDR.Value > 0 + OR Fields!Tra002ImporteDR.Value > 0 + OR Fields!Tra003ImporteDR.Value > 0 + OR Fields!Ret001ImporteDR.Value > 0 + OR Fields!Ret002ImporteDR.Value > 0 + OR Fields!Ret003ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tipo Factor + + + + + + + Textbox111 + + = IIF( + Fields!Tra001ImporteDR.Value > 0 + OR Fields!Tra002ImporteDR.Value > 0 + OR Fields!Tra003ImporteDR.Value > 0 + OR Fields!Ret001ImporteDR.Value > 0 + OR Fields!Ret002ImporteDR.Value > 0 + OR Fields!Ret003ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tasa/Cuota + + + + + + + Textbox112 + + = IIF( + Fields!Tra001ImporteDR.Value > 0 + OR Fields!Tra002ImporteDR.Value > 0 + OR Fields!Tra003ImporteDR.Value > 0 + OR Fields!Ret001ImporteDR.Value > 0 + OR Fields!Ret002ImporteDR.Value > 0 + OR Fields!Ret003ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox113 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001ImporteDR.Value > 0 Or Fields!Tra002ImporteDR.Value > 0 Or Fields!Tra003ImporteDR.Value > 0 Or Fields!Ret001ImporteDR.Value > 0 Or Fields!Ret002ImporteDR.Value > 0 Or Fields!Ret003ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + ISR + + + + + + + Textbox61 + + = IIF( + Fields!Tra001ImporteDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + = IIF( + Fields!Tra001ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra001ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Tra001TipoFactorDR.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Tra001TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra001ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Tra001ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + IVA + + + + + + + Textbox61 + + = IIF( + Fields!Tra002ImporteDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + = IIF( + Fields!Tra002ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra002ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Tra002TipoFactorDR.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Tra002TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra002ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Tra002ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + IEPS + + + + + + + Textbox61 + + = IIF( + Fields!Tra003ImporteDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + = IIF( + Fields!Tra003ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra003ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Tra003TipoFactorDR.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Tra003TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra003ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Tra003ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + ISR + + + + + + + Textbox61 + + = IIF( + Fields!Ret001ImporteDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + = IIF( + Fields!Ret001ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret001ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ret001TipoFactorDR.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ret001TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret001ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ret001ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + IVA + + + + + + + Textbox61 + + = IIF( + Fields!Ret002ImporteDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + = IIF( + Fields!Ret002ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret002ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ret002TipoFactorDR.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ret002TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret002ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ret002ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + IEPS + + + + + + + Textbox59 + + = IIF( + Fields!Ret003ImporteDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + = IIF( + Fields!Ret003ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret003ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ret003TipoFactorDR.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ret003TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret003ImporteDR.Value > 0 + ,False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ret003ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + + + + + + + + + + + DataSet2 + 4.65526cm + 0.30837cm + 1.47927cm + 20.32361cm + 1 + + + + + + + + + 4.5cm + + + 1.74905cm + + + 1.5cm + + + 2.96606cm + + + 6.82934cm + + + 2.77622cm + + + + + 0.49cm + + + + + true + true + + + + + FECHA Y HORA DE PAGO + + + + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + MONEDA + + + + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + TC + + + + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CTA ORDENANTE + + + + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + FORMA DE PAGO + + + + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + TOTAL DE PAGO + + + + + + + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!FechaPago.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!MonedaP.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TipoCambioP.Value + + + + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!CtaOrdenante.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FormaDePagoP.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Monto.Value + + + + + + + Monto + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!CantidadLetra.Value + + + + + + + Textbox53 + + + + Silver + 3pt + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + + + + + + + + + + + + + + + After + + + + + + Before + + + + DataSet1 + 6.51061cm + 0.31556cm + 1.69cm + 20.32067cm + 2 + + + + + + true + true + + + + + CFDI Relacionados + + + + + + + Textbox5 + 4.04466cm + 0.30837cm + 0.49cm + 20.32362cm + 3 + + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Datos del Cliente: + + + + + + + + + Cliente + + + + : + + + + =Parameters!Cliente.Value + + + + + + + + + Dirección: + + + + =Parameters!ClienteDireccion.Value + + + + , + + + + =Parameters!ClienteColonia.Value + + + + + + + + + Ciudad: + + + + =Parameters!ClienteCiudad.Value + + + + + + + + + CP: + + + + =Parameters!ClienteCP.Value + + + + + + + + + RFC Ordenante: + + + + + + + + =Parameters!RFCOrdenante.Value + + + + + + + + + Reg. Fiscal: + HTML + + + + = IIF( Parameters!RegimenFiscalCodigo.Value <> "ND-", Parameters!RegimenFiscalCodigo.Value,"") + HTML + + + + + + + Textbox2 + 0.30837cm + 0.98591in + 5.35046in + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + "Este documento es una representación impresa de un CFDI" + + + + + + + + + Cadena original del complemento de certificación digital del SAT: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =Parameters!UUIDPago.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!QR.Value + FitProportional + 3.46321in + 6.67189in + 1.17372in + 1.38542in + 7 + + + + + + true + true + + + + + Folio: + + + + + + + + =Parameters!SerieFolio.Value + + + + + + + + + Fecha Timbre: + + + + + + + + =Parameters!FechaTimbre.Value + + + + + + + Textbox1 + 0.74463cm + 16.49547cm + 1.0961cm + 4.14076cm + 8 + + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + RECIBO DE PAGO + + + + + + + Textbox1 + 0.07408cm + 16.49547cm + 0.6cm + 4.19095cm + 9 + + + White + 2pt + 2pt + 2pt + 2pt + + + + 11.77781cm + + + + + + + + + Tipo de Comprobante: I - Ingreso + + + + + + + + + Del Cobre No. 95 Col. Parque Industrial Hermosillo, Sonora. México, C.P. 83299 + + + + + + + + + Tel. 6622510249 + + + + RFC: CMN9810221L8 + + + + + + + + + Régimen Fiscal: 601 - General de Ley Personas Morales + + + + + + + Textbox4 + 0.17715cm + 1.70238in + 0.80098in + 5.32912in + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + LOGOPrisay + FitProportional + 0.12141in + 0.92669in + 1.13041in + 1 + + + + + + + + + + + 0.41981cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 0cm + 17.76633cm + 0.41981cm + 2.94979cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + + + + + + + Textbox7 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + @@ -806,6 +855,41 @@ + + + + true + true + + + + + =Fields!CodigoObjetoImpuesto.Value + + + + + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + + + + @@ -932,6 +1016,7 @@ + @@ -2692,7 +2777,7 @@ Textbox5 - 0.14926cm + 0.02226cm 1.30058cm 0.46066cm 18.98926cm @@ -2728,7 +2813,7 @@ Textbox29 - 0.735cm + 0.57625cm 5.06432cm 0.41981cm 5.31841cm @@ -2761,7 +2846,7 @@ Textbox29 - 0.735cm + 0.57625cm 10.38273cm 0.41981cm 7.14985cm @@ -3106,7 +3191,7 @@ DataSet4 - 1.39643cm + 1.07893cm 3.56258cm 0.85604cm 15.30142cm @@ -3120,7 +3205,7 @@ true 12.06599cm - 2.28935cm + 1.93497cm 20.28984cm 46 @@ -3298,7 +3383,7 @@ 20.2229cm 47 - =Not Parameters!TieneCartaPorte.Value + = iif(IsNothing(Parameters!TieneCartaPorte), True, iif(Parameters!TieneCartaPorte.Value , True, False)) + + true + true + + + + + VERSION + + + + =Parameters!CFDIVersion.Value + + + + + + + Textbox5 + 14.03578cm + 16.60468cm + 0.65292cm + 3.68516cm + 50 + + + 2pt + 2pt + 2pt + 2pt + + - 14.35534cm + 14.6887cm + + + + + + Textbox6 + + + + Black + + + + Black + + + White + 2pt + 2pt + 2pt + 2pt + + + + @@ -822,6 +871,41 @@ + + + + true + true + + + + + =Fields!CodigoObjetoImpuesto.Value + + + + + + + #4f81bd + + 2pt + 2pt + 2pt + 2pt + + + + @@ -948,6 +1032,7 @@ + @@ -964,7 +1049,7 @@ 6.28717cm 0.44641cm 1.2353cm - 20.06999cm + 20.01713cm 3 + + true + true + + + + + Regimen Fiscal: + + + + + + + Textbox19 + 2.24888in + 12.48303cm + 0.17222in + 0.82757in + 47 + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!RegimenFiscalCodigo.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + VERSION + + + + =Parameters!CFDIVersion.Value + + + + + + + Textbox5 + 16.52685cm + 16.7643cm + 0.54003cm + 3.68516cm + 49 + + + 2pt + 2pt + 2pt + 2pt + + - 16.79496cm + 17.06688cm + + + + + FooterBand1 + + + + - Microsoft Sans Serif,8,Regular,Point,False,0 - Center - True - 2,2,2,2 - Textbox47 + True + Panel1 - - ACEPTO (AMOS) DE CONFORMIDAD - Black - - - Transparent - True - 6.86,3.67,6.65,0.54 - - - Microsoft Sans Serif,8,Regular,Point,False,0 - Center - True - 2,2,2,2 - Textbox44 - - - Obligado - [0:0:0] - - - True - Transparent - True - 17,0.2,1,0.4 - - - Myriad Pro,10,Bold,Point,False,0 - 0,0,0,0 - Text15 - - - {Serie} - [255:0:0] - Expression - Bottom - - - Transparent - 18,0.2,1,0.4 - - - Myriad Pro,9,Bold,Point,False,0 - Right - 0,0,0,0 - Text16 - - - Folio: - Black - Expression - Bottom - - - True - Transparent - True - 19,0.2,1,0.4 - - - Myriad Pro,10,Bold,Point,False,0 - 0,0,0,0 - Text17 - - - {Folio} - [255:0:0] - Expression - Bottom - - - Transparent - 15.4,0.2,1.6,0.4 - - - Myriad Pro,9,Bold,Point,False,0 - Right - 0,0,0,0 - Text18 - - - Serie: - Black - Expression - Bottom - - - 0,1.44,21,0.0254 - Black - - - Black - - - True - Line1 - - - - Black - - - - 6.86,4.66,6.65,0.0254 - Black - - - Black - - - True - Line3 - - - - Black - - + + - True - Pagare + Panel4 - - OnlyLastPage - + + OnlyFirstPage + - FooterBand2 + PageHeaderBand1 - + OnlyFirstPage + + + Transparent + 0,27,21.1,0.4 + + + Transparent + True + 7.4,0,2.91,0.6 + + + Myriad Pro,8,Bold,Point,False,0 + Right + 2,2,2,2 + Text35 + + + Fecha Impresion: + Black + + + Transparent + True + 10.31,0,4.89,0.6 + + + Myriad Pro,8,Regular,Point,False,0 + 2,2,2,2 + Textbox37 + + + {FechaImpresion} + Black + + d + + + + Transparent + True + 17.31,0,3.69,0.6 + + + Myriad Pro,8,Bold,Point,False,0 + Right + 2,2,2,2 + Text37 + + + Página {PageNumber} de {TotalPageCount} + Black + + d + + Expression + + + + + PageFooterBand1 + + + @@ -8075,13 +8293,13 @@ ESTE PAGARÉ ES MERCANTIL Y ESTÁ PROTEGIDO POR LA LEY GENERAL DE TÍTULOS Y OPE Stimulsoft.Report.Dll Factura - 12/9/2022 10:44:46 AM + 12/7/2022 12:27:52 PM 7/11/2022 2:49:19 PM - C:\inetpub\wwwSIGGIT\Empresas\140\Formatos\Factura.mrt - 3135a03f0de04b128f910e44a3c041ce + Factura.mrt + 059fedaeb44b4374ad4f5a2888f69cf2 Factura Centimeters - 2022.4.5.0 + 2022.4.2.0 ", Script), False) + Public Shared Sub RegistraScript(Script As String, Optional valuetick As String = "") + Dim page As Page = TryCast(HttpContext.Current.CurrentHandler, Page) + Script = $"{Script.TrimEnd(";"c)};" 'sino trae ";" al final, se lo agregamos + ScriptManager.RegisterStartupScript(page, page.GetType(), $"{DateTime.Now.Ticks + 1}{Rand.Next()}{valuetick}", Script, True) End Sub Public Sub TabEnabled(Tab As System.Web.UI.HtmlControls.HtmlAnchor, Valor As Boolean) If Valor Then @@ -6192,9 +6190,6 @@ Public Class ClsPaginas 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 diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 06ff258ec..934c66cdf 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -64,7 +64,6 @@ Namespace Extensiones Private Const SEncryptionKeyAES As String = "$Ap7+5&z$Ap7+5&z$Ap7+5&z$Ap7+5&z" #End Region - Public Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean, Optional curRow As Integer = 0) As DataTable GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet) Dim excelFile As GemBox.Spreadsheet.ExcelFile = GemBox.Spreadsheet.ExcelFile.Load(flatFilePath) @@ -125,7 +124,6 @@ Namespace Extensiones End Function - Public Function IfNull(Valor As Object, Predeterminado As Object, Optional IfNotNull As Object = Nothing) As Object If Valor Is Nothing OrElse IsDBNull(Valor) Then ' si es nulo, manda el valor predeterminado @@ -188,7 +186,6 @@ Namespace Extensiones End Try End Function - Public Sub GuardaLog(Str As String) Dim ArchivoW As StreamWriter @@ -337,8 +334,7 @@ Namespace Extensiones End Sub #End Region -#Region "Alertas y notificaciones" - +#Region "Alertas y notificaciones" Public Enum TipoUpdate As Integer NoGuardar = 0 @@ -362,7 +358,7 @@ Namespace Extensiones End Enum Public Sub Alert(Obj As Object, Mensaje As String, pOpcion As TipoMensaje, Optional JSBtnAceptar As String = "", Optional TextoConfirmacion As String = "Aceptar", Optional TextoCancelacion As String = "Cancelar", Optional TimeoutToast As Integer = 5, Optional ShowCloseButton As Boolean = True, Optional TextoSegundoBoton As String = "", Optional JSBtn2 As String = "") - If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler.GetType().IsSubclassOf(GetType(Page)) Then + If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.CurrentHandler IsNot Nothing AndAlso System.Web.HttpContext.Current.CurrentHandler.GetType().IsSubclassOf(GetType(Page)) Then Dim Titulo As String = "" Dim Plus As String = DateTime.Now.Ticks.ToString @@ -441,7 +437,7 @@ Namespace Extensiones closeButtonOption = "backdrop : ""static"", keyboard : false, closeButton: false," End If - Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page) + Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.CurrentHandler, Page) Dim script As String = "" If showalert Then script = String.Format("bootbox.dialog({{message: ""{0} "", className: ""{11}"", {13} onEscape: function() {{ {12} }},title: ""{1}"",buttons: {{ success: {{ label: ""{2}"", className: "" {3}""," & @@ -465,7 +461,7 @@ Namespace Extensiones Public Sub Alert2(Obj As Object, Mensaje As String, pOpcion As TipoMensaje, Optional JSBtnAceptar As String = "") - If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing Then + If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.CurrentHandler IsNot Nothing Then Dim Img, Botones As String Dim Titulo As String Dim Plus As String = DateTime.Now.Ticks.ToString @@ -503,7 +499,7 @@ Namespace Extensiones Try - Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page) + Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.CurrentHandler, Page) 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) Pag = Nothing @@ -555,7 +551,7 @@ Namespace Extensiones ' 'Public Sub updateindicador(Obj As Object, script As String) - ' Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page) + ' Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.CurrentHandler, Page) ' ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), script, True) ' Pag = Nothing 'End Sub @@ -3643,16 +3639,7 @@ Namespace Extensiones Public Sub RegistraScript(Obj As Object, Script As String) - RegistraScript(Script) - End Sub - - - Public Sub RegistraScript(Script As String) - Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page) - Script = String.Format("{0};", Script.TrimEnd(";"c)) ' sino trae ";" al final, se lo agregamos - ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), Guid.NewGuid().ToString(), Script, True) - Pag = Nothing - + ClsPaginas.RegistraScript(Script) End Sub @@ -3667,7 +3654,7 @@ Namespace Extensiones Private ReadOnly Property ObjClsPaginas As ClsPaginas Get - Return DirectCast(System.Web.HttpContext.Current.Handler, ClsPaginas) + Return DirectCast(System.Web.HttpContext.Current.CurrentHandler, ClsPaginas) End Get End Property diff --git a/Bancos/RepComplementoPago.aspx.vb b/Bancos/RepComplementoPago.aspx.vb index 3f96cf6d8..77615c98a 100644 --- a/Bancos/RepComplementoPago.aspx.vb +++ b/Bancos/RepComplementoPago.aspx.vb @@ -447,7 +447,7 @@ Partial Class Bancos_RepComplementoPago Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) ' GvD.ExportToExcelG("ReporteComplementos", "Reporte Complementos", UsuarioActual) - 'GvD.ExportToExcelx("ReporteComplementos.xlsx") + 'GvD.ExportToExcelX("ReporteComplementos.xlsx") ' GvD.ExportToExcel("ReporteComplementos.xlsx") diff --git a/Bancos/Temporal/RepVotos.aspx.vb b/Bancos/Temporal/RepVotos.aspx.vb index c009dd186..fb81fce91 100644 --- a/Bancos/Temporal/RepVotos.aspx.vb +++ b/Bancos/Temporal/RepVotos.aspx.vb @@ -97,11 +97,11 @@ Partial Class Temporal_RepVotos End Sub Private Sub ImgExcelHombres_Click(sender As Object, e As EventArgs) Handles ImgExcelHombres.Click - GvMasculino.ExportToExcelx("Reporte de Hombres") + GvMasculino.ExportToExcelX("Reporte de Hombres") End Sub Private Sub ImgExcelMujeres_Click(sender As Object, e As EventArgs) Handles ImgExcelMujeres.Click - GvFemenino.ExportToExcelx("Reporte de Mujeres") + GvFemenino.ExportToExcelX("Reporte de Mujeres") End Sub #End Region diff --git a/CGame/CatCargosFijos.aspx.cs b/CGame/CatCargosFijos.aspx.cs index 3c5b50256..c282f539e 100644 --- a/CGame/CatCargosFijos.aspx.cs +++ b/CGame/CatCargosFijos.aspx.cs @@ -54,7 +54,7 @@ public partial class CGame_CatCargosFijos : ClsPaginas protected void LnkAgregarCargoFijo_Click(object sender, EventArgs e) { - this.RegistraScript("$('#ModalAgregarCargoFijo').modal();"); + RegistraScript("$('#ModalAgregarCargoFijo').modal();"); LimpiaModal(); BtnAddCargoFijo.Text = "Agregar"; Modalidad = "A"; @@ -70,7 +70,7 @@ public partial class CGame_CatCargosFijos : ClsPaginas ClsCGame ObjCGame = new ClsCGame(); if (ObjCGame.RemoveCargoFijo(CveCargoFijo)) { - this.RegistraScript("$('#ModalAgregarCargoFijo').modal('hide');"); + RegistraScript("$('#ModalAgregarCargoFijo').modal('hide');"); CargaCargosFijos(); Alert("Eliminado Correctamente."); } @@ -90,7 +90,7 @@ public partial class CGame_CatCargosFijos : ClsPaginas DdlMoneda.SelectedValueExist(gvRow.DataKey("CveMoneda")); ChkEstatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus")); CambioTipo(); - this.RegistraScript("$('#ModalAgregarCargoFijo').modal();"); + RegistraScript("$('#ModalAgregarCargoFijo').modal();"); DivEstatus.Visible = true; BtnAddCargoFijo.Text = "Actualizar"; UpModalCargoFijo.Update(); @@ -148,7 +148,7 @@ public partial class CGame_CatCargosFijos : ClsPaginas } if (!Error) { - this.RegistraScript("$('#ModalAgregarCargoFijo').modal('hide');"); + RegistraScript("$('#ModalAgregarCargoFijo').modal('hide');"); CargaCargosFijos(); if (Modalidad=="A") { Alert("Agregado Correctamente."); } else if (Modalidad == "U") { Alert("Actualizado Correctamente."); } } diff --git a/CGame/CatConceptoGastoCorte.aspx.cs b/CGame/CatConceptoGastoCorte.aspx.cs index 2cc6a8976..374eb4602 100644 --- a/CGame/CatConceptoGastoCorte.aspx.cs +++ b/CGame/CatConceptoGastoCorte.aspx.cs @@ -28,7 +28,7 @@ public partial class CGame_CatConceptoGastoCorte : ClsPaginas protected void LnkAgregarConcepto_Click(object sender, EventArgs e) { - this.RegistraScript("$('#DModalConcepto').modal();"); LimpiaConcepto(); BtnConceptoAdd.Visible = true; BtnConceptoEdit.Visible = false; + RegistraScript("$('#DModalConcepto').modal();"); LimpiaConcepto(); BtnConceptoAdd.Visible = true; BtnConceptoEdit.Visible = false; DivEstatus.Visible = false; UpModal.Update(); } @@ -58,16 +58,16 @@ public partial class CGame_CatConceptoGastoCorte : ClsPaginas protected void LnkEditar_Click(object sender, EventArgs e) { LimpiaConcepto(); GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); - CveConceptoGastoCorte = gvRow.DataKey("CveConceptoGastoCorte").ToEntero(); TxtConcepto.Text = gvRow.DataKey("ConceptoGastoCorte"); ChkEstatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus")); this.RegistraScript("$('#DModalConcepto').modal();"); BtnConceptoAdd.Visible = false; BtnConceptoEdit.Visible = true; DivEstatus.Visible = true; UpModal.Update(); + CveConceptoGastoCorte = gvRow.DataKey("CveConceptoGastoCorte").ToEntero(); TxtConcepto.Text = gvRow.DataKey("ConceptoGastoCorte"); ChkEstatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus")); RegistraScript("$('#DModalConcepto').modal();"); BtnConceptoAdd.Visible = false; BtnConceptoEdit.Visible = true; DivEstatus.Visible = true; UpModal.Update(); } protected void BtnConceptoAdd_Click(object sender, EventArgs e) { - ClsCGame ObjCgame = new ClsCGame(); bool Continuar = ObjCgame.AddConceptoGastoCorte(TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjCgame.Dispose(); if (Continuar) { this.RegistraScript("$('#DModalConcepto').modal('hide');"); LimpiaConcepto(); UpModal.Update(); Alert("El cocnepto se ha agregado"); CargaConcepto(); } + ClsCGame ObjCgame = new ClsCGame(); bool Continuar = ObjCgame.AddConceptoGastoCorte(TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjCgame.Dispose(); if (Continuar) { RegistraScript("$('#DModalConcepto').modal('hide');"); LimpiaConcepto(); UpModal.Update(); Alert("El cocnepto se ha agregado"); CargaConcepto(); } } protected void BtnConceptoEdit_Click(object sender, EventArgs e) { - ClsCGame ObjCGame = new ClsCGame(); bool Continuar = ObjCGame.UpdateConceptoGastoCorte(CveConceptoGastoCorte, TxtConcepto.Text, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjCGame.Dispose(); if (Continuar) { this.RegistraScript("$('#DModalConcepto').modal('hide');"); LimpiaConcepto(); UpModal.Update(); Alert("El concepto se ha actualizado"); CargaConcepto(); } + ClsCGame ObjCGame = new ClsCGame(); bool Continuar = ObjCGame.UpdateConceptoGastoCorte(CveConceptoGastoCorte, TxtConcepto.Text, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjCGame.Dispose(); if (Continuar) { RegistraScript("$('#DModalConcepto').modal('hide');"); LimpiaConcepto(); UpModal.Update(); Alert("El concepto se ha actualizado"); CargaConcepto(); } } } \ No newline at end of file diff --git a/CGame/CatHuerta.aspx.cs b/CGame/CatHuerta.aspx.cs index 721d5e777..1a180f79d 100644 --- a/CGame/CatHuerta.aspx.cs +++ b/CGame/CatHuerta.aspx.cs @@ -8,13 +8,13 @@ DdlProveedor.DataSource = ObjProv.DtResultados; DdlProveedor.Items.Insert(0, new ListItem("Seleccione", "-1")); DdlProveedor.DataBind(); - } ObjProv.Dispose(); } protected void LimpiaHuerta() { TxtHuerhuerta.Text= ""; TxtImporte.Text = ""; TxtCostoXTonelada.Text = ""; DdlProveedor.SelectedIndex = 0; DdlTipoCobro.SelectedIndex = 0; UPModalHuer.Update(); } protected void LnkEditarHuer_Click(object sender, EventArgs e) { LimpiaHuerta(); GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); CveHuerta = gvRow.DataKey("CveHuerta").ToEntero(); TxtHuerhuerta.Text = gvRow.DataKey("Huerta"); TxtImporte.Text = gvRow.DataKey("Importe"); TxtCostoXTonelada.Text = gvRow.DataKey("CostoXTonelada"); DdlProveedor.SelectedValueExist(gvRow.DataKey("CveProveedor").ToEntero()); DdlTipoCobro.SelectedValueExist(gvRow.DataKey("TipoCobro").ToEntero()); ChkHuerestatus.Checked= Convert.ToBoolean(gvRow.DataKey("Estatus")); this.RegistraScript("$('#DModalHuerta').modal();"); BtnHuerADD.Visible=false; BtnHuerEdit.Visible=true; DivEstatus.Visible = true; UPModalHuer.Update(); } protected void LnkAgregarHuer_Click(object sender, EventArgs e) { this.RegistraScript("$('#DModalHuerta').modal();"); LimpiaHuerta(); BtnHuerADD.Visible=true; BtnHuerEdit.Visible=false; DivEstatus.Visible = false; UPModalHuer.Update(); } protected void BtnHuerADD_Click(object sender, EventArgs e) { if (DdlProveedor.SelectedValue=="-1") + } ObjProv.Dispose(); } protected void LimpiaHuerta() { TxtHuerhuerta.Text= ""; TxtImporte.Text = ""; TxtCostoXTonelada.Text = ""; DdlProveedor.SelectedIndex = 0; DdlTipoCobro.SelectedIndex = 0; UPModalHuer.Update(); } protected void LnkEditarHuer_Click(object sender, EventArgs e) { LimpiaHuerta(); GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); CveHuerta = gvRow.DataKey("CveHuerta").ToEntero(); TxtHuerhuerta.Text = gvRow.DataKey("Huerta"); TxtImporte.Text = gvRow.DataKey("Importe"); TxtCostoXTonelada.Text = gvRow.DataKey("CostoXTonelada"); DdlProveedor.SelectedValueExist(gvRow.DataKey("CveProveedor").ToEntero()); DdlTipoCobro.SelectedValueExist(gvRow.DataKey("TipoCobro").ToEntero()); ChkHuerestatus.Checked= Convert.ToBoolean(gvRow.DataKey("Estatus")); RegistraScript("$('#DModalHuerta').modal();"); BtnHuerADD.Visible=false; BtnHuerEdit.Visible=true; DivEstatus.Visible = true; UPModalHuer.Update(); } protected void LnkAgregarHuer_Click(object sender, EventArgs e) { RegistraScript("$('#DModalHuerta').modal();"); LimpiaHuerta(); BtnHuerADD.Visible=true; BtnHuerEdit.Visible=false; DivEstatus.Visible = false; UPModalHuer.Update(); } protected void BtnHuerADD_Click(object sender, EventArgs e) { if (DdlProveedor.SelectedValue=="-1") { Alert("Tiene que seleccionar un proveedor."); return; - } ClsCGame ObjHuer =new ClsCGame(); bool Continuar = ObjHuer.AddHuerta(TxtHuerhuerta.Text, DdlProveedor.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,DdlTipoCobro.SelectedValue.ToEntero(),TxtImporte.Text.ToDouble(), TxtCostoXTonelada.Text.ToDouble()); ObjHuer.Dispose(); if(Continuar) { this.RegistraScript("$('#DModalHuerta').modal('hide');"); LimpiaHuerta(); UPModalHuer.Update(); Alert("La Huerta se ha agregado"); - CargaHuerta(); } } protected void BtnHuerEdit_Click(object sender, EventArgs e) { ClsCGame ObjHuer =new ClsCGame(); bool Continuar = ObjHuer.UpdateHuerta(CveHuerta, TxtHuerhuerta.Text, DdlProveedor.SelectedValue.ToEntero(), ChkHuerestatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTipoCobro.SelectedValue.ToEntero(), TxtImporte.Text.ToDouble(), TxtCostoXTonelada.Text.ToDouble()); ObjHuer.Dispose(); if(Continuar) { this.RegistraScript("$('#DModalHuerta').modal('hide');"); LimpiaHuerta(); UPModalHuer.Update(); Alert("La Huerta se ha actualizado"); CargaHuerta(); } } protected void LnkEliminarHuer_Click(object sender, EventArgs e) { GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); ClsCGame ObjHuer = new ClsCGame(); bool Continuar = ObjHuer.RemoveHuerta(gvRow.DataKey("CveHuerta").ToEntero()); ObjHuer.Dispose(); if(Continuar) { CargaHuerta(); Alert("La Huerta se ha eliminado"); } } + } ClsCGame ObjHuer =new ClsCGame(); bool Continuar = ObjHuer.AddHuerta(TxtHuerhuerta.Text, DdlProveedor.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,DdlTipoCobro.SelectedValue.ToEntero(),TxtImporte.Text.ToDouble(), TxtCostoXTonelada.Text.ToDouble()); ObjHuer.Dispose(); if(Continuar) { RegistraScript("$('#DModalHuerta').modal('hide');"); LimpiaHuerta(); UPModalHuer.Update(); Alert("La Huerta se ha agregado"); + CargaHuerta(); } } protected void BtnHuerEdit_Click(object sender, EventArgs e) { ClsCGame ObjHuer =new ClsCGame(); bool Continuar = ObjHuer.UpdateHuerta(CveHuerta, TxtHuerhuerta.Text, DdlProveedor.SelectedValue.ToEntero(), ChkHuerestatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTipoCobro.SelectedValue.ToEntero(), TxtImporte.Text.ToDouble(), TxtCostoXTonelada.Text.ToDouble()); ObjHuer.Dispose(); if(Continuar) { RegistraScript("$('#DModalHuerta').modal('hide');"); LimpiaHuerta(); UPModalHuer.Update(); Alert("La Huerta se ha actualizado"); CargaHuerta(); } } protected void LnkEliminarHuer_Click(object sender, EventArgs e) { GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); ClsCGame ObjHuer = new ClsCGame(); bool Continuar = ObjHuer.RemoveHuerta(gvRow.DataKey("CveHuerta").ToEntero()); ObjHuer.Dispose(); if(Continuar) { CargaHuerta(); Alert("La Huerta se ha eliminado"); } } protected void GvHuerta_RowDataBound(object sender, GridViewRowEventArgs e) { diff --git a/CGame/CatMotivosMerma.aspx.cs b/CGame/CatMotivosMerma.aspx.cs index 8e41e4b86..a370b4f6e 100644 --- a/CGame/CatMotivosMerma.aspx.cs +++ b/CGame/CatMotivosMerma.aspx.cs @@ -3,8 +3,8 @@ GVMotivosMerma.DataSource = ObjMoti.DtResultados; GVMotivosMerma.DataBind(); } - ObjMoti.Dispose(); upDatosMoti.Update(); } protected void LimpiaMotivosMerma() { TxtMotimotivo.Text= ""; UPModalMoti.Update(); } protected void LnkEditarMoti_Click(object sender, EventArgs e) { LimpiaMotivosMerma(); GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); CveMotivo = gvRow.DataKey("CveMotivo").ToEntero(); TxtMotimotivo.Text= gvRow.DataKey("Motivo"); ChkMotiestatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus")); this.RegistraScript("$('#DModalMotivosMerma').modal();"); BtnMotiADD.Visible=false; BtnMotiEdit.Visible=true; DivEstatus.Visible = true; UPModalMoti.Update(); } protected void LnkAgregarMoti_Click(object sender, EventArgs e) { this.RegistraScript("$('#DModalMotivosMerma').modal();"); LimpiaMotivosMerma(); BtnMotiADD.Visible=true; BtnMotiEdit.Visible=false; - DivEstatus.Visible = false; UPModalMoti.Update(); } protected void BtnMotiADD_Click(object sender, EventArgs e) { ClsCGame ObjMoti =new ClsCGame(); bool Continuar = ObjMoti.AddMotivoMerma(TxtMotimotivo.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjMoti.Dispose(); if(Continuar) { this.RegistraScript("$('#DModalMotivosMerma').modal('hide');"); LimpiaMotivosMerma(); UPModalMoti.Update(); Alert("El Motivo de Merma se ha agregado"); CargaMotivosMerma(); } } protected void BtnMotiEdit_Click(object sender, EventArgs e) { ClsCGame ObjMoti =new ClsCGame(); bool Continuar = ObjMoti.UpdateMotivoMerma(CveMotivo, TxtMotimotivo.Text, ChkMotiestatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjMoti.Dispose(); if(Continuar) { this.RegistraScript("$('#DModalMotivosMerma').modal('hide');"); LimpiaMotivosMerma(); UPModalMoti.Update(); Alert("El Motivo de Merma se ha actualizado"); CargaMotivosMerma(); } } protected void LnkEliminarMoti_Click(object sender, EventArgs e) { GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); ClsCGame ObjMoti = new ClsCGame(); bool Continuar = ObjMoti.RemoveMotivoMerma(gvRow.DataKey("CveMotivo").ToEntero()); ObjMoti.Dispose(); if(Continuar) { CargaMotivosMerma(); Alert("El Motivo de Merma se ha eliminado"); } } + ObjMoti.Dispose(); upDatosMoti.Update(); } protected void LimpiaMotivosMerma() { TxtMotimotivo.Text= ""; UPModalMoti.Update(); } protected void LnkEditarMoti_Click(object sender, EventArgs e) { LimpiaMotivosMerma(); GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); CveMotivo = gvRow.DataKey("CveMotivo").ToEntero(); TxtMotimotivo.Text= gvRow.DataKey("Motivo"); ChkMotiestatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus")); RegistraScript("$('#DModalMotivosMerma').modal();"); BtnMotiADD.Visible=false; BtnMotiEdit.Visible=true; DivEstatus.Visible = true; UPModalMoti.Update(); } protected void LnkAgregarMoti_Click(object sender, EventArgs e) { RegistraScript("$('#DModalMotivosMerma').modal();"); LimpiaMotivosMerma(); BtnMotiADD.Visible=true; BtnMotiEdit.Visible=false; + DivEstatus.Visible = false; UPModalMoti.Update(); } protected void BtnMotiADD_Click(object sender, EventArgs e) { ClsCGame ObjMoti =new ClsCGame(); bool Continuar = ObjMoti.AddMotivoMerma(TxtMotimotivo.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjMoti.Dispose(); if(Continuar) { RegistraScript("$('#DModalMotivosMerma').modal('hide');"); LimpiaMotivosMerma(); UPModalMoti.Update(); Alert("El Motivo de Merma se ha agregado"); CargaMotivosMerma(); } } protected void BtnMotiEdit_Click(object sender, EventArgs e) { ClsCGame ObjMoti =new ClsCGame(); bool Continuar = ObjMoti.UpdateMotivoMerma(CveMotivo, TxtMotimotivo.Text, ChkMotiestatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjMoti.Dispose(); if(Continuar) { RegistraScript("$('#DModalMotivosMerma').modal('hide');"); LimpiaMotivosMerma(); UPModalMoti.Update(); Alert("El Motivo de Merma se ha actualizado"); CargaMotivosMerma(); } } protected void LnkEliminarMoti_Click(object sender, EventArgs e) { GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); ClsCGame ObjMoti = new ClsCGame(); bool Continuar = ObjMoti.RemoveMotivoMerma(gvRow.DataKey("CveMotivo").ToEntero()); ObjMoti.Dispose(); if(Continuar) { CargaMotivosMerma(); Alert("El Motivo de Merma se ha eliminado"); } } protected void GvMotivoMerma_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) diff --git a/CGame/CatProductos.aspx.cs b/CGame/CatProductos.aspx.cs index 07e1af4bb..b2f9c8cd6 100644 --- a/CGame/CatProductos.aspx.cs +++ b/CGame/CatProductos.aspx.cs @@ -48,7 +48,7 @@ public partial class CATProductos : ClsPaginas CvePS = gvRow.DataKey("CvePS").ToEntero(); TxtProdpS.Text = gvRow.DataKey("PS"); ChkProdestatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus")); - this.RegistraScript("$('#DModalProductos').modal();"); + RegistraScript("$('#DModalProductos').modal();"); BtnProdADD.Visible = false; BtnProdEdit.Visible = true; DivEstatus.Visible = true; @@ -56,7 +56,7 @@ public partial class CATProductos : ClsPaginas } protected void LnkAgregarProd_Click(object sender, EventArgs e) { - this.RegistraScript("$('#DModalProductos').modal();"); + RegistraScript("$('#DModalProductos').modal();"); LimpiaProductos(); BtnProdADD.Visible=true; BtnProdEdit.Visible=false; @@ -71,7 +71,7 @@ public partial class CATProductos : ClsPaginas ObjCGame.Dispose(); if (Continuar) { - this.RegistraScript("$('#DModalProductos').modal('hide');"); + RegistraScript("$('#DModalProductos').modal('hide');"); LimpiaProductos(); UPModalProd.Update(); Alert("El Producto se ha agregado"); @@ -86,7 +86,7 @@ public partial class CATProductos : ClsPaginas ObjCGame.Dispose(); if (Continuar) { - this.RegistraScript("$('#DModalProductos').modal('hide');"); + RegistraScript("$('#DModalProductos').modal('hide');"); LimpiaProductos(); UPModalProd.Update(); Alert("El Producto se ha actualizado"); diff --git a/CGame/CatScat.aspx.cs b/CGame/CatScat.aspx.cs index 930f9a37f..c78f4e94e 100644 --- a/CGame/CatScat.aspx.cs +++ b/CGame/CatScat.aspx.cs @@ -26,7 +26,7 @@ private int CveScat protected void LnkAgregarScat_Click(object sender, EventArgs e) { - this.RegistraScript("$('#DModalScat').modal();"); LimpiaScat(); BtnScatAdd.Visible = true; BtnScatEdit.Visible = false; + RegistraScript("$('#DModalScat').modal();"); LimpiaScat(); BtnScatAdd.Visible = true; BtnScatEdit.Visible = false; DivEstatus.Visible = false; UpModal.Update(); } @@ -51,7 +51,7 @@ private int CveScat protected void LnkEditar_Click(object sender, EventArgs e) { LimpiaScat(); GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); - CveScat = gvRow.DataKey("CveScat").ToEntero(); TxtScat.Text = gvRow.DataKey("Scat"); ChkEstatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus")); this.RegistraScript("$('#DModalScat').modal();"); BtnScatAdd.Visible = false; BtnScatEdit.Visible = true; DivEstatus.Visible = true; UpModal.Update(); + CveScat = gvRow.DataKey("CveScat").ToEntero(); TxtScat.Text = gvRow.DataKey("Scat"); ChkEstatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus")); RegistraScript("$('#DModalScat').modal();"); BtnScatAdd.Visible = false; BtnScatEdit.Visible = true; DivEstatus.Visible = true; UpModal.Update(); } protected void imgD_Click(object sender, EventArgs e) @@ -61,11 +61,11 @@ private int CveScat protected void BtnScatAdd_Click(object sender, EventArgs e) { - ClsCGame ObjCgame = new ClsCGame(); bool Continuar = ObjCgame.AddScat(TxtScat.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjCgame.Dispose(); if (Continuar) { this.RegistraScript("$('#DModalScat').modal('hide');"); LimpiaScat(); UpModal.Update(); Alert("El Scat se ha agregado"); CargaScat(); } + ClsCGame ObjCgame = new ClsCGame(); bool Continuar = ObjCgame.AddScat(TxtScat.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjCgame.Dispose(); if (Continuar) { RegistraScript("$('#DModalScat').modal('hide');"); LimpiaScat(); UpModal.Update(); Alert("El Scat se ha agregado"); CargaScat(); } } protected void BtnScatEdit_Click(object sender, EventArgs e) { - ClsCGame ObjCGame = new ClsCGame(); bool Continuar = ObjCGame.UpdateScat(CveScat, TxtScat.Text, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjCGame.Dispose(); if (Continuar) { this.RegistraScript("$('#DModalScat').modal('hide');"); LimpiaScat(); UpModal.Update(); Alert("El Scat se ha actualizado"); CargaScat(); } + ClsCGame ObjCGame = new ClsCGame(); bool Continuar = ObjCGame.UpdateScat(CveScat, TxtScat.Text, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjCGame.Dispose(); if (Continuar) { RegistraScript("$('#DModalScat').modal('hide');"); LimpiaScat(); UpModal.Update(); Alert("El Scat se ha actualizado"); CargaScat(); } } } \ No newline at end of file diff --git a/CGame/CatTipoProducto.aspx.cs b/CGame/CatTipoProducto.aspx.cs index 93c295089..44ce45243 100644 --- a/CGame/CatTipoProducto.aspx.cs +++ b/CGame/CatTipoProducto.aspx.cs @@ -7,13 +7,13 @@ } ObjCGame.Dispose(); upDatosTipo.Update(); } protected void LimpiaTipoProducto() { TxtTipotipoProducto.Text= ""; UPModalTipo.Update(); } protected void LnkEditarTipo_Click(object sender, EventArgs e) { LimpiaTipoProducto(); GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); - CveTipoProducto = gvRow.DataKey("CveTipoProducto").ToEntero(); TxtTipotipoProducto.Text = gvRow.DataKey("TipoProducto"); ChkTipoestatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus")); this.RegistraScript("$('#DModalTipoProducto').modal();"); BtnTipoADD.Visible = false; BtnTipoEdit.Visible = true; DivEstatus.Visible = true; UPModalTipo.Update(); } protected void LnkAgregarTipo_Click(object sender, EventArgs e) { this.RegistraScript("$('#DModalTipoProducto').modal();"); LimpiaTipoProducto(); BtnTipoADD.Visible=true; BtnTipoEdit.Visible=false; + CveTipoProducto = gvRow.DataKey("CveTipoProducto").ToEntero(); TxtTipotipoProducto.Text = gvRow.DataKey("TipoProducto"); ChkTipoestatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus")); RegistraScript("$('#DModalTipoProducto').modal();"); BtnTipoADD.Visible = false; BtnTipoEdit.Visible = true; DivEstatus.Visible = true; UPModalTipo.Update(); } protected void LnkAgregarTipo_Click(object sender, EventArgs e) { RegistraScript("$('#DModalTipoProducto').modal();"); LimpiaTipoProducto(); BtnTipoADD.Visible=true; BtnTipoEdit.Visible=false; DivEstatus.Visible = false; UPModalTipo.Update(); } protected void BtnTipoADD_Click(object sender, EventArgs e) { - ClsCGame ObjCGame = new ClsCGame(); bool Continuar = ObjCGame.AddTipoProducto(TxtTipotipoProducto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjCGame.Dispose(); if (Continuar) { this.RegistraScript("$('#DModalTipoProducto').modal('hide');"); LimpiaTipoProducto(); UPModalTipo.Update(); Alert("El Tipo de producto se ha agregado"); CargaTipoProducto(); } } protected void BtnTipoEdit_Click(object sender, EventArgs e) { + ClsCGame ObjCGame = new ClsCGame(); bool Continuar = ObjCGame.AddTipoProducto(TxtTipotipoProducto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjCGame.Dispose(); if (Continuar) { RegistraScript("$('#DModalTipoProducto').modal('hide');"); LimpiaTipoProducto(); UPModalTipo.Update(); Alert("El Tipo de producto se ha agregado"); CargaTipoProducto(); } } protected void BtnTipoEdit_Click(object sender, EventArgs e) { - ClsCGame ObjCGame = new ClsCGame(); bool Continuar = ObjCGame.UpdateTipoProducto(CveTipoProducto, TxtTipotipoProducto.Text, ChkTipoestatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjCGame.Dispose(); if (Continuar) { this.RegistraScript("$('#DModalTipoProducto').modal('hide');"); LimpiaTipoProducto(); UPModalTipo.Update(); Alert("El Tipo de producto se ha actualizado"); CargaTipoProducto(); } } protected void LnkEliminarTipo_Click(object sender, EventArgs e) { + ClsCGame ObjCGame = new ClsCGame(); bool Continuar = ObjCGame.UpdateTipoProducto(CveTipoProducto, TxtTipotipoProducto.Text, ChkTipoestatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjCGame.Dispose(); if (Continuar) { RegistraScript("$('#DModalTipoProducto').modal('hide');"); LimpiaTipoProducto(); UPModalTipo.Update(); Alert("El Tipo de producto se ha actualizado"); CargaTipoProducto(); } } protected void LnkEliminarTipo_Click(object sender, EventArgs e) { GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); ClsCGame ObjCGame = new ClsCGame(); bool Continuar = ObjCGame.RemovePS(gvRow.DataKey("CveTipoProducto").ToEntero()); ObjCGame.Dispose(); if (Continuar) { CargaTipoProducto(); Alert("El Tipo de producto se ha eliminado"); } } protected void GVTipoProducto_RowDataBound(object sender, GridViewRowEventArgs e) { diff --git a/CGame/Empaque.aspx.cs b/CGame/Empaque.aspx.cs index 38f0b7e1e..de1fa8c1b 100644 --- a/CGame/Empaque.aspx.cs +++ b/CGame/Empaque.aspx.cs @@ -819,12 +819,12 @@ public partial class Empaque : ClsPaginas CargaGvResultado(); UpModalAdd.Update(); UpResultado.Update(); - this.RegistraScript("$('#DivResultado').modal();"); + RegistraScript("$('#DivResultado').modal();"); } protected void LnkAgregarResultado_Click(object sender, EventArgs e) { Modalidad = "A"; - this.RegistraScript("$('#DivResultado').modal();"); + RegistraScript("$('#DivResultado').modal();"); LimpiaModal(); BtnOPADD.Text = "Agregar"; CargaGvResultado(); @@ -904,7 +904,7 @@ public partial class Empaque : ClsPaginas ChkTipoEtiqueta.Checked, DdlCalidad.SelectedValue.ToEntero(), DdlTipoCaja.SelectedValue.ToEntero(), TxtPeso.Text.ToDouble(), DdlPS.SelectedItem.Text, DdlTamaño.SelectedItem.Text, DdlCalidad.SelectedItem.Text, DdlTipoCaja.SelectedItem.Text, DdlTipoEmpaque.SelectedItem.Text, DdlTipoEmpaque.SelectedValue.ToEntero(), DdlTipoMaduracion.SelectedValue.ToEntero(), DdlTipoProducto.SelectedValue.ToEntero(), DdlTipoMaduracion.SelectedItem.Text, DdlTipoProducto.SelectedItem.Text); } - this.RegistraScript("$('#DivResultado').modal('hide');"); + RegistraScript("$('#DivResultado').modal('hide');"); GvResultado.DataSource = DtResultado; GvResultado.DataBind(); UpResultado.Update(); diff --git a/CGame/EntradaMateriaPrima.aspx.cs b/CGame/EntradaMateriaPrima.aspx.cs index c71986c8d..54d0fb485 100644 --- a/CGame/EntradaMateriaPrima.aspx.cs +++ b/CGame/EntradaMateriaPrima.aspx.cs @@ -156,11 +156,11 @@ public partial class CATCorte : ClsPaginas { CargaOrdenCorte(gvRow.DataKey("CveOrdenCorte").ToEntero()); DdlOrdenCorte.SelectedValueExist(gvRow.DataKey("CveOrdenCorte").ToEntero()); TxtFecha.Text = gvRow.DataKey("Fecha"); TxtPeso.Text = gvRow.DataKey("Peso"); TxtObservacion.Text = gvRow.DataKey("Observacion"); TxtTicketBascula.Text = gvRow.DataKey("TicketBascula"); Adjunto = gvRow.DataKey("Adjunto"); - TxtPesoMerma.Text = gvRow.DataKey("PesoMerma"); TxtModalAdjuntoArchivo.Text = ""; DdlMotivo.SelectedValueExist(gvRow.DataKey("CveMotivo").ToEntero()); CargaFletes(gvRow.DataKey("CveFlete").ToEntero()); DdlFlete.SelectedValueExist(gvRow.DataKey("CveFlete").ToEntero()); DdlEmpaque.SelectedValueExist(gvRow.DataKey("CveEmpaque").ToEntero()); if (gvRow.DataKey("Adjunto").ToString() != "") { LnkDescargar.Visible = true; } this.RegistraScript("$('#DModalCorte').modal();"); BtnCortADD.Visible = false; BtnCortEdit.Visible = true; UPModalCort.Update(); } protected void LnkAgregarCort_Click(object sender, EventArgs e) { Agregar(); } + TxtPesoMerma.Text = gvRow.DataKey("PesoMerma"); TxtModalAdjuntoArchivo.Text = ""; DdlMotivo.SelectedValueExist(gvRow.DataKey("CveMotivo").ToEntero()); CargaFletes(gvRow.DataKey("CveFlete").ToEntero()); DdlFlete.SelectedValueExist(gvRow.DataKey("CveFlete").ToEntero()); DdlEmpaque.SelectedValueExist(gvRow.DataKey("CveEmpaque").ToEntero()); if (gvRow.DataKey("Adjunto").ToString() != "") { LnkDescargar.Visible = true; } RegistraScript("$('#DModalCorte').modal();"); BtnCortADD.Visible = false; BtnCortEdit.Visible = true; UPModalCort.Update(); } protected void LnkAgregarCort_Click(object sender, EventArgs e) { Agregar(); } protected void Agregar() { - this.RegistraScript("$('#DModalCorte').modal();"); LimpiaCorte(); + RegistraScript("$('#DModalCorte').modal();"); LimpiaCorte(); if (CveOrdenCorte > 0) { DdlOrdenCorte.SelectedValueExist(CveOrdenCorte); } BtnCortADD.Visible = true; BtnCortEdit.Visible = false; LnkDescargar.Visible = false; @@ -168,7 +168,7 @@ public partial class CATCorte : ClsPaginas { } protected void LnkAgregarBitacora_Click(object sender, EventArgs e) { - this.RegistraScript("$('#DModalBitacora').modal();"); + RegistraScript("$('#DModalBitacora').modal();"); TxtComentario.Text = ""; UpModalBitacora.Update(); } protected void BtnCortADD_Click(object sender, EventArgs e) { @@ -192,7 +192,7 @@ public partial class CATCorte : ClsPaginas { { GuardarAdjunto(); } - this.RegistraScript("$('#DModalCorte').modal('hide');"); + RegistraScript("$('#DModalCorte').modal('hide');"); if (CveOrdenCorte > 0) { Alert("La entrada de materia prima se ha agregado correctamente", TipoMensaje.MsgInformacion, $"document.location.href=\"/CGame/RepOrdenCorteDetalle.aspx?CveOrdenCorte={CveOrdenCorte}\""); @@ -228,7 +228,7 @@ public partial class CATCorte : ClsPaginas { { GuardarAdjunto(); } - this.RegistraScript("$('#DModalCorte').modal('hide');"); + RegistraScript("$('#DModalCorte').modal('hide');"); CargaCorte(); Alert("La entrada de materia prima se ha actualizado correctamente"); } @@ -276,7 +276,7 @@ public partial class CATCorte : ClsPaginas { Alert("La bitacora fue agregada correctamente"); } ObjCGame.Dispose(); - this.RegistraScript("$('#DModalBitacora').modal('hide');"); + RegistraScript("$('#DModalBitacora').modal('hide');"); CargaBitacora(); } diff --git a/CGame/Fletes.aspx.cs b/CGame/Fletes.aspx.cs index e412033b0..12d1cad18 100644 --- a/CGame/Fletes.aspx.cs +++ b/CGame/Fletes.aspx.cs @@ -393,7 +393,7 @@ public partial class CGame_Fletes : ClsPaginas if (gvRow.DataKey("Adjunto").ToString() != "-1") { LnkDescargar.Visible = true; } Modalidad = "U"; BtnAddFlete.Text = "Actualizar"; - this.RegistraScript("$('#DModalFlete').modal();","asd"); + RegistraScript("$('#DModalFlete').modal();","asd"); UpModalFleteAdd.Update(); } @@ -409,7 +409,7 @@ public partial class CGame_Fletes : ClsPaginas BtnAddFlete.Text = "Agregar"; if (CveOrdenCorteOpcion > 0) { DdlOrdenCorte.SelectedValueExist(CveOrdenCorteOpcion); CargaFleteHuertaEmpaque(); DdlTipo.SelectedValue = "1"; } if (CveOrdenProduccionOpcion > 0) { DdlOrdenProduccion.SelectedValueExist(CveOrdenProduccionOpcion); DdlTipo.SelectedValue = "2"; } - this.RegistraScript("$('#DModalFlete').modal();"); + RegistraScript("$('#DModalFlete').modal();"); UpModalFleteAdd.Update(); } protected void BtnAddFlete_Click(object sender, EventArgs e) @@ -465,7 +465,7 @@ public partial class CGame_Fletes : ClsPaginas { _CveFlete = ObjCGame.CveFlete; GuardarAdjunto(); - this.RegistraScript("$('#DModalFlete').modal('hide');"); + RegistraScript("$('#DModalFlete').modal('hide');"); } else { @@ -538,7 +538,7 @@ public partial class CGame_Fletes : ClsPaginas _CveFlete = CveFlete; Alert("El Flete fue actualizado correctamente"); GuardarAdjunto(); - this.RegistraScript("$('#DModalFlete').modal('hide');"); + RegistraScript("$('#DModalFlete').modal('hide');"); } else { @@ -917,7 +917,7 @@ public partial class CGame_Fletes : ClsPaginas { try { - //GvFlete.ExportToExcelx("Fletes"); + //GvFlete.ExportToExcelX("Fletes"); ExportToExcelG(GvFlete,"Fletes", "Fletes", UsuarioActual); } catch (Exception ex) diff --git a/CGame/GenerarOrdenCorte.aspx.cs b/CGame/GenerarOrdenCorte.aspx.cs index c7eb97a4b..52917b5e7 100644 --- a/CGame/GenerarOrdenCorte.aspx.cs +++ b/CGame/GenerarOrdenCorte.aspx.cs @@ -137,8 +137,8 @@ public partial class CGame_GenerarOrdenCorte : ClsPaginas } if (SiSelecciono || RblTipoOC.SelectedValue.ToEntero()==2) { - this.RegistraScript("recorreGrilla();", "recorre"); - this.RegistraScript("$('#DivModalOC').modal();"); + RegistraScript("recorreGrilla();", "recorre"); + RegistraScript("$('#DivModalOC').modal();"); LimpiaModal(); UpAccion.Update(); } @@ -187,9 +187,9 @@ public partial class CGame_GenerarOrdenCorte : ClsPaginas ObjCGame.Commit(); EnviarCorreo(CveOrdenCorte); Alert("Se genero la orden de corte correctamente con el folio " + Folio + ".", TipoMensaje.MsgInformacion); - this.RegistraScript("$('#DivModalOC').modal('hide');"); + RegistraScript("$('#DivModalOC').modal('hide');"); CargaOrdenProduccionDetalle(); - this.RegistraScript("recorreGrilla();", "recorre"); + RegistraScript("recorreGrilla();", "recorre"); } else { @@ -276,7 +276,7 @@ public partial class CGame_GenerarOrdenCorte : ClsPaginas GvRow.FCCheckBox("ChkOC").Checked = true; } } - this.RegistraScript("recorreGrilla();"); + RegistraScript("recorreGrilla();"); } diff --git a/CRM/Acercamiento.aspx.cs b/CRM/Acercamiento.aspx.cs index 7606eebda..53d1ec98b 100644 --- a/CRM/Acercamiento.aspx.cs +++ b/CRM/Acercamiento.aspx.cs @@ -1046,7 +1046,7 @@ public partial class CRM_Acercamiento : ClsPaginas BtnRegistrarCierreCancelacion.Text = "Actualizar"; } - this.RegistraScript("$('#ModalCierreMotivoRechazo').modal();"); + RegistraScript("$('#ModalCierreMotivoRechazo').modal();"); UpCierreMotivoRechazo.Update(); } protected void EliminarFile(object sender, EventArgs e) @@ -1103,7 +1103,7 @@ public partial class CRM_Acercamiento : ClsPaginas CargaDatos(); CargaEtapasBitacora(); - this.RegistraScript("$('#ModalCierreMotivoRechazo').modal('hide');"); + RegistraScript("$('#ModalCierreMotivoRechazo').modal('hide');"); } #endregion @@ -1726,7 +1726,7 @@ public partial class CRM_Acercamiento : ClsPaginas GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); string Lat = GvRow.DataKey("Lat"); string Long = GvRow.DataKey("Long"); - this.RegistraScript(String.Format("initMap(); CreaMarcador({0}, {1}, '{2}', '{3}'); $('#ModalVerUbicacion').modal();", Lat, Long, "0", "Info")); + RegistraScript(String.Format("initMap(); CreaMarcador({0}, {1}, '{2}', '{3}'); $('#ModalVerUbicacion').modal();", Lat, Long, "0", "Info")); } #endregion diff --git a/CRM/CatEtapasProceso.aspx.cs b/CRM/CatEtapasProceso.aspx.cs index 335d51abe..7c3eb5552 100644 --- a/CRM/CatEtapasProceso.aspx.cs +++ b/CRM/CatEtapasProceso.aspx.cs @@ -210,7 +210,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas UPModal.Update(); - this.RegistraScript("$('#DivModal').modal();"); + RegistraScript("$('#DivModal').modal();"); } protected void LnkEditar_Click(object sender, EventArgs e) @@ -244,7 +244,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas UPModal.Update(); - this.RegistraScript("$('#DivModal').modal();"); + RegistraScript("$('#DivModal').modal();"); } private void bloquearEtapasAnteriores(int CveTipoEtapa) @@ -323,7 +323,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas ObjCRM.Dispose(); limpiarCamposModal(); - this.RegistraScript("$('#DivModal').modal('hide');"); + RegistraScript("$('#DivModal').modal('hide');"); CargaDatos(-1); DdlFiltroProceso.SelectedValueExist("-1"); } diff --git a/CRM/CatMediosCaptacion.aspx.cs b/CRM/CatMediosCaptacion.aspx.cs index 42c14f659..98716e116 100644 --- a/CRM/CatMediosCaptacion.aspx.cs +++ b/CRM/CatMediosCaptacion.aspx.cs @@ -126,7 +126,7 @@ public partial class CRM_CatMediosCaptacion : ClsPaginas limpiarCamposModal(); UPModal.Update(); - this.RegistraScript("$('#DivModal').modal();"); + RegistraScript("$('#DivModal').modal();"); } protected void GVDatos_RowDeleting(object sender, GridViewDeleteEventArgs e) @@ -189,7 +189,7 @@ public partial class CRM_CatMediosCaptacion : ClsPaginas DdlTipoProceso.SelectedValue = GvRow.DataKey("CveTipoProceso").ToString(); UPModal.Update(); - this.RegistraScript("$('#DivModal').modal();"); + RegistraScript("$('#DivModal').modal();"); } protected void BtnGuardar_Click(object sender, EventArgs e) @@ -219,7 +219,7 @@ public partial class CRM_CatMediosCaptacion : ClsPaginas ObjCRM.Dispose(); limpiarCamposModal(); - this.RegistraScript("$('#DivModal').modal('hide');"); + RegistraScript("$('#DivModal').modal('hide');"); CargaDatos(); } #endregion diff --git a/CRM/CatProbabilidadAcercamiento.aspx.cs b/CRM/CatProbabilidadAcercamiento.aspx.cs index 01a2b57b5..33bf7da58 100644 --- a/CRM/CatProbabilidadAcercamiento.aspx.cs +++ b/CRM/CatProbabilidadAcercamiento.aspx.cs @@ -129,7 +129,7 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas limpiarCamposModal(); UPModal.Update(); - this.RegistraScript("$('#DivModal').modal();"); + RegistraScript("$('#DivModal').modal();"); } protected void LnkEditar_Click(object sender, EventArgs e) @@ -146,7 +146,7 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas DdlTipoProceso.SelectedValue = GvRow.DataKey("CveTipoProceso").ToString(); UPModal.Update(); - this.RegistraScript("$('#DivModal').modal();"); + RegistraScript("$('#DivModal').modal();"); } protected void BtnGuardar_Click(object sender, EventArgs e) @@ -176,7 +176,7 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas ObjCRM.Dispose(); limpiarCamposModal(); - this.RegistraScript("$('#DivModal').modal('hide');"); + RegistraScript("$('#DivModal').modal('hide');"); CargaDatos(); } diff --git a/CRM/CatRechazoMotivo.aspx.cs b/CRM/CatRechazoMotivo.aspx.cs index 230664a97..dd2ccae6f 100644 --- a/CRM/CatRechazoMotivo.aspx.cs +++ b/CRM/CatRechazoMotivo.aspx.cs @@ -127,7 +127,7 @@ public partial class CRM_CatRechazoMotivo : ClsPaginas limpiarCamposModal(); UPModal.Update(); - this.RegistraScript("$('#DivModal').modal();"); + RegistraScript("$('#DivModal').modal();"); } protected void LnkEditar_Click(object sender, EventArgs e) { @@ -145,7 +145,7 @@ public partial class CRM_CatRechazoMotivo : ClsPaginas UPModal.Update(); - this.RegistraScript("$('#DivModal').modal();"); + RegistraScript("$('#DivModal').modal();"); } protected void BtnGuardar_Click(object sender, EventArgs e) @@ -176,7 +176,7 @@ public partial class CRM_CatRechazoMotivo : ClsPaginas ObjCRM.Dispose(); limpiarCamposModal(); - this.RegistraScript("$('#DivModal').modal('hide');"); + RegistraScript("$('#DivModal').modal('hide');"); CargaDatos(); } diff --git a/CRM/CatTipoProceso.aspx.cs b/CRM/CatTipoProceso.aspx.cs index 70f473b07..bc92beb33 100644 --- a/CRM/CatTipoProceso.aspx.cs +++ b/CRM/CatTipoProceso.aspx.cs @@ -206,7 +206,7 @@ public partial class CRM_CatTipoProceso : ClsPaginas limpiarCamposModal(); UPModalTipoProceso.Update(); - this.RegistraScript("$('#DivModalTipoProceso').modal();"); + RegistraScript("$('#DivModalTipoProceso').modal();"); } protected void LnkEditar_Click(object sender, EventArgs e) @@ -228,7 +228,7 @@ public partial class CRM_CatTipoProceso : ClsPaginas UPModalTipoProceso.Update(); - this.RegistraScript("$('#DivModalTipoProceso').modal();"); + RegistraScript("$('#DivModalTipoProceso').modal();"); } protected void BtnGuardar_Click(object sender, EventArgs e) @@ -260,7 +260,7 @@ public partial class CRM_CatTipoProceso : ClsPaginas ObjCRM.Dispose(); limpiarCamposModal(); - this.RegistraScript("$('#DivModalTipoProceso').modal('hide');"); + RegistraScript("$('#DivModalTipoProceso').modal('hide');"); CargaDatos(); } diff --git a/CRM/EmpresaCRM.aspx.cs b/CRM/EmpresaCRM.aspx.cs index 5b7fb8098..3b5dcd835 100644 --- a/CRM/EmpresaCRM.aspx.cs +++ b/CRM/EmpresaCRM.aspx.cs @@ -1082,7 +1082,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas CargaGridTipoContacto(); CargaContactoSuperior(-1); - this.RegistraScript("$('#DivModalContacto').modal();"); + RegistraScript("$('#DivModalContacto').modal();"); } protected void LnkEditarContacto_Click(object sender, EventArgs e) @@ -1111,7 +1111,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas UPModalContacto.Update(); - this.RegistraScript("$('#DivModalContacto').modal();"); + RegistraScript("$('#DivModalContacto').modal();"); } protected void BtnGuardarContacto_Click(object sender, EventArgs e) @@ -1235,7 +1235,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas } limpiarCamposModalContato(); - this.RegistraScript("$('#DivModalContacto').modal('hide');"); + RegistraScript("$('#DivModalContacto').modal('hide');"); UpContactos.Update(); } @@ -1465,7 +1465,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas //protected void LnkAgregarEvento_Click(object sender, EventArgs e) //{ - // this.RegistraScript(String.Format("AbrirVentana('/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveEmpresaCRM={0}&TB_iframe=true&height=370&width=600');", CveEmpresaCRM)); + // RegistraScript(String.Format("AbrirVentana('/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveEmpresaCRM={0}&TB_iframe=true&height=370&width=600');", CveEmpresaCRM)); //} #endregion @@ -1740,7 +1740,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas CargaMetodosCaptacion(); InicializaAcercamientos(); limpiarCamposModalAcercamiento(); - this.RegistraScript("$('#DivModalAltaAcercamiento').modal();"); + RegistraScript("$('#DivModalAltaAcercamiento').modal();"); UpAltaAcercamiento.Update(); //Confirmacion("Se le redireccionara para realizar el Registro del Acercamiento, ¿Desea continuar?", "", "document.location.href=\"/CRM/Acercamiento.aspx\"", ""); } @@ -1844,7 +1844,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas ObjCRM.Dispose(); ObjBitacora.Dispose(); - this.RegistraScript("$('#DivModalAltaAcercamiento').modal('hide');"); + RegistraScript("$('#DivModalAltaAcercamiento').modal('hide');"); UPAcercamientos.Update(); diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index 55f0f7705..02a43469a 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -2394,7 +2394,7 @@ Partial Class Compras_Proveedores End If UPPSucursales.Update() - Me.RegistraScript("$('#divAgregarSucursal').modal('hide');") + RegistraScript("$('#divAgregarSucursal').modal('hide');") LimpiaModalAgregarSucursal() End Sub Private Sub OcultaDiv() @@ -2528,7 +2528,7 @@ Partial Class Compras_Proveedores DivPContactosSucursal.Visible = True UpAgregarSucursal.Update() - Me.RegistraScript("$('#divAgregarSucursal').modal('show');") + RegistraScript("$('#divAgregarSucursal').modal('show');") End Sub Protected Sub LnkAgregarSucursal_Click(sender As Object, e As EventArgs) @@ -2540,7 +2540,7 @@ Partial Class Compras_Proveedores End If DivPContactosSucursal.Visible = False LimpiaModalAgregarSucursal() - Me.RegistraScript("$('#divAgregarSucursal').modal('show');") + RegistraScript("$('#divAgregarSucursal').modal('show');") End Sub Protected Sub LimpiaModalAgregarSucursal() @@ -3876,7 +3876,7 @@ Partial Class Compras_Proveedores lista.Add(New CrystalParametro("SaldoDisponible", (TxtLimiteCredito.Text.ToDouble - dr("Saldo").ToString.ToDouble).ToString.FormatoNumero)) lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre)) lista.Add(New CrystalParametro("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - + 'Dim params As New List(Of ReportParameter) Dim dtnc As New DataTable Dim ObjCompra As New ClsCompras() @@ -4908,7 +4908,7 @@ Partial Class Compras_Proveedores EsEditar = 0 limpiarCamposModalAgregarContacto() - Me.RegistraScript("$('#DivAgregarContactoProveedor').modal();") + RegistraScript("$('#DivAgregarContactoProveedor').modal();") End Sub Protected Sub imgEditarContactoProv_Click(sender As Object, e As EventArgs) @@ -4931,7 +4931,7 @@ Partial Class Compras_Proveedores UpAgregarContatoProveedor.Update() - Me.RegistraScript("$('#DivAgregarContactoProveedor').modal('show');") + RegistraScript("$('#DivAgregarContactoProveedor').modal('show');") End Sub @@ -4977,7 +4977,7 @@ Partial Class Compras_Proveedores EsContactoSucursal = 1 EsEditar = 0 limpiarCamposModalAgregarContacto() - Me.RegistraScript("$('#DivAgregarContactoProveedor').modal('show');") + RegistraScript("$('#DivAgregarContactoProveedor').modal('show');") End Sub Protected Sub imgEditarContactoProvSuc_Click(sender As Object, e As EventArgs) @@ -5001,7 +5001,7 @@ Partial Class Compras_Proveedores UpAgregarContatoProveedor.Update() - Me.RegistraScript("$('#DivAgregarContactoProveedor').modal('show');") + RegistraScript("$('#DivAgregarContactoProveedor').modal('show');") End Sub Protected Sub GVContactosProveedorSucursal_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) @@ -5130,7 +5130,7 @@ Partial Class Compras_Proveedores End If - Me.RegistraScript("$('#DivAgregarContactoProveedor').modal('hide');") + RegistraScript("$('#DivAgregarContactoProveedor').modal('hide');") limpiarCamposModalAgregarContacto() End Sub diff --git a/Compras/RepGastosFijos.aspx.cs b/Compras/RepGastosFijos.aspx.cs index 0a9bc0d1a..d9d6c30bc 100644 --- a/Compras/RepGastosFijos.aspx.cs +++ b/Compras/RepGastosFijos.aspx.cs @@ -145,7 +145,7 @@ public partial class Compras_RepGastosFijos : ClsPaginas RecurrenciaTipo: RecurrenciaTipo, Frecuencia: Frecuencia, Mes: Mes, RecurrenciaFin: RecurrenciaFin.ToString(), CveTipoEvento: CveTipoEvento, Importe: Importe)) { LimpiaModal(); - this.RegistraScript("$('#DvModalGasto').modal('hide');"); + RegistraScript("$('#DvModalGasto').modal('hide');"); Alert("El Evento Gasto Mensual se guardó correctamente", ModExtensiones.TipoMensaje.MsgInformacion); } } @@ -155,7 +155,7 @@ public partial class Compras_RepGastosFijos : ClsPaginas RecurrenciaTipo: RecurrenciaTipo, Frecuencia: Frecuencia, Mes: Mes, RecurrenciaFin: RecurrenciaFin.ToString(), Importe: Importe)) { LimpiaModal(); - this.RegistraScript("$('#DvModalGasto').modal('hide');"); + RegistraScript("$('#DvModalGasto').modal('hide');"); Alert("El Evento Gasto Mensual se ha Actualizado correctamente", ModExtensiones.TipoMensaje.MsgInformacion); } } @@ -179,7 +179,7 @@ public partial class Compras_RepGastosFijos : ClsPaginas { LimpiaModal(); UPModalGasto.Update(); - this.RegistraScript("$('#DvModalGasto').modal();"); + RegistraScript("$('#DvModalGasto').modal();"); } protected void LnkEditar_Click(object sender, EventArgs e) @@ -201,7 +201,7 @@ public partial class Compras_RepGastosFijos : ClsPaginas UPModalGasto.Update(); - this.RegistraScript("$('#DvModalGasto').modal();"); + RegistraScript("$('#DvModalGasto').modal();"); } #endregion diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 07fcbdc6d..081c0f2c6 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -2528,7 +2528,7 @@ Partial Class Compras_eFacturas TabPanel.ActiveTabIndex = 0 cargasolicitudes() - Me.RegistraScript("$('#ModalViewSolicitudes').modal();") + RegistraScript("$('#ModalViewSolicitudes').modal();") End Sub @@ -2553,9 +2553,9 @@ Partial Class Compras_eFacturas ' 'If Continuar Then ' ' txtFechaIAdd.Text = "" ' ' txtFechaFAdd.Text = "" - ' ' Me.RegistraScript("$('#DModalSolicitudesNominas').modal('hide');") + ' ' RegistraScript("$('#DModalSolicitudesNominas').modal('hide');") ' ' cargasolicitudes() - ' ' Me.Alert("se a envia la solicitud al sat, le enviaremos un correo en cuanto tengamos una respuesta", ModExtensiones.TipoMensaje.ToastInformacion) + ' ' Alert("se a envia la solicitud al sat, le enviaremos un correo en cuanto tengamos una respuesta", ModExtensiones.TipoMensaje.ToastInformacion) ' 'End If ' Dim idSolicitudCFDI As Integer = 0 @@ -2640,7 +2640,7 @@ Partial Class Compras_eFacturas ' If Continuar Then ' txtFechaIAdd.Text = "" ' txtFechaFAdd.Text = "" - ' Me.RegistraScript("$('#ModalViewSolicitudes').modal('hide');") + ' RegistraScript("$('#ModalViewSolicitudes').modal('hide');") ' cargasolicitudes() ' End If @@ -2705,7 +2705,7 @@ Partial Class Compras_eFacturas txtFechaIAdd.Text = "" txtFechaFAdd.Text = "" ChkMetaDatos.Checked = False - Me.RegistraScript("$('#ModalAgregarSolicitud').modal('hide');") + RegistraScript("$('#ModalAgregarSolicitud').modal('hide');") cargasolicitudes() End If End Sub @@ -2869,7 +2869,7 @@ Partial Class Compras_eFacturas txtFechaFAdd.Text = "" ChkMetaDatos.Checked = False UPModalViewSolicitudesAgregar.Update() - Me.RegistraScript("$('#ModalAgregarSolicitud').modal('show');") + RegistraScript("$('#ModalAgregarSolicitud').modal('show');") End Sub Protected Sub GVSolicitudesNominas_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) diff --git a/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb b/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb index 1cdf2c6dc..84f411697 100644 --- a/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb +++ b/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb @@ -339,7 +339,7 @@ Partial Class AC_RepAnexoCatalogoSegmento Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click 'GvDatos.ExportToExcelG("RepAnexoCatalogoSegmento", "RepAnexoCatalogoSegmento", UsuarioActual) - GvDatos.ExportToExcelx("RepAnexoCatalogoSegmento") + GvDatos.ExportToExcelX("RepAnexoCatalogoSegmento") End Sub 'Private Sub ImprimirReporte(Optional Formato As String = "PDF") ' Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") diff --git a/Contratos/CatRefrendos.aspx.cs b/Contratos/CatRefrendos.aspx.cs index 802ec036c..f649ef7dc 100644 --- a/Contratos/CatRefrendos.aspx.cs +++ b/Contratos/CatRefrendos.aspx.cs @@ -321,7 +321,7 @@ public partial class Contratos_CatRefrendos : ClsPaginas UPModalRefrendo.Update(); - this.RegistraScript("$('#DvModalRefrendo').modal();"); + RegistraScript("$('#DvModalRefrendo').modal();"); } protected void imgE_Click(object sender, EventArgs e) @@ -382,7 +382,7 @@ public partial class Contratos_CatRefrendos : ClsPaginas UPModalRefrendo.Update(); - this.RegistraScript("$('#DvModalRefrendo').modal();"); + RegistraScript("$('#DvModalRefrendo').modal();"); } protected void BtnGuardarRefrendo_Click(object sender, EventArgs e) @@ -445,7 +445,7 @@ public partial class Contratos_CatRefrendos : ClsPaginas ObjContrato.Dispose(); limpiarCamposModal(); - this.RegistraScript("$('#DvModalRefrendo').modal('hide');"); + RegistraScript("$('#DvModalRefrendo').modal('hide');"); CargaDatos(); } diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb index fe12f6fef..2c8433ca6 100644 --- a/Contratos/Contrato.aspx.vb +++ b/Contratos/Contrato.aspx.vb @@ -4212,7 +4212,7 @@ Partial Class Contratos_Default LnkDescargar.Visible = False BtnGuardarFianza.Text = "Guardar" UPModalFianza.Update() - Me.RegistraScript("$('#DvModalFianza').modal();") + RegistraScript("$('#DvModalFianza').modal();") GvFianzas.DataSource = DtTmpFianzas GvFianzas.DataBind() UpGvFianzas.Update() @@ -4259,7 +4259,7 @@ Partial Class Contratos_Default UpGvFianzas.Update() LimpiarCamposModalFianzas() - Me.RegistraScript("$('#DvModalFianza').modal('hide');") + RegistraScript("$('#DvModalFianza').modal('hide');") End Sub @@ -4335,7 +4335,7 @@ Partial Class Contratos_Default txth4Fianza.InnerText = "Editar Fianza" BtnGuardarFianza.Text = "Actualizar" UPModalFianza.Update() - Me.RegistraScript("$('#DvModalFianza').modal();") + RegistraScript("$('#DvModalFianza').modal();") GvFianzas.DataSource = DtTmpFianzas GvFianzas.DataBind() UpGvFianzas.Update() diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb index 24f5cf339..69ebddbdd 100644 --- a/Contratos/ContratoObra.aspx.vb +++ b/Contratos/ContratoObra.aspx.vb @@ -3945,7 +3945,7 @@ Partial Class Contratos_ContratoObra LnkDescargar.Visible = False 'BtnGuardarFianza.Text = "Guardar" UPModalFianza.Update() - Me.RegistraScript("$('#DvModalFianza').modal();") + RegistraScript("$('#DvModalFianza').modal();") End Sub @@ -3995,7 +3995,7 @@ Partial Class Contratos_ContratoObra txth4Fianza.InnerText = "Editar Fianza" UPModalFianza.Update() - Me.RegistraScript("$('#DvModalFianza').modal();") + RegistraScript("$('#DvModalFianza').modal();") End Sub Protected Sub CreaDtTmpFianzas() diff --git a/GPS/CatEstatusTrayectos.aspx.cs b/GPS/CatEstatusTrayectos.aspx.cs index 6778292de..009df5448 100644 --- a/GPS/CatEstatusTrayectos.aspx.cs +++ b/GPS/CatEstatusTrayectos.aspx.cs @@ -81,7 +81,7 @@ public partial class GPS_CatEstatusTrayectos : ClsPaginas int NoEstatusInicio = DtEstatus.COUNT("CveEstatusTrayecto", "EsInicio = True"); if (NoEstatusInicio > 0) { - this.Alert("Ya existe un estatus de inicio.", TipoMensaje.MsgAdvertencia); + Alert("Ya existe un estatus de inicio.", TipoMensaje.MsgAdvertencia); ObjGPS.Dispose(); return; } @@ -97,7 +97,7 @@ public partial class GPS_CatEstatusTrayectos : ClsPaginas int NoEstatusFin = DtEstatus.COUNT("CveEstatusTrayecto", "EsFin = True"); if (NoEstatusFin > 0) { - this.Alert("Ya existe un estatus de final.", TipoMensaje.MsgAdvertencia); + Alert("Ya existe un estatus de final.", TipoMensaje.MsgAdvertencia); ObjGPS.Dispose(); return; } @@ -108,7 +108,7 @@ public partial class GPS_CatEstatusTrayectos : ClsPaginas if (RblInicioFin.SelectedValue == "2" && CveEstatusAnterior <= 0) { - this.Alert("No se puede agregar el estatus. Debe seleccionar un estatus anterior.", ModExtensiones.TipoMensaje.MsgAdvertencia); + Alert("No se puede agregar el estatus. Debe seleccionar un estatus anterior.", ModExtensiones.TipoMensaje.MsgAdvertencia); ObjGPS.Dispose(); return; } @@ -122,18 +122,18 @@ public partial class GPS_CatEstatusTrayectos : ClsPaginas { if (ObjGPS.UpdateEstatusTrayectos(CveEstatusSiguiente,"",false,false, CveEstatusNuevo, UsuarioActual.CveCliente)) { - this.Alert("El estatus se actualizo correctamente.", ModExtensiones.TipoMensaje.MsgInformacion); + Alert("El estatus se actualizo correctamente.", ModExtensiones.TipoMensaje.MsgInformacion); } else { - this.Alert("Ocurrió un error al actualizar el estatus.", ModExtensiones.TipoMensaje.MsgError); + Alert("Ocurrió un error al actualizar el estatus.", ModExtensiones.TipoMensaje.MsgError); } } - this.Alert("El estatus se agrego correctamente.", ModExtensiones.TipoMensaje.MsgInformacion); + Alert("El estatus se agrego correctamente.", ModExtensiones.TipoMensaje.MsgInformacion); } else { - this.Alert("Ocurrió un error al agregar el estatus.", ModExtensiones.TipoMensaje.MsgError); + Alert("Ocurrió un error al agregar el estatus.", ModExtensiones.TipoMensaje.MsgError); } @@ -221,7 +221,7 @@ public partial class GPS_CatEstatusTrayectos : ClsPaginas { if (ObjGPS.UpdateEstatusTrayectos(CveEstatusSiguiente,"",false,false, CveEstatusAnterior, UsuarioActual.CveCliente)) { - this.Alert("El estatus se eliminó correctamente.", ModExtensiones.TipoMensaje.MsgInformacion); + Alert("El estatus se eliminó correctamente.", ModExtensiones.TipoMensaje.MsgInformacion); } } } diff --git a/GPS/CatGrupos.aspx.cs b/GPS/CatGrupos.aspx.cs index ac45ebf8a..52cd012fb 100644 --- a/GPS/CatGrupos.aspx.cs +++ b/GPS/CatGrupos.aspx.cs @@ -136,7 +136,7 @@ public partial class GPS_CatGrupos : ClsPaginas BtnGuardar.Text = "Guardar"; UPConsulta.Update(); - this.RegistraScript("$('#DvModalGrupo').modal();"); + RegistraScript("$('#DvModalGrupo').modal();"); } @@ -269,7 +269,7 @@ public partial class GPS_CatGrupos : ClsPaginas ObjGPS.Dispose(); limpiarCamposModal(); - this.RegistraScript("$('#DvModalGrupo').modal('hide');"); + RegistraScript("$('#DvModalGrupo').modal('hide');"); CargaDatos(); } @@ -363,7 +363,7 @@ public partial class GPS_CatGrupos : ClsPaginas BtnGuardar.Text = "Actualizar"; UPConsulta.Update(); - this.RegistraScript("$('#DvModalGrupo').modal('show');"); + RegistraScript("$('#DvModalGrupo').modal('show');"); } #endregion diff --git a/GPS/RepParadas.aspx.cs b/GPS/RepParadas.aspx.cs index c378183ef..2b342a943 100644 --- a/GPS/RepParadas.aspx.cs +++ b/GPS/RepParadas.aspx.cs @@ -197,6 +197,6 @@ public partial class GPS_RepParardas : ClsPaginas { //var table = new System.Web.UI.HtmlControls.HtmlTable(); // table.InnerHtml = DivIndicadores.InnerHtml; - GvDatos.ExportToExcel("ReporteRutas"); + GvDatos.ExportToExcelX("ReporteRutas"); } } \ No newline at end of file diff --git a/GPS/Shipments.aspx.cs b/GPS/Shipments.aspx.cs index dc27aa9ba..510c38e98 100644 --- a/GPS/Shipments.aspx.cs +++ b/GPS/Shipments.aspx.cs @@ -145,12 +145,12 @@ public partial class GPS_Shipments : ClsPaginas { IniciaDTStops(); LimpiarModal(); - this.RegistraScript("$('#DivShipment').modal({backdrop: 'static', keyboard: false});"); + RegistraScript("$('#DivShipment').modal({backdrop: 'static', keyboard: false});"); } protected void LnkAddNewStop_Click(object sender, EventArgs e) { LimpiarModalStop(); - this.RegistraScript("$('#DivStop').modal({backdrop: 'static', keyboard: false});"); + RegistraScript("$('#DivStop').modal({backdrop: 'static', keyboard: false});"); } protected void LnkAddStop_Click(object sender, EventArgs e) { @@ -190,7 +190,7 @@ public partial class GPS_Shipments : ClsPaginas this.OnError("Ocurrió un error al registrar la parada (stop)", ex); } - this.RegistraScript("$('#DivStop').modal('hide');"); + RegistraScript("$('#DivStop').modal('hide');"); } protected void LimpiarModal() { @@ -623,13 +623,13 @@ public partial class GPS_Shipments : ClsPaginas if (TieneError) { ObjGPS.RollBack(); - this.Alert("No se pudo guardar el shipment.", TipoMensaje.MsgError); + Alert("No se pudo guardar el shipment.", TipoMensaje.MsgError); } else { ObjGPS.Commit(); - this.Alert("El shipment se envió correctamente a FreightVerify.", TipoMensaje.MsgInformacion); - this.RegistraScript("$('#DivShipment').modal('hide');"); + Alert("El shipment se envió correctamente a FreightVerify.", TipoMensaje.MsgInformacion); + RegistraScript("$('#DivShipment').modal('hide');"); } ObjGPS.Dispose(); @@ -639,7 +639,7 @@ public partial class GPS_Shipments : ClsPaginas } else { - this.Alert("No se pudo enviar el shipment a FreightVerify.", TipoMensaje.MsgError); + Alert("No se pudo enviar el shipment a FreightVerify.", TipoMensaje.MsgError); } } @@ -650,7 +650,7 @@ public partial class GPS_Shipments : ClsPaginas CargaStops(CveShipment); - this.RegistraScript("$('#DivEvent').modal({backdrop: 'static', keyboard: false});", "1"); + RegistraScript("$('#DivEvent').modal({backdrop: 'static', keyboard: false});", "1"); CargaPosicionStop(DdlStops.SelectedValue.ToEntero()); UpEvent.Update(); } @@ -662,7 +662,7 @@ public partial class GPS_Shipments : ClsPaginas TxtLatLongEvent.Text = string.Format("{0},{1}", row["Lat"].ToString(), row["Lon"].ToString()); TxtLatLongEvent.Text = string.Format("{0},{1}", row["Lat"].ToString(), row["Lon"].ToString()); - this.RegistraScript($"cargapin('{row["Lat"].ToString()}','{row["Lon"].ToString()}');", "2"); ; + RegistraScript($"cargapin('{row["Lat"].ToString()}','{row["Lon"].ToString()}');", "2"); ; } private void CargaStops(int CveShipment) { @@ -693,7 +693,7 @@ public partial class GPS_Shipments : ClsPaginas } else { - this.Alert("No se pudo eliminar el shipment.", TipoMensaje.MsgError); + Alert("No se pudo eliminar el shipment.", TipoMensaje.MsgError); } CargaDatos(); UpDatos.Update(); @@ -727,16 +727,16 @@ public partial class GPS_Shipments : ClsPaginas if (envio) { Alert("Se envio el evento correctamente."); - this.RegistraScript("$('#DivEvent').modal('hide');"); + RegistraScript("$('#DivEvent').modal('hide');"); } else { - this.Alert("No se pudo eliminar el shipment.", TipoMensaje.MsgError); + Alert("No se pudo eliminar el shipment.", TipoMensaje.MsgError); } } else { - this.Alert("No se pudo eliminar el shipment.", TipoMensaje.MsgError); + Alert("No se pudo eliminar el shipment.", TipoMensaje.MsgError); } } diff --git a/General/CatTipoCambio.aspx.cs b/General/CatTipoCambio.aspx.cs index d282b5482..44667d571 100644 --- a/General/CatTipoCambio.aspx.cs +++ b/General/CatTipoCambio.aspx.cs @@ -107,7 +107,7 @@ public partial class General_CatTipoCambio : ClsPaginas BtnGuardarTC.Text = "Guardar"; UPModalTipoCambio.Update(); - this.RegistraScript("$('#DvModalTipoCambio').modal('show');"); + RegistraScript("$('#DvModalTipoCambio').modal('show');"); } protected void limpiarCamposModal() @@ -136,7 +136,7 @@ public partial class General_CatTipoCambio : ClsPaginas UPModalTipoCambio.Update(); - this.RegistraScript("$('#DvModalTipoCambio').modal('show');"); + RegistraScript("$('#DvModalTipoCambio').modal('show');"); } @@ -200,7 +200,7 @@ public partial class General_CatTipoCambio : ClsPaginas ObjGeneral.Dispose(); limpiarCamposModal(); - this.RegistraScript("$('#DvModalTipoCambio').modal('hide');"); + RegistraScript("$('#DvModalTipoCambio').modal('hide');"); CargaDatos(); } diff --git a/General/ExcelToBD.aspx.cs b/General/ExcelToBD.aspx.cs index 1c3d4a6d7..363c8a8c1 100644 --- a/General/ExcelToBD.aspx.cs +++ b/General/ExcelToBD.aspx.cs @@ -146,13 +146,13 @@ public partial class General_ExcelToBD : System.Web.UI.Page { if (objbase.ExcelToBD(xml)) { - this.Alert("Información capturada", ModExtensiones.TipoMensaje.MsgInformacion); + Alert("Información capturada", ModExtensiones.TipoMensaje.MsgInformacion); } } GVDatos.DataSource = dt; GVDatos.DataBind(); - //this.Alert(string.Format("
    {0}\n

    ", xml), ModExtensiones.TipoMensaje.MsgInformacion); + //Alert(string.Format("
    {0}\n

    ", xml), ModExtensiones.TipoMensaje.MsgInformacion); } public string validtitle(string Valor) diff --git a/General/RepPaqueteriasGuias.aspx.cs b/General/RepPaqueteriasGuias.aspx.cs index 00b9403d9..ce34f7795 100644 --- a/General/RepPaqueteriasGuias.aspx.cs +++ b/General/RepPaqueteriasGuias.aspx.cs @@ -408,7 +408,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas } } - this.RegistraScript("$('#DivEditarGuia').modal('hide');"); + RegistraScript("$('#DivEditarGuia').modal('hide');"); ObjGeneral.Dispose(); } @@ -542,7 +542,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas UPEditarGuia.Update(); - this.RegistraScript("$('#DivEditarGuia').modal('show');"); + RegistraScript("$('#DivEditarGuia').modal('show');"); } protected void BtGuardarGuia_Click(object sender, EventArgs e) @@ -554,7 +554,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas protected void BtnEliminarGuia_Click(object sender, EventArgs e) { EliminaGuia(); - this.RegistraScript("$('#DivEditarGuia').modal('hide');"); + RegistraScript("$('#DivEditarGuia').modal('hide');"); CargaDatos(); } @@ -638,7 +638,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas protected void LnkAgregarGuia_Click(object sender, EventArgs e) { //Agregamos guia sin vincular - this.RegistraScript(String.Format("AbrirVentana('/General/PopUpPaqueteriasGuias.aspx',800,480);")); + RegistraScript(String.Format("AbrirVentana('/General/PopUpPaqueteriasGuias.aspx',800,480);")); } protected void LnkImprimirPDF_Click(object sender, EventArgs e) @@ -686,7 +686,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas UpModalUploadGuiaDocumento.Update(); - this.RegistraScript("$('#ModalUploadGuiaDocumento').modal({ backdrop: 'static', keyboard: false});"); + RegistraScript("$('#ModalUploadGuiaDocumento').modal({ backdrop: 'static', keyboard: false});"); } protected void BtnModalGuiaDocumentoUpload_Click(object sender, EventArgs e) @@ -769,7 +769,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas } } - this.RegistraScript("$('#ModalUploadGuiaDocumento').modal('hide')", "hidemodal3"); + RegistraScript("$('#ModalUploadGuiaDocumento').modal('hide')", "hidemodal3"); } @@ -1064,7 +1064,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas protected void Reasignar_Click(object sender, EventArgs e) { - this.RegistraScript("$('#ModalMotivoReasignacion').modal('show')", "hidemodal3"); + RegistraScript("$('#ModalMotivoReasignacion').modal('show')", "hidemodal3"); GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); CvePaqueteriaGuiaReasignar = GvRow.DataKey("CvePaqueteriaGuia").ToEntero(); CveVenta = GvRow.DataKey("CveAgrupador").ToString().ToEntero(); @@ -1083,7 +1083,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas UPDatos.Update(); CvePaqueteriaGuiaReasignar = -1; EnviarCorreoNotificacionEntrega(3, Folio, "", "", "", "", "", -1, null); - this.RegistraScript("$('#ModalMotivoReasignacion').modal('hide')", "hidemodal3"); + RegistraScript("$('#ModalMotivoReasignacion').modal('hide')", "hidemodal3"); } private string DocumentoEntregaInterna(int CveVenta) diff --git a/Global.asax b/Global.asax index 4590b7858..983d800cc 100644 --- a/Global.asax +++ b/Global.asax @@ -405,18 +405,18 @@ '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'S U B P R O Y E C T O S - Using ObjSubProyectos As New ClsSubProyectos - 'If ObjSubProyectos.GetSubProyectos Then Application("GlobalDTSubProyectos") = ObjSubProyectos.DtResultados Else Application("GlobalDTSubProyectos") = Nothing - If ObjSubProyectos.GetSubProyectosUsuarios Then - Application("GlobalDTProyectosUsuarios") = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"}) - Application("GlobalDTSubProyectosUsuarios") = ObjSubProyectos.DtResultados - Else - Application("GlobalDTProyectosUsuarios") = Nothing - Application("GlobalDTSubProyectosUsuarios") = Nothing - End If - 'Else Application("GlobalDTProyectosUsuarios") = Nothing - End Using - GuardaLogAsax(String.Format("Globalasax 26:{0}", DateTime.Now)) + 'Using ObjSubProyectos As New ClsSubProyectos + ' 'If ObjSubProyectos.GetSubProyectos Then Application("GlobalDTSubProyectos") = ObjSubProyectos.DtResultados Else Application("GlobalDTSubProyectos") = Nothing + ' If ObjSubProyectos.GetSubProyectosUsuarios Then + ' Application("GlobalDTProyectosUsuarios") = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"}) + ' Application("GlobalDTSubProyectosUsuarios") = ObjSubProyectos.DtResultados + ' Else + ' Application("GlobalDTProyectosUsuarios") = Nothing + ' Application("GlobalDTSubProyectosUsuarios") = Nothing + ' End If + ' 'Else Application("GlobalDTProyectosUsuarios") = Nothing + 'End Using + 'GuardaLogAsax(String.Format("Globalasax 26:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'T I P O S - D E - E V E N T O S diff --git a/Inicio.aspx.vb b/Inicio.aspx.vb index 835bd7d29..952ef0ac1 100644 --- a/Inicio.aspx.vb +++ b/Inicio.aspx.vb @@ -1074,7 +1074,7 @@ Partial Class Inicio Private Sub CargaDirectorioTelefonico() Dim ObjPersonal As New ClsRH - Me.RegistraScript("$get('DivActualizarEvento').style.display = 'true';") + RegistraScript("$get('DivActualizarEvento').style.display = 'true';") '$get('DivActualizarEvento').style.display = 'none'; If ObjPersonal.DirectorioTelefonicoGet(UsuarioActual.CveEmpresa) Then diff --git a/Inventarios/CatGrupoPS.aspx.cs b/Inventarios/CatGrupoPS.aspx.cs index 1813e85e6..7cbf00bbd 100644 --- a/Inventarios/CatGrupoPS.aspx.cs +++ b/Inventarios/CatGrupoPS.aspx.cs @@ -92,7 +92,7 @@ public partial class Inventarios_CatGrupoPSaspx : ClsPaginas protected void LnkAddGrupoPS_Click(object sender, EventArgs e) { - this.RegistraScript("$('#DModalGrupoPS').modal();"); + RegistraScript("$('#DModalGrupoPS').modal();"); Modalidad = "A"; LimpiaModal(); BtnGrupoPSAdd.Text = "Guardar"; DivEstatus.Visible = false; UpModal.Update(); } @@ -129,7 +129,7 @@ public partial class Inventarios_CatGrupoPSaspx : ClsPaginas ChkEstatus.Checked = Convert.ToBoolean((gvRow.DataKey("Estatus"))); CargaGrupoPSDetalle(); BtnGrupoPSAdd.Text = "Actualizar"; - this.RegistraScript("$('#DModalGrupoPS').modal();"); + RegistraScript("$('#DModalGrupoPS').modal();"); UpModal.Update(); } @@ -211,7 +211,7 @@ public partial class Inventarios_CatGrupoPSaspx : ClsPaginas { Alert("El grupo de productos se actualizo correctamente."); } - this.RegistraScript("$('#DModalGrupoPS').modal('hide');"); + RegistraScript("$('#DModalGrupoPS').modal('hide');"); } else { diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 852d7dd7d..6564616f1 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -4115,7 +4115,7 @@ Partial Class Inventarios_EntregaAlmacen ' CargaModalCombosDirecciones(CveCliente, CveDireccion); ' UpModalEditarentrega.Update(); - ' this.RegistraScript("$('#DivEditarEntrega').modal('show');"); + ' RegistraScript("$('#DivEditarEntrega').modal('show');"); '} diff --git a/Inventarios/EntregaAlmacenRuta.aspx.cs b/Inventarios/EntregaAlmacenRuta.aspx.cs index 1b367e86d..5fd88950a 100644 --- a/Inventarios/EntregaAlmacenRuta.aspx.cs +++ b/Inventarios/EntregaAlmacenRuta.aspx.cs @@ -1000,7 +1000,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas CargaModalCombosDirecciones(CveCliente, CveDireccion); UpModalEditarentrega.Update(); - this.RegistraScript("$('#DivEditarEntrega').modal('show');"); + RegistraScript("$('#DivEditarEntrega').modal('show');"); } protected void BtnModalEditarentrega_Click(object sender, EventArgs e) @@ -1017,7 +1017,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas if (ProcesoOK) { - this.RegistraScript("$('#DivEditarEntrega').modal('hide');"); + RegistraScript("$('#DivEditarEntrega').modal('hide');"); Alert("Dirección Actualizada correctamente.", ModExtensiones.TipoMensaje.ToastInformacion); CargaDatos(); } diff --git a/Inventarios/RepEntregaAlmacenRuta.aspx.cs b/Inventarios/RepEntregaAlmacenRuta.aspx.cs index 502e39065..bb7aa24d7 100644 --- a/Inventarios/RepEntregaAlmacenRuta.aspx.cs +++ b/Inventarios/RepEntregaAlmacenRuta.aspx.cs @@ -401,7 +401,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas UpModalEditarentrega.Update(); - this.RegistraScript("$('#DivEditarEntrega').modal({ backdrop: 'static', keyboard: false });"); + RegistraScript("$('#DivEditarEntrega').modal({ backdrop: 'static', keyboard: false });"); } @@ -601,7 +601,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas if (ProcesoOK) { - this.RegistraScript("$('#DivEditarEntrega').modal('hide');"); + RegistraScript("$('#DivEditarEntrega').modal('hide');"); Alert("Entrega Actualizada correctamente."); CargaDatos(); } @@ -611,7 +611,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas protected void BtnEliminarGuia_Click(object sender, EventArgs e) { //EliminaGuia(); - //this.RegistraScript("$('#DivEditarGuia').modal('hide');"); + //RegistraScript("$('#DivEditarGuia').modal('hide');"); //CargaDatos(); } diff --git a/Nomina/Acumulados.aspx.cs b/Nomina/Acumulados.aspx.cs index 78a4b7d4f..7a2c500b5 100644 --- a/Nomina/Acumulados.aspx.cs +++ b/Nomina/Acumulados.aspx.cs @@ -64,14 +64,14 @@ public partial class Nomina_Acumulados : ClsPaginas DdlTipoAcumulado .SelectedValueExist(cveTipoAcumulado.ToString()); TxtAcumacumulado.Text = acumulado.ToString(); - this.RegistraScript("$('#DModalAcumulados').modal();"); + RegistraScript("$('#DModalAcumulados').modal();"); BtnAcumADD.Visible = false; BtnAcumEdit.Visible = true; UPModalAcum.Update(); } protected void LnkAgregarAcum_Click(object sender, EventArgs e) { - this.RegistraScript("$('#DModalAcumulados').modal();"); + RegistraScript("$('#DModalAcumulados').modal();"); LimpiaAcumulados(); BtnAcumADD.Visible = true; BtnAcumEdit.Visible = false; @@ -92,11 +92,11 @@ public partial class Nomina_Acumulados : ClsPaginas } if (Continuar) { - this.RegistraScript("$('#DModalAcumulados').modal('hide');"); + RegistraScript("$('#DModalAcumulados').modal('hide');"); LimpiaAcumulados(); CargaAcumulados(); UPModalAcum.Update(); - this.Alert("El Acumulados Se ha agregado"); + Alert("El Acumulados Se ha agregado"); } } protected void BtnAcumEdit_Click(object sender, EventArgs e) @@ -112,11 +112,11 @@ public partial class Nomina_Acumulados : ClsPaginas } if (Continuar) { - this.RegistraScript("$('#DModalAcumulados').modal('hide');"); + RegistraScript("$('#DModalAcumulados').modal('hide');"); LimpiaAcumulados(); UPModalAcum.Update(); CargaAcumulados(); - this.Alert("El Acumulados Se ha actualizado"); + Alert("El Acumulados Se ha actualizado"); } } protected void LnkEliminarAcum_Click(object sender, EventArgs e) @@ -132,7 +132,7 @@ public partial class Nomina_Acumulados : ClsPaginas if (Continuar) { CargaAcumulados(); - this.Alert("El Acumulados Se ha Eliminado"); + Alert("El Acumulados Se ha Eliminado"); } } } \ No newline at end of file diff --git a/Nomina/Aguinaldo.aspx.cs b/Nomina/Aguinaldo.aspx.cs index 28e4abe3e..bfca04cea 100644 --- a/Nomina/Aguinaldo.aspx.cs +++ b/Nomina/Aguinaldo.aspx.cs @@ -551,7 +551,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas protected void LnkDownExcel_Click(object sender, EventArgs e) { - // GVCalcularAguinaldo.ExportToExcelx(string.Format("Aguinaldo {0}", DdlEjercicios.SelectedItem.Text)); + // GVCalcularAguinaldo.ExportToExcelX(string.Format("Aguinaldo {0}", DdlEjercicios.SelectedItem.Text)); ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook(); diff --git a/Nomina/CargaArchivosNomina.aspx.cs b/Nomina/CargaArchivosNomina.aspx.cs index fb3cd7ec1..eb5c45c67 100644 --- a/Nomina/CargaArchivosNomina.aspx.cs +++ b/Nomina/CargaArchivosNomina.aspx.cs @@ -112,7 +112,7 @@ public partial class Nomina_CargaArchivosNomina : System.Web.UI.Page { if (objbase.ExcelToBD(xml)) { - this.Alert("Información capturada", ModExtensiones.TipoMensaje.MsgInformacion); + Alert("Información capturada", ModExtensiones.TipoMensaje.MsgInformacion); } } GVDatos.DataSource = dt; diff --git a/Nomina/Finiquito.aspx.cs b/Nomina/Finiquito.aspx.cs index be5af6a84..734f9571c 100644 --- a/Nomina/Finiquito.aspx.cs +++ b/Nomina/Finiquito.aspx.cs @@ -795,7 +795,7 @@ public partial class Nomina_Finiquito : ClsPaginas protected void LnkCambiarEmpleado_Click(object sender, EventArgs e) { CargaDdlPersonal(); - this.RegistraScript("$('#ModalEmpleados').modal();"); + RegistraScript("$('#ModalEmpleados').modal();"); UpModalEmpleados.Update(); } diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index e941f6065..119681518 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -1449,18 +1449,18 @@ public partial class Nomina_Nomina2 : ClsPaginas objrh.NomBitacoraCorreoAdd(CvePeriodoSeleccionado, CvePersonal, Correo.Trim(), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario); } - this.Alert(string.Format("se envio el correo a '{0}'.", Correo), TipoMensaje.MsgInformacion); + Alert(string.Format("se envio el correo a '{0}'.", Correo), TipoMensaje.MsgInformacion); } else { - this.Alert("No se pudo generar el PDF para enviar el correo.", TipoMensaje.MsgAdvertencia); + Alert("No se pudo generar el PDF para enviar el correo.", TipoMensaje.MsgAdvertencia); } } else { - this.Alert("No se tiene un correo registrado.", TipoMensaje.MsgAdvertencia); + Alert("No se tiene un correo registrado.", TipoMensaje.MsgAdvertencia); } } protected void LnkTimbrar_Click(object sender, EventArgs e) @@ -6309,10 +6309,10 @@ public partial class Nomina_Nomina2 : ClsPaginas } if (Continuar) { - this.RegistraScript("$('#DModalMovtoPermanente').modal('hide');"); + RegistraScript("$('#DModalMovtoPermanente').modal('hide');"); CargaMovtoPermanente(); UpMovtosPermanentes.Update(); - this.Alert("Se ha agregado el movimiento permanente"); + Alert("Se ha agregado el movimiento permanente"); } RegistraScript("$('#ModalMovtoPermanente').modal('hide')"); @@ -6337,10 +6337,10 @@ public partial class Nomina_Nomina2 : ClsPaginas } if (Continuar) { - this.RegistraScript("$('#ModalMovtoPermanente').modal('hide');"); + RegistraScript("$('#ModalMovtoPermanente').modal('hide');"); CargaMovtoPermanente(); UpMovtosPermanentes.Update(); - this.Alert("Se ha actualizado el movimiento permanente"); + Alert("Se ha actualizado el movimiento permanente"); } } @@ -6364,10 +6364,10 @@ public partial class Nomina_Nomina2 : ClsPaginas } if (Continuar) { - this.RegistraScript("$('#ModalMovtoPermanente').modal('hide');"); + RegistraScript("$('#ModalMovtoPermanente').modal('hide');"); CargaMovtoPermanente(); UpMovtosPermanentes.Update(); - this.Alert("Se ha eliminadó el movimiento permanente"); + Alert("Se ha eliminadó el movimiento permanente"); } } protected void LnkEditarMovtoPermanente_Click(object sender, EventArgs e) @@ -7734,7 +7734,7 @@ public partial class Nomina_Nomina2 : ClsPaginas { CargaPersonalIncapacidad(); UpsrIncapacidadpersonal.Update(); - this.Alert("La incapacidad se ha agregado.", TipoMensaje.ToastInformacion); + Alert("La incapacidad se ha agregado.", TipoMensaje.ToastInformacion); RegistraScript("$('#ModalSRIncapacidad').modal('hide')"); } } @@ -7762,7 +7762,7 @@ public partial class Nomina_Nomina2 : ClsPaginas { CargaPersonalIncapacidad(); UpsrIncapacidadpersonal.Update(); - this.Alert("La incapacidad se ha actualizado.", TipoMensaje.ToastInformacion); + Alert("La incapacidad se ha actualizado.", TipoMensaje.ToastInformacion); RegistraScript("$('#ModalSRIncapacidad').modal('hide')"); } } @@ -8968,10 +8968,10 @@ public partial class Nomina_Nomina2 : ClsPaginas } if (Continuar) { - this.RegistraScript("$('#DModalVacacionesEmpresas').modal('hide');"); + RegistraScript("$('#DModalVacacionesEmpresas').modal('hide');"); CargaVacacionesEmpresas(); upDatosVacaEmpre.Update(); - this.Alert("El Vacaciones_Empresas Se ha agregado"); + Alert("El Vacaciones_Empresas Se ha agregado"); } } @@ -8989,7 +8989,7 @@ public partial class Nomina_Nomina2 : ClsPaginas if (Continuar) { CargaVacacionesEmpresas(); - this.Alert("El Vacaciones_Empresas Se ha Eliminado"); + Alert("El Vacaciones_Empresas Se ha Eliminado"); } } @@ -9047,7 +9047,7 @@ public partial class Nomina_Nomina2 : ClsPaginas DivModalLayoutBancosFecha.Visible = false; TxtModalLayoutBancosFecha.Text = ""; - this.RegistraScript("$('#ModalLayoutBancos').modal('show');"); + RegistraScript("$('#ModalLayoutBancos').modal('show');"); UpModalBancosLayout.Update(); } @@ -9218,7 +9218,7 @@ public partial class Nomina_Nomina2 : ClsPaginas //Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{DateTime.Now.ToString("yyyyMMddhhmmss").ToString()}.txt\""); Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina {DdlPeriodo.SelectedItem.Text}.txt\""); Response.Write(sb.ToString()); - this.RegistraScript("$('#ModalLayoutBancos').modal('hide');"); + RegistraScript("$('#ModalLayoutBancos').modal('hide');"); Response.Flush(); Response.End(); } @@ -9347,13 +9347,13 @@ public partial class Nomina_Nomina2 : ClsPaginas Response.ContentType = "text/plain"; Response.AppendHeader("Content-Disposition", $"attachment;filename=\"NI{Emisora.PadLeft(5, Cero)}{Consecutivo.ToString("00")}.PAG\""); Response.Write(sb.ToString()); - this.RegistraScript("$('#ModalLayoutBancos').modal('hide');"); + RegistraScript("$('#ModalLayoutBancos').modal('hide');"); Response.Flush(); Response.End(); } else { - this.Alert($"Errores {SbErrores.ToString()}", TipoMensaje.ToastAdventencia); + Alert($"Errores {SbErrores.ToString()}", TipoMensaje.ToastAdventencia); } } diff --git a/OI/CircularDetalleB.aspx.cs b/OI/CircularDetalleB.aspx.cs index cb9eb243b..600a24197 100644 --- a/OI/CircularDetalleB.aspx.cs +++ b/OI/CircularDetalleB.aspx.cs @@ -266,7 +266,7 @@ public partial class OI_CircularDetalleB : ClsPaginas protected void LnkAgregar_Click(object sender, EventArgs e) { - this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarPara)); + RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarPara)); ResetCombos(); ConsultaCorreos(); UpModalSeleccionCorreos.Update(); diff --git a/OI/ConvocatoriaDetalle.aspx.cs b/OI/ConvocatoriaDetalle.aspx.cs index 534a86d1d..ad9daff9b 100644 --- a/OI/ConvocatoriaDetalle.aspx.cs +++ b/OI/ConvocatoriaDetalle.aspx.cs @@ -200,7 +200,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas protected void LnkUpUsuarios_Click(object sender, EventArgs e) { - this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarMiembros)); + RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarMiembros)); LtlTituloUsuarios.Text = "Actualizar miembros"; BtnUpMiembros.Visible = true; DdlModera.SelectedValueExist(CveUsuarioDe.ToString()); @@ -264,12 +264,12 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas //Setpermisos(); } UpContenido.Update(); - this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarMiembros)); + RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarMiembros)); } protected void LnkAddTtemaModal_Click(object sender, EventArgs e) { - this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarTema)); + RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarTema)); } @@ -401,7 +401,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas ruta = string.Format("{0}{1}", ruta, archivoname);//, ArchivoExtencion); System.IO.File.Move(rutaarchivoOri, ruta); } - this.Alert(string.Format("Se ha agregadó la nueva convocatoria.
    ⏰ Agendar", HttpUtility.UrlEncode(ICString)), ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/ConvocatoriaDetalle.aspx?CveEvento={0}\");", CveEvento)); + Alert(string.Format("Se ha agregadó la nueva convocatoria.
    ⏰ Agendar", HttpUtility.UrlEncode(ICString)), ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/ConvocatoriaDetalle.aspx?CveEvento={0}\");", CveEvento)); } } } @@ -434,7 +434,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas if (errorMessage.Length > 0) { - this.Alert(errorMessage, ModExtensiones.TipoMensaje.MsgAdvertencia); + Alert(errorMessage, ModExtensiones.TipoMensaje.MsgAdvertencia); } } @@ -446,7 +446,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas if (objoi.AddRevisionesEventos(TxtTema.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) { Alert(string.Format("El Tema \"{0}\" fue agregada con éxito.", TxtTema.Text.Trim()), ModExtensiones.TipoMensaje.MsgInformacion); - this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarTema)); + RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarTema)); TxtTema.Text = ""; set_GlobalDTOIRevision(-1, objoi.DtResultados); CargaTemas(); @@ -519,7 +519,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas CveEventoMinuta = CveEvento; LnkOpenModalAsistencia.Visible = true; UpAcciones.Update(); - this.Alert(string.Format("Se ha iniciado la minuta, si desea ir a la minuta Click Aquí.", CveEvento), ModExtensiones.TipoMensaje.ToastInformacion, "", 0); + Alert(string.Format("Se ha iniciado la minuta, si desea ir a la minuta Click Aquí.", CveEvento), ModExtensiones.TipoMensaje.ToastInformacion, "", 0); LnkOpenModalAsistencia_Click(null, null); } } diff --git a/OI/MinutaDetalle.aspx.cs b/OI/MinutaDetalle.aspx.cs index 8c129d4e0..331241f74 100644 --- a/OI/MinutaDetalle.aspx.cs +++ b/OI/MinutaDetalle.aspx.cs @@ -402,7 +402,7 @@ public partial class OI_MinutaDetalle : ClsPaginas ruta = string.Format("{0}{1}", ruta, archivoname);//, ArchivoExtencion); System.IO.File.Move(rutaarchivoOri, ruta); } - this.Alert("Se ha agregadó la nueva minuta", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/MinutaDetalle.aspx?CveEvento={0}\");", CveEvento)); + Alert("Se ha agregadó la nueva minuta", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/MinutaDetalle.aspx?CveEvento={0}\");", CveEvento)); } } @@ -562,12 +562,12 @@ public partial class OI_MinutaDetalle : ClsPaginas System.IO.File.Move(rutaarchivoOri, ruta); } cargarAgenda(); - this.Alert("Se ha agregadó la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion); + Alert("Se ha agregadó la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion); TxtTareaAsunto.Text = ""; TxtTareaDescripcion.Text = ""; txtTareaFechaI.Text = ""; txtTareaFechaF.Text = ""; - //this.Alert("Se ha agregadó la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("window.open(\"/OI/TareaDetalle.aspx?CveEvento={0}\", \"_blank\");", CveEvento)); + //Alert("Se ha agregadó la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("window.open(\"/OI/TareaDetalle.aspx?CveEvento={0}\", \"_blank\");", CveEvento)); } } } @@ -685,13 +685,13 @@ public partial class OI_MinutaDetalle : ClsPaginas ruta = string.Format("{0}{1}", ruta, archivoname);//, ArchivoExtencion); System.IO.File.Move(rutaarchivoOri, ruta); } - this.Alert("Se ha agregadó la nueva agenda"); + Alert("Se ha agregadó la nueva agenda"); TxtAgendaAsunto.Text = ""; TxtAgendaDescripcion.Text = ""; txtAgendaFechaI.Text = ""; txtAgendaFechaF.Text = ""; cargarAgenda(); - //this.Alert("Se ha agregadó la nueva agenda", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("window.open(\"/OI/TareaDetalle.aspx?CveEvento={0}\", \"_blank\");", CveEvento)); + //Alert("Se ha agregadó la nueva agenda", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("window.open(\"/OI/TareaDetalle.aspx?CveEvento={0}\", \"_blank\");", CveEvento)); } } } @@ -735,9 +735,9 @@ public partial class OI_MinutaDetalle : ClsPaginas ruta = string.Format("{0}{1}{2}", ruta, CveComentario, archivoname);//, ArchivoExtencion); System.IO.File.Move(rutaarchivoOri, ruta); } - //this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregar)); - this.Alert("Comentario agregadó", ModExtensiones.TipoMensaje.ToastInformacion); - //this.Alert("Se ha agregado la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/TareaDetalle.aspx?CveEvento={0}\");", CveEvento)); + //RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregar)); + Alert("Comentario agregadó", ModExtensiones.TipoMensaje.ToastInformacion); + //Alert("Se ha agregado la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/TareaDetalle.aspx?CveEvento={0}\");", CveEvento)); } TxtComentario.Text = ""; } diff --git a/OI/Proyecto.aspx.cs b/OI/Proyecto.aspx.cs index 24749ecf1..ae7236837 100644 --- a/OI/Proyecto.aspx.cs +++ b/OI/Proyecto.aspx.cs @@ -70,14 +70,14 @@ public partial class OI_Proyecto : ClsPaginas } } str.AppendLine("];loadGant();"); - this.RegistraScript(str.ToString()); + RegistraScript(str.ToString()); UpContenido.Update(); //{ id: 2, text: "Direccion: evaluación de mercado", start_date: "2020/04/29 00:00", end_date: "2020/05/02 00:00",/*duration: 3,*/ parent: 1, progress: 0.25 } } protected void LnkNewProyecto_Click(object sender, EventArgs e) { - this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarProyecto)); + RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarProyecto)); RCveEventoB = RCveEvento; } @@ -201,7 +201,7 @@ public partial class OI_Proyecto : ClsPaginas ruta = string.Format("{0}{1}", ruta, archivoname);//, ArchivoExtencion); System.IO.File.Move(rutaarchivoOri, ruta); } - //this.Alert("Se ha agregadó la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/Proyecto.aspx?CveEvento={0}\");", CveEvento)); + //Alert("Se ha agregadó la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/Proyecto.aspx?CveEvento={0}\");", CveEvento)); loadEvento(); TxtAsunto.Text = ""; TxtDescripcion.Text = ""; @@ -217,7 +217,7 @@ public partial class OI_Proyecto : ClsPaginas protected void BtnopenmodalClickGant_Click(object sender, EventArgs e) { - this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarProyecto)); + RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarProyecto)); RCveEventoB = txtCveEvento.Text.ToEntero(); } } \ No newline at end of file diff --git a/OI/RepProyectos.aspx.cs b/OI/RepProyectos.aspx.cs index 4e142a81e..eb39fbe13 100644 --- a/OI/RepProyectos.aspx.cs +++ b/OI/RepProyectos.aspx.cs @@ -44,7 +44,7 @@ public partial class OI_RepProyectos : ClsPaginas } protected void LnkNewProyecto_Click(object sender, EventArgs e) { - this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarProyecto)); + RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarProyecto)); } protected void btnguardarProyecto_Click(object sender, EventArgs e) @@ -167,8 +167,8 @@ public partial class OI_RepProyectos : ClsPaginas ruta = string.Format("{0}{1}", ruta, archivoname);//, ArchivoExtencion); System.IO.File.Move(rutaarchivoOri, ruta); } - //this.Alert("Se ha agregadó la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/Proyecto.aspx?CveEvento={0}\");", CveEvento)); - this.Alert("Se ha agregadó la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion); + //Alert("Se ha agregadó la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/Proyecto.aspx?CveEvento={0}\");", CveEvento)); + Alert("Se ha agregadó la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion); cargar(); TxtAsunto.Text = ""; diff --git a/OI/RepReuniones.aspx.cs b/OI/RepReuniones.aspx.cs index 4f2044d64..416170f12 100644 --- a/OI/RepReuniones.aspx.cs +++ b/OI/RepReuniones.aspx.cs @@ -196,7 +196,7 @@ public partial class OI_RepReuniones : ClsPaginas if (Continuar) { BtnCargarReunion_Click(null, null); - this.Alert(string.Format("Se ha iniciado la minuta
    para ir a la minuta click aquí", CveEvento), ModExtensiones.TipoMensaje.ToastInformacion, "", 0); + Alert(string.Format("Se ha iniciado la minuta
    para ir a la minuta click aquí", CveEvento), ModExtensiones.TipoMensaje.ToastInformacion, "", 0); } } diff --git a/OI/RepSoporteADS.aspx.vb b/OI/RepSoporteADS.aspx.vb index 1894a8fd9..5b2b738e3 100644 --- a/OI/RepSoporteADS.aspx.vb +++ b/OI/RepSoporteADS.aspx.vb @@ -200,7 +200,7 @@ Partial Class OI_RepSoporteADS CargaDatosOIEventosTareasAsignaron() UPDatosOIEventosTareasAsignaron.Update() - Me.RegistraScript("UpperBound = " & GvDatosOIEventosTareasAsignaron.Rows.Count - 1 & ";") + RegistraScript("UpperBound = " & GvDatosOIEventosTareasAsignaron.Rows.Count - 1 & ";") End Sub #End Region diff --git a/OI/RepTareas.aspx.vb b/OI/RepTareas.aspx.vb index bafe8cf97..407dc3c7c 100644 --- a/OI/RepTareas.aspx.vb +++ b/OI/RepTareas.aspx.vb @@ -325,7 +325,7 @@ Partial Class OI_RepTareas CargaDatosOIEventosTareasAsigne() CargaDatosOIEventosTareasCCP() UPDatosOIEventosTareasAsignaron.Update() - Me.RegistraScript("UpperBound = " & GvDatosOIEventosTareasAsignaron.Rows.Count - 1 & ";") + RegistraScript("UpperBound = " & GvDatosOIEventosTareasAsignaron.Rows.Count - 1 & ";") End Sub #End Region diff --git a/OI/RepTareas3.aspx.cs b/OI/RepTareas3.aspx.cs index 1ee47f680..bc044fee3 100644 --- a/OI/RepTareas3.aspx.cs +++ b/OI/RepTareas3.aspx.cs @@ -17,6 +17,6 @@ public partial class OI_RepTareas3 : System.Web.UI.Page protected void LnkAddEvento_Click(object sender, EventArgs e) { - this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregar)); + RegistraScript(string.Format("$('#{0}').modal()", iddivAgregar)); } } \ No newline at end of file diff --git a/OI/Tablero.aspx.cs b/OI/Tablero.aspx.cs index a3f522fb9..987befccf 100644 --- a/OI/Tablero.aspx.cs +++ b/OI/Tablero.aspx.cs @@ -70,7 +70,7 @@ public partial class OI_Tablero : ClsPaginas TxtTabltablero.Text = tablero.ToString(); DdlTablusuario.SelectedValueExist(cveUsuario.ToString()); - this.RegistraScript("$('#DModalTablero').modal();"); + RegistraScript("$('#DModalTablero').modal();"); BtnTablADD.Visible = false; BtnTablEdit.Visible = true; UPModalTabl.Update(); @@ -85,11 +85,11 @@ public partial class OI_Tablero : ClsPaginas ObjTabl.Dispose(); if (Continuar) { - this.RegistraScript("$('#DModalTablero').modal('hide');"); + RegistraScript("$('#DModalTablero').modal('hide');"); LimpiaTablero(); CargaTablero(); UPModalTabl.Update(); - this.Alert("El Tablero Se ha agregado"); + Alert("El Tablero Se ha agregado"); } } protected void BtnTablEdit_Click(object sender, EventArgs e) @@ -102,11 +102,11 @@ public partial class OI_Tablero : ClsPaginas ObjTabl.Dispose(); if (Continuar) { - this.RegistraScript("$('#DModalTablero').modal('hide');"); + RegistraScript("$('#DModalTablero').modal('hide');"); LimpiaTablero(); UPModalTabl.Update(); CargaTablero(); - this.Alert("El Tablero Se ha actualizado"); + Alert("El Tablero Se ha actualizado"); } } protected void LnkEliminarTabl_Click(object sender, EventArgs e) @@ -120,15 +120,15 @@ public partial class OI_Tablero : ClsPaginas if (Continuar) { CargaTablero(); - this.Alert("El Tablero Se ha Eliminado"); + Alert("El Tablero Se ha Eliminado"); }else { - this.Alert("El Tablero Se ha Eliminado", ModExtensiones.TipoMensaje.MsgAdvertencia); + Alert("El Tablero Se ha Eliminado", ModExtensiones.TipoMensaje.MsgAdvertencia); } } protected void LnkTableros_Click(object sender, EventArgs e) { - this.RegistraScript("$('#DModalTablero').modal();"); + RegistraScript("$('#DModalTablero').modal();"); LimpiaTablero(); BtnTablADD.Visible = true; BtnTablEdit.Visible = false; diff --git a/OI/TableroDetalle.aspx.cs b/OI/TableroDetalle.aspx.cs index 4e034d51b..233bbe022 100644 --- a/OI/TableroDetalle.aspx.cs +++ b/OI/TableroDetalle.aspx.cs @@ -86,14 +86,14 @@ public partial class OI_TableroDetalle : ClsPaginas string lista = gvRow.DataKey("Lista"); TxtTabllista.Text = lista.ToString(); - this.RegistraScript("$('#DModalTableroLista').modal();"); + RegistraScript("$('#DModalTableroLista').modal();"); BtnTablADD.Visible = false; BtnTablEdit.Visible = true; UPModalTabl.Update(); } protected void LnkAgregarTabl_Click(object sender, EventArgs e) { - this.RegistraScript("$('#DModalTableroLista').modal();"); + RegistraScript("$('#DModalTableroLista').modal();"); LimpiaTableroLista(); BtnTablADD.Visible = true; BtnTablEdit.Visible = false; @@ -108,11 +108,11 @@ public partial class OI_TableroDetalle : ClsPaginas ObjTabl.Dispose(); if (Continuar) { - this.RegistraScript("$('#DModalTableroLista').modal('hide');"); + RegistraScript("$('#DModalTableroLista').modal('hide');"); LimpiaTableroLista(); CargaTableroLista(); UPModalTabl.Update(); - this.Alert("La Lista se ha agregadó",ModExtensiones.TipoMensaje.ToastInformacion); + Alert("La Lista se ha agregadó",ModExtensiones.TipoMensaje.ToastInformacion); } } protected void BtnTablEdit_Click(object sender, EventArgs e) @@ -124,11 +124,11 @@ public partial class OI_TableroDetalle : ClsPaginas ObjTabl.Dispose(); if (Continuar) { - this.RegistraScript("$('#DModalTableroLista').modal('hide');"); + RegistraScript("$('#DModalTableroLista').modal('hide');"); LimpiaTableroLista(); UPModalTabl.Update(); CargaTableroLista(); - this.Alert("La Lista Se ha actualizado"); + Alert("La Lista Se ha actualizado"); } } protected void LnkEliminarTabl_Click(object sender, EventArgs e) @@ -141,7 +141,7 @@ public partial class OI_TableroDetalle : ClsPaginas if (Continuar) { CargaTableroLista(); - this.Alert("El Tablero_Lista Se ha Eliminado"); + Alert("El Tablero_Lista Se ha Eliminado"); } } //Dim item As DataRowView = DirectCast(e.Item.DataItem, DataRowView) diff --git a/OI/TareaDetalle.aspx.cs b/OI/TareaDetalle.aspx.cs index e09084b6d..1f05e1f82 100644 --- a/OI/TareaDetalle.aspx.cs +++ b/OI/TareaDetalle.aspx.cs @@ -95,12 +95,12 @@ public partial class OI_TareaDetalle : ClsPaginas } catch (Exception) { - this.RegistraScript("window.close();"); + RegistraScript("window.close();"); } } else { - this.RegistraScript("window.close();"); + RegistraScript("window.close();"); } } else @@ -791,7 +791,7 @@ public partial class OI_TareaDetalle : ClsPaginas ruta = string.Format("{0}{1}", ruta, archivoname);//, ArchivoExtencion); System.IO.File.Move(rutaarchivoOri, ruta); } - this.Alert("Se ha agregado la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/TareaDetalle.aspx?CveEvento={0}\");", CveEvento)); + Alert("Se ha agregado la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/TareaDetalle.aspx?CveEvento={0}\");", CveEvento)); } } } @@ -839,14 +839,14 @@ public partial class OI_TareaDetalle : ClsPaginas { cargaActividades(objOI); } - this.Alert("Se actualizó la tarea", ModExtensiones.TipoMensaje.MsgInformacion); + Alert("Se actualizó la tarea", ModExtensiones.TipoMensaje.MsgInformacion); } } if (errorMessage.Length > 0) { - this.Alert(errorMessage, ModExtensiones.TipoMensaje.MsgAdvertencia); + Alert(errorMessage, ModExtensiones.TipoMensaje.MsgAdvertencia); } } @@ -1033,7 +1033,7 @@ public partial class OI_TareaDetalle : ClsPaginas DdlEventoEstatus.SelectedValueExist(DDlEstatus.SelectedValue); lblEstatus.Text = DdlEventoEstatus.SelectedItem.Text; UpEstatus.Update(); - this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivCambiarEstatus)); + RegistraScript(string.Format("$('#{0}').modal('hide')", iddivCambiarEstatus)); Alert(mensaje, ModExtensiones.TipoMensaje.ToastInformacion); cargaActividades(objOI); @@ -1074,13 +1074,13 @@ public partial class OI_TareaDetalle : ClsPaginas protected void LnkcambiarEstatus_Click(object sender, EventArgs e) { - this.RegistraScript(string.Format("$('#{0}').modal()", iddivCambiarEstatus)); + RegistraScript(string.Format("$('#{0}').modal()", iddivCambiarEstatus)); } protected void LnkAgregarTema_Click(object sender, EventArgs e) { - this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarTema)); + RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarTema)); } protected void BtnAgregarTema_Click(object sender, EventArgs e) @@ -1091,7 +1091,7 @@ public partial class OI_TareaDetalle : ClsPaginas if (objoi.AddRevisionesEventos(TxtTema.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) { Alert(string.Format("El Tema \"{0}\" fue agregado con éxito.", TxtTema.Text.Trim()), ModExtensiones.TipoMensaje.MsgInformacion); - this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarTema)); + RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarTema)); TxtTema.Text = ""; set_GlobalDTOIRevision(-1, objoi.DtResultados); CargaTemas(); @@ -1105,7 +1105,7 @@ public partial class OI_TareaDetalle : ClsPaginas protected void LnkAgregarActividad_Click(object sender, EventArgs e) { - this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregar)); + RegistraScript(string.Format("$('#{0}').modal()", iddivAgregar)); } protected void BtnAgregarComentario_Click(object sender, EventArgs e) @@ -1170,9 +1170,9 @@ public partial class OI_TareaDetalle : ClsPaginas ruta = string.Format("{0}{1}{2}", ruta, CveComentario, archivoname);//, ArchivoExtencion); System.IO.File.Move(rutaarchivoOri, ruta); } - this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregar)); - this.Alert("Comentario agregadó", ModExtensiones.TipoMensaje.ToastInformacion); - //this.Alert("Se ha agregado la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/TareaDetalle.aspx?CveEvento={0}\");", CveEvento)); + RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregar)); + Alert("Comentario agregadó", ModExtensiones.TipoMensaje.ToastInformacion); + //Alert("Se ha agregado la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/TareaDetalle.aspx?CveEvento={0}\");", CveEvento)); } TxtComentario.Text = ""; } @@ -1197,7 +1197,7 @@ public partial class OI_TareaDetalle : ClsPaginas protected void LnkUpFile_Click(object sender, EventArgs e) { - this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarArchivo)); + RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarArchivo)); } @@ -1259,8 +1259,8 @@ public partial class OI_TareaDetalle : ClsPaginas if (continuar) { LoadTarea(); - this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarArchivo)); - this.Alert("Archivo Actualizadó", ModExtensiones.TipoMensaje.ToastInformacion); + RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarArchivo)); + Alert("Archivo Actualizadó", ModExtensiones.TipoMensaje.ToastInformacion); } UpContenido.Update(); UpAcciones.Update(); @@ -1307,7 +1307,7 @@ public partial class OI_TareaDetalle : ClsPaginas } if (continuar) { - this.Alert("Avance Actualizadó", ModExtensiones.TipoMensaje.ToastInformacion); + Alert("Avance Actualizadó", ModExtensiones.TipoMensaje.ToastInformacion); } //UpTitulo.Update(); @@ -1315,12 +1315,12 @@ public partial class OI_TareaDetalle : ClsPaginas protected void LnkAddTtemaB_Click(object sender, EventArgs e) { - this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarTema)); + RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarTema)); } protected void LnkReasignar_Click(object sender, EventArgs e) { - this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarMiembros)); + RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarMiembros)); LtlTituloUsuarios.Text = "Reasignar Tarea"; BtnUpMiembros.Visible = false; BtnReasignarTarea.Visible = true; @@ -1361,7 +1361,7 @@ public partial class OI_TareaDetalle : ClsPaginas } protected void LnkUpUsuarios_Click(object sender, EventArgs e) { - this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarMiembros)); + RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarMiembros)); LtlTituloUsuarios.Text = "Actualizar miembros"; BtnUpMiembros.Visible = true; BtnReasignarTarea.Visible = false; @@ -1440,7 +1440,7 @@ public partial class OI_TareaDetalle : ClsPaginas Setpermisos(); } UpContenido.Update(); - this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarMiembros)); + RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarMiembros)); } @@ -1564,7 +1564,7 @@ public partial class OI_TareaDetalle : ClsPaginas } if (Continuar && CveEvento > 0) { - this.Alert("Se ha agregado la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/TareaDetalle.aspx?CveEvento={0}\");", CveEvento)); + Alert("Se ha agregado la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/TareaDetalle.aspx?CveEvento={0}\");", CveEvento)); } } diff --git a/Prospectos/GeneradorEncuestas.aspx.vb b/Prospectos/GeneradorEncuestas.aspx.vb index efb5f6974..1ec0025aa 100644 --- a/Prospectos/GeneradorEncuestas.aspx.vb +++ b/Prospectos/GeneradorEncuestas.aspx.vb @@ -157,7 +157,7 @@ Partial Class Prospectos_GeneradorEncuestas Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click CargaDatos() UPDatos.Update() - Me.RegistraScript("UpperBound = " & GvDatos.Rows.Count - 1 & ";") + RegistraScript("UpperBound = " & GvDatos.Rows.Count - 1 & ";") End Sub Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click diff --git a/Prospectos/RepEncuestas.aspx.vb b/Prospectos/RepEncuestas.aspx.vb index 34690838e..409eb6700 100644 --- a/Prospectos/RepEncuestas.aspx.vb +++ b/Prospectos/RepEncuestas.aspx.vb @@ -124,7 +124,7 @@ Partial Class Prospectos_RepRedesEstructuras Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click CargaDatos() UPDatos.Update() - Me.RegistraScript("UpperBound = " & GvDatos.Rows.Count - 1 & ";") + RegistraScript("UpperBound = " & GvDatos.Rows.Count - 1 & ";") End Sub Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click diff --git a/Prospectos/RepEventos.aspx.vb b/Prospectos/RepEventos.aspx.vb index a0af8167c..33f5b3fe3 100644 --- a/Prospectos/RepEventos.aspx.vb +++ b/Prospectos/RepEventos.aspx.vb @@ -84,7 +84,7 @@ Partial Class Prospectos_RepEventos 'Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click ' CargaDatos() ' UPDatos.Update() - ' Me.RegistraScript("UpperBound = " & GvDatos.Rows.Count - 1 & ";") + ' RegistraScript("UpperBound = " & GvDatos.Rows.Count - 1 & ";") 'End Sub Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click diff --git a/Prospectos/RepPadron.aspx.vb b/Prospectos/RepPadron.aspx.vb index 70566883b..74ecb97c3 100644 --- a/Prospectos/RepPadron.aspx.vb +++ b/Prospectos/RepPadron.aspx.vb @@ -298,7 +298,7 @@ Partial Class Prospectos_RepPadron Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click CargaDatos() UPDatos.Update() - Me.RegistraScript("UpperBound = " & GvDatos.Rows.Count - 1 & ";") + RegistraScript("UpperBound = " & GvDatos.Rows.Count - 1 & ";") End Sub Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click diff --git a/Prospectos/RepProspectos.aspx.vb b/Prospectos/RepProspectos.aspx.vb index f8257c0d3..c0c8a5660 100644 --- a/Prospectos/RepProspectos.aspx.vb +++ b/Prospectos/RepProspectos.aspx.vb @@ -81,7 +81,7 @@ Partial Class Prospectos_RepProspectos Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click CargaDatos() UPDatos.Update() - Me.RegistraScript("UpperBound = " & GvDatos.Rows.Count - 1 & ";") + RegistraScript("UpperBound = " & GvDatos.Rows.Count - 1 & ";") End Sub Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click diff --git a/Prospectos/RepRedesEstructuras.aspx.vb b/Prospectos/RepRedesEstructuras.aspx.vb index f7b011d19..f971f2804 100644 --- a/Prospectos/RepRedesEstructuras.aspx.vb +++ b/Prospectos/RepRedesEstructuras.aspx.vb @@ -142,7 +142,7 @@ Partial Class Prospectos_RepRedesEstructuras Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click CargaDatos() UPDatos.Update() - Me.RegistraScript("UpperBound = " & GvDatos.Rows.Count - 1 & ";") + RegistraScript("UpperBound = " & GvDatos.Rows.Count - 1 & ";") End Sub Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click diff --git a/Prospectos/RepSolicitudes.aspx.vb b/Prospectos/RepSolicitudes.aspx.vb index 596a2f7c9..90ae488d4 100644 --- a/Prospectos/RepSolicitudes.aspx.vb +++ b/Prospectos/RepSolicitudes.aspx.vb @@ -70,7 +70,7 @@ Partial Class Prospectos_RepSolicitudes Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click CargaDatos() UPDatos.Update() - Me.RegistraScript("UpperBound = " & GvDatos.Rows.Count - 1 & ";") + RegistraScript("UpperBound = " & GvDatos.Rows.Count - 1 & ";") End Sub Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click diff --git a/RH/CatConceptosViaticos.aspx.cs b/RH/CatConceptosViaticos.aspx.cs index cc3b69fa4..f72ba449f 100644 --- a/RH/CatConceptosViaticos.aspx.cs +++ b/RH/CatConceptosViaticos.aspx.cs @@ -96,7 +96,7 @@ public partial class RH_CatConceptosViaticos : ClsPaginas limpiarCamposModal(); UPModalConcepto.Update(); - this.RegistraScript("$('#DivModalConcepto').modal();"); + RegistraScript("$('#DivModalConcepto').modal();"); } protected void LnkEditar_Click(object sender, EventArgs e) @@ -112,7 +112,7 @@ public partial class RH_CatConceptosViaticos : ClsPaginas UPModalConcepto.Update(); - this.RegistraScript("$('#DivModalConcepto').modal();"); + RegistraScript("$('#DivModalConcepto').modal();"); } protected void BtnGuardarConcepto_Click(object sender, EventArgs e) @@ -142,7 +142,7 @@ public partial class RH_CatConceptosViaticos : ClsPaginas ObjBanco.Dispose(); limpiarCamposModal(); - this.RegistraScript("$('#DivModalConcepto').modal('hide');"); + RegistraScript("$('#DivModalConcepto').modal('hide');"); CargaDatos(); } diff --git a/RH/DiasFestivos.aspx.cs b/RH/DiasFestivos.aspx.cs index 4304fdcd7..3dca59d48 100644 --- a/RH/DiasFestivos.aspx.cs +++ b/RH/DiasFestivos.aspx.cs @@ -34,7 +34,7 @@ public partial class RH_DiasFestivos : ClsPaginas } protected void LnkAgregarDias_Click(object sender, EventArgs e) { - this.RegistraScript("$('#DModalDiasFestivos').modal();"); + RegistraScript("$('#DModalDiasFestivos').modal();"); LimpiaDiasFestivos(); BtnDiasADD.Visible = true; UPModalDias.Update(); @@ -48,11 +48,11 @@ public partial class RH_DiasFestivos : ClsPaginas ObjDias.Dispose(); if (Continuar) { - this.RegistraScript("$('#DModalDiasFestivos').modal('hide');"); + RegistraScript("$('#DModalDiasFestivos').modal('hide');"); LimpiaDiasFestivos(); CargaDiasFestivos(); UPModalDias.Update(); - this.Alert("El dìa festivos se ha agregado"); + Alert("El dìa festivos se ha agregado"); } } protected void LnkEliminarDias_Click(object sender, EventArgs e) @@ -65,7 +65,7 @@ public partial class RH_DiasFestivos : ClsPaginas if (Continuar) { CargaDiasFestivos(); - this.Alert("El dìa festivos se ha Eliminado"); + Alert("El dìa festivos se ha Eliminado"); } } diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 90f27ff1e..b701b1bd7 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -7181,10 +7181,10 @@ Partial Class RH_Personal End Using If Continuar Then - Me.RegistraScript("$('#DModalMovtoPermanente').modal('hide');") + RegistraScript("$('#DModalMovtoPermanente').modal('hide');") CargaMovtoPermanente() UpMovtosPermanentes.Update() - Me.Alert("Se ha agregado el movimiento permanente") + Alert("Se ha agregado el movimiento permanente") End If RegistraScript("$('#ModalMovtoPermanente').modal('hide')") @@ -7207,10 +7207,10 @@ Partial Class RH_Personal End Using If Continuar Then - Me.RegistraScript("$('#ModalMovtoPermanente').modal('hide');") + RegistraScript("$('#ModalMovtoPermanente').modal('hide');") CargaMovtoPermanente() UpMovtosPermanentes.Update() - Me.Alert("Se ha actualizado el movimiento permanente") + Alert("Se ha actualizado el movimiento permanente") End If End Sub @@ -7229,10 +7229,10 @@ Partial Class RH_Personal End Using If Continuar Then - Me.RegistraScript("$('#ModalMovtoPermanente').modal('hide');") + RegistraScript("$('#ModalMovtoPermanente').modal('hide');") CargaMovtoPermanente() UpMovtosPermanentes.Update() - Me.Alert("Se ha eliminadó el movimiento permanente") + Alert("Se ha eliminadó el movimiento permanente") End If End Sub @@ -7386,7 +7386,7 @@ Partial Class RH_Personal If Continuar Then CargaPersonalIncapacidad() UpsrIncapacidadpersonal.Update() - Me.Alert("La incapacidad se ha agregado.", TipoMensaje.ToastInformacion) + Alert("La incapacidad se ha agregado.", TipoMensaje.ToastInformacion) RegistraScript("$('#ModalSRIncapacidad').modal('hide')") End If End Sub @@ -7412,7 +7412,7 @@ Partial Class RH_Personal If Continuar Then CargaPersonalIncapacidad() UpsrIncapacidadpersonal.Update() - Me.Alert("La incapacidad se ha actualizado.", TipoMensaje.ToastInformacion) + Alert("La incapacidad se ha actualizado.", TipoMensaje.ToastInformacion) RegistraScript("$('#ModalSRIncapacidad').modal('hide')") End If End Sub diff --git a/SAT/SolicitudesIngresoSat.aspx.cs b/SAT/SolicitudesIngresoSat.aspx.cs index 6b5e5f4df..3ce158f5d 100644 --- a/SAT/SolicitudesIngresoSat.aspx.cs +++ b/SAT/SolicitudesIngresoSat.aspx.cs @@ -164,7 +164,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas TabPanel.ActiveTabIndex = 0; cargasolicitudes(); - this.RegistraScript("$('#ModalViewSolicitudes').modal();"); + RegistraScript("$('#ModalViewSolicitudes').modal();"); } protected void LnkSolicitarSat_Click(object sender, EventArgs e) @@ -248,7 +248,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas txtFechaIAdd.Text = ""; txtFechaFAdd.Text = ""; ChkMetaDatos.Checked = false; - this.RegistraScript("$('#ModalAgregarSolicitud').modal('hide');"); + RegistraScript("$('#ModalAgregarSolicitud').modal('hide');"); cargasolicitudes(); } @@ -389,7 +389,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas txtFechaFAdd.Text = ""; ChkMetaDatos.Checked = false; UPModalViewSolicitudesAgregar.Update(); - this.RegistraScript("$('#ModalAgregarSolicitud').modal('show');"); + RegistraScript("$('#ModalAgregarSolicitud').modal('show');"); } protected void GvResumen_RowDataBound(object sender, GridViewRowEventArgs e) diff --git a/SAT/SolicitudesNominaSat.aspx.cs b/SAT/SolicitudesNominaSat.aspx.cs index 8b5e40ac2..1056435d8 100644 --- a/SAT/SolicitudesNominaSat.aspx.cs +++ b/SAT/SolicitudesNominaSat.aspx.cs @@ -187,12 +187,12 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas txtFechaFAdd.Text = ""; ChkMetaDatos.Checked = false; UPModalViewSolicitudesAgregar.Update(); - this.RegistraScript("$('#ModalAgregarSolicitud').modal('show');"); + RegistraScript("$('#ModalAgregarSolicitud').modal('show');"); } protected void LnkShowSolicitudes_Click(object sender, EventArgs e) { cargasolicitudes(); - this.RegistraScript("$('#ModalViewSolicitudes').modal();"); + RegistraScript("$('#ModalViewSolicitudes').modal();"); } protected void LnkSolicitarSat_Click(object sender, EventArgs e) @@ -218,10 +218,10 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas { txtFechaIAdd.Text = ""; txtFechaFAdd.Text = ""; - //this.RegistraScript("$('#DModalSolicitudesNominas').modal('hide');"); - this.RegistraScript("$('#ModalAgregarSolicitud').modal('hide');"); + //RegistraScript("$('#DModalSolicitudesNominas').modal('hide');"); + RegistraScript("$('#ModalAgregarSolicitud').modal('hide');"); cargasolicitudes(); - this.Alert("se a envia la solicitud al sat, le enviaremos un correo en cuanto tengamos una respuesta", ModExtensiones.TipoMensaje.ToastInformacion); + Alert("se a envia la solicitud al sat, le enviaremos un correo en cuanto tengamos una respuesta", ModExtensiones.TipoMensaje.ToastInformacion); } } diff --git a/Ventas/CatPS.aspx.vb b/Ventas/CatPS.aspx.vb index f7833ab72..087af1283 100644 --- a/Ventas/CatPS.aspx.vb +++ b/Ventas/CatPS.aspx.vb @@ -207,7 +207,7 @@ Partial Class CatPS If ObjPS.DtResultados.Rows.Count > 0 Then GvProductos.DataSource = ObjPS.DtResultados GvProductos.DataBind() - GvProductos.ExportToExcelx("Reporte de Producto") + GvProductos.ExportToExcelX("Reporte de Producto") Else Alert("Todos los productos tienen Asignada Clave Producto Servicio SAT.", TipoMensaje.MsgInformacion) End If diff --git a/Ventas/ClasificacionesDetalle.aspx.cs b/Ventas/ClasificacionesDetalle.aspx.cs index 0b51e8ae3..d2a0dd240 100644 --- a/Ventas/ClasificacionesDetalle.aspx.cs +++ b/Ventas/ClasificacionesDetalle.aspx.cs @@ -43,7 +43,7 @@ public partial class Ventas_ClasificacionesDetalle : ClsPaginas protected void LnkAgregarClasificacionDetalle_Click(object sender, EventArgs e) { - this.RegistraScript("$('#DModal').modal();"); LimpiaModal(); BtnAddClasificacionDetalle.Text = "Agregar"; + RegistraScript("$('#DModal').modal();"); LimpiaModal(); BtnAddClasificacionDetalle.Text = "Agregar"; DivEstatus.Visible = false; UpModal.Update(); } @@ -74,7 +74,7 @@ public partial class Ventas_ClasificacionesDetalle : ClsPaginas protected void LnkEditar_Click(object sender, EventArgs e) { LimpiaModal(); GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); - CveClasificacionDetalle = gvRow.DataKey("CveClasificacionDetalle").ToEntero(); TxtClasificacionDetalle.Text = gvRow.DataKey("ClasificacionDetalle"); DdlClasificacion.SelectedValueExist(gvRow.DataKey("CveClasificacion")); ChkEstatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus")); Modalidad = "U"; this.RegistraScript("$('#DModal').modal();"); + CveClasificacionDetalle = gvRow.DataKey("CveClasificacionDetalle").ToEntero(); TxtClasificacionDetalle.Text = gvRow.DataKey("ClasificacionDetalle"); DdlClasificacion.SelectedValueExist(gvRow.DataKey("CveClasificacion")); ChkEstatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus")); Modalidad = "U"; RegistraScript("$('#DModal').modal();"); BtnAddClasificacionDetalle.Text = "Actualizar"; DivEstatus.Visible = true; UpModal.Update(); } @@ -87,7 +87,7 @@ public partial class Ventas_ClasificacionesDetalle : ClsPaginas UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) { CargaDatos(); - this.RegistraScript("$('#DModal').modal('hide');"); + RegistraScript("$('#DModal').modal('hide');"); Alert("Guardada Correctamente"); } } @@ -97,7 +97,7 @@ public partial class Ventas_ClasificacionesDetalle : ClsPaginas ChkEstatus.Checked)) { CargaDatos(); - this.RegistraScript("$('#DModal').modal('hide');"); + RegistraScript("$('#DModal').modal('hide');"); Alert("Actualizada Correctamente"); } } diff --git a/Ventas/RepComisionesJAM.aspx.cs b/Ventas/RepComisionesJAM.aspx.cs index 079d7a0a6..ac4f49186 100644 --- a/Ventas/RepComisionesJAM.aspx.cs +++ b/Ventas/RepComisionesJAM.aspx.cs @@ -372,6 +372,6 @@ public partial class Ventas_RepComisionesJAM : ClsPaginas LblInfo.Text = $"El producto obtuvo comision porque esta dentro de los de las comisiones especiales.
    La categoria del producto es: {get_GlobalDTGralCategorias(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Categoria", $"CveCategoria = { gvRow.DataKey("CveCategoria").ToString()}")}.
    El producto es: {gvRow.DataKey("CodigoPS").ToString()}.
    % Precio Publico: {gvRow.DataKey("PorcentajePrecioPublico").ToString()}
    Dias Pago: {gvRow.DataKey("DiasPago").ToString()}"; } - this.RegistraScript("$('#DModalInfo').modal();"); UpModalInformacion.Update(); + RegistraScript("$('#DModalInfo').modal();"); UpModalInformacion.Update(); } } \ No newline at end of file diff --git a/Ventas/RepLineasAdicionales.aspx.cs b/Ventas/RepLineasAdicionales.aspx.cs index 5c9f621bc..e9ca28611 100644 --- a/Ventas/RepLineasAdicionales.aspx.cs +++ b/Ventas/RepLineasAdicionales.aspx.cs @@ -314,13 +314,13 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas if(TipoLinea == 1) { GridView gvTemp = GvLineasAdicionales; - gvTemp.ExportToExcelx("RepLineasAdicionales" + DateTime.Now.ToShortDateString()); + gvTemp.ExportToExcelX("RepLineasAdicionales" + DateTime.Now.ToShortDateString()); } else if(TipoLinea == 2) { GridView gvTemp = GvLAPO; gvTemp.Columns[8].Visible = false; - gvTemp.ExportToExcelx("ReportePO" + DateTime.Now.ToShortDateString()); + gvTemp.ExportToExcelX("ReportePO" + DateTime.Now.ToShortDateString()); } } From e75e462991923e053cd0dcc0bc7b4aa3e75f8f72 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 31 Jan 2023 23:59:03 -0700 Subject: [PATCH 074/103] =?UTF-8?q?--=20mejora=20en=20extensi=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/modExtensiones.vb | 3 ++- Ventas/ClientesAbonar.aspx | 3 +++ Ventas/ClientesAbonar.aspx.vb | 20 ++++++++++---------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 06ff258ec..11f11fabf 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -3474,8 +3474,9 @@ Namespace Extensiones End Sub - Public Sub SelectedTextLikeIfExist(ByRef Rbl As DropDownList, ByRef Valor As String) + Public Sub SelectedTextLikeIfExist(Rbl As DropDownList, Valor As String) If Valor <> "" Then + Rbl.ClearSelection() For Each item As ListItem In Rbl.Items If item.Text.Contains(Valor) Then item.Selected = True diff --git a/Ventas/ClientesAbonar.aspx b/Ventas/ClientesAbonar.aspx index b296b6faa..ba7d5e7fc 100644 --- a/Ventas/ClientesAbonar.aspx +++ b/Ventas/ClientesAbonar.aspx @@ -684,6 +684,9 @@
    + + +
    diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index d078f30e8..46eeba02a 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -2928,18 +2928,18 @@ Partial Class Ventas_ClientesAbonar End Sub - Public Sub SelectedTextLikeIfExist(ByRef Rbl As RadioButtonList, Value As String) - Try + 'Public Sub SelectedTextLikeIfExist(ByRef Rbl As RadioButtonList, Value As String) + ' Try - For Each item As ListItem In Rbl.Items - If item.Value.Contains(Value) Then - item.Selected = True - End If - Next - Catch ex As Exception + ' For Each item As ListItem In Rbl.Items + ' If item.Value.Contains(Value) Then + ' item.Selected = True + ' End If + ' Next + ' Catch ex As Exception - End Try - End Sub + ' End Try + 'End Sub Protected Sub LnkDescargaFormato_Click(sender As Object, e As EventArgs) From 97c04f1c0288f448cafd93ed86d8f055203d14e8 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 1 Feb 2023 00:00:39 -0700 Subject: [PATCH 075/103] -- cambio en GlobalDT Usuarios --- App_Code/ClsPaginas.vb | 200 +++++----- App_Code/ClsSisUsuarios.vb | 3 +- App_Code/Modelos.vb | 502 ++++++++---------------- Bancos/OtrosIE.aspx.vb | 2 +- Bancos/PolizaCheque.aspx.vb | 2 +- Bancos/RepEgresosSinComprobante.aspx.vb | 4 +- Bancos/RepProgramarRecursos.aspx.vb | 22 +- Bancos/RepProveedoresPagos.aspx.vb | 2 +- Compras/Proveedores.aspx.vb | 11 +- Compras/eFacturas.aspx.vb | 2 +- Global.asax | 60 +-- LogIn.aspx.vb | 2 +- Ventas/Clientes.aspx | 4 +- Ventas/Clientes.aspx.vb | 13 +- 14 files changed, 332 insertions(+), 497 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 6045b7c57..62dd6a604 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -197,32 +197,34 @@ Public Class ClsPaginas 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 AppNombre As String = String.Format("GlobalDTUsuarios-{0}", CveEmpresa) + If Application(AppNombre) Is Nothing Then + Using ObjUsuarios As New ClsSisUsuarios + If ObjUsuarios.GetUsuariosEmpresas(-1, CveEmpresa) Then Application(AppNombre) = ObjUsuarios.DtResultados + End Using + End If + 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 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) + Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) GlobalDTUsuarios = Dv.ToTable Dv.Dispose() Else - GlobalDTUsuarios = DirectCast(Application("GlobalDTUsuarios"), DataTable) + GlobalDTUsuarios = DirectCast(Application(AppNombre), DataTable) End If + End Get Set(value As DataTable) - Application("GlobalDTUsuarios") = value + Dim AppNombre As String = String.Format("GlobalDTUsuarios-{0}", CveEmpresa) + Application(AppNombre) = value End Set End Property Property GlobalDTNomConceptos(CveEmpresa As Integer) As DataTable @@ -630,12 +632,32 @@ Public Class ClsPaginas Application("GlobalDTNomConceptosFunciones") = value End Set End Property - Property GlobalDTUsuarioResponsable() As DataTable + Property GlobalDTUsuarioResponsable(CveEmpresa As Integer) As DataTable Get - GlobalDTUsuarioResponsable = DirectCast(Application("GlobalDTUsuarioResponsable"), DataTable) + Dim AppNombre As String = String.Format("GlobalDTUsuarioResponsable-{0}", CveEmpresa) + If Application(AppNombre) Is Nothing Then + Using ObjUsuarios As New ClsSisUsuarios + If ObjUsuarios.GetUsuariosEmpresas(-1, CveEmpresa) Then Application(AppNombre) = ObjUsuarios.DtResultados.FiltraParametros("ProveedoresResponsables > 0") + End Using + End If + + 'Dim Str As New StringBuilder + ''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(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + ' GlobalDTUsuarios = Dv.ToTable + ' Dv.Dispose() + 'Else + GlobalDTUsuarioResponsable = DirectCast(Application(AppNombre), DataTable) + ' End If + End Get Set(value As DataTable) - Application("GlobalDTUsuarioResponsable") = value + Dim AppNombre As String = String.Format("GlobalDTUsuarioResponsable-{0}", CveEmpresa) + Application(AppNombre) = value End Set End Property Property GlobalDTProveedoresCuentas(CveProveedor As Integer, Estatus As Boolean) As DataTable @@ -807,19 +829,37 @@ Public Class ClsPaginas Application("GlobalDTNomSatTipoIncapacidad") = value End Set End Property - Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable + Public Shared Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable Get + Dim AppNombre As String = "GlobalDTEmpresas" + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Using ObjEmpresas As New ClsSisEmpresas() + If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1") Then + HttpContext.Current.Application(AppNombre) = ObjEmpresas.DtResultados + 'verifico si existe la carpeta de la empresa, sino la crea + For Each dr As Data.DataRow In ObjEmpresas.DtResultados.Rows + Dim Ruta As String = String.Format("{0}Empresas\{1}", ModExtensiones.DirectorioBaseEmpresas, dr("CveEmpresa")) + If Not IO.Directory.Exists(Ruta) Then IO.Directory.CreateDirectory(Ruta) + If Not System.IO.Directory.Exists(String.Format("{0}\XML\", Ruta)) Then System.IO.Directory.CreateDirectory(String.Format("{0}\XML\", Ruta)) + If Not System.IO.Directory.Exists(String.Format("{0}\PDF\", Ruta)) Then System.IO.Directory.CreateDirectory(String.Format("{0}\PDF\", Ruta)) + + Next + End If + End Using + End If If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTEmpresas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) GlobalDTEmpresas = Dv.ToTable Dv.Dispose() Else - GlobalDTEmpresas = DirectCast(Application("GlobalDTEmpresas"), DataTable) + GlobalDTEmpresas = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If + End Get Set(ByVal value As DataTable) - Application("GlobalDTEmpresas") = value + Dim AppNombre As String = "GlobalDTEmpresas" + HttpContext.Current.Application(AppNombre) = value End Set End Property @@ -1412,43 +1452,41 @@ Public Class ClsPaginas HttpContext.Current.Application(AppNombre) = value End Set End Property - Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable + Public Shared 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 + If HttpContext.Current.Application(AppNombre) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then Dim P As New ClsSubProyectos - If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = P.DtResultados + If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados P.Dispose() End If - If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then + If CveProyecto <> -1 OrElse CveSubProyecto <> -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) + Dim Dv As New DataView(DirectCast(HttpContext.Current.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) + GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If End Get Set(ByVal value As DataTable) Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa) - Application(AppNombre) = value + HttpContext.Current.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 + Public Shared 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 + If HttpContext.Current.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) + If ObjSubProyectos.GetSubProyectosUsuarios(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjSubProyectos.DtResultados ObjSubProyectos.Dispose() End If @@ -1460,34 +1498,26 @@ Public Class ClsPaginas 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) + Dim Dv As New DataView(DirectCast(HttpContext.Current.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) + GlobalDTSubProyectosUsuarios = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If End Get Set(ByVal value As DataTable) Dim AppNombre As String = String.Format("GlobalDTSubProyectosUsuarios-{0}", CveEmpresa) - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, CveEstatus As Integer) As DataTable + Public Shared Property GlobalDTProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, CveEstatus As Integer) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTProyectosUsuarios-{0}", CveEmpresa) - If Application(AppNombre) Is Nothing Then + If HttpContext.Current.Application(AppNombre) Is Nothing Then Dim ObjSubProyectos As New ClsSubProyectos() - If ObjSubProyectos.GetSubProyectosUsuarios(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"}) Else Alert("Ocurrió un error al cargar los Proyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError) + If ObjSubProyectos.GetSubProyectosUsuarios(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"}) ObjSubProyectos.Dispose() End If @@ -1498,18 +1528,18 @@ Public Class ClsPaginas 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(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) GlobalDTProyectosUsuarios = Dv.ToTable Dv.Dispose() Else - GlobalDTProyectosUsuarios = DirectCast(Application(AppNombre), DataTable) + GlobalDTProyectosUsuarios = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If End Get Set(ByVal value As DataTable) Dim AppNombre As String = String.Format("GlobalDTProyectosUsuarios-{0}", CveEmpresa) - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set End Property Public Shared Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable @@ -3572,69 +3602,55 @@ Public Class ClsPaginas #Region "***********************************************************************GLOBAL DT CONTABILIDAD****************************************************************************" - Property GlobalDTContaPlantillasPolizas(CveEmpresa As Integer, Optional TipoPlantilla As Integer = -1) As DataTable + Public Shared 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) + Dim AppNombre As String = $"GlobalDTContaPlantillasPolizas-{CveEmpresa}" + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjContabilidad As New ClsContabilidad + If ObjContabilidad.GetConta_PlantillasPolizas(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjContabilidad.DtResultados + ObjContabilidad.Dispose() End If + Dim Str As New StringBuilder + + If TipoPlantilla <> -1 Then Str.AppendFormat(" TipoPlantilla = {0}", TipoPlantilla) + + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + GlobalDTContaPlantillasPolizas = Dv.ToTable + Dv.Dispose() End Get Set(value As DataTable) - Application("GlobalDTContaPlantillasPolizas") = value + Dim AppNombre As String = $"GlobalDTContaPlantillasPolizas-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTContaPlantillasPolizasDetalle(CvePlantillaPoliza As Integer) As DataTable + Public Shared Property GlobalDTContaPlantillasPolizasDetalle(CveEmpresa As Integer, 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) + Dim AppNombre As String = $"GlobalDTContaPlantillasPolizasDetalle-{CveEmpresa}" + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjContabilidad As New ClsContabilidad + If ObjContabilidad.GetConta_PlantillasPolizasDetalle(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjContabilidad.DtResultados + ObjContabilidad.Dispose() End If + Dim Str As New StringBuilder + + If CvePlantillaPoliza <> -1 Then Str.AppendFormat(" CvePlantillaPoliza = {0}", CvePlantillaPoliza) + + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + GlobalDTContaPlantillasPolizasDetalle = Dv.ToTable + Dv.Dispose() End Get Set(value As DataTable) - Application("GlobalDTContaPlantillasPolizasDetalle") = value + Dim AppNombre As String = $"GlobalDTContaPlantillasPolizasDetalle-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property - 'Property GlobalDTContaPlantillasPolizasDetalle(CvePlantillaPoliza As Integer, CveEmpresa As Integer) As DataTable - ' Get - ' Dim AppNombre As String = String.Format("GlobalDTContaPlantillasPolizas-{0}", CveEmpresa) - ' 'sino existe, recarga los datos - ' If Application(AppNombre) Is Nothing Then - ' Using ObjContabilidad As New ClsContabilidad - ' If ObjContabilidad.GetConta_PlantillasPolizasDetalle(-1, CveEmpresa) Then Application(AppNombre) = ObjContabilidad.DtResultados Else Application(AppNombre) = Nothing - ' End Using - ' End If - - ' Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "Orden", DataViewRowState.CurrentRows) - ' GlobalDTContaPlantillasPolizasDetalle = Dv.ToTable - ' Dv.Dispose() - - - ' End Get - ' Set(value As DataTable) - ' Dim AppNombre As String = String.Format("GlobalDTContaPlantillasPolizas-{0}", CveEmpresa) - ' Application(AppNombre) = value - ' End Set - 'End Property - - Public Shared Property GlobalDTContaConceptosContables(CveConceptoContable As Integer) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables") - 'sino existe, recarga los datos If HttpContext.Current.Application(AppNombre) Is Nothing Then Using ObjContabilidad As New ClsContabilidad If ObjContabilidad.GetConta_ConceptosContables() Then HttpContext.Current.Application(AppNombre) = ObjContabilidad.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing diff --git a/App_Code/ClsSisUsuarios.vb b/App_Code/ClsSisUsuarios.vb index 115bacd73..46296e77d 100644 --- a/App_Code/ClsSisUsuarios.vb +++ b/App_Code/ClsSisUsuarios.vb @@ -657,7 +657,7 @@ Public Class ClsSisUsuarios Return Retorno End Function - Public Function GetUsuariosEmpresas(CveUsuario As Integer) As Boolean + Public Function GetUsuariosEmpresas(CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -665,6 +665,7 @@ Public Class ClsSisUsuarios DataAdapter("PA_Sis_UsuariosEmpresasGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 93bb76a17..ca48d9f8c 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -326,47 +326,47 @@ Namespace Modelos IniciaValores() End Sub - Public Sub New(ObjsClsPaginas As ClsPaginas, Optional Row As Data.DataRow = Nothing) - If Row IsNot Nothing Then - setValues(Row) - Else - IniciaValores() - End If - SetMetodoPago() - Timbre = New CFDITimbre - DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas - End Sub + 'Public Sub New(ObjsClsPaginas As ClsPaginas, Optional Row As Data.DataRow = Nothing) + ' If Row IsNot Nothing Then + ' setValues(Row) + ' Else + ' IniciaValores() + ' End If + ' SetMetodoPago() + ' Timbre = New CFDITimbre + ' DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas + 'End Sub - Public Sub New(ObjsClsPaginas As ClsPaginas, CveVenta As Integer, CveEmpresa As Integer) - Me.CveEmpresa = CveEmpresa - Dim ObjVentas As New ClsVentas() - If ObjVentas.GetVenta(CveVenta, CveEmpresa) Then - If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then - setValues(ObjVentas.DtResultados.Rows(0)) - SetMetodoPago(ObjsClsPaginas) - SetMoneda(ObjsClsPaginas) - End If - End If - ObjVentas.Dispose() - DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas - End Sub - Public Sub New(ObjsClsPaginas As ClsPaginas, UsuarioActual As Usuario, Optional Row As Data.DataRow = Nothing) - Me.UsuarioActual = UsuarioActual - Me.ErrorList = New List(Of String) - Me.RemisionesLista = New List(Of Integer) - Me.ListaMensajes = New List(Of String) - If Row IsNot Nothing Then - setValues(Row) - Else - IniciaValores() - End If - SetMetodoPago(ObjsClsPaginas) - SetMoneda(ObjsClsPaginas) - SetSubProyecto(ObjsClsPaginas) - SetSubProyectoMatriz(ObjsClsPaginas) - Timbre = New CFDITimbre - DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas - End Sub + 'Public Sub New(ObjsClsPaginas As ClsPaginas, CveVenta As Integer, CveEmpresa As Integer) + ' Me.CveEmpresa = CveEmpresa + ' Dim ObjVentas As New ClsVentas() + ' If ObjVentas.GetVenta(CveVenta, CveEmpresa) Then + ' If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then + ' setValues(ObjVentas.DtResultados.Rows(0)) + ' SetMetodoPago() + ' SetMoneda() + ' End If + ' End If + ' ObjVentas.Dispose() + ' DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas + 'End Sub + 'Public Sub New(ObjsClsPaginas As ClsPaginas, UsuarioActual As Usuario, Optional Row As Data.DataRow = Nothing) + ' Me.UsuarioActual = UsuarioActual + ' Me.ErrorList = New List(Of String) + ' Me.RemisionesLista = New List(Of Integer) + ' Me.ListaMensajes = New List(Of String) + ' If Row IsNot Nothing Then + ' setValues(Row) + ' Else + ' IniciaValores() + ' End If + ' SetMetodoPago() + ' SetMoneda() + ' SetSubProyecto(ObjsClsPaginas) + ' SetSubProyectoMatriz(ObjsClsPaginas) + ' Timbre = New CFDITimbre + ' DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas + 'End Sub Public Sub New(UsuarioActual As Usuario, Optional Row As Data.DataRow = Nothing) Me.UsuarioActual = UsuarioActual Me.ErrorList = New List(Of String) @@ -3332,7 +3332,7 @@ Namespace Modelos importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal) * ValorMultiplicador) importeMX = importeMovimiento * tipoCambio * Multiplicador FechaMovimiento = ObjFactura.FechaPago - Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}" + Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, ClsPaginas.GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}" If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" 'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas @@ -3407,7 +3407,7 @@ Namespace Modelos importeMX = importeMovimiento * tipoCambio * Multiplicador FechaMovimiento = ObjFactura.FechaPago - Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}" + Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, ClsPaginas.GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}" If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" 'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas @@ -3463,7 +3463,7 @@ Namespace Modelos importeMovimiento = (TmpDTDetalle.SUM("Descuento", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador importeMX = importeMovimiento * tipoCambio * Multiplicador FechaMovimiento = ObjFactura.FechaPago - Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}" + Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, ClsPaginas.GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}" If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" 'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas @@ -7194,12 +7194,12 @@ Namespace Modelos Public Sub SetSubProyecto() If CveSubProyecto > 0 AndAlso UsuarioActual IsNot Nothing Then - SubProyecto = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")) + SubProyecto = New Modelos.SubProyectoModel(ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")) End If End Sub Public Sub SetSubProyectoMatriz() If UsuarioActual IsNot Nothing Then - Dim Row As Data.DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1") + Dim Row As Data.DataRow = ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1") If Not IsNothing(Row) Then SubProyectoMatriz = New Modelos.SubProyectoModel(Row) End If @@ -7236,7 +7236,7 @@ Namespace Modelos End Sub Public Sub SetMoneda() If CveMoneda > 0 Then - Dim dr As DataRow = ClsPaginas.GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda ={0}", CveMoneda)) + Dim dr As DataRow = ClsPaginas.GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda = {0}", CveMoneda)) If Not IsNothing(dr) Then Moneda = dr("Moneda").ToString() MonedaSAT = dr("AbreviaturaSAT").ToString() @@ -7245,37 +7245,23 @@ Namespace Modelos End If End Sub Public Sub SetMetodoPago() - If CveMetodoPago > 0 AndAlso Not IsNothing(ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))) Then - MetodoPago = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString() - ClaveMetodoPagoSAT = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString() - End If - End Sub - Public Sub SetMoneda(ObjClsPaginas As ClsPaginas) - If Not IsNothing(ObjClsPaginas) Then - Dim dr As DataRow = ClsPaginas.GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda ={0}", CveMoneda)) + If CveMetodoPago > 0 Then + Dim dr As DataRow = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago = {0}", CveMetodoPago)) If Not IsNothing(dr) Then - Moneda = dr("Moneda").ToString() - MonedaSAT = dr("AbreviaturaSAT").ToString() - MonedaAbreviatura = dr("Abreviatura").ToString() - End If - End If - End Sub - Public Sub SetMetodoPago(ObjClsPaginas As ClsPaginas) - If Not IsNothing(ObjClsPaginas) Then - If Not IsNothing(ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))) Then - MetodoPago = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString() - ClaveMetodoPagoSAT = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString() + MetodoPago = dr("MetodoPago").ToString() + ClaveMetodoPagoSAT = dr("ClaveSAT").ToString() End If End If End Sub + Public Sub SetSubProyecto(obj As ClsPaginas) If CveSubProyecto > 0 AndAlso Not IsNothing(obj) Then - SubProyecto = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1, CveEmpresa:=obj.UsuarioActual.CveEmpresa).FiltroPrimero($"CveSubProyecto = {CveSubProyecto}")) + SubProyecto = New Modelos.SubProyectoModel(ClsPaginas.GlobalDTSubProyectos(-1, CveEmpresa:=obj.UsuarioActual.CveEmpresa).FiltroPrimero($"CveSubProyecto = {CveSubProyecto}")) End If End Sub Public Sub SetSubProyectoMatriz(obj As ClsPaginas) If Not IsNothing(obj) Then - Dim Row As Data.DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=obj.UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1") + Dim Row As Data.DataRow = ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=obj.UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1") If Not IsNothing(Row) Then SubProyectoMatriz = New Modelos.SubProyectoModel(Row) End If @@ -7479,137 +7465,137 @@ Namespace Modelos End Property - Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable - Get + 'Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable + ' Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEmpresas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTEmpresas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTEmpresas = DirectCast(HttpContext.Current.Application("GlobalDTEmpresas"), DataTable) - End If - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTEmpresas") = value - End Set - End Property + ' If CveEmpresa <> -1 Then + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEmpresas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) + ' GlobalDTEmpresas = Dv.ToTable + ' Dv.Dispose() + ' Else + ' GlobalDTEmpresas = DirectCast(HttpContext.Current.Application("GlobalDTEmpresas"), DataTable) + ' End If + ' End Get + ' Set(ByVal value As DataTable) + ' HttpContext.Current.Application("GlobalDTEmpresas") = 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(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then - Dim P As New ClsSubProyectos - If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados - P.Dispose() + '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(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then + ' Dim P As New ClsSubProyectos + ' If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados + ' P.Dispose() - Dim msg As String = "aqui no se carga subproyectos" - If HttpContext.Current.Request IsNot Nothing Then - msg = msg & HttpContext.Current.Request.ServerVariables("URL") - End If - msg.GuardaLog() + ' Dim msg As String = "aqui no se carga subproyectos" + ' If HttpContext.Current.Request IsNot Nothing Then + ' msg = msg & HttpContext.Current.Request.ServerVariables("URL") + ' End If + ' msg.GuardaLog() - End If + ' 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) + ' 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(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) - GlobalDTSubProyectos = Dv.ToTable - Dv.Dispose() + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) + ' GlobalDTSubProyectos = Dv.ToTable + ' Dv.Dispose() - Else - GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) - End If + ' Else + ' GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + ' End If - End Get - Set(ByVal value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa) - HttpContext.Current.Application(AppNombre) = value - End Set - End Property + ' End Get + ' Set(ByVal value As DataTable) + ' Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa) + ' HttpContext.Current.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 + '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 HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") Is Nothing Then - Dim ObjSubProyectos As New ClsSubProyectos() - If ObjSubProyectos.GetSubProyectosUsuarios Then HttpContext.Current.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 HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") Is Nothing Then + ' Dim ObjSubProyectos As New ClsSubProyectos() + ' If ObjSubProyectos.GetSubProyectosUsuarios Then HttpContext.Current.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) + ' 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(HttpContext.Current.Application("GlobalDTSubProyectosUsuarios"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) - GlobalDTSubProyectosUsuarios = Dv.ToTable - Dv.Dispose() + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.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() + ' 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(HttpContext.Current.Application("GlobalDTSubProyectosUsuarios"), DataTable) - End If + ' Else + ' GlobalDTSubProyectosUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTSubProyectosUsuarios"), DataTable) + ' End If - End Get - Set(ByVal value As DataTable) - If value Is Nothing OrElse value.Rows.Count = 0 Then + ' End Get + ' Set(ByVal value As DataTable) + ' If value Is Nothing OrElse value.Rows.Count = 0 Then - End If - HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") = value - End Set - End Property - Property GlobalDTProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, CveEstatus As Integer) As DataTable - Get + ' End If + ' HttpContext.Current.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 HttpContext.Current.Application("GlobalDTProyectosUsuarios") Is Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable).Rows.Count = 0 Then - Dim ObjSubProyectos As New ClsSubProyectos() - If ObjSubProyectos.GetSubProyectosUsuarios Then HttpContext.Current.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 HttpContext.Current.Application("GlobalDTProyectosUsuarios") Is Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable).Rows.Count = 0 Then + ' Dim ObjSubProyectos As New ClsSubProyectos() + ' If ObjSubProyectos.GetSubProyectosUsuarios Then HttpContext.Current.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) + ' 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(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) - GlobalDTProyectosUsuarios = Dv.ToTable - Dv.Dispose() + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) + ' GlobalDTProyectosUsuarios = Dv.ToTable + ' Dv.Dispose() - Else - GlobalDTProyectosUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable) - End If + ' Else + ' GlobalDTProyectosUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable) + ' End If - End Get - Set(ByVal value As DataTable) - If value Is Nothing OrElse value.Rows.Count = 0 Then + ' End Get + ' Set(ByVal value As DataTable) + ' If value Is Nothing OrElse value.Rows.Count = 0 Then - End If - HttpContext.Current.Application("GlobalDTProyectosUsuarios") = value - End Set - End Property + ' End If + ' HttpContext.Current.Application("GlobalDTProyectosUsuarios") = 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 @@ -7626,133 +7612,6 @@ Namespace Modelos End Property - - 'Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable - ' Get - ' Dim AppNombre As String = String.Format("GlobalDTCliente-{0}", CveEmpresa) - ' 'sino existe, recarga los datos - ' If HttpContext.Current.Application(AppNombre) Is Nothing Then - ' Dim ObjClientes As New ClsClientes - ' If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados - ' ObjClientes.Dispose() - ' End If - - - ' If CveEmpresa <> -1 Then - - ' Dim StrSQL As New StringBuilder - ' StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) - ' If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus) - - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - ' GlobalDTCliente = Dv.ToTable - ' Dv.Dispose() - - ' Else - ' GlobalDTCliente = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' Dim AppNombre As String = String.Format("GlobalDTCliente-{0}", CveEmpresa) - ' HttpContext.Current.Application(AppNombre) = value - ' 'Dim ObjClientes As New ClsClientes - ' 'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then Application(AppNombre) = ObjClientes.DtResultados - ' 'ObjClientes.Dispose() - ' End Set - 'End Property - 'Property GlobalDTClienteClasificaciones(CveEmpresa As Integer) As DataTable - ' Get - ' Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones-{0}", CveEmpresa) - ' 'sino existe, recarga los datos - ' If HttpContext.Current.Application(AppNombre) Is Nothing Then - ' Dim ObjClientes As New ClsClientes - ' If ObjClientes.GetClienteClasificacion(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados - ' ObjClientes.Dispose() - ' End If - ' If CveEmpresa <> -1 Then - - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - ' GlobalDTClienteClasificaciones = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTClienteClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones-{0}", CveEmpresa) - ' HttpContext.Current.Application(AppNombre) = value - ' 'Dim ObjClientes As New ClsClientes - ' 'If ObjClientes.GetClienteClasificacion(CveEmpresa) Then Application(AppNombre) = ObjClientes.DtResultados - ' 'ObjClientes.Dispose() - ' End Set - 'End Property - - 'Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable - ' Get - ' Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) - ' 'sino existe, recarga los datos - ' If HttpContext.Current.Application(AppNombre) Is Nothing Then - ' Dim ObjUsr As New ClsInventarios - ' If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados - ' ObjUsr.Dispose() - ' End If - - ' Dim Str As New StringBuilder - ' Str.Append("1=1 AND ") - ' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa) - ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) - ' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus) - ' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen) - - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - ' GlobalDTAlmacen = Dv.ToTable - ' Dv.Dispose() - ' End Get - ' Set(value As DataTable) - ' Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) - ' HttpContext.Current.Application(AppNombre) = value - ' End Set - ' 'Get - - ' ' Dim Str As New StringBuilder - ' ' Str.Append("1=1 AND ") - ' ' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa) - ' ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) - ' ' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus) - ' ' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen) - - ' ' Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - ' ' GlobalDTAlmacen = Dv.ToTable - ' ' Dv.Dispose() - - ' 'End Get - ' 'Set(value As DataTable) - ' ' Application("GlobalDTAlmacen") = value - ' 'End Set - 'End Property - 'Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable - ' Get - ' Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa) - ' 'sino existe, recarga los datos - ' If HttpContext.Current.Application(AppNombre) Is Nothing Then - ' Dim ObjUsr As New ClsSisUsuarios - ' If ObjUsr.GetAlmacen(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados - ' ObjUsr.Dispose() - ' End If - ' Dim Str As New StringBuilder - ' Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa) - ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) - - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - ' GlobalDTAlmacenUsuarios = Dv.ToTable - ' Dv.Dispose() - ' End Get - ' Set(value As DataTable) - ' Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa) - ' HttpContext.Current.Application(AppNombre) = value - ' End Set - 'End Property - Public ReadOnly Property GlobalTipoCambioUltimaFluctuacion(Optional Fecha As Date = MinFecha) As ClsPaginas.MTipoCambioFluctuacion Get @@ -7790,47 +7649,6 @@ Namespace Modelos End Get End Property - -#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(HttpContext.Current.Application("GlobalDTContaPlantillasPolizas"), DataTable), Str.ToString.Substring(5), "", DataViewRowState.CurrentRows) - GlobalDTContaPlantillasPolizas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTContaPlantillasPolizas = DirectCast(HttpContext.Current.Application("GlobalDTContaPlantillasPolizas"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.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(HttpContext.Current.Application("GlobalDTContaPlantillasPolizasDetalle"), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "", DataViewRowState.CurrentRows) - GlobalDTContaPlantillasPolizasDetalle = Dv.ToTable - Dv.Dispose() - Else - GlobalDTContaPlantillasPolizasDetalle = DirectCast(HttpContext.Current.Application("GlobalDTContaPlantillasPolizasDetalle"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTContaPlantillasPolizasDetalle") = value - End Set - End Property - -#End Region - - Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1, Optional PorcentajeIVA As Double = -1) As DataTable diff --git a/Bancos/OtrosIE.aspx.vb b/Bancos/OtrosIE.aspx.vb index cb99507d6..09a79ba60 100644 --- a/Bancos/OtrosIE.aspx.vb +++ b/Bancos/OtrosIE.aspx.vb @@ -201,7 +201,7 @@ Partial Class Bancos_OtrosIE Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero - Dim DT As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros("", "Orden") + Dim DT As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden") Dim Cuenta As String = "" Dim IdCuenta As Integer = 0 Dim CodigoCuenta As String = "" diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb index cbfc816d9..25d3d9559 100644 --- a/Bancos/PolizaCheque.aspx.vb +++ b/Bancos/PolizaCheque.aspx.vb @@ -387,7 +387,7 @@ Partial Class Bancos_PolizaCheque Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero - Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden") + Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden") Dim Cuenta As String = "" Dim IdCuenta As Integer = 0 Dim CodigoCuenta As String = "" diff --git a/Bancos/RepEgresosSinComprobante.aspx.vb b/Bancos/RepEgresosSinComprobante.aspx.vb index d0fc990bf..411c89859 100644 --- a/Bancos/RepEgresosSinComprobante.aspx.vb +++ b/Bancos/RepEgresosSinComprobante.aspx.vb @@ -31,11 +31,11 @@ Partial Class Bancos_RepEgresosSinComprobante Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa, "Nombre") + DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre") DdlUsuarioResponsable.DataBind() If UsuarioActual.TienePermisoProceso(91) Then - DdlUsuarioRegistro.DataSource = GlobalDTUsuarios.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa), "Nombre") + DdlUsuarioRegistro.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre") DdlUsuarioRegistro.DataBind() DdlUsuarioRegistro.Items.Insert(0, New ListItem("Todos", "-1")) Else diff --git a/Bancos/RepProgramarRecursos.aspx.vb b/Bancos/RepProgramarRecursos.aspx.vb index 7e53e652a..f0720faa8 100644 --- a/Bancos/RepProgramarRecursos.aspx.vb +++ b/Bancos/RepProgramarRecursos.aspx.vb @@ -109,9 +109,9 @@ Partial Class Bancos_RepProgramarRecursos DdlProveedores.ddl.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlProveedores.ddl.DataBind() DdlProveedores.ddl.Items.Insert(0, New ListItem("Todos", "-1")) - End If - - DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) + End If + + DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa) DdlUsuarioResponsable.DataBind() DdlProveedoresClasificaciones.DataSource = GlobalDTProveedorClasificacion(UsuarioActual.CveEmpresa) @@ -644,14 +644,14 @@ Partial Class Bancos_RepProgramarRecursos CargaUsuariosProgramaron() UPPFiltros.Update() - Dim ObjUsuarios As New ClsSisUsuarios - If ObjUsuarios.GetUsuariosEmpresas(-1) Then - Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados - Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados.FiltraParametros("ProveedoresResponsables > 0") - Else - Application("GlobalDTUsuarios") = Nothing - End If - ObjUsuarios.Dispose() + 'Dim ObjUsuarios As New ClsSisUsuarios + 'If ObjUsuarios.GetUsuariosEmpresas(-1, -1) Then + ' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados + ' Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados.FiltraParametros("ProveedoresResponsables > 0") + 'Else + ' Application("GlobalDTUsuarios") = Nothing + 'End If + 'ObjUsuarios.Dispose() End Sub Private Sub EnviaCorreoNotificacion() If UsuarioActual.CveEmpresa.Contiene(13, 83) Then diff --git a/Bancos/RepProveedoresPagos.aspx.vb b/Bancos/RepProveedoresPagos.aspx.vb index 14f731d5c..b4494650f 100644 --- a/Bancos/RepProveedoresPagos.aspx.vb +++ b/Bancos/RepProveedoresPagos.aspx.vb @@ -42,7 +42,7 @@ Partial Class Bancos_RepProveedoresPagos DdlProveedores.SelectedValue = "-1" - DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa), "Nombre") + DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre") DdlUsuarioResponsable.DataBind() DdlProveedoresClasificaciones.DataSource = GlobalDTProveedorClasificacion(UsuarioActual.CveEmpresa) diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index 55f0f7705..0e422a31f 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -5147,11 +5147,12 @@ Partial Class Compras_Proveedores objUsuario.Dispose() End Sub Public Sub CargaGlobal() - Dim ObjUsuarios As New ClsSisUsuarios - If ObjUsuarios.GetUsuariosEmpresas(-1) Then - Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados - End If - ObjUsuarios.Dispose() + 'Dim ObjUsuarios As New ClsSisUsuarios + 'If ObjUsuarios.GetUsuariosEmpresas(-1) Then + ' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados + 'End If + 'ObjUsuarios.Dispose() + GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing End Sub Protected Sub GvUsuarios_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvUsuarios.RowDataBound diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 07fcbdc6d..eab095e7d 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -751,7 +751,7 @@ Partial Class Compras_eFacturas Ejecutable = "C:\Proyectos\wwwSIG\Utilerias\ADSUtilerias.exe" Form.DefaultButton = BtnConsultar.UniqueID - DdlResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) + DdlResponsable.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa) DdlResponsable.DataBind() DdlResponsable.Items.Insert(0, New ListItem("Todos", "-1")) diff --git a/Global.asax b/Global.asax index 4590b7858..382eb57a2 100644 --- a/Global.asax +++ b/Global.asax @@ -220,11 +220,11 @@ 'C O N T A B I L I D A D - P L A N T I L L A S - Using ObjContabilidad As New ClsContabilidad - If ObjContabilidad.GetConta_PlantillasPolizas(-1, -1) Then Application("GlobalDTContaPlantillasPolizas") = ObjContabilidad.DtResultados Else Application("GlobalDTContaPlantillasPolizas") = Nothing - 'If ObjContabilidad.GetConta_ConceptosContables() Then Application("GlobalDTContaConceptosContables") = ObjContabilidad.DtResultados Else Application("GlobalDTContaConceptosContables") = Nothing - If ObjContabilidad.GetConta_PlantillasPolizasDetalle(-1, -1) Then Application("GlobalDTContaPlantillasPolizasDetalle") = ObjContabilidad.DtResultados Else Application("GlobalDTContaPlantillasPolizasDetalle") = Nothing - End Using + 'Using ObjContabilidad As New ClsContabilidad + 'If ObjContabilidad.GetConta_PlantillasPolizas(-1, -1) Then Application("GlobalDTContaPlantillasPolizas") = ObjContabilidad.DtResultados Else Application("GlobalDTContaPlantillasPolizas") = Nothing + 'If ObjContabilidad.GetConta_ConceptosContables() Then Application("GlobalDTContaConceptosContables") = ObjContabilidad.DtResultados Else Application("GlobalDTContaConceptosContables") = Nothing + 'If ObjContabilidad.GetConta_PlantillasPolizasDetalle(-1, -1) Then Application("GlobalDTContaPlantillasPolizasDetalle") = ObjContabilidad.DtResultados Else Application("GlobalDTContaPlantillasPolizasDetalle") = Nothing + 'End Using GuardaLogAsax(String.Format("Globalasax 15:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ @@ -536,16 +536,16 @@ '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'U S U A R I O S - Using ObjUsuarios As New ClsSisUsuarios - If ObjUsuarios.GetUsuariosEmpresas(-1) Then - Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados - Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados - Else - Application("GlobalDTUsuarios") = Nothing - End If - 'If ObjUsuarios.GetAlmacen(-1) Then Application("GlobalDTAlmacenUsuarios") = ObjUsuarios.DtResultados Else Application("GlobalDTAlmacenUsuarios") = Nothing - End Using - GuardaLogAsax(String.Format("Globalasax 36:{0}", DateTime.Now)) + 'Using ObjUsuarios As New ClsSisUsuarios + ' If ObjUsuarios.GetUsuariosEmpresas(-1, -1) Then + ' 'Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados + ' Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados + ' Else + ' Application("GlobalDTUsuarios") = Nothing + ' End If + ' 'If ObjUsuarios.GetAlmacen(-1) Then Application("GlobalDTAlmacenUsuarios") = ObjUsuarios.DtResultados Else Application("GlobalDTAlmacenUsuarios") = Nothing + 'End Using + 'GuardaLogAsax(String.Format("Globalasax 36:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'R O L E S @@ -576,22 +576,22 @@ '----------------------------------------------------------------------------------7-------------------------------------------------------------------------------------------- 'E M P R E S A S - Using ObjEmpresas As New ClsSisEmpresas() - If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1") Then - Application("GlobalDTEmpresas") = ObjEmpresas.DtResultados - 'verifico si existe la carpeta de la empresa, sino la crea - For Each dr As Data.DataRow In ObjEmpresas.DtResultados.Rows - Dim Ruta As String = String.Format("{0}Empresas\{1}", ModExtensiones.DirectorioBaseEmpresas, dr("CveEmpresa")) - If Not IO.Directory.Exists(Ruta) Then IO.Directory.CreateDirectory(Ruta) - If Not System.IO.Directory.Exists(String.Format("{0}\XML\", Ruta)) Then System.IO.Directory.CreateDirectory(String.Format("{0}\XML\", Ruta)) - If Not System.IO.Directory.Exists(String.Format("{0}\PDF\", Ruta)) Then System.IO.Directory.CreateDirectory(String.Format("{0}\PDF\", Ruta)) + 'Using ObjEmpresas As New ClsSisEmpresas() + ' If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1") Then + ' Application("GlobalDTEmpresas") = ObjEmpresas.DtResultados + ' 'verifico si existe la carpeta de la empresa, sino la crea + ' For Each dr As Data.DataRow In ObjEmpresas.DtResultados.Rows + ' Dim Ruta As String = String.Format("{0}Empresas\{1}", ModExtensiones.DirectorioBaseEmpresas, dr("CveEmpresa")) + ' If Not IO.Directory.Exists(Ruta) Then IO.Directory.CreateDirectory(Ruta) + ' If Not System.IO.Directory.Exists(String.Format("{0}\XML\", Ruta)) Then System.IO.Directory.CreateDirectory(String.Format("{0}\XML\", Ruta)) + ' If Not System.IO.Directory.Exists(String.Format("{0}\PDF\", Ruta)) Then System.IO.Directory.CreateDirectory(String.Format("{0}\PDF\", Ruta)) - Next - Else - Application("GlobalDTEmpresas") = Nothing - End If - End Using - GuardaLogAsax(String.Format("Globalasax 40:{0}", DateTime.Now)) + ' Next + ' Else + ' Application("GlobalDTEmpresas") = Nothing + ' End If + 'End Using + 'GuardaLogAsax(String.Format("Globalasax 40:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/LogIn.aspx.vb b/LogIn.aspx.vb index ac31e4b1a..3a46151ae 100644 --- a/LogIn.aspx.vb +++ b/LogIn.aspx.vb @@ -252,7 +252,7 @@ Partial Class LogIn 'PLATAFORMA SIG CType(Session("UsuarioSIG"), Usuario).CvePlataforma = 1 Using ObjUsuarios As New ClsSisUsuarios - If ObjUsuarios.GetUsuariosEmpresas(Usuario.CveUsuario) Then + If ObjUsuarios.GetUsuariosEmpresas(Usuario.CveUsuario, Usuario.CveEmpresa) Then Dim dt As Data.DataTable = ObjUsuarios.DtResultados If dt IsNot Nothing Then If dt.Rows.Count >= 1 Then diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index f23ebb96f..48c102697 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1104,10 +1104,8 @@
    - CFDI Versión 3.3 + CFDI Versión
    - -
    diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index c3e1a8dfe..ea4ab93ab 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -875,7 +875,7 @@ Partial Class Clientes End If 'CargaCuentasyConceptos() - If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso UsuarioActual.TienePermisoProceso(353) Then DVLnkCambiarVendedor.Visible = True End If @@ -6505,11 +6505,12 @@ Partial Class Clientes End Sub Public Sub CargaGlobal() - Dim ObjUsuarios As New ClsSisUsuarios - If ObjUsuarios.GetUsuariosEmpresas(-1) Then - Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados - End If - ObjUsuarios.Dispose() + GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing + 'Dim ObjUsuarios As New ClsSisUsuarios + 'If ObjUsuarios.GetUsuariosEmpresas(-1) Then + ' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados + 'End If + 'ObjUsuarios.Dispose() End Sub Protected Sub GvUsuarios_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvUsuarios.RowDataBound From 78e8f1637cc5ccb6da04992f52405288ac3d0e15 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 1 Feb 2023 00:00:59 -0700 Subject: [PATCH 076/103] -- globalDtUsuarios --- Ashx/E48.ashx | 2 +- asmx/WSSIGApp.asmx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Ashx/E48.ashx b/Ashx/E48.ashx index 385fd6efe..81952afa9 100644 --- a/Ashx/E48.ashx +++ b/Ashx/E48.ashx @@ -78,7 +78,7 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState Dim IDPoliza As Integer = 0 Dim usuario As String = JsonRequest("usuario").ToString() - If ObjUsuarios.GetUsuariosEmpresas(-1) Then + If ObjUsuarios.GetUsuariosEmpresas(-1, -1) Then CveUsuario = ObjUsuarios.DtResultados.FiltroPrimeroValor("CveUsuario", String.Format("Usuario = '{0}' ", usuario)).ToEntero If CveUsuario > 0 Then UsuarioActual = ValidaUsuarioSistema(CveUsuario, CveEmpresa) diff --git a/asmx/WSSIGApp.asmx b/asmx/WSSIGApp.asmx index dc6ef1427..b13093bdd 100644 --- a/asmx/WSSIGApp.asmx +++ b/asmx/WSSIGApp.asmx @@ -511,7 +511,7 @@ Public Class WSSIGApp ' End If 'End If - If ObjUsuarios.GetUsuariosEmpresas(Salida.CveUsuario) Then + If ObjUsuarios.GetUsuariosEmpresas(Salida.CveUsuario, Salida.CveEmpresa) Then For Each Row As DataRow In ObjUsuarios.DtResultados.FiltraParametros("", "", {"CveEmpresa", "CveEncuestaCRM", "Empresa", "Tipo_CentroCosto"}).Rows Empresas.Add(New WsEmpresa With { .CveEmpresa = Row("CveEmpresa").ToString.ToEntero(), @@ -572,7 +572,7 @@ Public Class WSSIGApp Next End If Salida.Modulos = UsuariosModulos - If tUsuario.GetUsuariosEmpresas(Salida.CveUsuario) Then + If tUsuario.GetUsuariosEmpresas(Salida.CveUsuario, Salida.CveEmpresa) Then For Each Row As DataRow In tUsuario.DtResultados.Rows Empresas.Add(New WsEmpresa With {.CveEmpresa = Row("CveEmpresa").ToString.ToEntero, .Empresa = Row("Empresa").ToString}) Next From d3cf589cbe8939c236ad1c7adf801775d6a31055 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 1 Feb 2023 00:19:32 -0700 Subject: [PATCH 077/103] - cvesubproyecto en concepto de bancos --- Bancos/DepositosCaja.aspx.vb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index f651eac3c..78e3472d1 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -267,6 +267,16 @@ Partial Class Bancos_DepositosCaja FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco) End If + If CveSubProyecto <= 0 Then 'sino se seleccionó del combo, busca en el listado el primero + + For Each Gvr As GridViewRow In GvFacturas.Rows + If Gvr.FCCheckBox("ChkFactura").Checked Then + CveSubProyecto = Gvr.DataKey("CveSubProyecto").ToEntero + Exit For + End If + Next + End If + If FolioIE <= 0 Then OcurrioError = True End If From ebd8267ac33d21a8dca76158e10640520cb18f2f Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 1 Feb 2023 00:19:45 -0700 Subject: [PATCH 078/103] -- GlobalDT --- Contabilidad/RegPrePoliza.aspx.vb | 4 ++-- Contabilidad/RegPrePolizaS.aspx.vb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index 88ea2a459..c39b56c1a 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -825,7 +825,7 @@ Partial Class ContabilidadC_RegPrePoliza Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero() - Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden") + Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden") Dim Cuenta As String = "" Dim IdCuenta As Integer = 0 Dim CodigoCuenta As String = "" @@ -2108,7 +2108,7 @@ Partial Class ContabilidadC_RegPrePoliza Dim worksheet = workbook.Worksheets.Add(DdlPlantilla2.SelectedItem.Text.Substring(1, 30)) Dim CvePlantilla As Integer = DdlPlantilla2.SelectedValue.ToEntero() - Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden") + Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden") Dim DtExcel As DataTable = (From row As DataRow In Dt.Rows Select New With diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 0edfc89d0..d8eee866b 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -808,7 +808,7 @@ Partial Class ContabilidadC_RegPrePolizaS Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero - Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden") + Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden") 'Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla, UsuarioActual.CveEmpresa) Dim Cuenta As String = "" @@ -2314,7 +2314,7 @@ Partial Class ContabilidadC_RegPrePolizaS Dim CvePlantilla As Integer = DdlPlantilla2.SelectedValue.ToEntero 'Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla, UsuarioActual.CveEmpresa) - Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden") + Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden") Dim DtExcel As DataTable = (From row As DataRow In Dt.Rows From 2a16eb2d68f6169a48e947ca140e8cb74954dead Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 1 Feb 2023 01:04:12 -0700 Subject: [PATCH 079/103] -- cambio en GlobalDT --- App_Code/ClsPaginas.vb | 2 +- Ashx/SIGFacturacion.ashx | 2851 +-------------------------- Compras/CatProveedores.aspx.vb | 2 +- Compras/RepCompras.aspx.vb | 2 +- Compras/RepComprasDetalle.aspx.vb | 2 +- Sistemas/PopUpCambiaUsuario.aspx.vb | 8 +- 6 files changed, 22 insertions(+), 2845 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 1f6e176e5..93713d476 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1706,7 +1706,7 @@ Public Class ClsPaginas ' 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, Optional Estatus As Integer = -1, Optional Codigo As String = "-1") As DataTable + Public Shared ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1, Optional Estatus As Integer = -1, Optional Codigo As String = "-1") As DataTable Get Dim ObjPS As New ClsProductosServicios diff --git a/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx index 590b27b3c..3ad28d89c 100644 --- a/Ashx/SIGFacturacion.ashx +++ b/Ashx/SIGFacturacion.ashx @@ -168,7 +168,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState If DTRemisionesPS IsNot Nothing AndAlso DTRemisionesPS.Rows.Count > 0 Then Dim Resp As New Modelos.Factura.MMensajeFactura - Dim CveSubProyectoMatriz As Integer = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero() + Dim CveSubProyectoMatriz As Integer = ClsPaginas.GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero() Dim ObjFactura = CreaFactura(Resp, UsuarioActual, DTRemisionesPS, RowCliente("CveCliente").ToString().ToEntero(), CveSubProyectoMatriz, 1, DatosRemisiones, FechaI, FechaF) @@ -310,8 +310,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState ObjFactura.TipoCambio = 1 ObjFactura.ConvertirPesos = False ObjFactura.CveMoneda = CveMoneda - ObjFactura.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", String.Format("CveMoneda = {0} ", CveMoneda)) - ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", CveMoneda)) + ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", String.Format("CveMoneda = {0} ", CveMoneda)) + ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", CveMoneda)) ObjFactura.TipoDocto = "Ing" ObjFactura.RefDocto = "" 'ObjFactura.CveMesa = -1 @@ -339,8 +339,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState ObjFactura.CveSubProyecto = CveSubProyecto ObjFactura.CveSubProyectoCobranza = CveSubProyecto ObjFactura.CveSubProyectoEjecucion = CveSubProyecto - ObjFactura.SubProyecto = New SubProyectoModel(GlobalDTSubProyectos(-1).FiltroPrimero(String.Format("CveSubProyecto = {0}", CveSubProyecto))) - ObjFactura.SubProyectoMatriz = New SubProyectoModel(GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1")) + ObjFactura.SubProyecto = New SubProyectoModel(ClsPaginas.GlobalDTSubProyectos(-1).FiltroPrimero(String.Format("CveSubProyecto = {0}", CveSubProyecto))) + ObjFactura.SubProyectoMatriz = New SubProyectoModel(ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1")) 'CLIENTE ObjFactura.CveCliente = CveCliente @@ -351,16 +351,16 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then If ObjCliente.DtResultados.Rows.Count > 0 Then ObjFactura.CveFormaPago33 = ObjCliente.CveFormaPago33 - ObjFactura.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33)) - ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33)) + ObjFactura.FormaPago33 = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33)) + ObjFactura.FormaPagoSAT33 = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33)) ObjFactura.CveMetodoPago33 = ObjCliente.CveMetodoPago33 - ObjFactura.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)) - ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)) + ObjFactura.MetodoPago33 = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)) + ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)) ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI - ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI)) - ObjFactura.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI)) + ObjFactura.UsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI)) + ObjFactura.ClaveUsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI)) 'ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago @@ -668,7 +668,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Dim DrPS As DataRow = Nothing - DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1 + DrPS = ClsPaginas.GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1 If DrPS Is Nothing Then Retorno.Mensajes.Add("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.") @@ -705,7 +705,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Dim Row As DataRow = Nothing Dim TotalCalculableImpuestos As Decimal = 0 PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos - Dim DrSubProyecto As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto).Rows(0) + Dim DrSubProyecto As DataRow = ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto).Rows(0) Row = TmpDT.NewRow() Row("CveProyecto") = DrSubProyecto("CveProyecto").ToString().ToEntero() @@ -951,7 +951,6 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState ArchivoW.Dispose() End Sub -#Region "G L O B A L - D T" Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double Get If GlobalTipoCambio <= 0 Then @@ -1000,2832 +999,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState End Set End Property - 'Property GlobalValidarCFDI As Boolean - ' Get - ' GlobalValidarCFDI = CBool(HttpContext.Current.Application("GlobalValidarCFDI")) - ' End Get - ' Set(value As Boolean) - ' HttpContext.Current.Application("GlobalValidarCFDI") = value - ' End Set - 'End Property - Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1) As DataTable - Get - Dim Str As New StringBuilder - 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(HttpContext.Current.Application("GlobalDTUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTUsuarios = Dv.ToTable - Dv.Dispose() - Else - GlobalDTUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTUsuarios"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTUsuarios") = value - End Set - End Property - Property GlobalDTNomConceptos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTNomConceptos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTNomConceptos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTNomConceptos = DirectCast(HttpContext.Current.Application("GlobalDTNomConceptos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTNomConceptos") = value - End Set - End Property - Property GlobalDTTiposGastos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTiposGastos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTiposGastos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTiposGastos = DirectCast(HttpContext.Current.Application("GlobalDTTiposGastos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTiposGastos") = value - End Set - End Property - Property GlobalDTMFActividad(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveActividad As Integer = -1) As DataTable - Get - - Dim dt As DataTable = Nothing - Dim ObjMF As New ClsMF - - If ObjMF.GetActividad(CveActividad, CveEmpresa, Estatus) Then - dt = ObjMF.DtResultados - End If - - ObjMF.Dispose() - GlobalDTMFActividad = dt - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTActividad") = value - End Set - End Property - Property GlobalDTMFOperador(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveOperador As Integer = -1) As DataTable - Get - - Dim dt As DataTable = Nothing - Dim ObjMF As New ClsMF - - If ObjMF.GetOperador(CveOperador, CveEmpresa, Estatus) Then - dt = ObjMF.DtResultados - End If - - ObjMF.Dispose() - GlobalDTMFOperador = dt - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOperador") = value - End Set - End Property - Property GlobalDTMFEstatus(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable - Get - - Dim dt As DataTable = Nothing - Dim ObjMF As New ClsMF - - If ObjMF.GetEstatus(CveEstatus, Estatus, CveEmpresa) Then - dt = ObjMF.DtResultados - End If - - ObjMF.Dispose() - GlobalDTMFEstatus = dt - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstatus") = value - End Set - End Property - Property DtFacturaDefault() As DataTable - Get - DtFacturaDefault = DirectCast(HttpContext.Current.Application("DtFacturaDefault"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("DtFacturaDefault") = value - End Set - End Property - Property Directorio() As String - Get - Directorio = DirectCast(HttpContext.Current.Application("Directorio"), String) - End Get - Set(value As String) - HttpContext.Current.Application("Directorio") = value - End Set - End Property - Property GlobalDTPSATPS() As DataTable - Get - GlobalDTPSATPS = DirectCast(HttpContext.Current.Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow)).CopyToDataTable - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPSATPS") = value - End Set - End Property - -#Region "GLOBALES DE SAT COMERCIO EXTERIOR" - - Property GlobalDTClavePedimento() As DataTable - Get - GlobalDTClavePedimento = DirectCast(HttpContext.Current.Application("GlobalDTClavePedimento"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTClavePedimento") = value - End Set - End Property - - Property GlobalDTFraccionArancelaria() As DataTable - Get - GlobalDTFraccionArancelaria = DirectCast(HttpContext.Current.Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow)).CopyToDataTable - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTFraccionArancelaria") = value - End Set - End Property - - Property GlobalDTIncoterm() As DataTable - Get - GlobalDTIncoterm = DirectCast(HttpContext.Current.Application("GlobalDTIncoterm"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTIncoterm") = value - End Set - End Property - - Property GlobalDTTipoOperacion() As DataTable - Get - GlobalDTTipoOperacion = DirectCast(HttpContext.Current.Application("GlobalDTTipoOperacion"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoOperacion") = value - End Set - End Property - - Property GlobalDTSATMotivoTraslado() As DataTable - Get - GlobalDTSATMotivoTraslado = DirectCast(HttpContext.Current.Application("GlobalDTSATMotivoTraslado"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSATMotivoTraslado") = value - End Set - End Property - - Property GlobalDTUnidadAduana() As DataTable - Get - GlobalDTUnidadAduana = DirectCast(HttpContext.Current.Application("GlobalDTUnidadAduana"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTUnidadAduana") = value - End Set - End Property - - Property GlobalDTPais() As DataTable - Get - GlobalDTPais = DirectCast(HttpContext.Current.Application("GlobalDTPais"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPais") = value - End Set - End Property - - Property GlobalDTEstado(ClaveSATPais As String) As DataTable - Get - If ClaveSATPais <> "-1" Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEstado"), DataTable), String.Format("ClaveSATPais = '{0}'", ClaveSATPais), "", DataViewRowState.CurrentRows) - GlobalDTEstado = Dv.ToTable - Dv.Dispose() - Else - GlobalDTEstado = DirectCast(HttpContext.Current.Application("GlobalDTEstado"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstado") = value - End Set - End Property - - Property GlobalDTMunicipio(ClaveSATEstado As String) As DataTable - Get - If ClaveSATEstado <> "-1" Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTMunicipio"), DataTable), String.Format("ClaveSATEstado = '{0}'", ClaveSATEstado), "", DataViewRowState.CurrentRows) - GlobalDTMunicipio = Dv.ToTable - Dv.Dispose() - Else - GlobalDTMunicipio = DirectCast(HttpContext.Current.Application("GlobalDTMunicipio"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMunicipio") = value - End Set - End Property - - Property GlobalDTColonia(ClaveSATMunicipio As String) As DataTable - Get - If ClaveSATMunicipio <> "-1" Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTColonia"), DataTable), String.Format("ClaveSATMunicipio = '{0}'", ClaveSATMunicipio), "", DataViewRowState.CurrentRows) - GlobalDTColonia = Dv.ToTable - Dv.Dispose() - Else - GlobalDTColonia = DirectCast(HttpContext.Current.Application("GlobalDTColonia"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTColonia") = value - End Set - End Property - -#End Region - - Property GlobalDTPSATUM() As DataTable - Get - GlobalDTPSATUM = DirectCast(HttpContext.Current.Application("GlobalDTPSATUM"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPSATUM") = value - End Set - End Property - Property GlobalDTNomConceptosFunciones() As DataTable - Get - GlobalDTNomConceptosFunciones = DirectCast(HttpContext.Current.Application("GlobalDTNomConceptosFunciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTNomConceptosFunciones") = value - End Set - End Property - Property GlobalDTUsuarioResponsable() As DataTable - Get - GlobalDTUsuarioResponsable = DirectCast(HttpContext.Current.Application("GlobalDTUsuarioResponsable"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTUsuarioResponsable") = value - End Set - End Property - Property GlobalDTProveedoresCuentas(CveProveedor As Integer, Estatus As Boolean) As DataTable - Get - GlobalDTProveedoresCuentas = DirectCast(HttpContext.Current.Application("GlobalDTProveedoresCuentas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProveedoresCuentas") = value - End Set - End Property - Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProveedorClasificacion"), DataTable), String.Format("CveEmpresa ={0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProveedorClasificacion = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProveedorClasificacion = DirectCast(HttpContext.Current.Application("GlobalDTProveedorClasificacion"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProveedorClasificacion") = value - End Set - End Property - Property GlobalDTProveedorSucursales(CveProveedor As Integer) As DataTable - Get - If CveProveedor <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProveedorSucursales"), DataTable), String.Format("CveProveedor = {0}", CveProveedor), "", DataViewRowState.CurrentRows) - GlobalDTProveedorSucursales = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProveedorSucursales = DirectCast(HttpContext.Current.Application("GlobalDTProveedorSucursales"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProveedorSucursales") = value - End Set - End Property - Property GlobalDTRoles(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTRoles"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTRoles = Dv.ToTable - Dv.Dispose() - Else - GlobalDTRoles = DirectCast(HttpContext.Current.Application("GlobalDTRoles"), DataTable) - End If - - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTRoles") = value - End Set - End Property - Property GlobalDTNomSatBancos() As DataTable - Get - GlobalDTNomSatBancos = DirectCast(HttpContext.Current.Application("GlobalDTNomSatBancos"), DataTable) - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTNomSatBancos") = value - End Set - End Property - Property GlobalDTNomSatConceptos() As DataTable - Get - GlobalDTNomSatConceptos = DirectCast(HttpContext.Current.Application("GlobalDTNomSatConceptos"), DataTable) - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTNomSatConceptos") = value - End Set - End Property - Property GlobalDTNomSatRegimenContratacion() As DataTable - Get - GlobalDTNomSatRegimenContratacion = DirectCast(HttpContext.Current.Application("GlobalDTNomSatRegimenContratacion"), DataTable) - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTNomSatRegimenContratacion") = value - End Set - End Property - Property GlobalDTNomSatRiesgoPuesto() As DataTable - Get - GlobalDTNomSatRiesgoPuesto = DirectCast(HttpContext.Current.Application("GlobalDTNomSatRiesgoPuesto"), DataTable) - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTNomSatRiesgoPuesto") = value - End Set - End Property - Property GlobalDTNomSatTipoIncapacidad() As DataTable - Get - GlobalDTNomSatTipoIncapacidad = DirectCast(HttpContext.Current.Application("GlobalDTNomSatTipoIncapacidad"), DataTable) - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTNomSatTipoIncapacidad") = value - End Set - End Property - Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable - Get - - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEmpresas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTEmpresas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTEmpresas = DirectCast(HttpContext.Current.Application("GlobalDTEmpresas"), DataTable) - End If - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTEmpresas") = value - End Set - End Property - Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1) 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) - If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificaciones"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) - GlobalDTClasificaciones = Dv.ToTable - Dv.Dispose() - Else - GlobalDTClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTClasificaciones"), DataTable) - End If - - - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTClasificaciones") = value - End Set - End Property - Property GlobalDTClasificaciones2(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Str As New StringBuilder - Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificaciones2"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) - GlobalDTClasificaciones2 = Dv.ToTable - Dv.Dispose() - Else - GlobalDTClasificaciones2 = DirectCast(HttpContext.Current.Application("GlobalDTClasificaciones2"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTClasificaciones2") = value - End Set - End Property - Property GlobalDTClasificacionesSubProyectos(Optional CveClasificacion As Integer = -1, Optional CveEmpresa As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Str As New StringBuilder - Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) - GlobalDTClasificacionesSubProyectos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTClasificacionesSubProyectos = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto") = value - End Set - End Property - Property GlobalDTACClasificadorObjetoGasto(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Str As New StringBuilder - Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) - GlobalDTACClasificadorObjetoGasto = Dv.ToTable - Dv.Dispose() - Else - GlobalDTACClasificadorObjetoGasto = DirectCast(HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto") = value - End Set - End Property - Property GlobalDTClasificacionesDetalle(Optional CveEmpresa As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Str As New StringBuilder - Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesDetalle"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) - GlobalDTClasificacionesDetalle = Dv.ToTable - Dv.Dispose() - Else - GlobalDTClasificacionesDetalle = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesDetalle"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTClasificacionesDetalle") = value - End Set - End Property - Property GlobalDTSubFamilias(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Str As New StringBuilder - Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubFamilias"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) - GlobalDTSubFamilias = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTSubFamilias = DirectCast(HttpContext.Current.Application("GlobalDTSubFamilias"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSubFamilias") = value - End Set - End Property - Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTFamilias"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTFamilias = Dv.ToTable - Dv.Dispose() - Else - GlobalDTFamilias = DirectCast(HttpContext.Current.Application("GlobalDTFamilias"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTFamilias") = value - End Set - End Property - Property GlobalDTClasificacionesPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTClasificacionesPresupuestos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTClasificacionesPresupuestos = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos") = value - End Set - End Property - Property GlobalDTMetodosPago() As DataTable - Get - GlobalDTMetodosPago = DirectCast(HttpContext.Current.Application("GlobalDTMetodosPago"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMetodosPago") = value - End Set - End Property - Property GlobalDTModulos() As DataTable - Get - GlobalDTModulos = DirectCast(HttpContext.Current.Application("GlobalDTModulos"), DataTable) - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTModulos") = value - End Set - End Property - Property GlobalDTMonedas() As DataTable - Get - GlobalDTMonedas = DirectCast(HttpContext.Current.Application("GlobalDTMonedas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMonedas") = value - End Set - End Property - Property GlobalDTMonedasAlias() As DataTable - Get - GlobalDTMonedasAlias = DirectCast(HttpContext.Current.Application("GlobalDTMonedasAlias"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMonedasAlias") = value - End Set - End Property - Property GlobalDTSucursales(Optional CveEmpresa As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSucursales"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " Sucursal", DataViewRowState.CurrentRows) - GlobalDTSucursales = Dv.ToTable - Dv.Dispose() - Else - GlobalDTSucursales = DirectCast(HttpContext.Current.Application("GlobalDTSucursales"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSucursales") = value - End Set - End Property - Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1) As DataTable - Get - If EsPersonaFisica <> -1 Then - Dim Tipo As String = "" - If EsPersonaFisica = 1 Then Tipo = "AplicaPersonaFisica = 1" Else Tipo = "AplicaPersonaMoral = 1" - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSATUsosCFDI"), DataTable), Tipo, " UsoCFDIDescripcion", DataViewRowState.CurrentRows) - GlobalDTSATUsosCFDI = Dv.ToTable - Dv.Dispose() - Else - GlobalDTSATUsosCFDI = DirectCast(HttpContext.Current.Application("GlobalDTSATUsosCFDI"), DataTable) - End If - - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTSATUsosCFDI") = value - End Set - End Property - 'Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedida"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows) - ' GlobalDTUnidadesMedida = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTUnidadesMedida = DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedida"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTUnidadesMedida") = value - ' End Set - 'End Property - 'Property GlobalDTUnidadesMedidaAlias(Optional CveEmpresa As Integer = -1) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - ' GlobalDTUnidadesMedidaAlias = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTUnidadesMedidaAlias = DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias") = value - ' End Set - 'End Property - Property GlobalDTEstatusOrdenCompra() As DataTable - Get - GlobalDTEstatusOrdenCompra = DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenCompra"), DataTable) - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTEstatusOrdenCompra") = value - End Set - End Property - Property GlobalDTLeyendasFiscales() As DataTable - Get - GlobalDTLeyendasFiscales = DirectCast(HttpContext.Current.Application("GlobalDTLeyendasFiscales"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTLeyendasFiscales") = value - End Set - End Property - - Property GlobalDTEstatusFactura() As DataTable - Get - GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTEstatusFactura"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstatusFactura") = value - End Set - End Property - Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable - Get - - If DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable).Rows.Count = 0) Then - Dim P As New ClsProyectos - If P.GetProyectos(-1) Then - HttpContext.Current.Application("GlobalDTProyectos") = P.DtResultados - End If - P.Dispose() - - End If - - If CveEmpresa <> -1 OrElse Estatus <> -1 Then 'OrElse CveProyecto <> -1 - - Dim StrSQL As New StringBuilder - If CveEmpresa <> -1 Then StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) - ' If CveProyecto <> -1 Then StrSQL.AppendFormat(" {0} CveProyecto = {1}", If(StrSQL.Length > 0, "AND", ""), CveProyecto) - If Estatus <> -1 Then StrSQL.AppendFormat(" {0} CveEstatus = {1}", If(StrSQL.Length > 0, "AND", ""), Estatus) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProyectos = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProyectos = DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) - End If - - End Get - Set(ByVal value As DataTable) - If value Is Nothing OrElse value.Rows.Count = 0 Then - - End If - HttpContext.Current.Application("GlobalDTProyectos") = value - End Set - End Property - Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable - Get - Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa) - 'sino existe, recarga los datos - If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then - Dim P As New ClsSubProyectos - If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados - P.Dispose() - - 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(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) - GlobalDTSubProyectos = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) - End If - - End Get - Set(ByVal value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa) - HttpContext.Current.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 HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") Is Nothing Then - Dim ObjSubProyectos As New ClsSubProyectos() - If ObjSubProyectos.GetSubProyectosUsuarios Then HttpContext.Current.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(HttpContext.Current.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(HttpContext.Current.Application("GlobalDTSubProyectosUsuarios"), DataTable) - End If - - End Get - Set(ByVal value As DataTable) - If value Is Nothing OrElse value.Rows.Count = 0 Then - - - End If - HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") = value - End Set - End Property - Property GlobalDTProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, CveEstatus As Integer) As DataTable - Get - - If HttpContext.Current.Application("GlobalDTProyectosUsuarios") Is Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable).Rows.Count = 0 Then - Dim ObjSubProyectos As New ClsSubProyectos() - If ObjSubProyectos.GetSubProyectosUsuarios Then HttpContext.Current.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(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) - GlobalDTProyectosUsuarios = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProyectosUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable) - End If - - End Get - Set(ByVal value As DataTable) - If value Is Nothing OrElse value.Rows.Count = 0 Then - - End If - HttpContext.Current.Application("GlobalDTProyectosUsuarios") = value - End Set - End Property - Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable - Get - GlobalDTPrecioListas = DirectCast(HttpContext.Current.Application("GlobalDTPrecioListas"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPrecioListas") = value - End Set - End Property - Property GlobalDTMesas() As DataTable - Get - GlobalDTMesas = DirectCast(HttpContext.Current.Application("GlobalDTMesas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMesas") = value - End Set - End Property - Property GlobalDTTipoOrdenServicios(CveEmpresa As Integer) As DataTable - Get - GlobalDTTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTTipoOrdenServicios"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoOrdenServicios") = value - End Set - End Property - Property GlobalDTSubTipoOrdenServicios() As DataTable - Get - GlobalDTSubTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios") = value - End Set - End Property - Property GlobalDTCaracteristicasOrdenServicios() As DataTable - Get - GlobalDTCaracteristicasOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios") = value - End Set - End Property - Property GlobalDTOrdenesServiciosCaracteristicas() As DataTable - Get - GlobalDTOrdenesServiciosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas") = value - End Set - End Property - Property GlobalDTCaracteristicasOpciones() As DataTable - Get - GlobalDTCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOpciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCaracteristicasOpciones") = value - End Set - End Property - Property GlobalDTTipoCuentasEquipos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoCuentasEquipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoCuentasEquipos = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoCuentasEquipos") = value - End Set - End Property - Property GlobalDTTipoCuentasEquiposCaracteristicas(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoCuentasEquiposCaracteristicas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoCuentasEquiposCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas") = value - End Set - End Property - Property GlobalDTTipoCuentasEquiposOpciones(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoCuentasEquiposOpciones = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoCuentasEquiposOpciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones") = value - End Set - End Property - ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1) As DataTable - Get - Dim ObjPS As New ClsProductosServicios - - 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 - 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 - If CveEmpresa <> -1 Then - - Dim Cons = DirectCast(HttpContext.Current.Application("GlobalDTPSSimplificado"), 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(HttpContext.Current.Application("GlobalDTPSSimplificado"), EnumerableRowCollection(Of DataRow)).CopyToDataTable - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPSSimplificado") = value - End Set - End Property - Property GlobalDTProductosServiciosAlias(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable - Get - 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(HttpContext.Current.Application("GlobalDTProductosServiciosAlias"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProductosServiciosAlias = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProductosServiciosAlias = DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosAlias"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProductosServiciosAlias") = value - End Set - End Property - - Property GlobalDTProductosServiciosCaracteristicas(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProductosServiciosCaracteristicas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProductosServiciosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicas"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicas") = value - End Set - End Property - Property GlobalDTProductosServiciosCaracteristicasOpciones(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicasOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProductosServiciosCaracteristicasOpciones = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProductosServiciosCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicasOpciones"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicasOpciones") = value - End Set - End Property - Property GlobalDTInvMetodosInventario() As DataTable - Get - GlobalDTInvMetodosInventario = DirectCast(HttpContext.Current.Application("GlobalDTInvMetodosInventario"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTInvMetodosInventario") = value - End Set - End Property - Property GlobalDTAFCaracteristicasOpciones() As DataTable - Get - GlobalDTAFCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones") = value - End Set - End Property - Property GlobalDTAFCaracteristicas() As DataTable - Get - GlobalDTAFCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAFCaracteristicas") = value - End Set - End Property - Property GlobalDTAFCaracteristicasClasificaciones() As DataTable - Get - GlobalDTAFCaracteristicasClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones") = value - End Set - End Property - Property GlobalDTImpuestosLocales(CvePS As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CvePS > 0 Then Str.AppendFormat("CvePS = {0}", CvePS) - If CveEmpresa > 0 Then Str.AppendFormat("{0} CveEmpresa = {1}", If(CvePS > 0, " AND ", ""), CveEmpresa) - - If CvePS > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTImpuestosLocales = Dv.ToTable - Dv.Dispose() - Else - GlobalDTImpuestosLocales = DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTImpuestosLocales") = value - End Set - End Property - 'Bancos - Property GlobalDTBancos() As DataTable - Get - GlobalDTBancos = DirectCast(HttpContext.Current.Application("GlobalDTBancos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTBancos") = value - End Set - End Property - - Property GlobalDTEstatusIE() As DataTable - Get - GlobalDTEstatusIE = DirectCast(HttpContext.Current.Application("GlobalDTEstatusIE"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstatusIE") = value - End Set - End Property - Property GlobalDTBancosIE() As DataTable - Get - GlobalDTBancosIE = DirectCast(HttpContext.Current.Application("GlobalDTBancosIE"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTBancosIE") = value - End Set - End Property - Property GlobalDTTipoCuenta() As DataTable - Get - GlobalDTTipoCuenta = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuenta"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoCuenta") = value - End Set - End Property - 'Fin Bancos - - 'Fin EstadoCIvil - 'TipoPerioso - Property GlobalDTTipoPeriodo() As DataTable - Get - GlobalDTTipoPeriodo = DirectCast(HttpContext.Current.Application("GlobalDTTipoPeriodo"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoPeriodo") = value - End Set - End Property - 'Fin TipoPeriodo - - 'Periodos - Property GlobalDTNominasPeriodos(CveTipoPeriodo As Integer, CvePeriodo As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveTipoPeriodo <> -1 Then Str.AppendFormat(" {0} CveTipoPeriodo = {1}", If(Str.Length > 0, "AND", ""), CveTipoPeriodo) - If CvePeriodo <> -1 Then Str.AppendFormat(" {0} CvePeriodo = {1}", If(Str.Length > 0, "AND", ""), CvePeriodo) - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTNominasPeriodos = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTNominasPeriodos = DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTNominasPeriodos") = value - End Set - End Property - 'Fin Periodos - - 'Fin Ruta - 'Cliente - Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable - Get - Dim AppNombre As String = String.Format("GlobalDTCliente{0}", CveEmpresa) - 'sino existe, recarga los datos - If HttpContext.Current.Application(AppNombre) Is Nothing Then - Dim ObjClientes As New ClsClientes - If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados - ObjClientes.Dispose() - End If - - - If CveEmpresa <> -1 Then - - Dim StrSQL As New StringBuilder - StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTCliente = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTCliente = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) - End If - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTCliente{0}", CveEmpresa) - HttpContext.Current.Application(AppNombre) = value - 'Dim ObjClientes As New ClsClientes - 'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then Application(AppNombre) = ObjClientes.DtResultados - 'ObjClientes.Dispose() - End Set - End Property - Property GlobalDTClienteClasificaciones(CveEmpresa As Integer) As DataTable - Get - Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones{0}", CveEmpresa) - 'sino existe, recarga los datos - If HttpContext.Current.Application(AppNombre) Is Nothing Then - Dim ObjClientes As New ClsClientes - If ObjClientes.GetClienteClasificacion(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados - ObjClientes.Dispose() - End If - If CveEmpresa <> -1 Then - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTClienteClasificaciones = Dv.ToTable - Dv.Dispose() - Else - GlobalDTClienteClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) - End If - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones{0}", CveEmpresa) - HttpContext.Current.Application(AppNombre) = value - 'Dim ObjClientes As New ClsClientes - 'If ObjClientes.GetClienteClasificacion(CveEmpresa) Then Application(AppNombre) = ObjClientes.DtResultados - 'ObjClientes.Dispose() - End Set - End Property - Property GlobalDTEstatusOrdenServicios(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenServicios"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTEstatusOrdenServicios = Dv.ToTable - Dv.Dispose() - Else - GlobalDTEstatusOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenServicios"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstatusOrdenServicios") = value - End Set - End Property - 'Variables para Ventas - Property GlobalDTVendedores(CveEmpresa As Integer, Optional Estatus As Boolean = True, Optional VendedorTipo As Integer = 1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTVendedores"), DataTable), String.Format("CveEmpresa = {0} AND CveEstatus = {1} AND VendedorTipo = {2}", CveEmpresa, If(Estatus, 1, 0), VendedorTipo), "", DataViewRowState.CurrentRows) - GlobalDTVendedores = Dv.ToTable - Dv.Dispose() - Else - GlobalDTVendedores = DirectCast(HttpContext.Current.Application("GlobalDTVendedores"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVendedores") = value - End Set - End Property - Property GlobalDTClientesCorporativo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClientesCorporativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTClientesCorporativo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTClientesCorporativo = DirectCast(HttpContext.Current.Application("GlobalDTClientesCorporativo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTClientesCorporativo") = value - End Set - End Property - Property GlobalDTCompProveedores(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCompProveedores"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTCompProveedores = Dv.ToTable - Dv.Dispose() - Else - GlobalDTCompProveedores = DirectCast(HttpContext.Current.Application("GlobalDTCompProveedores"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCompProveedores") = value - End Set - End Property - 'EstatusFactura - Property GlobalDTCompEstatusFactura() As DataTable - Get - GlobalDTCompEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTCompEstatusFactura"), DataTable).FiltraParametros("Estatus = 'Activo'") - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCompEstatusFactura") = value - End Set - End Property - Property GlobalDTContratosSecciones() As DataTable - Get - GlobalDTContratosSecciones = DirectCast(HttpContext.Current.Application("GlobalDTContratosSecciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTContratosSecciones") = value - End Set - End Property - Property GlobalDTContratos() As DataTable - Get - GlobalDTContratos = DirectCast(HttpContext.Current.Application("GlobalDTContratos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTContratos") = value - End Set - End Property - Property GlobalDTContratosTipos() As DataTable - Get - GlobalDTContratosTipos = DirectCast(HttpContext.Current.Application("GlobalDTContratosTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTContratosTipos") = value - End Set - End Property - Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoAlmacen = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoAlmacen") = value - End Set - End Property - Property GlobalDTInvConceptos() As DataTable - Get - - Return DirectCast(HttpContext.Current.Application("GlobalDTInvConceptos"), DataTable) - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTInvConceptos") = value - End Set - End Property - Property GlobalDTSeccionAlmacen(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTSeccionAlmacen = Dv.ToTable - Dv.Dispose() - Else - GlobalDTSeccionAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSeccionAlmacen") = value - End Set - End Property - Property GlobalDTAlmacen(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAlmacen = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTAlmacen"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAlmacen") = value - End Set - End Property - Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable - Get - Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa) - 'sino existe, recarga los datos - If HttpContext.Current.Application(AppNombre) Is Nothing Then - Dim ObjUsr As New ClsSisUsuarios - If ObjUsr.GetAlmacen(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados - ObjUsr.Dispose() - End If - Dim Str As New StringBuilder - Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa) - If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTAlmacenUsuarios = Dv.ToTable - Dv.Dispose() - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa) - HttpContext.Current.Application(AppNombre) = value - End Set - '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) - - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - ' GlobalDTAlmacenUsuarios = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTAlmacenUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable) - ' End If - - 'End Get - 'Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTAlmacenUsuarios") = value - 'End Set - End Property - Property GlobalDTNom_Periodos() As DataTable - Get - GlobalDTNom_Periodos = DirectCast(HttpContext.Current.Application("GlobalDTNom_Periodos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTNom_Periodos") = value - End Set - End Property - Property GlobalDTVtaFormaPago() As DataTable - Get - GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaFormaPago"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaFormaPago") = value - End Set - End Property - Property GlobalDTVtaMetodoPago() As DataTable - Get - GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaMetodoPago"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaMetodoPago") = value - End Set - End Property - Property GlobalDTVtaTiposRelacion() As DataTable - Get - GlobalDTVtaTiposRelacion = DirectCast(HttpContext.Current.Application("GlobalDTVtaTiposRelacion"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaTiposRelacion") = value - End Set - End Property - Property GlobalDTTiposDocumentos() As DataTable - Get - GlobalDTTiposDocumentos = DirectCast(HttpContext.Current.Application("GlobalDTTiposDocumentos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTiposDocumentos") = value - End Set - End Property - Property GlobalDTCobranzaEstatus(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTCobranzaEstatus = Dv.ToTable - Dv.Dispose() - Else - GlobalDTCobranzaEstatus = DirectCast(HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus") = value - End Set - End Property - - -#Region "***********************************************************************DT EVENTOS****************************************************************************************" - Property GlobalDTTiposEventos() As DataTable - Get - GlobalDTTiposEventos = DirectCast(HttpContext.Current.Application("GlobalDTTiposEventos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTiposEventos") = value - End Set - End Property - - Property GlobalDTEventos() As DataTable - Get - GlobalDTEventos = DirectCast(HttpContext.Current.Application("GlobalDTEventos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEventos") = value - End Set - End Property - - Property GlobalDTOIEventoTarea() As DataTable - Get - GlobalDTOIEventoTarea = DirectCast(HttpContext.Current.Application("GlobalDTOIEventoTarea"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIEventoTarea") = value - End Set - End Property - - Property GlobalDTOIEstatusEventos() As DataTable - Get - GlobalDTOIEstatusEventos = DirectCast(HttpContext.Current.Application("GlobalDTOIEstatusEventos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIEstatusEventos") = value - End Set - End Property -#End Region - -#Region " **********************************************************************DT PROSPECTOS*************************************************************************************" - Property GlobalDTProspectosCaracteristicasClasificaciones() As DataTable - Get - GlobalDTProspectosCaracteristicasClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicasClasificaciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosCaracteristicasClasificaciones") = value - End Set - End Property - Property GlobalDTProspectosTiposCaracteristicas() As DataTable - Get - GlobalDTProspectosTiposCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosTiposCaracteristicas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosTiposCaracteristicas") = value - End Set - End Property - Property GlobalDTProspectosCaracteristicas(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosCaracteristicas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicas"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosCaracteristicas") = value - End Set - End Property - - Property GlobalDTProspectosCaracteristicasOpciones() As DataTable - Get - GlobalDTProspectosCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicasOpciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosCaracteristicasOpciones") = value - End Set - End Property -#End Region - -#Region "***********************************************************************DT ACTIVOS FIJOS**********************************************************************************" - Property GlobalDTActivoFijos(CveEmpresa As Integer, Optional CveSubTipoActivoFijo As Integer = -1, Optional CveActivoFijo As Integer = -1) As DataTable - Get - Dim dt As DataTable = Nothing - 'Dim Str As New StringBuilder - 'Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - 'If CveSubTipoActivoFijo <> -1 Then Str.AppendFormat(" AND CveSubTipoActivoFijo = {0}", CveSubTipoActivoFijo) - - Dim ObjAF As New ClsAF - 'If ObjAF.GetActivosFijos(CveActivoFijo, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, -1, "-1", -1, -1, -1, -1, -1) Then - If ObjAF.GetActivosFijos(CveActivoFijo, CveEmpresa, "-1", "-1", -1, CveSubTipoActivoFijo, "-1", -1, -1, -1, -1, -1, "", -1) Then - dt = ObjAF.DtResultados - End If - - ObjAF.Dispose() - GlobalDTActivoFijos = dt - - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTActivoFijos") = value - End Set - End Property - Property GlobalDTEstadoActivoFijo() As DataTable - Get - GlobalDTEstadoActivoFijo = DirectCast(HttpContext.Current.Application("GlobalDTEstadoActivoFijo"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstadoActivoFijo") = value - End Set - End Property - Property GlobalDTMarcaActivoFijo(CveEmpresa As Integer) As DataTable - Get - Dim dt As DataTable = Nothing - - Dim ObjAF As New ClsAF - - If ObjAF.GetMarcasActivosFijos(CveEmpresa) Then - dt = ObjAF.DtResultados - End If - - ObjAF.Dispose() - GlobalDTMarcaActivoFijo = dt - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMarcaActivoFijo") = value - End Set - End Property - Property GlobalDTModeloActivoFijo(CveEmpresa As Integer, CveMarca As Integer) As DataTable - Get - Dim dt As DataTable = Nothing - - Dim ObjAF As New ClsAF - - If ObjAF.GetModelosActivosFijos(CveEmpresa, CveMarca) Then - dt = ObjAF.DtResultados - End If - - ObjAF.Dispose() - GlobalDTModeloActivoFijo = dt - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTModeloActivoFijo") = value - End Set - End Property - - Property GlobalDTSubTipoActivoFijo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubTipoActivoFijo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTSubTipoActivoFijo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTSubTipoActivoFijo = DirectCast(HttpContext.Current.Application("GlobalDTSubTipoActivoFijo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSubTipoActivoFijo") = value - End Set - End Property - Property GlobalDTTipoActivoFijo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoActivoFijo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoActivoFijo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoActivoFijo = DirectCast(HttpContext.Current.Application("GlobalDTTipoActivoFijo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoActivoFijo") = value - End Set - End Property - -#End Region - -#Region "***********************************************************************DT GENERALES**************************************************************************************" - Property GlobalDTGralPaises() As DataTable - Get - GlobalDTGralPaises = DirectCast(HttpContext.Current.Application("GlobalDTGralPaises"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralPaises") = value - End Set - End Property - Property GlobalDTGralEstados(CvePais As Integer) As DataTable - Get - GlobalDTGralEstados = DirectCast(HttpContext.Current.Application("GlobalDTGralEstados"), DataTable).FiltraParametros(String.Format("CvePais ={0}", CvePais)) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralEstados") = value - End Set - End Property - Property GlobalDTGralMunicipios(CveEstado As Integer) As DataTable - Get - GlobalDTGralMunicipios = DirectCast(HttpContext.Current.Application("GlobalDTGralMunicipios"), DataTable).FiltraParametros(String.Format("CveEstado ={0}", CveEstado)) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralMunicipios") = value - End Set - End Property - - Property GlobalDTGralPoblaciones() As DataTable - Get - GlobalDTGralPoblaciones = DirectCast(HttpContext.Current.Application("GlobalDTGralPoblaciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralPoblaciones") = value - End Set - End Property - Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable - - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTGralCategorias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTGralCategorias = Dv.ToTable - Dv.Dispose() - Else - GlobalDTGralCategorias = DirectCast(HttpContext.Current.Application("GlobalDTGralCategorias"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralCategorias") = value - End Set - End Property - Property GlobalDTGralCategorias2(CveEmpresa As Integer) As DataTable - - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCategorias2"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTGralCategorias2 = Dv.ToTable - Dv.Dispose() - Else - GlobalDTGralCategorias2 = DirectCast(HttpContext.Current.Application("GlobalDTCategorias2"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCategorias2") = value - End Set - End Property - - Property GlobalDTGralEscolaridades() As DataTable - Get - GlobalDTGralEscolaridades = DirectCast(HttpContext.Current.Application("GlobalDTGralEscolaridades"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralEscolaridades") = value - End Set - End Property - - Property GlobalDTGralColectivas(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTGralColectivas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTGralColectivas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTGralColectivas = DirectCast(HttpContext.Current.Application("GlobalDTGralColectivas"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralColectivas") = value - End Set - End Property - -#End Region - -#Region "***********************************************************************DT PROSPECTOS*************************************************************************************" - Property GlobalDTProspectosSupervisores(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSupervisores"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSupervisores = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSupervisores = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSupervisores"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSupervisores") = value - End Set - End Property - Property GlobalDTProspectosCoordinadores(CveSupervisor As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveSupervisor <> -1 Then Str.AppendFormat(" {0} CveSupervisor = {1}", If(Str.Length > 0, "AND", ""), CveSupervisor) - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosCoordinadores"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosCoordinadores = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProspectosCoordinadores = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCoordinadores"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosCoordinadores") = value - End Set - End Property - Property GlobalDTProspectosApoyos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosApoyos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosApoyos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyos"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosApoyos") = value - End Set - End Property - Property GlobalDTProspectosClasificaciones(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosClasificaciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosClasificaciones = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTProspectosClasificaciones"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosClasificaciones") = value - End Set - End Property - Property GlobalDTProspectosEventosTipo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEventosTipo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosEventosTipo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosEventosTipo = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEventosTipo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEventosTipo") = value - End Set - End Property - Property GlobalDTProspectosEvento(CveEventoTipo As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveEventoTipo <> -1 Then Str.AppendFormat(" {0} CveEventoTipo = {1}", If(Str.Length > 0, "AND", ""), CveEventoTipo) - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEvento"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEvento = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosEvento = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEvento"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEvento") = value - End Set - End Property - Property GlobalDTProspectosEstatus(CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEstatus"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEstatus = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosEstatus = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEstatus"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEstatus") = value - End Set - End Property - Property GlobalDTProspectosApoyosTipos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyosTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosApoyosTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosApoyosTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyosTipos"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosApoyosTipos") = value - End Set - End Property - Property GlobalDTProspectosApoyosTipos() As DataTable - Get - GlobalDTProspectosApoyosTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyosTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosApoyosTipos") = value - End Set - End Property - Property GlobalDTProspectosEncuestas(CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEncuestas = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProspectosEncuestas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestas"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEncuestas") = value - End Set - End Property - Property GlobalDTProspectosEncuestasPreguntas(CveEncuesta As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveEncuesta <> -1 Then Str.AppendFormat(" {0} CveEncuesta = {1}", If(Str.Length > 0, "AND", ""), CveEncuesta) - - - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasPreguntas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEncuestasPreguntas = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProspectosEncuestasPreguntas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasPreguntas"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEncuestasPreguntas") = value - End Set - End Property - Property GlobalDTProspectosEncuestasRespuestas(CvePregunta As Integer, CveEncuesta As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveEncuesta <> -1 Then Str.AppendFormat(" {0} CveEncuesta = {1}", If(Str.Length > 0, "AND", ""), CveEncuesta) - If CvePregunta <> -1 Then Str.AppendFormat(" {0} CvePregunta = {1}", If(Str.Length > 0, "AND", ""), CvePregunta) - - - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasRespuestas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEncuestasRespuestas = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProspectosEncuestasRespuestas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasRespuestas"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEncuestasRespuestas") = value - End Set - End Property - Property GlobalDTProspectosTipos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosTipos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosTipos") = value - End Set - End Property - -#Region " DT PROSPECTOS SOLICITUDES" - Property GlobalDTProspectosSolicitudes(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudes"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSolicitudes = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSolicitudes = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudes"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSolicitudes") = value - End Set - End Property - Property GlobalDTProspectosSolicitudesEstatus(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSolicitudesEstatus = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSolicitudesEstatus = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesEstatus"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSolicitudesEstatus") = value - End Set - End Property - Property GlobalDTProspectosSolicitudesTipos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSolicitudesTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSolicitudesTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos") = value - End Set - End Property - 'Property GlobalDTProspectosSolicitudesTipos() As DataTable - ' Get - ' GlobalDTProspectosSolicitudesTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos") = value - ' End Set - 'End Property - Property GlobalDTProspectosSolicitudesApoyos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSolicitudesApoyos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSolicitudesApoyos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos") = value - End Set - End Property - -#End Region -#End Region - -#Region "**********************************************DT AMORTIZACIÓN CONTABLE PLAN DE DESARROLLO********************************************************************************" - -#Region "***********************************************************************DT AMORTIZACIÓN CONTABLE*********************************************************************************************" - - Property GlobalDTAC_RubrosIngreso() As DataTable - Get - GlobalDTAC_RubrosIngreso = DirectCast(HttpContext.Current.Application("GlobalDTAC_RubrosIngreso"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_RubrosIngreso") = value - End Set - End Property - Property GlobalDTAC_FuentesRecaudacion(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesRecaudacion"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTAC_FuentesRecaudacion = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_FuentesRecaudacion = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesRecaudacion"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_FuentesRecaudacion") = value - End Set - End Property - - Property GlobalDTAC_FuentesFinanciamiento() As DataTable - Get - GlobalDTAC_FuentesFinanciamiento = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento") = value - End Set - End Property - Property GlobalDTAC_OG() As DataTable - Get - GlobalDTAC_OG = DirectCast(HttpContext.Current.Application("GlobalDTAC_OG"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_OG") = value - End Set - End Property - 'Property GlobalDTAC_ClasificadorOG(CveEmpresa As Integer) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificadorOG"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - ' GlobalDTAC_ClasificadorOG = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTAC_ClasificadorOG = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificadorOG"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTAC_ClasificadorOG") = value - ' End Set - 'End Property - Property GlobalDTAC_Ubicaciones() As DataTable - Get - GlobalDTAC_Ubicaciones = DirectCast(HttpContext.Current.Application("GlobalDTAC_Ubicaciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Ubicaciones") = value - End Set - End Property - Property GlobalDTAC_UnidadesAdministrativas(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_UnidadesAdministrativas"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTAC_UnidadesAdministrativas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_UnidadesAdministrativas = DirectCast(HttpContext.Current.Application("GlobalDTAC_UnidadesAdministrativas"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_UnidadesAdministrativas") = value - End Set - End Property - Property GlobalDTAC_ClasificacionFuncional(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionFuncional"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_ClasificacionFuncional = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_ClasificacionFuncional = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionFuncional"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ClasificacionFuncional") = value - End Set - End Property - Property GlobalDTAC_ClasificacionGeografica(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionGeografica"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_ClasificacionGeografica = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_ClasificacionGeografica = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionGeografica"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ClasificacionGeografica") = value - End Set - End Property - Property GlobalDTAC_Cuentas() As DataTable - Get - GlobalDTAC_Cuentas = DirectCast(HttpContext.Current.Application("GlobalDTAC_Cuentas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Cuentas") = value - End Set - End Property - Property GlobalDTAC_Finalidad() As DataTable - Get - GlobalDTAC_Finalidad = DirectCast(HttpContext.Current.Application("GlobalDTAC_Finalidad"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Finalidad") = value - End Set - End Property - 'Property GlobalDTAC_FuenteFinanciamiento() As DataTable - ' Get - ' GlobalDTAC_FuenteFinanciamiento = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuenteFinanciamiento"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTAC_FuenteFinanciamiento") = value - ' End Set - 'End Property - Property GlobalDTAC_FuentesFinanciamiento(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTAC_FuentesFinanciamiento = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_FuentesFinanciamiento = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento") = value - End Set - End Property - Property GlobalDTAC_FuentesFinanciamientoCONAC() As DataTable - Get - GlobalDTAC_FuentesFinanciamientoCONAC = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamientoCONAC"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamientoCONAC") = value - End Set - End Property - Property GlobalDTAC_Funcion() As DataTable - Get - GlobalDTAC_Funcion = DirectCast(HttpContext.Current.Application("GlobalDTAC_Funcion"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Funcion") = value - End Set - End Property - Property GlobalDTAC_Programas() As DataTable - Get - GlobalDTAC_Programas = DirectCast(HttpContext.Current.Application("GlobalDTAC_Programas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Programas") = value - End Set - End Property - Property GlobalDTAC_ProgramasCONAC() As DataTable - Get - GlobalDTAC_ProgramasCONAC = DirectCast(HttpContext.Current.Application("GlobalDTAC_ProgramasCONAC"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ProgramasCONAC") = value - End Set - End Property - Property GlobalDTAC_ProyectosProceso() As DataTable - Get - GlobalDTAC_ProyectosProceso = DirectCast(HttpContext.Current.Application("GlobalDTAC_ProyectosProceso"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ProyectosProceso") = value - End Set - End Property - Property GlobalDTAC_SubFuncion() As DataTable - Get - GlobalDTAC_SubFuncion = DirectCast(HttpContext.Current.Application("GlobalDTAC_SubFuncion"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_SubFuncion") = value - End Set - End Property - Property GlobalDTAC_SubProgramas() As DataTable - Get - GlobalDTAC_SubProgramas = DirectCast(HttpContext.Current.Application("GlobalDTAC_SubProgramas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_SubProgramas") = value - End Set - End Property - Property GlobalDTAC_ClasificacionAdministrativa(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionAdministrativa"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_ClasificacionAdministrativa = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_ClasificacionAdministrativa = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionAdministrativa"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ClasificacionAdministrativa") = value - End Set - End Property - Property GlobalDTAC_TipoGasto() As DataTable - Get - GlobalDTAC_TipoGasto = DirectCast(HttpContext.Current.Application("GlobalDTAC_TipoGasto"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_TipoGasto") = value - End Set - End Property - - Property GlobalDTAC_ProgramaOperativo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ProgramaOperativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_ProgramaOperativo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_ProgramaOperativo = DirectCast(HttpContext.Current.Application("GlobalDTAC_ProgramaOperativo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ProgramaOperativo") = value - End Set - End Property - - Property GlobalDTAC_MatrizIngresos() As DataTable - Get - GlobalDTAC_MatrizIngresos = DirectCast(HttpContext.Current.Application("GlobalDTAC_MatrizIngresos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_MatrizIngresos") = value - End Set - End Property - - Property GlobalDTAC_MatrizEgresos() As DataTable - Get - GlobalDTAC_MatrizEgresos = DirectCast(HttpContext.Current.Application("GlobalDTAC_MatrizEgresos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_MatrizEgresos") = value - End Set - End Property - - -#End Region - - Property GlobalDTAC_PD_EjeRector(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_EjeRector"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_EjeRector = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_EjeRector = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_EjeRector"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_EjeRector") = value - End Set - End Property - - Property GlobalDTAC_PD_Programas(CveEjeRector As Integer) As DataTable - Get - If CveEjeRector <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Programas"), DataTable), String.Format("CveEjeRector = {0}", CveEjeRector), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_Programas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_Programas = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Programas"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_Programas") = value - End Set - End Property - - Property GlobalDTAC_PD_Estrategias(CveProgramas As Integer) As DataTable - Get - If CveProgramas <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Estrategias"), DataTable), String.Format("CvePrograma = {0}", CveProgramas), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_Estrategias = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_Estrategias = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Estrategias"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_Estrategias") = value - End Set - End Property - - Property GlobalDTAC_PD_LineasAccion(CveEstrategias As Integer) As DataTable - Get - If CveEstrategias <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_LineasAccion"), DataTable), String.Format("CveEstrategia = {0}", CveEstrategias), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_LineasAccion = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_LineasAccion = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_LineasAccion"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_LineasAccion") = value - End Set - End Property - - Property GlobalDTAC_PD_Metas(CveLineasAccion As Integer) As DataTable - Get - If CveLineasAccion <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Metas"), DataTable), String.Format("CveLineaAccion = {0}", CveLineasAccion), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_Metas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_Metas = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Metas"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_Metas") = value - End Set - End Property -#End Region - -#Region "***********************************************************************GLOBAL DT ORDENES DE COMPRA***********************************************************************" - Property GlobalDTOCEstatus(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTOCEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTOCEstatus = Dv.ToTable - Dv.Dispose() - Else - GlobalDTOCEstatus = DirectCast(HttpContext.Current.Application("GlobalDTOCEstatus"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOCEstatus") = value - End Set - End Property - - Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable - Get - - Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa) - 'sino existe, recarga los datos - If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then - - Dim ObjOC As New ClsOC - If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, CveEmpresa) Then - HttpContext.Current.Application(AppNombre) = ObjOC.DtResultados - Else - HttpContext.Current.Application(AppNombre) = Nothing - End If - - ObjOC.Dispose() - - End If - - Dim filtro As New StringBuilder - filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa) - If CveUsuario > 0 Then - filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario) - End If - If Tipo <> "" Then - filtro.AppendFormat(" AND Tipo='{0}'", Tipo) - End If - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows) - GlobalDTOCEstatusUsuarios = Dv.ToTable - Dv.Dispose() - - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa) - HttpContext.Current.Application(AppNombre) = value - End Set - End Property - - - - - - 'Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim filtro As New StringBuilder - ' filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa) - ' If CveUsuario > 0 Then - ' filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario) - ' End If - ' If Tipo <> "" Then - ' filtro.AppendFormat(" AND Tipo='{0}'", Tipo) - ' End If - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTOCEstatusUsuarios"), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows) - ' GlobalDTOCEstatusUsuarios = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTOCEstatusUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTOCEstatusUsuarios"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTOCEstatusUsuarios") = value - ' End Set - 'End Property - - -#End Region - -#Region "F I N A N Z A S " - Property GlobalDTFinan_RazonesFinancieras() As DataTable - Get - GlobalDTFinan_RazonesFinancieras = DirectCast(HttpContext.Current.Application("GlobalDTFinan_RazonesFinancieras"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTFinan_RazonesFinancieras") = value - End Set - End Property -#End Region - - -#Region "***********************************************************************GLOBAL DT CONTABILIDAD****************************************************************************" - 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(HttpContext.Current.Application("GlobalDTContaPlantillasPolizas"), DataTable), Str.ToString.Substring(5), "", DataViewRowState.CurrentRows) - GlobalDTContaPlantillasPolizas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTContaPlantillasPolizas = DirectCast(HttpContext.Current.Application("GlobalDTContaPlantillasPolizas"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.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(HttpContext.Current.Application("GlobalDTContaPlantillasPolizasDetalle"), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "", DataViewRowState.CurrentRows) - GlobalDTContaPlantillasPolizasDetalle = Dv.ToTable - Dv.Dispose() - Else - GlobalDTContaPlantillasPolizasDetalle = DirectCast(HttpContext.Current.Application("GlobalDTContaPlantillasPolizasDetalle"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.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(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "", DataViewRowState.CurrentRows) - GlobalDTContaConceptosContables = Dv.ToTable - Dv.Dispose() - Else - GlobalDTContaConceptosContables = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTContaConceptosContables") = value - End Set - End Property -#End Region - -#Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************" - Property GlobalDTAsistenciaDetalle() As DataTable - Get - GlobalDTAsistenciaDetalle = DirectCast(HttpContext.Current.Application("GlobalDTAsistenciaDetalle"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAsistenciaDetalle") = value - End Set - End Property - Property GlobalDTAsistenciasInasistencias() As DataTable - Get - GlobalDTAsistenciasInasistencias = DirectCast(HttpContext.Current.Application("GlobalDTAsistenciasInasistencias"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAsistenciasInasistencias") = value - End Set - End Property - Property GlobalDTEstatusPersonal() As DataTable - Get - GlobalDTEstatusPersonal = DirectCast(HttpContext.Current.Application("GlobalDTEstatusPersonal"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstatusPersonal") = value - End Set - End Property - - Property GlobalDTRHPersonal(CveEmpresa As Integer) As DataTable - Get - Dim ObjPersonal As New ClsRH - ObjPersonal.GetPersonal(-1, CveEmpresa) - GlobalDTRHPersonal = ObjPersonal.DtResultados - ObjPersonal.Dispose() - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTRHPersonal") = value - End Set - End Property - - - Property GlobalDTDepartamentos() As DataTable - Get - GlobalDTDepartamentos = DirectCast(HttpContext.Current.Application("GlobalDTDepartamentos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTDepartamentos") = value - End Set - End Property - Property GlobalDTRHPuestos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTRHPuestos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTRHPuestos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTRHPuestos = DirectCast(HttpContext.Current.Application("GlobalDTRHPuestos"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTRHPuestos") = value - End Set - End Property - Property GlobalDTEscolaridad() As DataTable - Get - GlobalDTEscolaridad = DirectCast(HttpContext.Current.Application("GlobalDTEscolaridad"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEscolaridad") = value - End Set - End Property - Property GlobalDTEstadoCivil() As DataTable - Get - GlobalDTEstadoCivil = DirectCast(HttpContext.Current.Application("GlobalDTEstadoCivil"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstadoCivil") = value - End Set - End Property - Property GlobalDTDocumentos() As DataTable - Get - GlobalDTDocumentos = DirectCast(HttpContext.Current.Application("GlobalDTDocumentos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTDocumentos") = value - End Set - End Property - Property GlobalDTGenero() As DataTable - Get - GlobalDTGenero = DirectCast(HttpContext.Current.Application("GlobalDTGenero"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGenero") = value - End Set - End Property - Property GlobalDTMotivoBaja() As DataTable - Get - GlobalDTMotivoBaja = DirectCast(HttpContext.Current.Application("GlobalDTMotivoBaja"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMotivoBaja") = value - End Set - End Property - Property GlobalDTTiposContrato() As DataTable - Get - GlobalDTTiposContrato = DirectCast(HttpContext.Current.Application("GlobalDTTiposContrato"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTiposContrato") = value - End Set - End Property - Property GlobalDTRutas() As DataTable - Get - GlobalDTRutas = DirectCast(HttpContext.Current.Application("GlobalDTRutas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTRutas") = value - End Set - End Property - Property GlobalDTTurno() As DataTable - Get - GlobalDTTurno = DirectCast(HttpContext.Current.Application("GlobalDTTurno"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTurno") = value - End Set - End Property - Property GlobalDTJornadas() As DataTable - Get - GlobalDTJornadas = DirectCast(HttpContext.Current.Application("GlobalDTJornadas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTJornadas") = value - End Set - End Property - Property GlobalDTMotivosHorasExtras() As DataTable - Get - GlobalDTMotivosHorasExtras = DirectCast(HttpContext.Current.Application("GlobalDTMotivosHorasExtras"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMotivosHorasExtras") = value - End Set - End Property - Property GlobalDTTipoBuzon() As DataTable - Get - GlobalDTTipoBuzon = DirectCast(HttpContext.Current.Application("GlobalDTTipoBuzon"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoBuzon") = value - End Set - End Property -#End Region - -#Region "*********** D T - C O M B U S T I B L E S ***********" - - - - Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As New StringBuilder - StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCombustibles"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTCombustibles = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTCombustibles = DirectCast(HttpContext.Current.Application("GlobalDTCombustibles"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCombustibles") = value - End Set - End Property - - Property GlobalDTCombustiblesTipos(Optional CveCombustibleTipo As Integer = -1) As DataTable - Get - - If CveCombustibleTipo <> -1 Then - - Dim StrSQL As New StringBuilder - If CveCombustibleTipo <> -1 Then StrSQL.AppendFormat("CveCombustibleTipo = {0}", CveCombustibleTipo) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCombustiblesTipos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTCombustiblesTipos = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTCombustiblesTipos = DirectCast(HttpContext.Current.Application("GlobalDTCombustiblesTipos"), DataTable) - End If - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTCombustiblesTipos") = value - End Set - End Property -#End Region - -#Region "*********** D T - M A N T E N I M I E N T O S ***********" - - Property GlobalDTMantenimientosTipos() As DataTable - Get - GlobalDTMantenimientosTipos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMantenimientosTipos") = value - End Set - End Property - - Property GlobalDTMantenimientos() As DataTable - Get - GlobalDTMantenimientos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMantenimientos") = value - End Set - End Property - - Property GlobalDTMantenimientosTipos(Optional CveMantenimientoTipo As Integer = -1) As DataTable - Get - - If CveMantenimientoTipo <> -1 Then - - Dim StrSQL As New StringBuilder - If CveMantenimientoTipo <> -1 Then StrSQL.AppendFormat("CveMantenimientoTipo = {0}", CveMantenimientoTipo) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTMantenimientosTipos = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTMantenimientosTipos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable) - End If - End Get - Set(ByVal value As DataTable) - - HttpContext.Current.Application("GlobalDTMantenimientosTipos") = value - End Set - End Property - -#End Region - - -#Region "*********** D T - T A L L E R E S ***********" - - Property GlobalDTTalleresTipos() As DataTable - Get - GlobalDTTalleresTipos = DirectCast(HttpContext.Current.Application("GlobalDTTalleresTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTalleresTipos") = value - End Set - End Property - - Property GlobalDTTalleres() As DataTable - Get - GlobalDTTalleres = DirectCast(HttpContext.Current.Application("GlobalDTTalleres"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTalleres") = value - End Set - End Property - -#End Region - -#Region "*********** D T - D I S T R I B U I D O R E S ***********" - - Property GlobalDTDistribuidoresTipos() As DataTable - Get - GlobalDTDistribuidoresTipos = DirectCast(HttpContext.Current.Application("GlobalDTDistribuidoresTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTDistribuidoresTipos") = value - End Set - End Property - - Property GlobalDTDistribuidores() As DataTable - Get - GlobalDTDistribuidores = DirectCast(HttpContext.Current.Application("GlobalDTDistribuidores"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTDistribuidores") = value - End Set - End Property - -#End Region - - - Property GlobalDTOIRevision(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTOIRevision"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTOIRevision = Dv.ToTable - Dv.Dispose() - Else - GlobalDTOIRevision = DirectCast(HttpContext.Current.Application("GlobalDTOIRevision"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIRevision") = value - End Set - End Property - Property GlobalDTOIAgendaTipo() As DataTable - Get - GlobalDTOIAgendaTipo = DirectCast(HttpContext.Current.Application("GlobalDTOIAgendaTipo"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIAgendaTipo") = value - End Set - End Property - Property GlobalDTOIAgenda() As DataTable - Get - GlobalDTOIAgenda = DirectCast(HttpContext.Current.Application("GlobalDTOIAgenda"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIAgenda") = value - End Set - End Property - Property GlobalDTVtaCondicionesEntrega(Optional CveEmpresa As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTVtaCondicionesEntrega"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTVtaCondicionesEntrega = Dv.ToTable - Dv.Dispose() - Else - GlobalDTVtaCondicionesEntrega = DirectCast(HttpContext.Current.Application("GlobalDTVtaCondicionesEntrega"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaCondicionesEntrega") = value - End Set - End Property - Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable - - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTPaqueteriaGuiaTipos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTPaqueteriaGuiaTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTPaqueteriaGuiaTipos = DirectCast(HttpContext.Current.Application("GlobalDTPaqueteriaGuiaTipos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPaqueteriaGuiaTipos") = value - End Set - End Property - Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1, - Optional PorcentajeIVA As Double = -1) As DataTable - - 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(HttpContext.Current.Application("GlobalDTClasificacionPorcentaje"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTClasificacionPorcentaje = Dv.ToTable - Dv.Dispose() - Else - GlobalDTClasificacionPorcentaje = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionPorcentaje"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTClasificacionPorcentaje") = value - End Set - End Property - Property GlobalDTPaqueterias() As DataTable - Get - GlobalDTPaqueterias = DirectCast(HttpContext.Current.Application("GlobalDTPaqueterias"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPaqueterias") = value - End Set - End Property - -#End Region End Class \ No newline at end of file diff --git a/Compras/CatProveedores.aspx.vb b/Compras/CatProveedores.aspx.vb index a46ae19af..1d3b0b87c 100644 --- a/Compras/CatProveedores.aspx.vb +++ b/Compras/CatProveedores.aspx.vb @@ -22,7 +22,7 @@ Partial Class Compras_CatProveedores End Sub Private Sub InicializaValores() - DdlResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) + DdlResponsable.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa) DdlResponsable.DataBind() DdlResponsable.Items.Insert(0, New ListItem("Todos", "-1")) diff --git a/Compras/RepCompras.aspx.vb b/Compras/RepCompras.aspx.vb index f4a943bd6..6a76475dc 100644 --- a/Compras/RepCompras.aspx.vb +++ b/Compras/RepCompras.aspx.vb @@ -143,7 +143,7 @@ Partial Class Compras_RepCompras DdlTipoGasto.DataBind() 'CargaUsuarios - DdlUsuario.DataSource = GlobalDTUsuarioResponsable.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) + DdlUsuario.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa) DdlUsuario.DataBind() 'Carga Usuarios Captura diff --git a/Compras/RepComprasDetalle.aspx.vb b/Compras/RepComprasDetalle.aspx.vb index 69b15621a..9a536acb4 100644 --- a/Compras/RepComprasDetalle.aspx.vb +++ b/Compras/RepComprasDetalle.aspx.vb @@ -253,7 +253,7 @@ Partial Class Compras_RepComprasDetalle DdlProveedores.SelectedValue = "-1" 'CargaUsuarios - DdlUsuario.DataSource = GlobalDTUsuarioResponsable.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) + DdlUsuario.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa) DdlUsuario.DataBind() 'Carga Usuario Capturo diff --git a/Sistemas/PopUpCambiaUsuario.aspx.vb b/Sistemas/PopUpCambiaUsuario.aspx.vb index 2c3b04d80..dc0069cd6 100644 --- a/Sistemas/PopUpCambiaUsuario.aspx.vb +++ b/Sistemas/PopUpCambiaUsuario.aspx.vb @@ -25,9 +25,9 @@ Partial Class Sistemas_PopUpCambiaUsuario RegistraScript("window.close();") End If - Dim DtEmp As DataTable = GlobalDTEmpresas.Copy + Dim DtEmp As DataTable = GlobalDTEmpresas(CveEmpresa:=-1).Copy Dim NombreEmp As String = UsuarioActual.Empresa.Empresa - '''condición para ocultar los nombres de las empresas y ponerles "mi empresa de venta (xxx)" + ''condición para ocultar los nombres de las empresas y ponerles "mi empresa de venta (xxx)" ''If UsuarioActual.CveUsuario = 100 Then '' Dim customerRow() As Data.DataRow @@ -62,6 +62,8 @@ Partial Class Sistemas_PopUpCambiaUsuario Case "BDH" : CveEmpresa = "140" Case "ECONOLLANTAS" : CveEmpresa = "141" Case "SERVEC" : CveEmpresa = "153" + Case "CITRUS" : CveEmpresa = "172" + Case "KINO" : CveEmpresa = "173" End Select End If DdlEmpresa.DataBind() @@ -195,7 +197,7 @@ Partial Class Sistemas_PopUpCambiaUsuario End Sub Private Sub CargaUsuarios(Optional Orden As String = "Nombre") - Dim dtt As DataTable = GlobalDTUsuarios(-1, DdlEmpresa.SelectedValue.ToEntero) + Dim dtt As DataTable = GlobalDTUsuarios(-1, CveEmpresa:=DdlEmpresa.SelectedValue.ToEntero) 'If DdlRol.SelectedValue <> "-1" Then ' dtt = dtt.FiltraParametros("CveRol=" & DdlRol.SelectedValue) 'End If From 7f456a8175ddd69d15a39e63b975be9e45c335c3 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Wed, 1 Feb 2023 09:05:13 -0700 Subject: [PATCH 080/103] eFacturas Correcion ruta de ADSUtilerias --- Compras/eFacturas.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 07fcbdc6d..a127d8fda 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -748,7 +748,7 @@ Partial Class Compras_eFacturas txtFechaF.Text = Now.ToShortDateString 'txtFechaI.Text.ToDate.AddMonths(1).AddDays(-1).ToShortDateString Destino = String.Format("{0}Compras\", UsuarioActual.Empresa.Ruta) - Ejecutable = "C:\Proyectos\wwwSIG\Utilerias\ADSUtilerias.exe" + Ejecutable = "F:\Proyectos\wwwSIG\Utilerias\ADSUtilerias.exe" Form.DefaultButton = BtnConsultar.UniqueID DdlResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) From 18876945567f37cb18fac3c9d868589577e0aab5 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Wed, 1 Feb 2023 09:28:14 -0700 Subject: [PATCH 081/103] OC Correcion Get a get --- OC/OC.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index c4da7e4fb..9e4242ee6 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -907,7 +907,7 @@ Partial Class OC_OC UPPDetalle.Update() PermisosPagina() - RegistraScript("$Get('HdnWidth').value = $('#C_Tab_TabC_DivConceptosContenido').width();") + RegistraScript("$get('HdnWidth').value = $('#C_Tab_TabC_DivConceptosContenido').width();") 'NO MOSTRAR LA OPCION DE ENTREGA DIRECTA (ECONOLLANTAS) If UsuarioActual.CveEmpresa = 141 Then From d72a785136bddf184ec117dec1b223d5dae8e496 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 1 Feb 2023 10:26:49 -0700 Subject: [PATCH 082/103] Cambios en ventas para contratos de emd --- Contratos/Contrato.aspx.vb | 120 +++++++++++++++---------- Ventas/Ventas.aspx | 40 ++------- Ventas/Ventas.aspx.vb | 173 +++++++++++++++++++++++++++++-------- 3 files changed, 217 insertions(+), 116 deletions(-) diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb index fe12f6fef..413d9a730 100644 --- a/Contratos/Contrato.aspx.vb +++ b/Contratos/Contrato.aspx.vb @@ -25,17 +25,17 @@ Partial Class Contratos_Default ViewState("CveContrato") = value End Set End Property - Private Property CveTipoContrato As Integer + Private Property CveContratoTipo As Integer Get - If ViewState("CveTipoContrato") Is Nothing Then + If ViewState("CveContratoTipo") Is Nothing Then Return 0 Else - Return ViewState("CveTipoContrato").ToString.ToEntero + Return ViewState("CveContratoTipo").ToString.ToEntero End If End Get Set(value As Integer) - ViewState("CveTipoContrato") = value + ViewState("CveContratoTipo") = value End Set End Property Private Property CveMovimiento As Integer @@ -372,7 +372,7 @@ Partial Class Contratos_Default CargaInventarios() '12/04/2018 - Si el tipo de contrato es convenio de precio fijo configura campos - If CveTipoContrato = 28 Then + If CveContratoTipo = 28 Then CargaConvenioPrecioFijo() End If @@ -664,7 +664,11 @@ Partial Class Contratos_Default Private Sub loadComboTipoContrato(venta As Boolean) Try If venta Then - DdlTipoContrato.DataSource = GlobalDTContratosTipos(UsuarioActual.CveEmpresa).FiltraParametros(" TipoMovimiento = 1") + If UsuarioActual.CveEmpresa = 13 Then + DdlTipoContrato.DataSource = GlobalDTContratosTipos(UsuarioActual.CveEmpresa).FiltraParametros(" CveEmpresa = 13") + Else + DdlTipoContrato.DataSource = GlobalDTContratosTipos(UsuarioActual.CveEmpresa).FiltraParametros(" TipoMovimiento = 1") + End If Else DdlTipoContrato.DataSource = GlobalDTContratosTipos(UsuarioActual.CveEmpresa).FiltraParametros(" TipoMovimiento = 0") @@ -724,11 +728,11 @@ Partial Class Contratos_Default DvTotal.Visible = True - If CveContrato > 0 AndAlso CveTipoContrato <> 25 Then + If CveContrato > 0 AndAlso CveContratoTipo <> 25 Then TableDatosCabecera.Visible = True End If - If CveTipoContrato = 25 Then + If CveContratoTipo = 25 Then DvMax.Visible = False DvMin.Visible = False DvTotal.Visible = False @@ -745,11 +749,11 @@ Partial Class Contratos_Default DvTotal.Visible = True 'TxtCantidad.Visible = False - If CveContrato > 0 AndAlso CveTipoContrato <> 25 Then + If CveContrato > 0 AndAlso CveContratoTipo <> 25 Then TableDatosCabecera.Visible = True End If - If CveTipoContrato = 25 Then + If CveContratoTipo = 25 Then DvMax.Visible = False DvMin.Visible = False DvTotal.Visible = False @@ -776,13 +780,13 @@ Partial Class Contratos_Default Exit Sub End If - Me.CveTipoContrato = DdlTipoContrato.SelectedValue.ToEntero + Me.CveContratoTipo = DdlTipoContrato.SelectedValue.ToEntero 'Dim TipoMov = GlobalDTContratosTipos.FiltroPrimeroValor("TipoMovimiento", $"CveContratoTipo='{CveTipoContrato}'").ToEntero If rpCompra.Checked Then - Response.Redirect($"/Contratos/Presupuestos.aspx?CveContrato=-1&CveContratoTipo={Me.CveTipoContrato}") + Response.Redirect($"/Contratos/Presupuestos.aspx?CveContrato=-1&CveContratoTipo={Me.CveContratoTipo}") 'RegistraScript("window.location='/Contratos/Presupuestos.aspx") Else @@ -853,7 +857,7 @@ Partial Class Contratos_Default ' 'DvObservaciones.Visible = True 'End If - Dim CveTipoContrato = DdlTipoContrato.SelectedValue + 'Dim CveTipoContrato = DdlTipoContrato.SelectedValue 'Dim TipoMov = GlobalDTContratosTipos.AsEnumerable().Where(Function(a) a("CveContratoTipo").ToString = CveTipoContrato).FirstOrDefault()("TipoMovimiento") @@ -913,9 +917,28 @@ Partial Class Contratos_Default TxtNumeroLicitacion.Text = ObjContratos.NumeroLicitacion TipoContrato = ObjContratos.CveContratoTipo TxtPorcentajeComision.Text = ObjContratos.PorcentajeComision.ToString - CveTipoContrato = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero + CveContratoTipo = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString + If CveContratoTipo = 33 Then + TabContratosGastos.Visible = False + TabAF.Visible = False + TabReporteAvance.Visible = False + TabAvanveDocumento.Visible = False + TabContratosGastos.Visible = False + TabAF.Visible = False + TabPed.Visible = False + TabAddendum.Visible = False + TabFacCiclica.Visible = False + + TabPVInsumos.Visible = False + + thOcCliente.Visible = False + tdOcCliente.Visible = False + + thLimitar.Visible = False + tdLimitar2.Visible = False + End If If ObjContratos.CveProveedor > 0 Then TrProveedor.Visible = True @@ -1379,7 +1402,7 @@ Partial Class Contratos_Default If ObjContratos.UpdateContratos(CveContrato, TxtNumeroContrato.Text, TxtDescripcionContrato.Text, TxtNumeroLicitacion.Text.Trim, DdlContratista.SelectedValue.ToEntero, DdlCliente.SelectedValue.ToEntero, -1, TxtFechaInicial.Text.ToDate, TxtFechaFinal.Text.ToDate, TxtUbicacion.Text, TxtResponsable.Text, DdlSubProyectoContrato.SelectedValue.ToEntero, TxtPorIVA.Text.ToDouble, TxtPorAnticipo.Text.ToDouble, TxtPorAmortizacionAnticipo.Text.ToDouble, TxtPorGarantia.Text.ToDouble, ArchivoUpdate, "", DdlContratoPadre.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, Minimo, Maximo, Total, DdlMoneda.SelectedValue.ToEntero, - ModalidadDetalle, If(UsuarioActual.Empresa.CvePlataforma = 3 OrElse CveTipoContrato = 25, 1, DdlEstatus.SelectedValue.ToEntero), TipoContrato, TxtTipoCambio.Text.ToDouble, CveSucursalCliente:=DdlSucursalCliente.SelectedValue.ToEntero, + ModalidadDetalle, If(UsuarioActual.Empresa.CvePlataforma = 3 OrElse CveContratoTipo = 25, 1, DdlEstatus.SelectedValue.ToEntero), TipoContrato, TxtTipoCambio.Text.ToDouble, CveSucursalCliente:=DdlSucursalCliente.SelectedValue.ToEntero, CveAlmacenOrigen:=DdlAlmacenOrigen.SelectedValue.ToEntero, CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, PorcentajeComision:=TxtPorcentajeComision.Text.ToEntero, TipoGarantia:=DdlTipoGarantia.SelectedValue.ToEntero, Folio:=TxtFolio.Text.ToEntero, FechaVenc:=txtFechaVenc.Text.ToDate, EstatusFianza:=DdlEstatusFianza.SelectedValue.ToEntero, CveContratoPlantilla:=DdlPlantillaContrato.SelectedValue.ToEntero, CveCuentaEquipo:=DdlCuentaEquipo.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=DdlClienteDireccionEnvio.SelectedValue.ToEntero, AplicaImpuestosLocales:=ChkImpuestosLocales.Checked, @@ -1887,7 +1910,7 @@ Partial Class Contratos_Default Gv.DataSource = DtTemp DtPresupuestos = DtTemp Gv.DataBind() - If CveTipoContrato = 25 Then + If CveContratoTipo = 25 Then Gv.Columns(0).Visible = False Gv.Columns(2).Visible = False Gv.Columns(3).Visible = False @@ -2045,7 +2068,7 @@ Partial Class Contratos_Default e.Row.FCLinkButton("imgE").Visible = False e.Row.FCLinkButton("imgD").Visible = False End If - If CveTipoContrato = 25 Then + If CveContratoTipo = 25 Then e.Row.Cells(1).Width = Unit.Pixel(10) e.Row.Cells(6).Width = Unit.Pixel(250) End If @@ -2474,38 +2497,41 @@ Partial Class Contratos_Default Private Sub CargaDatosAvance() If CveContrato <= 0 Then Exit Sub + End If + + If CveContratoTipo <> 33 Then + TabReporteAvance.Visible = True + lbImprimirAvance.Visible = True + + Dim Modalidad = IfNull(Request("Tipo"), 1, 2) + + If Modalidad.ToString.ToEntero = 2 Then + Tab.ActiveTabIndex = 2 + End If + + Dim ObjContratos As New ClsContratos + + If ObjContratos.GetReporteContratosAvancesDetalleCP(CveContrato, UsuarioActual.CveEmpresa) Then + GvDatosAvance.DataSource = ObjContratos.DtResultados + SumaAvance = ObjContratos.DtResultados.SUM("AvanceImporte", "CveClasificacion IS NULL") + SumaUtilidad = ObjContratos.DtResultados.SUM("AvanceUtilidad", "CveClasificacion IS NULL") + DtAvance = ObjContratos.DtResultados + Else + Alert("Ocurrió un Error al obtener el Reporte de Avances. Por favor vuelva a intentar", TipoMensaje.MsgError) + End If + + ObjContratos.Dispose() + GvDatosAvance.DataBind() + + If (GvDatosAvance.Rows.Count > 0) Then + GvDatosAvance.UseAccessibleHeader = True + GvDatosAvance.HeaderRow.TableSection = TableRowSection.TableHeader + RegistraScript("OrdenarGV();") + End If + + UpGral.Update() End If - TabReporteAvance.Visible = True - lbImprimirAvance.Visible = True - - Dim Modalidad = IfNull(Request("Tipo"), 1, 2) - - If Modalidad.ToString.ToEntero = 2 Then - Tab.ActiveTabIndex = 2 - End If - - Dim ObjContratos As New ClsContratos - - If ObjContratos.GetReporteContratosAvancesDetalleCP(CveContrato, UsuarioActual.CveEmpresa) Then - GvDatosAvance.DataSource = ObjContratos.DtResultados - SumaAvance = ObjContratos.DtResultados.SUM("AvanceImporte", "CveClasificacion IS NULL") - SumaUtilidad = ObjContratos.DtResultados.SUM("AvanceUtilidad", "CveClasificacion IS NULL") - DtAvance = ObjContratos.DtResultados - Else - Alert("Ocurrió un Error al obtener el Reporte de Avances. Por favor vuelva a intentar", TipoMensaje.MsgError) - End If - - ObjContratos.Dispose() - GvDatosAvance.DataBind() - - If (GvDatosAvance.Rows.Count > 0) Then - GvDatosAvance.UseAccessibleHeader = True - GvDatosAvance.HeaderRow.TableSection = TableRowSection.TableHeader - RegistraScript("OrdenarGV();") - End If - - UpGral.Update() End Sub Protected Sub GvDatosAvance_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosAvance.RowDataBound diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 92084a0bb..4de903d41 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -554,11 +554,11 @@
    - - - - - + + Descripción de factura: + + +
    @@ -907,32 +907,6 @@ - - - -
    -
    - - Descripción -
    -
    -
    -
    -
    -
    - -
    -
    -
    - - - - -
    -
    -
    -
    -
    @@ -3165,7 +3139,7 @@ - + @@ -4552,7 +4526,7 @@ - + diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 8bf4bc962..c554e418e 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2315,6 +2315,15 @@ Partial Class Ventas End Set End Property + Private Property CveContratoTipo As Integer + Get + Return IfNull(ViewState("CveContratoTipo"), "-1", ViewState("CveContratoTipo")).ToString().ToEntero() + End Get + Set(value As Integer) + ViewState("CveContratoTipo") = value + End Set + End Property + #End Region '#Region "AuxiliarConta" @@ -3464,7 +3473,7 @@ Partial Class Ventas End If If UsuarioActual.CveEmpresa = 13 Then - UpDescripcionVenta.Visible = True + TrDescripcionVenta.Visible = True If CveVenta <= 0 Then TxtDescripcionVenta.Enabled = True End If @@ -3742,6 +3751,7 @@ Partial Class Ventas End Try End Sub Private Sub VerificarContrato(Optional AfterPageLoad As Boolean = False) + Dim ObjContratos As New ClsContratos If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, CveCliente, -1, 1) Then @@ -3823,6 +3833,17 @@ Partial Class Ventas End If + + If UsuarioActual.CveEmpresa = 13 Then + DivEstimaciones.Visible = True + GvEst.Visible = False + ContratoDetalles.Visible = False + GvContratoDetalles.Visible = True + + BtnEstimacion.Visible = False + + End If + PresionarBotonModal("C_BtnCerrarContrato") End Sub Private Sub BtnCancelarContratoDetalles_Click(sender As Object, e As EventArgs) Handles BtnCancelarContratoDetalles.Click @@ -4067,9 +4088,17 @@ Partial Class Ventas ' ObjClientes.Dispose() 'End If + Dim CveContratoSeleccionado As Integer = -1 + If DdlContratosModal.SelectedValue.ToEntero() > 0 Then + CveContratoSeleccionado = DdlContratosModal.SelectedValue.ToEntero() + End If + + If Me.CveContratoTipo = 33 AndAlso DdlContrato.SelectedValue.ToEntero() > 0 Then + CveContratoSeleccionado = DdlContrato.SelectedValue.ToEntero() + End If + + Dim DrContrato As DataRow = DtContratos.FiltroPrimero($"CveContrato = {CveContratoSeleccionado}") - Dim DrContrato As DataRow = DtContratos.FiltroPrimero($"CveContrato = {DdlContratosModal.SelectedValue.ToEntero()}") - Dim ps As New ClsInventarios CveContrato = DdlContratosModal.SelectedValue.ToEntero() AplicaGastoContrato = If(DrContrato("CveContratoTipo").ToString().Contiene("9", "10", "13"), True, False) 'Arrendamiento, Servicios De Impresion, Financiamiento @@ -4083,6 +4112,7 @@ Partial Class Ventas TxtIVA.Text = "0" TxtRetIVA.Text = "0" + Dim ps As New ClsInventarios For Each Row As GridViewRow In GvContratoDetalles.Rows If Row.FCTextBox("TxtCant").Text.ToEntero() > 0 Then @@ -4107,8 +4137,8 @@ Partial Class Ventas SeleccionadoContrato += Row.FCTextBox("TxtCant").Text.ToEntero() * Row.FCLiteral("LtlPU").Text.ToDouble AgregarProductoServicio(Row.FCTextBox("TxtCant").Text.ToEntero(), Row.DataKey("CveUM").ToEntero(), Row.FCLiteral("LtlUM").Text, Row.DataKey("CveClasificacion").ToEntero(), - Row.DataKey("Clasificacion"), Row.DataKey("CvePS").ToEntero(), Row.FCLiteral("LtlPS").Text, If(CveCicloComercial > 0, ObsPlantilla, $"/ {Row.FCLiteral("LtCveInterna").Text}"), Row.FCLiteral("LtlPU").Text.ToDecimal, 0, - DrContrato("CveProyecto").ToString().ToEntero(), DrContrato("ProyectoContrato").ToString(), DrContrato("CveSubProyecto").ToString().ToEntero(), DrContrato("SubProyectoContrato").ToString(), CveContratoDetalle:=Row.DataKey("CveContratoDetalle").ToEntero()) + Row.DataKey("Clasificacion"), Row.DataKey("CvePS").ToEntero(), Row.FCLiteral("LtlPS").Text, If(CveCicloComercial > 0, ObsPlantilla, $"/ {Row.FCLiteral("LtCveInterna").Text}"), Row.FCLiteral("LtlPU").Text.ToDecimal, 0, + DrContrato("CveProyecto").ToString().ToEntero(), DrContrato("ProyectoContrato").ToString(), DrContrato("CveSubProyecto").ToString().ToEntero(), DrContrato("SubProyectoContrato").ToString(), CveContratoDetalle:=Row.DataKey("CveContratoDetalle").ToEntero()) 'AddPS(Row.FCTextBox("TxtCant").Text.ToEntero(), Row.DataKey("CveUM").ToEntero(), Row.FCLiteral("LtlUM").Text, Row.DataKey("CveClasificacion").ToEntero(), Row.DataKey("Clasificacion"), ' Row.DataKey("CvePS").ToEntero(), Row.FCLiteral("LtlPS").Text, If(CveCicloComercial > 0, Row.DataKey("Observaciones"), $"/ {Row.FCLiteral("LtCveInterna").Text}"), Row.FCLiteral("LtlPU").Text.ToDouble, If(Row.DataKey("IVA").ToDouble = -1, ViewState("IVA").ToString().ToDouble, Row.DataKey("IVA").ToDouble), 0, 0, 1, 0, True, "", ' DrContrato("CveProyecto").ToString().ToEntero(), DrContrato("ProyectoContrato").ToString(), DrContrato("CveSubProyecto").ToString().ToEntero(), DrContrato("SubProyectoContrato").ToString(), CveTipoPS, CveTipoInv, CveContratoDetalle:=Row.DataKey("CveContratoDetalle").ToEntero(), CodigoPS:=Row.FCLiteral("LtlPS").Text) @@ -4125,6 +4155,7 @@ Partial Class Ventas End If Next + ps.Dispose() 'SI EL CONTRATO TIENE IMPUESTOS LOCALES SE CARGAN LOS DEL CONTRATO AHUEVO If RBLTipoContrato.SelectedValue = "2" Then @@ -4175,7 +4206,15 @@ Partial Class Ventas CalculaUsados() CalculaTotalesVenta() - LbAgregar.Visible = False + + If Me.CveContratoTipo <> 33 Then + LbAgregar.Visible = False + Else + Me.CveContrato = DdlContrato.SelectedValue.ToEntero() + LbAgregar.Visible = True + End If + + UpPS.Update() 'restricciones para evitar cambios una vez seleccionado el contrato @@ -4192,7 +4231,7 @@ Partial Class Ventas PresionarBotonModal("C_BtnCerrarContrato") - ps.Dispose() + UpFacturar.Update() End Sub Private Sub CargarContratoUrl() @@ -4366,6 +4405,11 @@ Partial Class Ventas e.Row.FCTextBox("TxtCant").Enabled = False End If + If Me.CveContratoTipo = 33 Then + e.Row.FCTextBox("TxtCant").Enabled = False + e.Row.FCTextBox("TxtCant").Text = e.Row.DBCampo("Cantidad") + End If + ''Si viene de una OC Sin Facturar y tiene contrato 'If TieneContrato AndAlso ContratosConOC IsNot Nothing AndAlso ContratosConOC.ToString().Length > 0 Then ' e.Row.FCTextBox("TxtCant").Text = e.Row.DBCampo("CantidadOC").ToString() @@ -4821,7 +4865,7 @@ Partial Class Ventas End If If UsuarioActual.CveEmpresa = 13 Then - UpDescripcionVenta.Visible = True + TrDescripcionVenta.Visible = True TxtDescripcionVenta.Text = DbRowVenta("DescripcionVenta").ToString() End If @@ -6682,7 +6726,11 @@ Partial Class Ventas 'CargaFolios() - CargaDatosEstimaciones(CveCliente) + If UsuarioActual.CveEmpresa = 13 Then + CargaContratosCliente(CveCliente) + Else + CargaDatosEstimaciones(CveCliente) + End If If ObjCliente.GetClienteImpuestosLocales(CveCliente) Then 'se cargan impuestos locales @@ -13452,11 +13500,13 @@ Partial Class Ventas End If 'Contratos - If factura.CveContrato > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing") Then - GuardarContratoAvanceEstimaciones(ObjContr, factura, ErrorList, 1) - 'CUANDO ES NOTA DE CRÉDITO, NO DEBE DE CONSIDERAR AVANCE, CUANDO ES NOTA DE CRÉDITO POR AMORTIZACIÓN - ElseIf factura.CveContrato > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") AndAlso Not EsNCAmortizacion Then - GuardarContratoAvanceEstimaciones(ObjContr, factura, ErrorList, -1) + If factura.CveContrato > 0 AndAlso Me.CveContratoTipo <> 33 Then + If factura.CveContrato > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing") Then + GuardarContratoAvanceEstimaciones(ObjContr, factura, ErrorList, 1) + 'CUANDO ES NOTA DE CRÉDITO, NO DEBE DE CONSIDERAR AVANCE, CUANDO ES NOTA DE CRÉDITO POR AMORTIZACIÓN + ElseIf factura.CveContrato > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") AndAlso Not EsNCAmortizacion Then + GuardarContratoAvanceEstimaciones(ObjContr, factura, ErrorList, -1) + End If End If 'Impuestos Locales @@ -13626,7 +13676,9 @@ Partial Class Ventas If ErrorList.Count = 0 Then 'estimaciones - GuardarVentaEstimaciones(ObjContr, factura) + If Me.CveContratoTipo <> 33 Then + GuardarVentaEstimaciones(ObjContr, factura) + End If If ErrorList.Count = 0 Then 'armonizaccionContable GuardarVentaAC(ObjVentas, factura, Msgok, objContPaqi) @@ -21410,18 +21462,39 @@ Partial Class Ventas Protected Sub DdlContrato_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlContrato.SelectedIndexChanged Dim valueselect = DdlContrato.SelectedValue - CargaDatosEstimaciones(CveCliente) - DdlContrato.SelectedValue = valueselect - If DdlContrato.SelectedValue.ToEntero() > 0 Then - For Each gvr As GridViewRow In GvEst.Rows - If gvr.DataKey("CveContratoAvance").ToEntero() > 0 Then - gvr.FCCheckBox("Chk").Checked = True - gvr.FCCheckBox("Chk").Visible = True - End If - Next - BtnEstimacion.Visible = True + + Dim CveContrato As Integer = valueselect.ToEntero() + Using ObjContratos As New ClsContratos + If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa, CveCliente:=CveCliente) Then + Me.CveContratoTipo = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString().ToEntero() + End If + End Using + + + If CveContratoTipo <> 33 Then + CargaDatosEstimaciones(CveCliente) + DdlContrato.SelectedValue = valueselect + If DdlContrato.SelectedValue.ToEntero() > 0 Then + For Each gvr As GridViewRow In GvEst.Rows + If gvr.DataKey("CveContratoAvance").ToEntero() > 0 Then + gvr.FCCheckBox("Chk").Checked = True + gvr.FCCheckBox("Chk").Visible = True + End If + Next + BtnEstimacion.Visible = True + End If + Else + CargaDatosContratoDetalle() + GvEst.Visible = False + ContratoDetalles.Visible = False + GvContratoDetalles.Visible = True + + DdlContrato.SelectedValue = valueselect + BtnEstimacion.Visible = False + UPEstimaciones.Update() End If + 'If RblOpcionContrato.SelectedValue = "3" Then @@ -21441,34 +21514,62 @@ Partial Class Ventas If CveVenta > 0 Then Exit Sub End If - Dim Con As New ClsContratos - - - - - If Con.GetEstimacionesPorFacturar(-1, CveCliente, DdlContrato.SelectedValue.ToEntero(), 0, UsuarioActual.CveEmpresa) Then - GvEst.DataSource = Con.DtResultados - If Con.DtResultados.Rows.Count > 0 Then + Dim ObjContrato As New ClsContratos + If ObjContrato.GetEstimacionesPorFacturar(-1, CveCliente, DdlContrato.SelectedValue.ToEntero(), 0, UsuarioActual.CveEmpresa) Then + GvEst.DataSource = ObjContrato.DtResultados + If ObjContrato.DtResultados.Rows.Count > 0 Then 'BtnEstimacion.Visible = True DdlContrato.Items.Clear() DdlContrato.Items.Add(New ListItem("Todos", "-1")) - DdlContrato.DataSource = Con.DtResultados.FiltraParametros("CveContrato > 0", "NumeroContrato", DistinctColumns:={"CveContrato", "NumeroContrato"}) + DdlContrato.DataSource = ObjContrato.DtResultados.FiltraParametros("CveContrato > 0", "NumeroContrato", DistinctColumns:={"CveContrato", "NumeroContrato"}) End If End If + ObjContrato.Dispose() - UPEstimaciones.Update() - Con.Dispose() DdlContrato.DataBind() GvEst.DataBind() + UPEstimaciones.Update() + End Sub + Private Sub CargaDatosContratoDetalle() + If CveVenta > 0 Then + Exit Sub + End If + Dim ObjContrato As New ClsContratos + If DdlContrato.SelectedValue.ToEntero() > 0 Then + If ObjContrato.GetContratosDetalle(DdlContrato.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then + GvContratoDetalles.DataSource = ObjContrato.DtResultados + End If + Else + GvContratoDetalles.DataSource = Nothing + End If + ObjContrato.Dispose() + GvContratoDetalles.DataBind() + GvContratoDetalles.EmptyDataText = "No se encontraron productos/servicios para este contrato" + UPEstimaciones.Update() + End Sub + Private Sub CargaContratosCliente(CveCliente As Integer) + If CveVenta > 0 Then + Exit Sub + End If + DdlContrato.Items.Clear() + DdlContrato.Items.Add(New ListItem("Todos", "-1")) + Dim ObjContratos As New ClsContratos + If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, CveCliente:=CveCliente, CveEstatus:=-1) Then + DdlContrato.DataSource = ObjContratos.DtResultados.FiltraParametros("CveContrato > 0", "NumeroContrato", DistinctColumns:={"CveContrato", "NumeroContrato"}) + End If + ObjContratos.Dispose() + + DdlContrato.DataBind() + UPEstimaciones.Update() End Sub Protected Sub GVEst_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEst.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then From c5e97bb891955bee51ca4f66e1d33092d1980551 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 1 Feb 2023 10:38:49 -0700 Subject: [PATCH 083/103] =?UTF-8?q?--=20optmizaci=C3=B3n=20para=20sacar=20?= =?UTF-8?q?info=20de=20ps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/EntregaAlmacen.aspx.vb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 6564616f1..c53d15091 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -1156,8 +1156,9 @@ Partial Class Inventarios_EntregaAlmacen If Not CargaMasivo Then RegistraScript("$('#DivSerie').modal('show')", "show") Dim AplicaCaducidad = False - If GlobalDTPS(UsuarioActual.CveEmpresa, ).FiltraParametros("").Rows(0) IsNot Nothing Then - AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False) + Dim dttt As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie) + If dttt IsNot Nothing AndAlso dttt.Rows.Count > 0 Then + AplicaCaducidad = If(dttt.FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False) End If GvSerie.Columns(1).HeaderText = UsuarioActual.Empresa.Funcionalidad(147) @@ -1177,7 +1178,7 @@ Partial Class Inventarios_EntregaAlmacen 'SERIE LOTE RECOMENDADO Dim DtSerie As New DataTable - If TipoMovimiento = 1 Then + If TipoMovimiento = 1 AndAlso Not CargaMasivo Then Dim ObjInventarios As New ClsInventarios If ObjInventarios.SerieRecomendadoGet(CvePSSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), CveSubProyecto:=CveSubProyecto, CveCliente:=CveCliente, CveVendedor:=CveVendedor) Then DtSerie = ObjInventarios.DtResultados @@ -1254,7 +1255,7 @@ Partial Class Inventarios_EntregaAlmacen ArraySeries = Series.Trim.Split(","c) For i As Integer = 0 To ArraySeries.Length - 1 - If ArraySeries(i).Trim.Length > 1 Then AgregaSerie(ArraySeries(i).Trim, 1) + If ArraySeries(i).Trim.Length > 1 Then AgregaSerie(ArraySeries(i).Trim, 1, True) Next Else AgregaSerie(TxtSerie.Text.Trim, 1) From ca24caa0eb2b31a78d91a547f51b86892ab81699 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 1 Feb 2023 10:48:26 -0700 Subject: [PATCH 084/103] -- mejora carga masiva *Series* --- Inventarios/EntregaAlmacen.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index c53d15091..29e17c875 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -1188,7 +1188,7 @@ Partial Class Inventarios_EntregaAlmacen DtSerie = DtExistencias.FiltraParametros("Serie <> ''") End If 'SERIE LOTE RECOMENDADO - QUITA YA COMPLETADOS EN EL CLIENTE - If DtSerie.Rows.Count > 0 Then + If DtSerie IsNot Nothing AndAlso DtSerie.Rows.Count > 0 Then 'CALCULA YA COMPLETADOS Dim DrsRemove As New List(Of DataRow) DtSerie.Columns.Add("CantidadSeleccionada", GetType(Integer)) From 438abc98cf7b4acd275807de8271f0c689048cc2 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 1 Feb 2023 10:55:08 -0700 Subject: [PATCH 085/103] -- mejora de control de error --- Inventarios/EntregaAlmacen.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 29e17c875..f52220856 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -1317,7 +1317,7 @@ Partial Class Inventarios_EntregaAlmacen DtDatosDetalle.Rows.Add(Row) ActualizaBitacora() - RegistraScript("playsonidito('beep-07.wav')", "Sonidito") + If Not CargaMasivo Then RegistraScript("playsonidito('beep-07.wav')", "Sonidito") If Tipo = 1 Then TxtSerie.Text = "" From 8465bda0485b8f60f773b4a04c896d309ee6a0eb Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 1 Feb 2023 10:55:36 -0700 Subject: [PATCH 086/103] -- cambios en manejo de GlobalDTs --- Compras/RepComprasG.aspx.vb | 2 +- Compras/RepComprasPeriodo.aspx.vb | 2 +- Compras/RepCxP.aspx.vb | 4 +-- Compras/RepCxPDetalle.aspx.vb | 2 +- Compras/RepCxPPeriodo.aspx.cs | 2 +- Compras/RepProductosServiciosPeriodo.aspx.cs | 2 +- Contabilidad/FisImpuestos.aspx.vb | 6 ++-- Contabilidad/PlantillasPolizasDetalle.aspx.vb | 10 +++--- Contabilidad/RegPrePoliza1.aspx.vb | 2 +- GPS/UsuariosRastreo.aspx.vb | 15 ++++---- General/SaldosIniciales.aspx.vb | 2 +- Nomina/CargaArchivosNomina.aspx.cs | 5 ++- Sistemas/CatSesiones.aspx.vb | 36 ++++++++++--------- Sistemas/PopUpAddUsuario.aspx.vb | 14 ++++---- Sistemas/PopUpPerfil.aspx.vb | 11 +++--- Sistemas/UsuarioDetalle.aspx.vb | 16 +++++---- 16 files changed, 68 insertions(+), 63 deletions(-) diff --git a/Compras/RepComprasG.aspx.vb b/Compras/RepComprasG.aspx.vb index 59578db83..29e787bee 100644 --- a/Compras/RepComprasG.aspx.vb +++ b/Compras/RepComprasG.aspx.vb @@ -30,7 +30,7 @@ Partial Class Compras_RepComprasG 'TxtFechaICaptura.Text = Now.AddMonths(-1).FirstDayOfMonth.ToShortDateString 'TxtFechaFCaptura.Text = Now.ToShortDateString - DDlUsuarioCaptura.DataSource = GlobalDTUsuarioResponsable.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) + DDlUsuarioCaptura.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa) DDlUsuarioCaptura.DataBind() DdlEstatusCompra.DataSource = GlobalDTCompEstatusFactura.FiltraParametros("CveEstatusFactura IN (1,2)") diff --git a/Compras/RepComprasPeriodo.aspx.vb b/Compras/RepComprasPeriodo.aspx.vb index 7b86e0ed1..6a1d06779 100644 --- a/Compras/RepComprasPeriodo.aspx.vb +++ b/Compras/RepComprasPeriodo.aspx.vb @@ -111,7 +111,7 @@ Partial Class Compras_RepComprasPeriodo DdlTipoGasto.DataBind() 'Carga Usuarios Responsable - DdlUsuario.DataSource = GlobalDTUsuarioResponsable.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) + DdlUsuario.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa) DdlUsuario.DataBind() 'Carga Usuarios Captura diff --git a/Compras/RepCxP.aspx.vb b/Compras/RepCxP.aspx.vb index c6aa07c91..ccfa889b5 100644 --- a/Compras/RepCxP.aspx.vb +++ b/Compras/RepCxP.aspx.vb @@ -124,9 +124,7 @@ Partial Class Compras_RepCxP DdlProveedor.ddl.Items.Insert(0, New ListItem("Todos", "-1")) End If - - - DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa).FiltraParametros("ProveedoresResponsables > 0") + DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa) DdlUsuarioResponsable.DataBind() 'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) diff --git a/Compras/RepCxPDetalle.aspx.vb b/Compras/RepCxPDetalle.aspx.vb index 10ad64961..c7243644b 100644 --- a/Compras/RepCxPDetalle.aspx.vb +++ b/Compras/RepCxPDetalle.aspx.vb @@ -245,7 +245,7 @@ Partial Class RepCxPDetalle 'CargaUsuarios Dim UsuarioResponsable As Integer = IfNull(Request("CveUsuarioResponsable"), -1).ToString.ToEntero - DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa).FiltraParametros("ProveedoresResponsables > 0") + DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa) DdlUsuarioResponsable.DataBind() DdlUsuarioResponsable.SelectedValueExist(UsuarioResponsable) diff --git a/Compras/RepCxPPeriodo.aspx.cs b/Compras/RepCxPPeriodo.aspx.cs index 27b498718..95766a42b 100644 --- a/Compras/RepCxPPeriodo.aspx.cs +++ b/Compras/RepCxPPeriodo.aspx.cs @@ -67,7 +67,7 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas - DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}").FiltraParametros("ProveedoresResponsables > 0"); + DdlUsuarioResponsable.DataSource = get_GlobalDTUsuarioResponsable ( UsuarioActual.CveEmpresa ); DdlUsuarioResponsable.DataBind(); DdlSubProyecto.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1); diff --git a/Compras/RepProductosServiciosPeriodo.aspx.cs b/Compras/RepProductosServiciosPeriodo.aspx.cs index 75d4bcdbe..c14c5b578 100644 --- a/Compras/RepProductosServiciosPeriodo.aspx.cs +++ b/Compras/RepProductosServiciosPeriodo.aspx.cs @@ -129,7 +129,7 @@ public partial class Compras_RepProductosServiciosPeriodo : ClsPaginas DdlTipoGasto.DataBind(); //Carga Usuarios Responsable - DdlUsuario.DataSource = GlobalDTUsuarioResponsable.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}"); + DdlUsuario.DataSource = get_GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa); DdlUsuario.DataBind(); //Carga Usuarios Captura diff --git a/Contabilidad/FisImpuestos.aspx.vb b/Contabilidad/FisImpuestos.aspx.vb index 24a0db316..cd147c712 100644 --- a/Contabilidad/FisImpuestos.aspx.vb +++ b/Contabilidad/FisImpuestos.aspx.vb @@ -167,7 +167,7 @@ Partial Class Contabilidad_FisImpuestos Dim objConta As New ClsContabilidad Dim DtTemp As New DataTable Dim _CvePrePoliza As Integer = 0 - Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(62).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden") + Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, 62).FiltraParametros("", "Orden") Dim DtTempDetalle As New DataTable With DtTempDetalle.Columns @@ -247,7 +247,7 @@ Partial Class Contabilidad_FisImpuestos Private Sub CargaDetallesPlantilla() - Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(62).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden") + Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, 62).FiltraParametros("", "Orden") Dim Cuenta As String = "" Dim IdCuenta As Integer = 0 Dim CodigoCuenta As String = "" @@ -343,7 +343,7 @@ Partial Class Contabilidad_FisImpuestos Protected Sub GvMov_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMov.RowDataBound - Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(62).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden") + Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, 62).FiltraParametros("", "Orden") If e.Row.RowType = DataControlRowType.DataRow Then diff --git a/Contabilidad/PlantillasPolizasDetalle.aspx.vb b/Contabilidad/PlantillasPolizasDetalle.aspx.vb index 3d9238f6f..e9a5d17dd 100644 --- a/Contabilidad/PlantillasPolizasDetalle.aspx.vb +++ b/Contabilidad/PlantillasPolizasDetalle.aspx.vb @@ -242,14 +242,14 @@ Partial Class Contabilidad_PlantillasPolizasDetalle Public Sub updatatos() Dim ObjPlantillaPolizaDetalle As New ClsContabilidad - If ObjPlantillaPolizaDetalle.GetConta_PlantillasPolizasDetalle(-1, -1) Then + If ObjPlantillaPolizaDetalle.GetConta_PlantillasPolizasDetalle(-1, UsuarioActual.CveEmpresa) Then ViewState("DTPlantillaPolizaDetalle") = ObjPlantillaPolizaDetalle.DtResultados.FiltraParametros(String.Format(" CvePlantillaPoliza={0} AND CveEmpresa = {1}", CvePlantillaPoliza, UsuarioActual.CveEmpresa)) - GlobalDTContaPlantillasPolizasDetalle(CvePlantillaPoliza) = ObjPlantillaPolizaDetalle.DtResultados - End If - If ObjPlantillaPolizaDetalle.GetConta_PlantillasPolizas(-1, -1) Then - GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa) = ObjPlantillaPolizaDetalle.DtResultados + ' GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantillaPoliza) = ObjPlantillaPolizaDetalle.DtResultados End If + + GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa) = Nothing + ObjPlantillaPolizaDetalle.Dispose() End Sub Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click diff --git a/Contabilidad/RegPrePoliza1.aspx.vb b/Contabilidad/RegPrePoliza1.aspx.vb index 2dbc8e945..44afac00d 100644 --- a/Contabilidad/RegPrePoliza1.aspx.vb +++ b/Contabilidad/RegPrePoliza1.aspx.vb @@ -636,7 +636,7 @@ Partial Class ContabilidadC_RegPrePoliza Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero - Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden") + Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden") Dim Cuenta As String = "" Dim IdCuenta As Integer = 0 Dim CodigoCuenta As String = "" diff --git a/GPS/UsuariosRastreo.aspx.vb b/GPS/UsuariosRastreo.aspx.vb index 00453084b..88bfd564b 100644 --- a/GPS/UsuariosRastreo.aspx.vb +++ b/GPS/UsuariosRastreo.aspx.vb @@ -51,13 +51,14 @@ Partial Class GPS_UsuariosRastreo End Sub Public Sub CargaGlobal() - Dim ObjUsuarios As New ClsSisUsuarios - If ObjUsuarios.GetUsuariosEmpresas(-1) Then - GlobalDTUsuarios(-1) = ObjUsuarios.DtResultados - Else - GlobalDTUsuarios() = Nothing - End If - ObjUsuarios.Dispose() + GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa) = Nothing + 'Dim ObjUsuarios As New ClsSisUsuarios + 'If ObjUsuarios.GetUsuariosEmpresas(-1) Then + ' GlobalDTUsuarios(-1) = ObjUsuarios.DtResultados + 'Else + ' GlobalDTUsuarios() = Nothing + 'End If + 'ObjUsuarios.Dispose() End Sub Protected Sub GvUsuarios_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvUsuarios.RowDataBound diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index f26103631..114626dde 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1408,7 +1408,7 @@ Partial Class General_SaldosIniciales If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, NumExt.ToString(), "", Colonia, Poblacion, Poblacion, Estado, Pais, RFC, CodigoPostal, Telefono, Contacto, "", "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CveVendedor, PlazoCobranza, -1, "-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", Codigo, LimiteCredito, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación, CargoUsado:=CargoUsado, - BonificacionUsado:=BonificacionUsado, CobranzaContacto:=CobranzaContacto, CobranzaCorreo:=CobranzaCorreo, DiasEspecifico:=DiasPagoEspecifico, DiasRevision:=DìaVisita, CobranzaTelefono:=CobranzaTelefono, CveFormaPago33:=CveFormaPago33, CveUsoCFDI:=CveUsoCFDI, CveSATEstado:=CveSATEstado, CveAdminTrayecto:=0) Then + BonificacionUsado:=BonificacionUsado, CobranzaContacto:=CobranzaContacto, CobranzaCorreo:=CobranzaCorreo, DiasEspecifico:=DiasPagoEspecifico, DiasRevision:=DìaVisita, CobranzaTelefono:=CobranzaTelefono, CveFormaPago:=CveFormaPago33, CveUsoCFDI:=CveUsoCFDI, CveSATEstado:=CveSATEstado, CveAdminTrayecto:=0) Then ErrorClientes = True RFC.GuardaLog diff --git a/Nomina/CargaArchivosNomina.aspx.cs b/Nomina/CargaArchivosNomina.aspx.cs index eb5c45c67..9065835c4 100644 --- a/Nomina/CargaArchivosNomina.aspx.cs +++ b/Nomina/CargaArchivosNomina.aspx.cs @@ -63,8 +63,7 @@ public partial class Nomina_CargaArchivosNomina : System.Web.UI.Page URLFile = fileItem.FileUrl; } using (var workbook = new XLWorkbook(URLFile)) - { - int position = 1; + { foreach (IXLWorksheet wokitem in workbook.Worksheets) { workname = wokitem.Name; @@ -112,7 +111,7 @@ public partial class Nomina_CargaArchivosNomina : System.Web.UI.Page { if (objbase.ExcelToBD(xml)) { - Alert("Información capturada", ModExtensiones.TipoMensaje.MsgInformacion); + this.Alert("Información capturada", ModExtensiones.TipoMensaje.MsgInformacion); } } GVDatos.DataSource = dt; diff --git a/Sistemas/CatSesiones.aspx.vb b/Sistemas/CatSesiones.aspx.vb index a554bcc80..a8b3bda14 100644 --- a/Sistemas/CatSesiones.aspx.vb +++ b/Sistemas/CatSesiones.aspx.vb @@ -300,30 +300,32 @@ Partial Class Sistemas_CatSesiones 'Generales Private Sub CargaUsuarios() 'Carga Usuarios - Dim ObjUsuarios As New ClsSisUsuarios - If ObjUsuarios.GetUsuariosEmpresas(-1) Then - Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados - Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados - Else - Application("GlobalDTUsuarios") = Nothing - End If + 'Dim ObjUsuarios As New ClsSisUsuarios + 'If ObjUsuarios.GetUsuariosEmpresas(-1) Then + ' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados + ' Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados + 'Else + ' Application("GlobalDTUsuarios") = Nothing + 'End If + GlobalDTUsuarios(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing GlobalDTAlmacenUsuarios(-1, UsuarioActual.CveEmpresa) = Nothing 'If ObjUsuarios.GetAlmacen(-1) Then Application("GlobalDTAlmacenUsuarios") = ObjUsuarios.DtResultados Else Application("GlobalDTAlmacenUsuarios") = Nothing - ObjUsuarios.Dispose() + 'ObjUsuarios.Dispose() 'Fin Carga Usuarios End Sub Private Sub CargaUsuariosResponsable() 'Carga Usuarios - Dim ObjUsuarios As New ClsSisUsuarios - If ObjUsuarios.GetUsuariosEmpresas(-1) Then - Alert(ObjUsuarios.DtResultados.Rows.Count.ToString) - Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados - Else - Application("GlobalDTUsuarioResponsable") = Nothing - End If - ObjUsuarios.Dispose() - 'Fin Carga Usuarios + GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa) = Nothing + 'Dim ObjUsuarios As New ClsSisUsuarios + 'If ObjUsuarios.GetUsuariosEmpresas(-1) Then + ' Alert(ObjUsuarios.DtResultados.Rows.Count.ToString) + ' Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados + 'Else + ' Application("GlobalDTUsuarioResponsable") = Nothing + 'End If + 'ObjUsuarios.Dispose() + ''Fin Carga Usuarios End Sub diff --git a/Sistemas/PopUpAddUsuario.aspx.vb b/Sistemas/PopUpAddUsuario.aspx.vb index 3e75ae980..64fc0dce6 100644 --- a/Sistemas/PopUpAddUsuario.aspx.vb +++ b/Sistemas/PopUpAddUsuario.aspx.vb @@ -563,12 +563,14 @@ Partial Class Sistemas_PopUpAddUsuario GPS.Dispose() End Sub Private Sub RecargarGlobalUsuarios() - Dim ObjUsuarios As New ClsSisUsuarios - If ObjUsuarios.GetUsuariosEmpresas(-1) Then - Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados - Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados.FiltraParametros("ProveedoresResponsables > 0") - End If - ObjUsuarios.Dispose() + GlobalDTUsuarios(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing + GlobalDTAlmacenUsuarios(-1, UsuarioActual.CveEmpresa) = Nothing + 'Dim ObjUsuarios As New ClsSisUsuarios + 'If ObjUsuarios.GetUsuariosEmpresas(-1) Then + ' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados + ' Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados.FiltraParametros("ProveedoresResponsables > 0") + 'End If + 'ObjUsuarios.Dispose() End Sub #Region "MANDAR CORREOS" diff --git a/Sistemas/PopUpPerfil.aspx.vb b/Sistemas/PopUpPerfil.aspx.vb index 59ae31f2b..d5219c042 100644 --- a/Sistemas/PopUpPerfil.aspx.vb +++ b/Sistemas/PopUpPerfil.aspx.vb @@ -126,10 +126,11 @@ Partial Class Sistemas_PopUpPerfil CargaGlobal() End Sub Private Sub CargaGlobal() - Dim ObjUsuarios As New ClsSisUsuarios - If ObjUsuarios.GetUsuariosEmpresas(-1) Then - Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados - End If - ObjUsuarios.Dispose() + GlobalDTUsuarios(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing + 'Dim ObjUsuarios As New ClsSisUsuarios + 'If ObjUsuarios.GetUsuariosEmpresas(-1) Then + ' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados + 'End If + 'ObjUsuarios.Dispose() End Sub End Class diff --git a/Sistemas/UsuarioDetalle.aspx.vb b/Sistemas/UsuarioDetalle.aspx.vb index 10c2f7692..9d31e213c 100644 --- a/Sistemas/UsuarioDetalle.aspx.vb +++ b/Sistemas/UsuarioDetalle.aspx.vb @@ -1383,13 +1383,15 @@ Partial Class Sistemas_UsuarioDetalle 'RECARGA GLOBAL ALMACEN 'If ObjUsuarios.GetAlmacen(-1, UsuarioActual.CveEmpresa) Then Application("GlobalDTAlmacenUsuarios") = ObjUsuarios.DtResultados Else Application("GlobalDTAlmacenUsuarios") = Nothing - GlobalDTAlmacenUsuarios(-1, UsuarioActual.CveEmpresa) = Nothing - - 'RECARGA GLOBAL EMPRESAS USUARIOS - If ObjUsuarios.GetUsuariosEmpresas(-1) Then - Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados - Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados.FiltraParametros("ProveedoresResponsables > 0") - End If + GlobalDTAlmacenUsuarios(-1, UsuarioActual.CveEmpresa) = Nothing + + 'RECARGA GLOBAL EMPRESAS USUARIOS + GlobalDTAlmacenUsuarios(-1, UsuarioActual.CveEmpresa) = Nothing + GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa) = Nothing + 'If ObjUsuarios.GetUsuariosEmpresas(-1, UsuarioActual.CveEmpresa) Then + ' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados + ' Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados.FiltraParametros("ProveedoresResponsables > 0") + 'End If End Sub Private Sub EnviaCorreo() From 9e560ac63683a7775f2b663018625a6e34f7af36 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 1 Feb 2023 10:55:46 -0700 Subject: [PATCH 087/103] -- cambio de metodo/forma pago --- Ventas/PV.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index dece79162..8a9ee6476 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -2715,7 +2715,7 @@ Partial Class PV End If If CveVenta <= 0 Then - CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString.ToEntero + CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString) 'DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString) DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33.ToString) From b1330fe4107ab099a2496f6207719c0fa6bab579 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 1 Feb 2023 10:55:57 -0700 Subject: [PATCH 088/103] =?UTF-8?q?--=20limpieza=20de=20un=20m=C3=B3dulo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsPaginas.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 93713d476..71f9a5e21 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5813,7 +5813,6 @@ Public Class ClsPaginas 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) From 1c2d564f8fbeb9d4fb76bf5af3e2f6d675aced82 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 1 Feb 2023 10:56:11 -0700 Subject: [PATCH 089/103] =?UTF-8?q?-=20limpieza=20de=20m=C3=B3dulo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/eFacturas.aspx | 279 ---------------------- Ventas/eFacturas.aspx.vb | 495 --------------------------------------- 2 files changed, 774 deletions(-) delete mode 100644 Ventas/eFacturas.aspx delete mode 100644 Ventas/eFacturas.aspx.vb diff --git a/Ventas/eFacturas.aspx b/Ventas/eFacturas.aspx deleted file mode 100644 index 5f48a07bf..000000000 --- a/Ventas/eFacturas.aspx +++ /dev/null @@ -1,279 +0,0 @@ -<%@ Page Title="Ventas - eFacturas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="eFacturas.aspx.vb" Inherits="Ventas_eFacturas" %> - - - - - - - - - Reporte de Facturas de Ventas - - -
  • - Genera PDF -
  • -
  • - Genera Excel -
  • -
  • - - - <%----%> - Descarga Facturas SAT - - -
  • - - - -
    - - - - -
    -
    -
    -
      -
    • Folio: - -
    • -
    • Receptor: - -
    • -
    • Fecha I.: -
      - - - - -
      - - - - - - -
    • -
    • Fecha F.: -
      - - - - -
      - - - - - - -
    • - -
    -
    -
    - - - -
    - -
    - -
    -
    -
    - - - - - - - -
    - - No Recibidas
    -
    -
    - - -<%--
    -
    -
    --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%----%> - - - - - - - - - - - - - - <%----%> - - - - - - -
    - <%----%> - - - -
    -
    - -
    - - -
    - <%----%> - - - -
    -
    - -
    -
    - -
    - - - - - - - - - - - diff --git a/Ventas/eFacturas.aspx.vb b/Ventas/eFacturas.aspx.vb deleted file mode 100644 index 4ece942df..000000000 --- a/Ventas/eFacturas.aspx.vb +++ /dev/null @@ -1,495 +0,0 @@ -Option Strict On -Option Explicit On - -Imports System.Data -Imports Extensiones -Imports System.Diagnostics -Imports System.IO -Imports Microsoft.Reporting.WebForms -Imports System.Globalization - -Partial Class Ventas_eFacturas - Inherits ClsPaginas - - Private Property Destino As String - Set(value As String) - ViewState("Destino") = value - End Set - Get - Return ViewState("Destino").ToString - End Get - End Property - - Private Property Ejecutable As String - Set(value As String) - ViewState("Ejecutable") = value - End Set - Get - Return ViewState("Ejecutable").ToString - End Get - End Property - - Private Property ChecandoCorreo As Boolean - Set(value As Boolean) - ViewState("ChecandoCorreo") = value - End Set - Get - Return CType(ViewState("ChecandoCorreo"), Boolean) - End Get - End Property - - Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - If Not Page.IsPostBack Then - ChecandoCorreo = False - ViewState("Orden") = String.Empty - - txtFechaI.Text = Now.AddMonths(-1).FirstDayOfMonth().ToShortDateString ' String.Format("01/01/{0}", If(Now.Month > 6, Now.Year, Now.Year - 1)) - ' If UsuarioActual.CveEmpresa = 66 Then txtFechaI.Text = Now.AddDays(-7).ToShortDateString - - txtFechaF.Text = Now.ToShortDateString 'txtFechaI.Text.ToDate.AddMonths(1).AddDays(-1).ToShortDateString - - Destino = String.Format("{0}Ventas\", UsuarioActual.Empresa.Ruta) - Ejecutable = String.Format("{0}\Utilerias\eeeFacturas.exe", AppDomain.CurrentDomain.BaseDirectory) - Form.DefaultButton = BtnConsultar.UniqueID - - DdlResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) - DdlResponsable.DataBind() - DdlResponsable.Items.Insert(0, New ListItem("Todos", "-1")) - TxtFolio.Focus() - - If UsuarioActual.Sesion("eFact-Proveedor").ToString <> "" Then TxtReceptor.Text = UsuarioActual.Sesion("eFact-Proveedor").ToString.Trim - If UsuarioActual.Sesion("eFact-FI").ToString <> "" Then txtFechaI.Text = UsuarioActual.Sesion("eFact-FI").ToString.Trim - If UsuarioActual.Sesion("eFact-FF").ToString <> "" Then txtFechaF.Text = UsuarioActual.Sesion("eFact-FF").ToString.Trim - - 'If Session("Folio") IsNot Nothing Then TxtFolio.Text = Session("Folio").ToString.Trim - 'If Session("Proveedor") IsNot Nothing Then TxtProveedor.Text = Session("Proveedor").ToString.Trim - - ' RegistraScript("$(document).ready(function() { var table = $('#GvDatos').DataTable({""paging"": false, ""info"": false, ""searching"": false, ""order"": [[ 1, ""desc"" ]]} ); new $.fn.dataTable.FixedHeader( table, { bottom: false } ); } );") - - If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(9).Visible = True : GvD.Columns(10).Visible = True - - CargaDatos() - OrdenaDatos() - End If - End Sub - - Protected Sub GvDatos_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvD.RowCommand - - - If e.CommandName = "ValidarCFDi" Then - Dim a = e.CommandSource - - Dim ImgBtn As LinkButton = DirectCast(e.CommandSource, LinkButton) - Dim gvr As GridViewRow = DirectCast(ImgBtn.BindingContainer, GridViewRow) - - - Dim Valida As New ClsValidaCFDi(gvr.DataKey("UUID"), gvr.DataKey("RFCDe"), gvr.DataKey("RFCPara")) - If Valida.EsValida > 0 Then - Dim ObjDatos As New ClsCompras - - If Valida.EsValida = 2 Then - Alert("La factura está cancelada ante el SAT.", TipoMensaje.MsgInformacion) - End If - - If ObjDatos.UpdateEstatus(Valida.EsValida, gvr.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa) Then - BtnConsultar_Click(sender, e) - End If - ObjDatos.Dispose() - Else - Alert("La Factura no se pudo validar.", TipoMensaje.MsgAdvertencia) - End If - Valida.Dispose() - ElseIf e.CommandName = "ValidarCFD" Then - - Dim a = e.CommandSource - - Dim ImgBtn As LinkButton = DirectCast(e.CommandSource, LinkButton) - Dim gvr As GridViewRow = DirectCast(ImgBtn.BindingContainer, GridViewRow) - - Dim ObjDatos As New ClsCompras - - If ObjDatos.UpdateEstatus(1, gvr.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa) Then - BtnConsultar_Click(sender, e) - End If - ObjDatos.Dispose() - - ElseIf e.CommandName = "Omitir" Then - - Dim a = e.CommandSource - - 'Dim ImgBtn As ImageButton = DirectCast(e.CommandSource, ImageButton) - 'Dim gvr As GridViewRow = DirectCast(ImgBtn.BindingContainer, GridViewRow) - Dim LnkBtn As LinkButton = DirectCast(e.CommandSource, LinkButton) - Dim gvr As GridViewRow = DirectCast(LnkBtn.BindingContainer, GridViewRow) - - Dim ObjDatos As New ClsCompras - - If ObjDatos.UpdateEstatus(3, gvr.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa) Then - BtnConsultar_Click(sender, e) - End If - ObjDatos.Dispose() - - End If - - End Sub - - - - Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click - CargaDatos() - 'OrdenaDatos() - End Sub - - Private Sub CargaDatos() - Dim Folio, RFC, Proveedor As String - Folio = If(TxtFolio.Text.Trim.Length > 0, String.Format("%{0}%", TxtFolio.Text.Trim.ToUpper), "-1") - RFC = "-1" 'If(TxtRFC.Text.Trim.Length > 0, TxtRFC.Text.Trim, "-1") - Proveedor = If(TxtReceptor.Text.Trim.Length > 0, String.Format("%{0}%", TxtReceptor.Text.Trim.ToUpper.Replace(" ", "%")), "-1") - Dim FechaI, FechaF As Date - 'UsuarioActual.Sesion("Folio") = TxtFolio.Text.Trim - UsuarioActual.Sesion("eFact-Proveedor") = TxtReceptor.Text.Trim - UsuarioActual.Sesion("eFact-FI") = txtFechaI.Text - UsuarioActual.Sesion("eFact-FF") = txtFechaF.Text - If txtFechaI.Text.Trim = "" Then FechaI = MinFecha - If txtFechaF.Text.Trim = "" Then FechaF = MaxFecha - Dim ObjDatos As New ClsVentas - If ObjDatos.GetFacturas(-1, Folio, MinFecha, MaxFecha, RFC, Proveedor, 1, DdlResponsable.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then - If ObjDatos.DtResultados.Rows.Count > 0 Then - GvD.DataSource = ObjDatos.DtResultados '.AsEnumerable().Take(100).CopyToDataTable() - - Else - GvD.DataSource = Nothing - - End If - End If - LblRegistros.Text = String.Format("{0} Registros", ObjDatos.DtResultados.Rows.Count.ToString("N0")) - ObjDatos.Dispose() - - GvD.DataBind() - - If (GvD.Rows.Count > 0) Then - GvD.UseAccessibleHeader = True - GvD.HeaderRow.TableSection = TableRowSection.TableHeader - RegistraScript("OrdenarGV();") - End If - - If GvD.Rows.Count = 0 Then - Alert("No se encontraron Registros con el filtro actual", TipoMensaje.MsgAdvertencia) - End If - - UpDatos.Update() - UPRegistros.Update() - End Sub - - Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - GvD.Columns(4).Visible = False - GvD.Columns(5).Visible = False - GvD.Columns(6).Visible = False - GvD.Columns(8).Visible = False - GvD.Columns(9).Visible = False - ' GvD.DataSource = ViewState("DTCompleta") - ' GvD.DataBind() - - GvD.ExportToExcel("RepFacturas_" & Now.ToShortDateString()) - - ' GvD.DataSource = ViewState("DT") - 'GvD.DataBind() - GvD.Columns(4).Visible = False - GvD.Columns(5).Visible = False - GvD.Columns(6).Visible = True - GvD.Columns(8).Visible = True - GvD.Columns(9).Visible = True - End Sub - - - - - -#Region "G V D A T O S" - Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - 'e.Row.Cells(0).Width = 100 - 'e.Row.Cells(1).Width = 80 - 'e.Row.Cells(2).Width = 400 - 'e.Row.Cells(3).Width = 80 - 'e.Row.Cells(4).Width = 40 - 'e.Row.Cells(5).Width = 40 - - If e.Row.RowIndex = 0 Then - - 'e.Row.Cells(1).ColumnSpan = 8 - 'e.Row.Cells(2).Visible = False : e.Row.Cells(3).Visible = False : e.Row.Cells(4).Visible = False : e.Row.Cells(5).Visible = False - 'e.Row.Cells(6).Visible = False : e.Row.Cells(7).Visible = False : e.Row.Cells(8).Visible = False - 'e.Row.Font.Bold = True - 'e.Row.FCLiteral("LtlFolio").Text &= " Registros" - - End If - - e.Row.Cells(1).Attributes.Add("data-order", e.Row.DBCampo("FechaFactura").ToDate.Ticks.ToString) - - If File.Exists(String.Format("{0}{1}\{2}", Destino, e.Row.DBCampo("RFCPara"), e.Row.DBCampo("XML"))) Then - e.Row.FCLiteral("LtlXML").Text = String.Format("Ver", HttpUtility.UrlEncode(e.Row.DBCampo("RFCDe")), HttpUtility.UrlEncode(e.Row.DBCampo("XML"))) - Else - e.Row.FCLiteral("LtlXML").Text = "N/D" - End If - - If File.Exists(String.Format("{0}{1}/{2}", Destino, e.Row.DBCampo("RFCPara"), e.Row.DBCampo("PDF"))) Then - e.Row.FCLiteral("LtlPDF").Text = String.Format("Ver", HttpUtility.UrlEncode(e.Row.DBCampo("RFCDe")), HttpUtility.UrlEncode(e.Row.DBCampo("PDF"))) - Else - e.Row.FCLiteral("LtlPDF").Text = "N/D" - End If - - If e.Row.DBCampo("FueValidado").Contiene("1", "2", "3") Then - e.Row.FCLinkButton("ImgValidarCFDi").Visible = False - e.Row.FCLiteral("LtlValidado").Visible = True - If e.Row.DBCampo("FueValidado") = "2" Then - e.Row.FCLiteral("LtlValidado").Text = "Cancelada" - e.Row.ForeColor = Drawing.Color.Red - e.Row.FCHyperLink("HplProveedor").ForeColor = Drawing.Color.Red - ElseIf e.Row.DBCampo("FueValidado") = "3" Then - e.Row.FCLiteral("LtlValidado").Text = "Omitida" - e.Row.ForeColor = Drawing.Color.Gray - e.Row.FCHyperLink("HplProveedor").ForeColor = Drawing.Color.Gray - End If - Else - If e.Row.DBCampo("TipoFactura") = "CFD" Then - e.Row.FCLinkButton("ImgValidarCFDi").CommandName = "ValidarCFD" - e.Row.FCLinkButton("ImgValidarCFDi").OnClientClick = "return confirm('La factura se validó en el sitio del SAT de comprobantes fiscales?');" - End If - e.Row.FCLinkButton("ImgValidarCFDi").Visible = True - e.Row.FCLiteral("LtlValidado").Visible = False - - End If - If e.Row.DBCampo("CveVenta") <> "" Then - e.Row.FCLiteral("LtlFolio").Text = String.Format("{1}", e.Row.DBCampo("CveVenta"), e.Row.DBCampo("SerieFolio")) '1\Compras\GAPC480413QL3\A-69.xml - End If - - If e.Row.DBCampo("CveCliente") = "" Then - 'liga para guardar el proveedor - 'e.Row.FCLiteral("LtlProv").Text = String.Format("Agregar Proveedor", e.Row.DBCampo("CveFactura")) '1\Compras\GAPC480413QL3\A-69.xml - e.Row.FCHyperLink("HplProv").Visible = True - e.Row.FCHyperLink("HplProv").NavigateUrl = String.Format("/Ventas/Clientes.aspx?CveFactura={0}", e.Row.DBCampo("CveFactura")) - ' e.Row.FCLiteral("LtlAgregar").Text = "" - Else - - - e.Row.FCHyperLink("HplProveedor").NavigateUrl = String.Format("/Ventas/Clientes.aspx?CveCliente={0}", e.Row.DBCampo("CveCliente")) - - If e.Row.DBCampo("CveVenta") = "" AndAlso (e.Row.DBCampo("FueValidado") = "1") AndAlso e.Row.DBCampo("CveCliente") <> "" Then ' OrElse UsuarioActual.CveEmpresa = 66 - 'e.Row.FCImage("ImgAgregar").Attributes.Add("onclick", String.Format("window.open('/Compras/Compras.aspx?CveFactura={0}&RFC={1}','_newtab')", e.Row.DBCampo("CveFactura"), e.Row.DBCampo("RFCDe"))) - e.Row.FCHyperLink("HplAgregar").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveFactura={0}&RFC={1}&CVECLIENTE={2}", e.Row.DBCampo("CveFactura"), e.Row.DBCampo("RFCPara"), e.Row.DBCampo("CveCliente")) - Else - 'si ya tiene cvecompra es que ya está validada - 'e.Row.FCImage("ImgAgregar").Visible = False - e.Row.FCHyperLink("HplAgregar").Visible = False - End If - - End If - - - If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then - End If - - End If - End Sub - - Protected Sub GvDatos_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvD.RowUpdating - Dim ObjDatos As New ClsCompras - Dim FueValidado As Integer = 0 - If GvD.Rows(e.RowIndex).FCCheckBox("ChkFueValidado").Checked Then FueValidado = 1 - If ObjDatos.UpdateEstatus(FueValidado, GvD.DataKeys(e.RowIndex).Value.ToString.ToEntero, UsuarioActual.CveEmpresa) Then - GvD.EditIndex = -1 - BtnConsultar_Click(sender, e) - End If - ObjDatos.Dispose() - - 'If ViewState("Orden").ToString() <> String.Empty Then - 'CargaGrid(ViewState("Orden").ToString()) - 'Else - CargaDatos() - OrdenaDatos() - 'End If - End Sub - - Protected Sub GvDatos_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvD.RowCancelingEdit - GvD.EditIndex = -1 - 'If ViewState("Orden").ToString() <> String.Empty Then - ' CargaGrid(ViewState("Orden").ToString()) - 'Else - CargaDatos() - OrdenaDatos() - 'End If - End Sub - - Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvD.RowDeleting - Dim Fact As New ClsCompras - If Fact.DeleteFactura(e.Keys("CveFactura").ToString.ToEntero, UsuarioActual.CveEmpresa) Then - GvD.EditIndex = -1 - Alert("La factura se eliminó correctamente.", TipoMensaje.MsgInformacion) - CargaDatos() - OrdenaDatos() - End If - - Fact.Dispose() - - 'If ViewState("Orden").ToString() <> String.Empty Then - ' CargaGrid(ViewState("Orden").ToString()) - 'Else - - 'End If - End Sub - - Protected Sub GvDatos_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvD.RowEditing - GvD.EditIndex = e.NewEditIndex - 'If ViewState("Orden").ToString() <> String.Empty Then - ' CargaGrid(ViewState("Orden").ToString()) - 'Else - CargaDatos() - OrdenaDatos() - 'End If - End Sub -#End Region - - - - Protected Sub LnkNoRecibidas_Click(sender As Object, e As EventArgs) Handles LnkNoRecibias.Click - Dim dt As New DataTable - Dim Ruta As String = String.Format("{0}Compras\NoRecibidas-{1}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveEmpresa) - Dim Str As New StringBuilder - If IO.File.Exists(Ruta) Then - dt.ReadXml(Ruta) - - Dim conta As Integer = 1 - Str.Append("Se encontraron las siguientes facturas con problema:
    ") - - For Each dr As DataRow In dt.FiltraParametros("", "Fecha DESC").Rows - - Str.AppendFormat("", If(conta Mod 2 = 0, "TextoAlterno", "Texto")) - - Str.AppendFormat("", dr("Serie")) - Str.AppendFormat("", dr("Folio")) - Str.AppendFormat("", If(dr("Fecha").ToString <> "", dr("Fecha").ToString.ToDate.ToShortDateString, "")) - Str.AppendFormat("", dr("Proveedor")) - Str.AppendFormat("", dr("Importe").ToString.ToDouble.FormatoNumero) - Str.AppendFormat("", dr("Motivo")) - Str.AppendFormat("", If(dr("Correo").ToString.Length > 20, dr("Correo").ToString.Substring(0, 20), dr("Correo").ToString())) - Str.AppendFormat("", dr("FechaRecepcion").ToString.ToDate.ToShortDateString) - - Str.Append("") - conta += 1 - Next - Str.Append("
    SerieFolioFechaProveedorImporteMotivoCorreoF. Recepción
    {0}{0}{0}{0}{0}{0}{0}{0}
    ") - Else - Str.Append("No se encontraron facturas pendientes de recibir.") - End If - - Alert(Str.ToString, TipoMensaje.MsgInformacion) - CargaDatos() - OrdenaDatos() - End Sub - - -#Region "G E N E R A P D F " - Private Sub GenerarPDF() - 'Dim ObjDatos As New ClsCompras - 'Dim FechaI As String = txtFechaI.Text - 'Dim FechaF As String = txtFechaF.Text - 'If txtFechaI.Text = "" Then FechaI = "-1" - 'If txtFechaF.Text = "" Then FechaF = "-1" - 'Dim Folio = If(TxtFolio.Text.Trim.Length > 0, String.Format("%{0}%", TxtFolio.Text.Trim.ToUpper), "-1") - 'Dim Proveedor = If(TxtProveedor.Text.Trim.Length > 0, String.Format("%{0}%", TxtProveedor.Text.Trim.ToUpper.Replace(" ", "%")), "-1") - 'If ObjDatos.GetFacturas(-1, Folio, txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim.ToDate, "-1", Proveedor, DdlValidado.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then - ' Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - ' Dim dt As DataTable = ObjDatos.DtResultados - ' Dim params As New List(Of ReportParameter) - ' params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) - ' params.Add(New ReportParameter("FechaInicio", FechaI)) - ' params.Add(New ReportParameter("FechaFin", FechaF)) - ' params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - ' params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) - ' If Imagen.Exists Then - ' params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) - ' Else - ' params.Add(New ReportParameter("LogoPath", "")) - ' End If - ' ImprimirPDF("Empresas/Grales/Formatos/RepFacturas.rdlc", dt, params, "ReporteCxC") - 'Else - ' Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) - 'End If - - End Sub - Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click - GenerarPDF() - End Sub -#End Region - -#Region "O R D E N A M I E N T O" - Private Sub OrdenaDatos() - If (GvD.Rows.Count > 0) Then - GvD.UseAccessibleHeader = True - GvD.HeaderRow.TableSection = TableRowSection.TableHeader - RegistraScript("OrdenarGV();") - End If - End Sub -#End Region - -#Region "descargar factura " - Protected Sub lbDescargar_Click(sender As Object, e As EventArgs) Handles lbDescargar.Click - Dim Retorno As Boolean = False - - 'Dim ObjProcess As Process = Nothing - 'Dim Mensajes As String = "" - 'Dim EjecutableUtilerias = Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Utilerias\UtileriasAD.exe") - 'Dim Folder = Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas\") - 'Dim error1 As Boolean = False - 'Dim en As New CultureInfo("en-US") - 'Dim fechai = txtFechaI.Text.Trim.ToDate.ToString("d", en) - 'Dim fechaf = txtFechaF.Text.Trim.ToDate.ToString("d", en) - 'Try - ' ObjProcess = New Process() - ' ObjProcess.StartInfo.RedirectStandardOutput = True - ' ObjProcess.StartInfo.FileName = EjecutableUtilerias - ' ObjProcess.StartInfo.Verb = "runas" - ' ObjProcess.StartInfo.Arguments = $"{UsuarioActual.CveEmpresa} {Folder} 2 {fechai} {fechaf}" - ' ObjProcess.StartInfo.UseShellExecute = False - ' ObjProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal - ' ObjProcess.Start() - ' ObjProcess.WaitForExit() - ' ObjProcess.Close() - 'Catch ex As Exception - ' error1 = True - ' OnError("Ocurrió un error al ejecutar el actualizador.", ex) - 'End Try - Dim ObjProcess As Process = Nothing - Dim Mensajes As String = "" - Dim EjecutableUtilerias = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Utilerias\ADSUtilerias.exe") - Dim Folder = UsuarioActual.Empresa.Ruta.Replace($"{UsuarioActual.CveEmpresa.ToString()}\", "") 'Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas\") - Dim error1 As Boolean = False - Dim en As New CultureInfo("en-US") - Dim fechai = txtFechaI.Text.Trim.ToDate.ToString("d", en) - Dim fechaf = txtFechaF.Text.Trim.ToDate.ToString("d", en) - Try - ObjProcess = New Process() - ObjProcess.StartInfo.RedirectStandardOutput = True - ObjProcess.StartInfo.FileName = EjecutableUtilerias - ObjProcess.StartInfo.Verb = "runas" - ObjProcess.StartInfo.Arguments = $"--mod dsat --e {UsuarioActual.CveEmpresa} --op 2 --fd {Folder} --fi {fechai} --ff {fechaf}" - ObjProcess.StartInfo.UseShellExecute = False - ObjProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal - ObjProcess.Start() - ObjProcess.WaitForExit() - ObjProcess.Close() - Catch ex As Exception - error1 = True - OnError("Ocurrió un error al ejecutar el actualizador.", ex) - End Try - - End Sub -#End Region - - - - - -End Class From 78e8af83bb23622e04197de20c132a0ce66cf401 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 1 Feb 2023 11:10:45 -0700 Subject: [PATCH 090/103] EMD. Correcion de expresion de carta porte --- Empresas/13/Formatos/Factura.rdlc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Empresas/13/Formatos/Factura.rdlc b/Empresas/13/Formatos/Factura.rdlc index 204a978e9..c5b2ba6c6 100644 --- a/Empresas/13/Formatos/Factura.rdlc +++ b/Empresas/13/Formatos/Factura.rdlc @@ -3383,7 +3383,7 @@ 20.2229cm 47 - = iif(IsNothing(Parameters!TieneCartaPorte), True, iif(Parameters!TieneCartaPorte.Value , True, False)) + = Not iif(IsNothing(Parameters!TieneCartaPorte), True, iif(Parameters!TieneCartaPorte.Value , True, False)) + + + + + + Textbox3 + 0.90692in + 5.662in + 0.5cm + 2.24597in + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Fecha y hora de emisión + + + + + + + + + + + + + + + + Textbox3 + 0.46414in + 5.662in + 0.5cm + 2.24597in + 1 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =IIF(Parameters!Serie.Value.ToString="",Parameters!Folio.Value,Parameters!Serie.Value & "-" &Parameters!Folio.Value) + + + + + + + Textbox3 + 0.22455in + 5.662in + 0.60856cm + 2.24597in + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!TipoDocumento.Value + + + + + + + Textbox3 + 0.0412cm + 5.662in + 0.5cm + 2.24597in + 3 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + + + + + GRUPO CUYSAT + + + + + + + + + R.F.C GCU101122LQ4 + + + + + + + Textbox4 + 1.76749in + 0.46414in + 3.86673in + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox3 + 0.66099in + 5.662in + 0.25114in + 2.24597in + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!Tipo.Value & Parameters!Ref.Value + + + + + + + Textbox3 + 1.10364in + 5.662in + 0.25635in + 2.24597in + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Domicilio Fiscal + + + + + + + + + CALLE EMILIANO ZAPATA, #76, Col.:LOS REYES ACAQUILPAN CENTRO, + + + + + + + + + C.P. 56400 LA PAZ, MEXICO + + + + + + + Textbox10 + 0.53358in + 1.7536in + 0.61185in + 2.01842in + 7 + + true + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + LUGAR DE EXPEDICIÓN: + + + + + + + + + =Parameters!CP.Value + + + + + + + Textbox10 + 0.53358in + 3.77202in + 0.61185in + 1.88998in + 8 + + + Top + + + + true + 22.50468cm + 0.0208cm + 2.10099cm + 20.06179cm + 9 + + true + + + + + + + + + + 1.27365cm + + + 1.78562cm + + + 2.0584cm + + + 3.47821cm + + + 4.82589cm + + + 2.5cm + + + 1.6882cm + + + 2.33651cm + + + + + 0.52063cm + + + + + true + + + + + Cant. + + + + + + + Textbox34 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Unidad SAT + + + + + + + Textbox2 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Producto SAT + + + + + + + Textbox25 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Descripción + + + + + + + Textbox79 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox1 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Obj. Imp. + + + + + + + Textbox22 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + P. Unitario + + + + + + + Textbox84 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Importe + + + + + + + + + + + + + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.57355cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SATClaveUM.Value + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SATClaveProdServ.Value + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =IIF(Fields!PS.Value="-" OrElse Fields!PS.Value="." OrElse Fields!PS.Value="=" OrElse Fields!PS.Value="--" OrElse Fields!PS.Value="---" OrElse Fields!PS.Value=".." OrElse Fields!PS.Value="/" ,"" & Fields!Obs.Value,Fields!PS.Value & " " & Fields!Obs.Value) + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + =Fields!CodigoObjetoImpuesto.Value + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU1 + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value*Fields!PU.Value + + + + + + + Textbox88 + + + + + + + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + 3.47821cm + + + + + 0.6cm + + + + + true + true + + + + + =Fields!Titulo.Value + + + + + + + + + + + + + + + + + + __________________________________ + + + + + + + + + =Fields!Nombre.Value + + + + + + + + + =Fields!Puesto.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + true + DataSet2 + 1 + + + + + + + + + + + + + 4.82589cm + + + + + 0.6cm + + + + + true + true + + + + + =Fields!Titulo.Value + + + + + + + + + + + + + + + + + + __________________________________ + + + + + + + + + =Fields!Nombre.Value + + + + + + + + + =Fields!Puesto.Value + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + DataSet2 + 2 + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + 1pt + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + =Fields!PS.Value Is Nothing + + + + Before + + + Before + + + + DsOC + 5.79515cm + 0.11516cm + 2.29418cm + 19.94648cm + 10 + + + + + + + + External + =Parameters!QR.Value + FitProportional + 0.03128in + 1.3497in + 1.5531in + + + + + + true + true + + + + + Folio Fiscal: + + + + + + + Textbox54 + 0.00077in + 1.63514in + 0.18056in + 4.03672in + 1 + + + + + + + White + + + + + + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + No. Serie del Certificado del SAT: + + + + + + + Textbox54 + 0.19522in + 1.63514in + 0.18056in + 4.03672in + 2 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha y Hora de certificación: + + + + + + + Textbox54 + 0.39377in + 1.63514in + 0.19444in + 4.03672in + 3 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Certificado del Contribuyente: + + + + + + + Textbox54 + 0.59938in + 1.63514in + 0.19445in + 4.03672in + 4 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SerieCertificadoSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaCertificacion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CertificadoContribuyente.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Regímen: Regímen General de Ley Personas Morales 601 + + + + + + + =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado", iif( Parameters!MetodoPago.Value = "PUE-Pago en una sola exhibición","PUE","PPD")) + + + + + + + =Parameters!FormaPago.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Éste documento es una representacion impresa de un CFDi + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + 15.10221cm + 0.04257cm + 3.74574cm + 20.109cm + 11 + + + + + + + + true + true + + + + + =Parameters!CadenaOriginal.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.57553cm + + + + + 0.6cm + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + + + + + + + + + + + + =Fields!ImpuestoLocal.Value + + + + 2.45694cm + + + true + true + + + + + =Fields!ImpuestoLocal.Value + + + + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + DataSet1 + 0.04588cm + 14.93861cm + 0.6cm + 5.03247cm + 1 + + + + + + + + + 3.74028cm + + + 11.08915cm + + + + + 0.6cm + + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + + Textbox128 + + + + + + + + + + + + + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + Importe con letra: + + + + + + + Textbox126 + + + + + 1pt + + + + 1pt + + + + 1pt + + + + 1pt + + #c4d79b + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + ="SON: " & Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) + + + + + + + Textbox127 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Forma de pago: + + + + + + + Textbox130 + + + + + 1pt + + + + 1pt + + + + 1pt + + + + 1pt + + #c4d79b + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!FormaPago.Value + + + + + + + Textbox131 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Uso CFDI: + + + + + + + Textbox27 + + + + + 1pt + + + + 1pt + + + + 1pt + + + + 1pt + + #c4d79b + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!UsoCFDI.Value + + + + + + + Textbox37 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 1.8cm + + + + + true + true + + + + + Sello digital del CFDI: + + + + + + + Textbox132 + + + + + 1pt + + + + 1pt + + + + 1pt + + + + 1pt + + #c4d79b + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!SelloCFDI.Value + + + + + + + Textbox133 + + + Top + 2pt + 2pt + 2pt + 2pt + + + + + + + + 1.2cm + + + + + true + true + + + + + Sello del SAT: + + + + + + + Textbox134 + + + + + 1pt + + + + 1pt + + + + 1pt + + + + 1pt + + #c4d79b + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!SelloSAT.Value + + + + + + + Textbox135 + + + Top + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Cadena original del complemento de certificación digital del SAT: + + + + + + + Textbox136 + + + + + + + + + + + + + + 1pt + + #c4d79b + Middle + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + DsOC + 0.04588cm + 0.03862cm + 6cm + 14.82943cm + 2 + + + + + + + + + 0.73688in + + + 0.5734in + + + 0.671in + + + + + 0.19645in + + + + + true + true + + + + + Impuesto + + + + + + + Textbox22 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tasa + + + + + + + Textbox15 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox29 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.14436in + + + + + true + true + + + + + =Fields!Impuesto.Value + + + + + + + Cantidad1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!tasa.Value + + + + + + + UM + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Codigo + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet3 + 0.26817in + 5.88134in + 0.34081in + 1.98128in + 3 + + + + + + true + 8.26307cm + 0.11516cm + 6.80033cm + 20.03641cm + 12 + + + + + + true + true + + + + + Moneda: + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + CFDI Relacionados + + + + + + + Textbox5 + 0.11382cm + 0.05336cm + 0.54004cm + 20.00281cm + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tipo Relación: + + + + + + + Textbox29 + 0.83025cm + 4.33636cm + 0.41981cm + 5.31841cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TipoRelacionTexto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.42456cm + + + 2.05585cm + + + 3.03631cm + + + 7.7847cm + + + + + 0.44125cm + + + + + true + true + + + + + Folio + + + + + + + Textbox10 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox21 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio Fiscal + + + + + + + Textbox11 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.41479cm + + + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet4 + 1.39643cm + 2.83462cm + 0.85604cm + 15.30142cm + 3 + + + + + + true + 18.86206cm + 0.00547cm + 2.25247cm + 20.1554cm + 14 + + =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) + + + + + + + true + true + + + + + Nombre: + + + + + + + + + + + + + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteNombre.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + RFC: + + + + =Parameters!ClienteRFC.Value + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Regimen Fiscal: + + + + + + + + + + + + + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!RegimenFiscalCodigo.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Dirección: + + + + + + + + + + + + + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteDireccion.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Estado: + + + + + + + + + + + + + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteEstado.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + País: + + + + + + + + + + + + + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClientePais.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo + FitProportional + 0.0412cm + 0.38753cm + 2.66008cm + 3.1044cm + 26 + + + + + + 24.92317cm + + + + + + + Textbox3 + 0.14111cm + 16.12728cm + 0.6cm + 3.95896cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Today + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 0.5cm + 1.27cm + - - - - - true - true - true - - - - - Sello Digital del CFDI: - - - - - - - - - - - - - - - - - - - - - - - - - VERSION - - - - =Parameters!CFDIVersion.Value - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - 6.32868in - 0.06752in - 1.42169in - 8.23953in - - - - - - - - - 0.54014in - - - 0.59111in - - - 0.80359in - - - 0.66404in - - - 2.11562in - - - 0.6863in - - - 0.69852in - - - 0.6403in - - - 0.67895in - - - 0.80447in - - - - - 0.19645in - - - - - true - true - - - - - # Cant. - - - - - - - - 2pt - - - - 2pt - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Unidad - - - - - - - Black - - 2pt - - - Black - - 2pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Clave Pr./Se - - - - - - - Textbox29 - - - - Black - - 2pt - - - Black - - 2pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Clave U. - - - - - - - Textbox2 - - - - - 2pt - - - - 2pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Nombre - - - - - - - Textbox17 - - - - Black - - 2pt - - - Black - - 2pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Obj. Imp. - - - - - - - Textbox26 - - - - Black - - 2pt - - - Black - - 2pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Precio - - - - - - - Textbox53 - - - - Black - - 2pt - - - Black - - 2pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Tasa IVA - - - - - - - Textbox21 - - - - Black - - 2pt - - - Black - - 2pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descto. - - - - - - - Textbox23 - - - - Black - - 2pt - - - Black - - 2pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - SubTotal - - - - - - - Textbox1 - - - - Black - - 2pt - - - Black - - 2pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.16561in - - - - - true - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - true - - - - - =Fields!UM.Value - - - - - - - UM - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - true - - - - - =Fields!SATClaveProdServ.Value - - - - - - - SATClaveProdServ - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - true - - - - - =Fields!SATClaveUM.Value - - - - - - - SATClaveUM - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - true - - - - - =Fields!PS.Value & IIF(Fields!Obs.Value <> "",System.Environment.NewLine &"Observaciones: ","") & Fields!Obs.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!CodigoObjetoImpuesto.Value - - - - - - - CodigoObjetoImpuesto - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - true - - - - - =Fields!PU.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - true - - - - - =Fields!PorcentajeIVA.Value - - - - - - - PorcentajeIVA - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - true - - - - - =Fields!Descuento.Value - - - - - - - Descuento1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - true - - - - - =Fields!Cantidad.Value * Fields!PU.Value - - - - - - - TiempoEntrega - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsOC - 1.75278in - 0.09836in - 0.36206in - 8.22304in - 1 - - - - - - true - true - - - - - - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - - - =iif(Parameters!Kilometraje.Value = "-1", "","Kilometraje: "& Parameters!Kilometraje.Value) - - - - - - - - ="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) - HTML - - - - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - ID2 - FitProportional - 0.15875cm - 1.15361cm - 2.2881cm - 2.75323cm - 4 - - - - - - true - true - - - - - ECONOLLANTAS SERVICIOS Y ACCESORIOS SA DE CV - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Expedido en Sucursal: - - - - =Parameters!Sucursal.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =UCase(Parameters!TipoDocumento.Value) - - - - - - - Textbox8 - 18.23008cm - 0.96018cm - 2.79101cm - 7 - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =IIF(Parameters!Serie.Value.ToString="",Parameters!Folio.Value,Parameters!Serie.Value & "-" &Parameters!Folio.Value) - - - - - - - Textbox8 - 0.97782cm - 18.23008cm - 0.6cm - 2.79101cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha y Hora: - - - - - - - - - =Parameters!Fecha.Value - - - - - - - Textbox8 - 1.57782cm - 18.23008cm - 0.86903cm - 2.79101cm - 9 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - true - - - - - Folio Fiscal: - - - - =Parameters!FolioFiscal.Value - - - - - - - - - Fecha y hora de certificacion: - - - - =Parameters!FechaCertificacion.Value - - - - - - - - - No. de Serie del Certificado del SAT: - - - - =Parameters!SerieCertificadoSAT.Value - - - - - - - Textbox4 - 2.47332cm - 0.28014cm - 1.09007cm - 9.71199cm - 10 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - true - - - - - No. de Serie del Certificado del CSD: - - - - =Parameters!CertificadoContribuyente.Value - - - - - - - =Parameters!CiudadSucursal.Value - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteNombre.Value - - - - - - - - - - - =Parameters!ClienteColonia.Value - - - - - - - - =Parameters!ClienteCiudad.Value - - - - - - - - =Parameters!ClienteEstado.Value - - - - CP - - - - =Parameters!ClienteCP.Value - - - - - - - - =Parameters!ClientePais.Value - - - - - - - - - - - =Parameters!ClienteTelefono.Value - - - - - - - - =iif(Parameters!ClienteContactoMail.Value = "","","Correo: ") - - - - =Parameters!ClienteContactoMail.Value - - - - - - - =Parameters!ClienteRFC.Value - - - - - - - =Parameters!RegimenFiscalCodigo.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CondicionPago.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - true - - - - - Esta Póliza cubre cualquier daño que presente la llanta que no esté cubierta por el fabricante, Esta será reemplazada solo si el daño no es reparable, por una llanta nueva igual o equivalente, cargo al cliente el desgaste por el uso que presente la banda de rodamiento, paq. de serv. y póliza nueva. *NO APLICA EN DESGASTE, ROBO O INCENDIO. - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - true - - - - - Sonora: - - - - Rodríguez (662) 213-0388 - Camino del seri (662) 220-3070 - Colosio (662) 260-8088 - Colosio II (662) 118-9939 - Veracruz (662) 210-0041 - Monteverde (662) 688-1512 - Morelos (662) 211-0805 - Palo Verde (662) 436-3254 - Perisur (662) 254-4849 - Portillo (662) 688-5349 - Progreso (662) 310-5781 - Reforma (662) 213-8724 - Sahuaro (662) 216-1471 - Solidaridad (662) 216-0935 - Quiroga (662) 261-0838 - Guaymas (622) 222-2417 - Nogales (631) 319-0093 - San Luis Rio Colorado (653) 596-1799 - Agua Prieta (633) 688-0080 - Caborca (637) 372-4214 - Magdalena (632) 322-4080 - Cananea (645) 332-2040 - Obregón (644) 412-2002 - Obregón II (644) 413-1543 - Obregón III (644) 413-4501 - Navojoa (642) 422-9852 – - - - - Sinaloa: - - - - Mochis (668) 817-0209 - Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Guamúchil (673) 688-0108 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Sanalona (667) 713-6671 - Tres Ríos (667) 211-4696 - La Primavera (667) 304-2060 - Corredor Automotriz (667) 715-5004 - Del Valle (667) 721-5577 - Mazatlán (669) 910-2122 - - - - - Baja California - - - - : Tijuana (664) 622-5221 – Tijuana II (664) 626-2615 - Rosarito (661) 612-4461 - Mexicali (686) 567-6102 - Mexicali II (686) 326 02 79 - Tecate (665) 5212080 - Ensenada (646) 172-4075 – Ensenada II (646) 176-2703 - - - - - Baja California Sur - - - - : La Paz (612) 146-3656 - La Paz II (612) 121-3185 - Los Cabos (624) 688 3552 - San José del Cabo (624) 247-4739 - - - - - - - Textbox4 - 10.20293cm - 0.22108cm - 2.03224cm - 20.79751cm - 15 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - Black - 2pt - 2pt - 2pt - 2pt - - - - Embedded - ID3 - FitProportional - 24.6983cm - 0.28014cm - 0.93046cm - 5.37042cm - 17 - - - - - - true - true - - - - - DESCARGA NUESTRA NUEVA APLICACIÓN - - - - - - - Textbox60 - 22.36352cm - 0.28014cm - 0.6882cm - 20.71217cm - 18 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ord. Compra: - - - - =IIf(Parameters!OrdenCompra.Value = "-1", "", Parameters!OrdenCompra.Value) - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tipo de Comprobante:I - - - - =UCase(Parameters!TipoDocumento.Value) - - - - ,Moneda: - - - - =Parameters!MonedaAbreviatura.Value - - - - , Uso de CFDI: - - - - =Parameters!UsoCFDI.Value - - - - , Forma de Pago: - - - - =Parameters!FormaPago.Value - - - - , Método de Pago: - - - - =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value) - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Precio Total: - - - - - - - Textbox19 - 5.27553in - 6.21617in - 0.17608in - 0.94607in - 21 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Descuento: - - - - - - - Textbox19 - 5.4305in - 6.21616in - 0.17608in - 0.94607in - 22 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Sub Total: - - - - - - - Textbox19 - 5.59199in - 6.21616in - 0.17608in - 0.94607in - 23 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - IVA: - - - - - - - Textbox19 - 5.76074in - 6.22658in - 0.17608in - 0.94607in - 24 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - T O T A L : - - - - - - - Textbox19 - 5.92637in - 6.237in - 0.19596in - 0.94607in - 25 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Microsoft.VisualBasic.Interaction.IIF(Parameters!SubTotal.Value.ToString() = "", "-", Parameters!SubTotal.Value) - - - - - - - Textbox42 - 5.27553in - 7.16224in - 0.17608in - 0.98426in - 26 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Microsoft.VisualBasic.Interaction.iif(Parameters!Descuento.Value.ToString() = "", "-", Parameters!Descuento.Value) - - - - - - - Textbox42 - 5.4305in - 7.16224in - 0.17608in - 0.98425in - 27 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Microsoft.VisualBasic.Interaction.IIF(Parameters!SubTotal2.Value.ToString() = "", "-", Parameters!SubTotal2.Value) - - - - - - - Textbox42 - 5.59199in - 7.17266in - 0.17608in - 0.98425in - 28 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Microsoft.VisualBasic.Interaction.iif(Parameters!IVA.Value.ToString() = "", "-", Parameters!IVA.Value) - - - - - - - Textbox42 - 5.76074in - 7.17266in - 0.17608in - 0.98425in - 29 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Total.Value - - - - - - - Textbox42 - 5.92637in - 7.18308in - 0.19596in - 0.98425in - 30 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - www.econollantas.com - 01800 560-6757 - - - - - - - Textbox90 - 1.77125cm - 7.90108cm - 0.78cm - 4.3635cm - 31 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - true - - - - - ** SI LAS LLANTAS NO SON INSTALADAS EN ECONOLLANTAS PIERDE SU GARANTÍA DE FABRICA ** - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - Database - =System.Convert.FromBase64String(Parameters!QRDescarga.Value) - image/png - FitProportional - 9.3435in - 6.67743in - 0.6035in - 0.78275in - 34 - - - - - - true - true - - - - - Puedes encontrarla en Appstore o Google play - - - - - - - - - como Econollantas: - - - - - - - Textbox60 - 22.8083cm - 0.28014cm - 1.49135cm - 5.37042cm - 35 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Con tu aplicación el beneficio más - - - - - - - - - importante es poder escanear el código QR de tu póliza y siempre traerla contigo para - - - - - - - - - atenderte - - - - - - - - - MÁS RÁPIDO Y MEJOR. - - - - - - - Textbox60 - 22.8083cm - 7.45145cm - 2.45709cm - 6.56105cm - 38 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Una vez descargada la App utiliza la podrás agregar tu póliza escaneando el código QR - - - - - - - Textbox60 - 22.79852cm - 14.67145cm - 1.46939cm - 6.32076cm - 39 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - PARA UNA OPTIMA DURACIÓN DE SUS LLANTAS, ESTAS DEBEN ALINEARSE, BALANCEARSE Y ROTAR CADA 6 MESES O 1O MIL KILOMETROS. - - - - PARA HACER VÁLIDA UNA RECLAMACIÓN DEBERÁN CUMPLIR CON EL ANTERIOR REQUISITO - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - CFDI Relacionados - - - - - - - Textbox5 - 0.14926cm - 0.07193cm - 0.54004cm - 20.7077cm - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tipo Relación: - - - - - - - Textbox29 - 0.83025cm - 4.78817cm - 0.41981cm - 5.31841cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!TipoRelacionTexto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 2.42456cm - - - 2.05585cm - - - 3.03631cm - - - 7.7847cm - - - - - 0.44125cm - - - - - true - true - - - - - Folio - - - - - - - Textbox10 - - - Black - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Textbox12 - - - Black - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox21 - - - Black - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Folio Fiscal - - - - - - - Textbox11 - - - Black - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.41479cm - - - - - true - true - - - - - =Fields!SerieFolio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Fecha.Value - - - - - - - Fecha - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FolioFiscal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - After - - - - - - - DataSet4 - 1.39643cm - 3.28643cm - 0.85604cm - 15.30142cm - 3 - - - - - - true - 19.97297cm - 0.13424cm - 2.25247cm - 20.89818cm - 41 - - =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) - - - - - - - true - true - - - - - Acepto ajuste - - - - ____________________ - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - LogoLlantas1 - FitProportional - 12.27878cm - 0.20617cm - 0.85359cm - 20.86494cm - 43 - - - - - - true - true - true - - - - - < ** Toda corrección de los datos del comprobante debera efectuarse a más tardar tres dias despues de su expedición. ** > - - - - - - - Textbox4 - 9.73684cm - 0.20617cm - 0.44183cm - 20.83436cm - 44 - - - 2pt - 2pt - 2pt - 2pt - - - - 25.75074cm - - - - - - - - =Globals!ExecutionTime - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario Imprimio: - - - - - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox35 - 0.00882cm - 18.54098cm - 0.50624cm - 2.5cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0cm - 0cm - 0.5cm - 0.5cm - 1.27cm -