From 8a01477009db20e015d7a98420894b2c45de4fe2 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 14 Jan 2021 19:22:08 -0700 Subject: [PATCH 01/18] -- que no registre bitacora en prerender --- App_Code/ClsPaginas.vb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index df2523887..4c3cd1671 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5287,11 +5287,11 @@ Public Class ClsPaginas If sw IsNot Nothing AndAlso Not (Not User.Identity.IsAuthenticated OrElse UsuarioActual Is Nothing) Then sw.Stop() - If Not Page.IsPostBack Then - Using ObjUsuario As New ClsSisUsuarios - ObjUsuario.AddBitacora(CveModulo, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request.Url.PathAndQuery.ToString(), sw.ElapsedMilliseconds) - End Using - End If + 'If Not Page.IsPostBack Then + ' Using ObjUsuario As New ClsSisUsuarios + ' ObjUsuario.AddBitacora(CveModulo, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request.Url.PathAndQuery.ToString(), sw.ElapsedMilliseconds) + ' End Using + 'End If End If If Not IsNothing(ViewState("strToastMsglargonoreplace")) AndAlso ViewState("strToastMsglargonoreplace").ToString.Length > 0 Then From 413c5b56e1f60b2f2c0c342a2d7469a98fa13a95 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 21 Jan 2021 09:26:11 -0700 Subject: [PATCH 02/18] =?UTF-8?q?carga=20de=20trabajo=20sobre=20la=20retro?= =?UTF-8?q?alimentaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsEncuestas.vb | 2 +- App_Code/ClsPaginas.vb | 1 + CRM/AsignarVendedorEnProspectos.aspx | 30 ++++++++++++++ CRM/AsignarVendedorEnProspectos.aspx.cs | 17 ++++++++ CRM/CatEmpresasCRM.aspx | 6 +-- CRM/CatEtapasProceso.aspx | 4 +- CRM/CatEtapasProceso.aspx.cs | 43 ++++++++----------- CRM/CatMediosCaptacion.aspx | 4 +- CRM/CatProbabilidadAcercamiento.aspx | 4 +- CRM/CatProbabilidadAcercamiento.aspx.cs | 4 +- CRM/CatTipoProceso.aspx | 4 +- CRM/CatTipoProceso.aspx.cs | 4 +- CRM/EmpresaCRM.aspx.cs | 7 +++- CRM/RepAcercamientos.aspx | 16 +++++++- CRM/RepAcercamientos.aspx.cs | 48 +++++++++++++++++++++- CRM/RepAcercamientosProcesos.aspx.cs | 30 +++++++++++++- CRM/RepAcercamientosRechazos.aspx.cs | 27 ++++++++++++ Prospeccion/PopUpBuscarProspectos.aspx | 50 +++++++++++------------ Prospeccion/PopUpBuscarProspectos.aspx.vb | 38 +++++++++-------- 19 files changed, 247 insertions(+), 92 deletions(-) create mode 100644 CRM/AsignarVendedorEnProspectos.aspx create mode 100644 CRM/AsignarVendedorEnProspectos.aspx.cs diff --git a/App_Code/ClsEncuestas.vb b/App_Code/ClsEncuestas.vb index edec3dd57..bafb08bd6 100644 --- a/App_Code/ClsEncuestas.vb +++ b/App_Code/ClsEncuestas.vb @@ -33,6 +33,7 @@ Public Class ClsEncuestas SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString Try SqlConexion.Open() + ConexionAdd() Catch ex As Exception OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex) End Try @@ -42,7 +43,6 @@ Public Class ClsEncuestas End If SqlAdapter = New SqlDataAdapter("", SqlConexion) - ConexionAdd() End Sub Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) With SqlAdapter.SelectCommand diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index df2523887..507d7bc15 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4453,6 +4453,7 @@ Public Class ClsPaginas PaginaDict.Add("/CRM/RepAcercamientosRechazos.aspx".ToUpper(), 1314) PaginaDict.Add("/CRM/RepAcercamientosProcesosDetalle.aspx".ToUpper(), 1313) PaginaDict.Add("/CRM/CatMetas.aspx".ToUpper(), 684) + PaginaDict.Add("/CRM/AsignarVendedorEnProspectos.aspx".ToUpper(), 695) #End Region #Region "CxC" diff --git a/CRM/AsignarVendedorEnProspectos.aspx b/CRM/AsignarVendedorEnProspectos.aspx new file mode 100644 index 000000000..1bc111064 --- /dev/null +++ b/CRM/AsignarVendedorEnProspectos.aspx @@ -0,0 +1,30 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="AsignarVendedorEnProspectos.aspx.cs" Inherits="CRM_AsignarVendedorEnProspectos" %> + + + + + + + Asignar Vendedor a Prospectos + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CRM/AsignarVendedorEnProspectos.aspx.cs b/CRM/AsignarVendedorEnProspectos.aspx.cs new file mode 100644 index 000000000..247372543 --- /dev/null +++ b/CRM/AsignarVendedorEnProspectos.aspx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Data; +using Microsoft.Reporting.WebForms; +using Extensiones; + +public partial class CRM_AsignarVendedorEnProspectos : ClsPaginas +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} \ No newline at end of file diff --git a/CRM/CatEmpresasCRM.aspx b/CRM/CatEmpresasCRM.aspx index c4391eec7..4d47b17ab 100644 --- a/CRM/CatEmpresasCRM.aspx +++ b/CRM/CatEmpresasCRM.aspx @@ -11,7 +11,7 @@
  • - Agregar Prospecto + Agregar
  • @@ -72,7 +72,7 @@ - + @@ -96,7 +96,7 @@ - + diff --git a/CRM/CatEtapasProceso.aspx b/CRM/CatEtapasProceso.aspx index 8dc6acbfb..1ec7ff0ef 100644 --- a/CRM/CatEtapasProceso.aspx +++ b/CRM/CatEtapasProceso.aspx @@ -13,7 +13,7 @@
  • - Agregar Etapas de Proceso + Agregar
  • PDF @@ -112,7 +112,7 @@ - + diff --git a/CRM/CatEtapasProceso.aspx.cs b/CRM/CatEtapasProceso.aspx.cs index 088df61d5..2fc3b29a8 100644 --- a/CRM/CatEtapasProceso.aspx.cs +++ b/CRM/CatEtapasProceso.aspx.cs @@ -132,19 +132,19 @@ public partial class CRM_CatEtapasProceso : ClsPaginas { if (EsEditar == 1) { - LtlModalTitulo.Text = "Actualizar Etapa del Proceso"; + //LtlModalTitulo.Text = "Actualizar Etapa del Proceso"; BtnGuardar.Text = "Actualizar"; DivEstatus.Visible = true; - + DdlTipoProceso.SelectedValueExist("-1"); DdlTipoProceso.Enabled = false; } else { - LtlModalTitulo.Text = "Agregar Etapa al Proceso"; + //LtlModalTitulo.Text = "Agregar Etapa al Proceso"; BtnGuardar.Text = "Guardar"; DivEstatus.Visible = false; - DdlTipoProceso.SelectedValueExist("1"); + DdlTipoProceso.SelectedValueExist("-1"); DdlTipoEtapa.SelectedValueExist("1"); DdlTipoProceso.Enabled = true; @@ -152,6 +152,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas TxtEtapaProceso.Text = ""; TxtDescripcion.Text = ""; ChkEstatus.Checked = true; + UPModal.Update(); } protected void CargaTiposProceso() @@ -203,6 +204,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas DivOrden.Visible = false; bloquearEtapasAnteriores(-1); DdlTipoProceso.SelectedValueExist(CveTipoProcesoSeleccionado); + //cargaEtapas(); DdlTipoEtapa.SelectedValueExist(CveTipoEtapaSeleccionada); UPModal.Update(); @@ -222,6 +224,11 @@ public partial class CRM_CatEtapasProceso : ClsPaginas bloquearEtapasAnteriores(GvRow.DataKey("CveTipoEtapa").ToEntero()); CveEtapaProceso = GvRow.DataKey("CveEtapaProceso").ToEntero(); DdlTipoProceso.SelectedValueExist(GvRow.DataKey("CveTipoProceso")); + + int CveTipoEtapaSeleccionado = GvRow.DataKey("CveTipoEtapa").ToEntero(); + DataTable EtapasDisponiblesEditar = DTEtapas.FiltraParametros(String.Format("CveTipoEtapa = {0} OR TipoEtapa = 'Proceso'", CveTipoEtapaSeleccionado)); + DdlTipoEtapa.DataSource = EtapasDisponiblesEditar; + DdlTipoEtapa.DataBind(); DdlTipoEtapa.SelectedValueExist(GvRow.DataKey("CveTipoEtapa")); TxtEtapaProceso.Text = GvRow.DataKey("EtapaProceso").ToString(); @@ -308,7 +315,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas //} // PRECARGAMOS LA SIGUIENTE ETAPA A AGREGAR CON LOS MISMA DATOS DE LA ETAPA QUE SE INSERTO - CveTipoProcesoSeleccionado = CveTipoProceso; + //CveTipoProcesoSeleccionado = CveTipoProceso; CveTipoEtapaSeleccionada = CveTipoEtapa; ObjCRM.Dispose(); @@ -421,40 +428,26 @@ public partial class CRM_CatEtapasProceso : ClsPaginas protected void DdlTipoProceso_Change(Object sender,EventArgs e) { + int CveTipoProcesoSeleccionado = DdlTipoProceso.SelectedValue.ToEntero(); DataTable EtapasIterable = DTEtapas.Copy(); + DataTable EtapasDefiniticas = DTEtapas.Copy(); DataTable EtapasAux = DTEtapas.Copy(); - int indice = 0; foreach (DataRow EtapaRow in EtapasIterable.Rows) { int CveTipoEtapa = EtapaRow["CveTipoEtapa"].ToEntero(); if (CveTipoEtapa != 2) { - int CantidadEtapas = TmpDT.FiltraParametros(String.Format("CveTipoProceso = {0} AND CveTipoEtapa = {1}",DdlTipoProceso.SelectedValue,EtapaRow["CveTipoEtapa"])).Rows.Count; - if(CantidadEtapas > 0) + int CantidadEtapas = TmpDT.FiltraParametros(String.Format("CveTipoProceso = {0} AND CveTipoEtapa = {1}", CveTipoProcesoSeleccionado, CveTipoEtapa)).Rows.Count; + if (CantidadEtapas > 0) { - EtapasAux.Rows.RemoveAt(indice); + EtapasAux = EtapasDefiniticas.FiltraParametros(String.Format("CveTipoEtapa <> {0}", CveTipoEtapa)); + EtapasDefiniticas = EtapasAux.Copy(); } - }else - { - indice++; } } - //for (int i = 1; i < CveTipoEtapa; i++) - //{ - // DataRow TipoEtapaRow = EtapasAux.Rows[indice]; - // int CveTipoEtapaAux = TipoEtapaRow["CveTipoEtapa"].ToEntero(); - // if (CveTipoEtapaAux == 2) - // { - // indice++; - // } - // else - // { - // EtapasAux.Rows.Remove(TipoEtapaRow); - // } - //} EtapasAux.AcceptChanges(); DdlTipoEtapa.DataSource = EtapasAux; diff --git a/CRM/CatMediosCaptacion.aspx b/CRM/CatMediosCaptacion.aspx index 5e733e2eb..44c28263a 100644 --- a/CRM/CatMediosCaptacion.aspx +++ b/CRM/CatMediosCaptacion.aspx @@ -13,7 +13,7 @@
  • - Agregar Medio de Captación + Agregar
  • @@ -60,7 +60,7 @@ - + diff --git a/CRM/CatProbabilidadAcercamiento.aspx b/CRM/CatProbabilidadAcercamiento.aspx index fed9a26a3..2cd1ec94e 100644 --- a/CRM/CatProbabilidadAcercamiento.aspx +++ b/CRM/CatProbabilidadAcercamiento.aspx @@ -13,7 +13,7 @@
  • - Agregar Probabilidad de Acercamiento + Agregar
  • PDF @@ -48,7 +48,7 @@ --%> - + diff --git a/CRM/CatProbabilidadAcercamiento.aspx.cs b/CRM/CatProbabilidadAcercamiento.aspx.cs index 2997bba1e..417402df1 100644 --- a/CRM/CatProbabilidadAcercamiento.aspx.cs +++ b/CRM/CatProbabilidadAcercamiento.aspx.cs @@ -104,13 +104,13 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas { if (EsEditar == 1) { - LtlModalTitulo.Text = "Actualizar Probabilidad de Acercamiento"; + //LtlModalTitulo.Text = "Actualizar Probabilidad de Acercamiento"; BtnGuardar.Text = "Actualizar"; DivEstatus.Visible = true; } else { - LtlModalTitulo.Text = "Agregar Probabilidad de Acercamiento"; + //LtlModalTitulo.Text = "Agregar Probabilidad de Acercamiento"; BtnGuardar.Text = "Guardar"; DivEstatus.Visible = false; } diff --git a/CRM/CatTipoProceso.aspx b/CRM/CatTipoProceso.aspx index 8ce066a9f..221b3ae1d 100644 --- a/CRM/CatTipoProceso.aspx +++ b/CRM/CatTipoProceso.aspx @@ -13,7 +13,7 @@
  • - Agregar Tipo de Proceso + Agregar
  • PDF @@ -74,7 +74,7 @@ - + diff --git a/CRM/CatTipoProceso.aspx.cs b/CRM/CatTipoProceso.aspx.cs index 2058a867d..5f00ba584 100644 --- a/CRM/CatTipoProceso.aspx.cs +++ b/CRM/CatTipoProceso.aspx.cs @@ -73,13 +73,13 @@ public partial class CRM_CatTipoProceso : ClsPaginas { if (EsEditar == 1) { - LtlModalTitulo.Text = "Actualizar Tipo de Proceso"; + //LtlModalTitulo.Text = "Actualizar Tipo de Proceso"; BtnGuardar.Text = "Actualizar"; DivEstatus.Visible = true; } else { - LtlModalTitulo.Text = "Agregar Tipo de Proceso"; + //LtlModalTitulo.Text = "Agregar Tipo de Proceso"; BtnGuardar.Text = "Guardar"; DivEstatus.Visible = false; } diff --git a/CRM/EmpresaCRM.aspx.cs b/CRM/EmpresaCRM.aspx.cs index 8c2874e1b..abb4a55a9 100644 --- a/CRM/EmpresaCRM.aspx.cs +++ b/CRM/EmpresaCRM.aspx.cs @@ -239,7 +239,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas CreoCliente = false; RecuperaCve(); CargaTipoProceso(); - //CargaMetodosCaptacion(); + CargaMetodosCaptacion(); CargaVendedores(); CargaSucursales(); CargarTiposEventos(); @@ -570,14 +570,16 @@ public partial class CRM_EmpresaCRM : ClsPaginas if (ObjCRM.GetTipoProceso(UsuarioActual.CveEmpresa)) { DdlTipoPrceso2.DataSource = ObjCRM.DtResultados; + DdlTipoPrceso2.Items.Insert(0, new ListItem("Seleccione","-1")); } DdlTipoPrceso2.DataBind(); + ObjCRM.Dispose(); } protected void CargaMetodosCaptacion() { ClsCRM ObjCRM = new ClsCRM(); - if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa, 1)) + if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa, -1)) { DdlMedioCaptacion.DataSource = ObjCRM.DtResultados.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoPrceso2.SelectedValue)); DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1")); @@ -758,6 +760,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas else { ObjCRM.RollBack(); } ObjCRM.Dispose(); + objDatosTecnicos.Dispose(); } #endregion diff --git a/CRM/RepAcercamientos.aspx b/CRM/RepAcercamientos.aspx index 7b6db4b54..f3f14be4a 100644 --- a/CRM/RepAcercamientos.aspx +++ b/CRM/RepAcercamientos.aspx @@ -10,6 +10,20 @@ + + +
  • + +
  • +
  • + +
  • +
    + + + + +
    @@ -54,7 +68,7 @@ - +
    diff --git a/CRM/RepAcercamientos.aspx.cs b/CRM/RepAcercamientos.aspx.cs index 1eef821ff..07844b84b 100644 --- a/CRM/RepAcercamientos.aspx.cs +++ b/CRM/RepAcercamientos.aspx.cs @@ -6,6 +6,7 @@ using System.Web.UI; using System.Web.UI.WebControls; using Extensiones; using System.Data; +using Microsoft.Reporting.WebForms; public partial class CRM_RepAcercamientos : ClsPaginas { @@ -22,6 +23,18 @@ public partial class CRM_RepAcercamientos : ClsPaginas ViewState["CveVendedor"] = value; } } + private DataTable DtDatos + { + get + { + return (ViewState["DtDatos"] == null ? null : (DataTable)ViewState["DtDatos"]); + } + + set + { + ViewState["DtDatos"] = value; + } + } #endregion protected void Page_Load(object sender, EventArgs e) @@ -49,6 +62,7 @@ public partial class CRM_RepAcercamientos : ClsPaginas if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin, CvePS: CvePS, CveGiroClasificacion:DdlGiroClasificacion.SelectedValue.ToEntero())) { GVDatos.DataSource = ObjCRM.DtResultados; + DtDatos = ObjCRM.DtResultados; GVDatos.DataBind(); } @@ -78,13 +92,43 @@ public partial class CRM_RepAcercamientos : ClsPaginas //CALCULAMOS EL INTERVALO DE LA SEMANA ACTUAL TxtFechaInicio.Text = DateTime.Now.AddDays(-((int)DateTime.Now.DayOfWeek) + 1).ToShortDateString(); - //TxtFechaFin.Text = DateTime.Now.AddDays((7 - (int)DateTime.Now.DayOfWeek)).ToShortDateString(); + TxtFechaFin.Text = DateTime.Now.AddDays((7 - (int)DateTime.Now.DayOfWeek)).ToShortDateString(); DdlPS.setEsWebService(true); - + DdlPS.SelectedValue = "-1"; + DdlPS.SelectedText = "Seleccione"; DataTable dtGiroClasificaciones = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa); DdlGiroClasificacion.DataSource = dtGiroClasificaciones; DdlGiroClasificacion.DataBind(); DdlGiroClasificacion.Items.Insert(0, new ListItem("Seleccione", "-1")); } #endregion + + protected void LnkPDF_Click(object sender, EventArgs e) + { + Imprimir("PDF"); + } + + protected void LnkExcel_Click(object sender, EventArgs e) + { + Imprimir("Excel"); + } + + private void Imprimir(string formato) + { + string VendedorFiltro = String.Format("Vendedor: {0}    ", (DdlVendedor.SelectedValue != "-1" ? DdlVendedor.SelectedItem.Text : "Todos")); + string ProductoServicioFiltro = String.Format("Producto Servicio: {0}    ", (DdlPS.SelectedValue != "-1" ? DdlPS.SelectedText : "Todos")); + string GiroFiltro = String.Format("Giro: {0}    ", (DdlGiroClasificacion.SelectedValue != "-1" ? DdlGiroClasificacion.SelectedItem.Text : "Todos")); + string FechaInicioFiltro = String.Format("Fecha Inicio: {0}    ", TxtFechaInicio.Text); + string FechaFinFiltro = String.Format("Fecha Fin: {0}    ", TxtFechaFin.Text); + + string Filtros = String.Format("{0}{1}{2}{3}{4}", VendedorFiltro, FechaInicioFiltro, FechaFinFiltro, ProductoServicioFiltro, GiroFiltro); + + List @params = new List(); + @params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); + @params.Add(new ReportParameter("LogoPath", new Uri(Server.MapPath(string.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri)); + @params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)); + @params.Add(new ReportParameter("AgrupadoPor", Filtros)); + + ImprimirPDF("Empresas/Grales/Formatos/RepAcercamientos.rdlc", DtDatos, @params, "Reporte de Acercamientos", formato); + } } \ No newline at end of file diff --git a/CRM/RepAcercamientosProcesos.aspx.cs b/CRM/RepAcercamientosProcesos.aspx.cs index 59588035e..241ff91d7 100644 --- a/CRM/RepAcercamientosProcesos.aspx.cs +++ b/CRM/RepAcercamientosProcesos.aspx.cs @@ -393,7 +393,7 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas doc.Add(header); Paragraph Filtros = this.filtrosDelReporte(); doc.Add(Filtros); - PdfPTable table = this.convertirReporteATabla(); + PdfPTable table = this.convertirReporteATabla(doc); doc.Add(table); doc.Close(); @@ -533,12 +533,15 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas return Filtros; } - private PdfPTable convertirReporteATabla() + private PdfPTable convertirReporteATabla(Document doc) { int numeroDeColumnas = GVRepAcercamientosEtapas.Columns.Count; PdfPTable table = new PdfPTable(numeroDeColumnas); table.WidthPercentage = 100f; + float[] anchoColumnas = this.ColumnasWidth(); + table.SetWidths(anchoColumnas); + BaseColor headerBackGroundColor = new BaseColor(240,240,240); Font fuente = FontFactory.GetFont("Arial", 9f); @@ -568,6 +571,29 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas return table; } + private float[] ColumnasWidth() + { + int CantidadColumnas = GVRepAcercamientosEtapas.Columns.Count; + float[] ColumnsWidth = new float[CantidadColumnas]; + + int cursor = 0; + DataControlFieldCollection ColumnsCollection = GVRepAcercamientosEtapas.Columns; + foreach (DataControlField columns in ColumnsCollection) + { + if (columns.HeaderText == "Total") + { + ColumnsWidth[cursor] = 20f; + }else + { + ColumnsWidth[cursor] = 80f; + } + + cursor++; + } + + return ColumnsWidth; + } + protected void LnkExcel_Click(object sender, EventArgs e) { GVRepAcercamientosEtapas.ExportToExcelGembox("Reporte de Rechazos de Acercamiento", UsuarioActual, "", "", "Reporte de Rechazos de Acercamiento", "", -1); diff --git a/CRM/RepAcercamientosRechazos.aspx.cs b/CRM/RepAcercamientosRechazos.aspx.cs index 2ab4f2746..ea1d906c8 100644 --- a/CRM/RepAcercamientosRechazos.aspx.cs +++ b/CRM/RepAcercamientosRechazos.aspx.cs @@ -520,6 +520,9 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas PdfPTable table = new PdfPTable(numeroDeColumnas); table.WidthPercentage = 100f; + //float[] anchoColumnas = this.ColumnasWidth(); + //table.SetWidths(anchoColumnas); + BaseColor headerBackGroundColor = new BaseColor(240, 240, 240); Font fuente = FontFactory.GetFont("Arial", 9f); @@ -550,6 +553,30 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas return table; } + private float[] ColumnasWidth() + { + int CantidadColumnas = GVRepAcercamientosEtapas.Columns.Count; + float[] ColumnsWidth = new float[CantidadColumnas]; + + int cursor = 0; + DataControlFieldCollection ColumnsCollection = GVRepAcercamientosEtapas.Columns; + foreach (DataControlField columns in ColumnsCollection) + { + //if (columns.HeaderText == "Total") + //{ + // ColumnsWidth[cursor] = 20f; + //} + //else + //{ + // ColumnsWidth[cursor] = 80f; + //} + + cursor++; + } + + return ColumnsWidth; + } + protected void LnkExcel_Click(object sender, EventArgs e) { GVRepAcercamientosEtapas.ExportToExcelGembox("Reporte de Rechazos de Acercamiento", UsuarioActual, "", "", "Reporte de Rechazos de Acercamiento", "", -1); diff --git a/Prospeccion/PopUpBuscarProspectos.aspx b/Prospeccion/PopUpBuscarProspectos.aspx index d1038fbd9..936bffa8e 100644 --- a/Prospeccion/PopUpBuscarProspectos.aspx +++ b/Prospeccion/PopUpBuscarProspectos.aspx @@ -21,16 +21,14 @@ Filtros para búsqueda - Nombre: - Empresa: + RFC: + - Teléfono/Celular: - @@ -44,52 +42,52 @@
    - +
    Número de registros encontrados: 
    -
    - +
    + - + -
    +
    - + -
    +
    - <%----%> - + -
    +
    - <%----%> - + -
    +
    - <%----%> - + -
    +
    - <%----%> - <%-- - --%> - + -
    +
    - <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%>
    diff --git a/Prospeccion/PopUpBuscarProspectos.aspx.vb b/Prospeccion/PopUpBuscarProspectos.aspx.vb index 971daf4b0..90b755c73 100644 --- a/Prospeccion/PopUpBuscarProspectos.aspx.vb +++ b/Prospeccion/PopUpBuscarProspectos.aspx.vb @@ -16,7 +16,7 @@ Partial Class PopUpBuscarProspectos CType(Me.Master, BaseMasterPage).EsPopup = True CType(Me.Master, BaseMasterPage).PopupWidth = 800 RegistraScript("$get('tdContenido').style.height='520px'") - TxtNombre.Focus() + 'TxtNombre.Focus() ViewState("Opt") = IfNull(Request("Opt"), "") @@ -31,29 +31,26 @@ Partial Class PopUpBuscarProspectos End Sub Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click - Dim ObjProsp As New ClsProspectos() + Dim ObjCRM As New ClsCRM() - Dim Nombre As String = "-1" + Dim RFC As String = "-1" Dim NombreEmpresa As String = "-1" - Dim Celular As String = "-1" - - If TxtNombre.Text.Trim <> String.Empty Then Nombre = TxtNombre.Text.Trim - If TxtNombreEmpresa.Text.Trim <> String.Empty Then NombreEmpresa = TxtNombreEmpresa.Text.Trim - If txtCelular.Text.Trim <> String.Empty Then Celular = txtCelular.Text.Trim - - If ObjProsp.GetProspectosDetalle(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "-1", -1, Nombre, NombreEmpresa, Celular, UsuarioActual.CveEmpresa) Then - If ObjProsp.DtResultados.Rows.Count > 0 Then - LtlTotalRegistros.Text = ObjProsp.DtResultados.Rows.Count.ToString.FormatoNumero(0) - GV.DataSource = ObjProsp.DtResultados + If TxtRFC.Text.Trim <> String.Empty Then RFC = TxtRFC.Text.Trim + If TxtNombreEmpresa.Text.Trim <> String.Empty Then NombreEmpresa = TxtNombreEmpresa.Text.Trim + + If ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa, -1, NombreEmpresa, RFC) Then + If ObjCRM.DtResultados.Rows.Count > 0 Then + LtlTotalRegistros.Text = ObjCRM.DtResultados.Rows.Count.ToString.FormatoNumero(0) + GV.DataSource = ObjCRM.DtResultados Else LtlTotalRegistros.Text = "0" GV.DataSource = Nothing - Alert("No se encontraron registros con losparámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia) + Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia) End If End If - ObjProsp.Dispose() + ObjCRM.Dispose() GV.DataBind() UPDatos.Update() TblBusqueda.Visible = True @@ -62,12 +59,17 @@ Partial Class PopUpBuscarProspectos Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowIndex = 0 Then - 'e.Row.Cells(0).Width = Unit.Pixel(250) - 'e.Row.Cells(1).Width = Unit.Pixel(80) + e.Row.Cells(0).Width = Unit.Pixel(250) + e.Row.Cells(1).Width = Unit.Pixel(80) End If e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left - e.Row.FCHyperLink("Hpl").Attributes.Add("onclick", String.Format("Ir('/Prospeccion/Prospectos.aspx?CveProspecto={0}')", e.Row.DBCampo("CveProspecto"))) + e.Row.FCHyperLink("Hpl").Attributes.Add("onclick", String.Format("Ir('/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}')", e.Row.DBCampo("CveEmpresaCRM"))) + e.Row.FCHyperLink("Hp2").Attributes.Add("onclick", String.Format("Ir('/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}')", e.Row.DBCampo("CveEmpresaCRM"))) + e.Row.FCHyperLink("Hp3").Attributes.Add("onclick", String.Format("Ir('/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}')", e.Row.DBCampo("CveEmpresaCRM"))) + e.Row.FCHyperLink("Hp4").Attributes.Add("onclick", String.Format("Ir('/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}')", e.Row.DBCampo("CveEmpresaCRM"))) + e.Row.FCHyperLink("Hp5").Attributes.Add("onclick", String.Format("Ir('/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}')", e.Row.DBCampo("CveEmpresaCRM"))) + e.Row.FCHyperLink("Hp6").Attributes.Add("onclick", String.Format("Ir('/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}')", e.Row.DBCampo("CveEmpresaCRM"))) End If End Sub End Class From e1d793ac7386133682986cda819206a574b7c728 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 21 Jan 2021 21:19:45 -0700 Subject: [PATCH 03/18] merge --- App_Code/ClsCRM.vb | 37 ++++++++++ CRM/AsignarVendedorEnProspectos.aspx | 94 ++++++++++++++++++++++--- CRM/AsignarVendedorEnProspectos.aspx.cs | 77 ++++++++++++++++++++ 3 files changed, 197 insertions(+), 11 deletions(-) diff --git a/App_Code/ClsCRM.vb b/App_Code/ClsCRM.vb index d269279b6..acabd6abe 100644 --- a/App_Code/ClsCRM.vb +++ b/App_Code/ClsCRM.vb @@ -1089,6 +1089,43 @@ Public Class ClsCRM End Function #End Region +#Region "Asignar Vendedor a Prospectos" + Public Function GetProspectosPorAsignarVendedor(CveEmpresa As Integer, Optional Empresa As String = "-1", Optional CveSubProyecto As Integer = -1, Optional CveGiro As Integer = -1) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_CRM_GetProspectosPorAsignarVendedor", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Empresa", SqlDbType.NVarChar).Value = Empresa + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveGiro", SqlDbType.Int).Value = CveGiro + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los Prospectos sin Vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + + Public Function AsignarVendedor(CveProspectos As String, CveVendedor As Integer) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_CRM_AsignarVendedores", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@ProspectosCve", SqlDbType.NVarChar).Value = CveProspectos + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los Prospectos sin Vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function +#End Region + #Region "IDisposable Support" ' IDisposable Protected Overridable Sub Dispose(disposing As Boolean) diff --git a/CRM/AsignarVendedorEnProspectos.aspx b/CRM/AsignarVendedorEnProspectos.aspx index 1bc111064..bf082f0cd 100644 --- a/CRM/AsignarVendedorEnProspectos.aspx +++ b/CRM/AsignarVendedorEnProspectos.aspx @@ -14,17 +14,89 @@ + + +
    +
    +
    + +
    +
    +
    - - - - - - - - + +
    + +
    + +
    + +
    + +
    + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + Asignar vendedor +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + + + + + + + + + + + +
    +
    - \ No newline at end of file + diff --git a/CRM/AsignarVendedorEnProspectos.aspx.cs b/CRM/AsignarVendedorEnProspectos.aspx.cs index 247372543..025b2970a 100644 --- a/CRM/AsignarVendedorEnProspectos.aspx.cs +++ b/CRM/AsignarVendedorEnProspectos.aspx.cs @@ -1,4 +1,5 @@ using System; +using System.Text; using System.Collections.Generic; using System.Linq; using System.Web; @@ -12,6 +13,82 @@ public partial class CRM_AsignarVendedorEnProspectos : ClsPaginas { protected void Page_Load(object sender, EventArgs e) { + if (!IsPostBack) + { + this.CargaFiltros(); + this.CargaDatos(); + } + } + private void CargaDatos() + { + string Empresa = (TxtNombre.Text == "" ? "-1" : TxtNombre.Text); + ClsCRM ObjCRM = new ClsCRM(); + if (ObjCRM.GetProspectosPorAsignarVendedor(UsuarioActual.CveEmpresa, Empresa, DdlSubProyecto.SelectedValue.ToEntero(),DdlGiroClasificacion.SelectedValue.ToEntero())) + { + GvProspectos.DataSource = ObjCRM.DtResultados; + } + ObjCRM.Dispose(); + GvProspectos.DataBind(); + } + + private void CargaFiltros() + { + DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(-1, CveEmpresa: UsuarioActual.CveEmpresa); + DdlSubProyecto.Items.Insert(0, new ListItem("Seleccione", "-1")); + DdlSubProyecto.DataBind(); + + DdlGiroClasificacion.DataSource = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa); + DdlGiroClasificacion.Items.Insert(0, new ListItem("Seleccione", "-1")); + DdlGiroClasificacion.DataBind(); + + DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa); + DdlVendedor.Items.Insert(0, new ListItem("Seleccione", "-1")); + DdlVendedor.DataBind(); + } + + protected void BtnConsultar_Click(object sender, EventArgs e) + { + CargaDatos(); + } + + protected void BtnAsignar_Click(object sender, EventArgs e) + { + StringBuilder CveProspectos = new StringBuilder(); + GridViewRowCollection RowsProspectos = GvProspectos.Rows; + + foreach (GridViewRow Prospecto in RowsProspectos) + { + bool Asignado = Prospecto.FCCheckBox("ChkAsignar").Checked; + + if (Asignado) + { + int CveProspecto = Prospecto.DataKey("CveEmpresaCRM").ToEntero(); + CveProspectos.AppendFormat("{0},",CveProspecto); + } + } + + string CveProspectosFinal = CveProspectos.ToString(); + int CveVendedor = DdlVendedor.SelectedValue.ToEntero(); + + if (CveProspectosFinal.Length > 0 && CveVendedor != -1) + { + CveProspectos.Remove((CveProspectos.Length -1),1); + ClsCRM ObjCRM = new ClsCRM(); + + if (ObjCRM.AsignarVendedor(CveProspectosFinal,CveVendedor)) + { + + string Vendedor = DdlVendedor.SelectedItem.Text; + string MensajeExito = String.Format("El vendedor '{0}' fue asignado a los prospectos de manera exitosa", Vendedor); + Alert(MensajeExito); + this.CargaDatos(); + UpDatos.Update(); + + } + + ObjCRM.Dispose(); + + } } } \ No newline at end of file From 90800e4233b27c99ba5babd43018ed788792e2d6 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 22 Jan 2021 11:52:44 -0700 Subject: [PATCH 04/18] cambio en PAC 3, al timbrado sin impuestos --- App_Code/Timbrado.vb | 62 +++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index 42549491e..bed33b7e6 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -2981,8 +2981,10 @@ Public Class Timbrado comprobante.Conceptos(i).ClaveProdServ = concep.ClaveProdServ If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then - comprobante.Conceptos(i).Descuento = concep.Descuento - comprobante.Conceptos(i).DescuentoSpecified = True + If concep.Descuento > 0 Then + comprobante.Conceptos(i).Descuento = concep.Descuento + comprobante.Conceptos(i).DescuentoSpecified = True + End If End If If concep.Noidentificacion <> "" Then comprobante.Conceptos(i).NoIdentificacion = concep.Noidentificacion @@ -2996,33 +2998,39 @@ Public Class Timbrado k = 0 'SI NO ES FACTURA EN 0 AGREGA LOS IMPUESTOS If Not ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("P", "N") AndAlso (Ventas.Total <> 0 OrElse (ObjCFDITimbre.TotalImpuestosRetenidos > 0 OrElse ObjCFDITimbre.TotalImpuestosTrasladados > 0)) Then - comprobante.Conceptos(i).Impuestos = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestos() - comprobante.Conceptos(i).Impuestos.Traslados = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosTraslado(concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion = "T").Count - 1) {} - If concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion <> "T").Count > 0 Then - comprobante.Conceptos(i).Impuestos.Retenciones = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosRetencion(concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion <> "T").Count - 1) {} + + If concep.Impuestos.Count > 0 Then + + comprobante.Conceptos(i).Impuestos = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestos() + comprobante.Conceptos(i).Impuestos.Traslados = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosTraslado(concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion = "T").Count - 1) {} + If concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion <> "T").Count > 0 Then + comprobante.Conceptos(i).Impuestos.Retenciones = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosRetencion(concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion <> "T").Count - 1) {} + End If + + For Each imp As CFDIConceptosImpuestos In concep.Impuestos + If imp.TrasladooRetencion = "T" Then + comprobante.Conceptos(i).Impuestos.Traslados(j) = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosTraslado() + comprobante.Conceptos(i).Impuestos.Traslados(j).Base = imp.Base + comprobante.Conceptos(i).Impuestos.Traslados(j).Impuesto = imp.Impuesto + comprobante.Conceptos(i).Impuestos.Traslados(j).TipoFactor = imp.TipoFactor + comprobante.Conceptos(i).Impuestos.Traslados(j).Importe = imp.Importe + comprobante.Conceptos(i).Impuestos.Traslados(j).ImporteSpecified = True + comprobante.Conceptos(i).Impuestos.Traslados(j).TasaOCuota = imp.TasaOCuota.FormatoNumero(6) + comprobante.Conceptos(i).Impuestos.Traslados(j).TasaOCuotaSpecified = True + j += 1 + Else + comprobante.Conceptos(i).Impuestos.Retenciones(k) = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosRetencion() + comprobante.Conceptos(i).Impuestos.Retenciones(k).Base = imp.Base + comprobante.Conceptos(i).Impuestos.Retenciones(k).Impuesto = imp.Impuesto + comprobante.Conceptos(i).Impuestos.Retenciones(k).TipoFactor = imp.TipoFactor + comprobante.Conceptos(i).Impuestos.Retenciones(k).Importe = imp.Importe + comprobante.Conceptos(i).Impuestos.Retenciones(k).TasaOCuota = imp.TasaOCuota.ToString.ToDecimal + k += 1 + End If + Next End If - For Each imp As CFDIConceptosImpuestos In concep.Impuestos - If imp.TrasladooRetencion = "T" Then - comprobante.Conceptos(i).Impuestos.Traslados(j) = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosTraslado() - comprobante.Conceptos(i).Impuestos.Traslados(j).Base = imp.Base - comprobante.Conceptos(i).Impuestos.Traslados(j).Impuesto = imp.Impuesto - comprobante.Conceptos(i).Impuestos.Traslados(j).TipoFactor = imp.TipoFactor - comprobante.Conceptos(i).Impuestos.Traslados(j).Importe = imp.Importe - comprobante.Conceptos(i).Impuestos.Traslados(j).ImporteSpecified = True - comprobante.Conceptos(i).Impuestos.Traslados(j).TasaOCuota = imp.TasaOCuota.FormatoNumero(6) - comprobante.Conceptos(i).Impuestos.Traslados(j).TasaOCuotaSpecified = True - j += 1 - Else - comprobante.Conceptos(i).Impuestos.Retenciones(k) = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosRetencion() - comprobante.Conceptos(i).Impuestos.Retenciones(k).Base = imp.Base - comprobante.Conceptos(i).Impuestos.Retenciones(k).Impuesto = imp.Impuesto - comprobante.Conceptos(i).Impuestos.Retenciones(k).TipoFactor = imp.TipoFactor - comprobante.Conceptos(i).Impuestos.Retenciones(k).Importe = imp.Importe - comprobante.Conceptos(i).Impuestos.Retenciones(k).TasaOCuota = imp.TasaOCuota.ToString.ToDecimal - k += 1 - End If - Next + End If i += 1 Next From 6366e767558ede6ddecc4c7d15b73df20187f7e9 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 22 Jan 2021 11:53:07 -0700 Subject: [PATCH 05/18] columnas separadas , codigo y ps --- Acumuladores/CatFoliosGarantia.aspx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Acumuladores/CatFoliosGarantia.aspx b/Acumuladores/CatFoliosGarantia.aspx index 6d82dd232..8d42dc3a9 100644 --- a/Acumuladores/CatFoliosGarantia.aspx +++ b/Acumuladores/CatFoliosGarantia.aspx @@ -380,7 +380,8 @@ - + + From 257c5ab1632da8953625c9e89fd62ae582cfd254 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 22 Jan 2021 11:53:34 -0700 Subject: [PATCH 06/18] - limpieza de codigo de mas --- App_Code/ClsPaginas.vb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 4c3cd1671..f04d608aa 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -6833,13 +6833,6 @@ Public Class ClsPaginas params.Add(New ReportParameter("Ref", TipoDocumentoRef)) params.Add(New ReportParameter("AplicaPagare", AplicaPagare)) - 'ALAN YEPIZ - If UsuarioActual.CveEmpresa.Contiene(123) Then - params.Add(New ReportParameter("DiaExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Day))) - params.Add(New ReportParameter("MesExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Month))) - params.Add(New ReportParameter("AñoExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Year))) - End If - RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo) RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo) Case "Cot" From ce781016459d2bdaeeeb7782a7d6e97363df89ae Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 22 Jan 2021 11:54:07 -0700 Subject: [PATCH 07/18] =?UTF-8?q?codigo=20para=20mejorar=20devoluci=C3=B3n?= =?UTF-8?q?=20de=20nc,=20de=20proveedor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/IE.aspx.vb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 0f859956c..80424468e 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -3450,9 +3450,16 @@ Partial Class Bancos_IE Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC) Dim CveCuentaIVAxAcreditarDevDinC = 0 Dim CveCuentaIVAAcreditableDevDinC = 0 - Dim IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero - Dim IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero + Dim IdCtaIVAXAcreditarDevDinC As Integer + Dim IdCtaIVAAcreditableDevDinC As Integer + + If DTCuentas IsNot Nothing AndAlso DTCuentas.Rows.Count > 0 Then + IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero + IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero + Else + MsgError = "Sin Registros de porcentaje impuesto" + End If Dim IVADevMN As Decimal = 0 Dim IEPSDevMN As Decimal = 0 @@ -4508,7 +4515,8 @@ Partial Class Bancos_IE End If If UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then - If Not ObjConta.ContabilizarPrePoliza(CvePrePolizaCancelacion, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjAC) Then + + If Not ObjConta.ContabilizarPrePoliza(CvePrePolizaCancelacion, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IDPoliza > 0, IDPoliza, -1), ObjConta:=ObjAC) Then ErrorCancelar = True MensajeError = "Error al contabilizar poliza" End If From 81050cba84954e9e97a668118450a8dc8cc4181e Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 22 Jan 2021 12:56:38 -0700 Subject: [PATCH 08/18] correion de funcionalidad 702, cuanod debe ser 128 --- 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 e1ff03926..2237c88b5 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -4053,7 +4053,7 @@ Partial Class Compras_Compras 'Verifica funcionalidad 702 "Require orden de compra para factura de compra" - If UsuarioActual.Empresa.Funcionalidad(702) = "1" Then + If UsuarioActual.Empresa.Funcionalidad(128) <> "" Then If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then If Not CompraEstaVinculadaOC Then Alert("Debe de vincular una orden de compra para registrar la factura") From 5bcfb65cf8e588b887c7cb3ef8d0c17b59b82a3a Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 22 Jan 2021 12:56:55 -0700 Subject: [PATCH 09/18] mejoras en conceptos de NC --- Contabilidad/RegPrePoliza.aspx.vb | 82 ++++++++++++++++++++++++------ Contabilidad/RegPrePolizaS.aspx.vb | 19 +++++-- 2 files changed, 81 insertions(+), 20 deletions(-) diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index 197c8bf07..6756eca1a 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -542,7 +542,7 @@ Partial Class ContabilidadC_RegPrePoliza End Sub Private Sub DdlConceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContables.SelectedIndexChanged - If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 201, 205, 206, 14, 15, 16, 19, 25, 26, 21) Then + If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 201, 205, 206, 14, 15, 16, 19, 25, 26, 21, 18, 60) Then CargaProveedores() DdlProveedores.Visible = True DdlCompras.Visible = True @@ -557,7 +557,7 @@ Partial Class ContabilidadC_RegPrePoliza Else DdlPersonal.Visible = False End If - If DdlConceptosContables.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39) Then + If DdlConceptosContables.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then CargaClientes() DdlClientes.Visible = True DdlVentas.Visible = True @@ -594,11 +594,21 @@ Partial Class ContabilidadC_RegPrePoliza End Sub Private Sub DdlProveedores_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedores.SelectedIndexChanged - CargaCompras(DdlProveedores.SelectedValue.ToEntero) + If DdlConceptosContables.SelectedValue.ToEntero.Contiene(18, 60) Then + CargaNotasCreditoCompras(DdlProveedores.SelectedValue.ToEntero, DdlCompras) + Else + CargaCompras(DdlProveedores.SelectedValue.ToEntero) + End If + End Sub Private Sub DdlClientes_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientes.selectedindexchange - CargaVentas(DdlClientes.SelectedValue.ToEntero) + If DdlConceptosContables.SelectedValue.ToEntero.Contiene(12, 91) Then + CargaVentas(DdlClientes.SelectedValue.ToEntero) + Else + CargaVentas(DdlClientes.SelectedValue.ToEntero) + End If + End Sub Private Sub CargaSubProyectos() @@ -646,6 +656,24 @@ Partial Class ContabilidadC_RegPrePoliza End If End Sub + Private Sub CargaNotasCreditoCompras(CveProveedor As Integer, ddl As DropDownList) + If DdlConceptosContables.SelectedValue.ToEntero.Contiene(18, 60) Then + Dim ObjCompras As New ClsCompras + + ddl.ClearSelection() + If ObjCompras.GetCompras(UsuarioActual.CveEmpresa, "NC", "-1", "-1", "-1", "-1", "-1", "-1", "-1", "-1", CveProveedor:=CveProveedor, TopSelect:=1000) Then + ddl.DataSource = ObjCompras.DtResultados '.FiltraParametros("Saldo <> 0") + ddl.DataBind() + ddl.Items.Insert(0, New ListItem(" - ", "-1")) + Else + ddl.DataSource = Nothing + ddl.DataBind() + ddl.Items.Insert(0, New ListItem(" - ", "-1")) + End If + ObjCompras.Dispose() + End If + End Sub + Private Sub CargaClientes() DdlClientes.setEsWebService(True) DdlClientes.Attributes.Add("data-metodo", "getcliente") @@ -676,6 +704,22 @@ Partial Class ContabilidadC_RegPrePoliza ObjVentas.Dispose() End Sub + Private Sub CargaNotasCreditoVentas(CveCliente As Integer) + Dim ObjVentas As New ClsVentas + + DdlVentas.ClearSelection() + If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then + DdlVentas.DataSource = ObjVentas.DtResultados '.FiltraParametros("Saldo > 0") + DdlVentas.DataBind() + DdlVentas.Items.Insert(0, New ListItem(" - ", "-1")) + Else + DdlVentas.DataSource = Nothing + DdlVentas.DataBind() + DdlVentas.Items.Insert(0, New ListItem(" - ", "-1")) + End If + ObjVentas.Dispose() + End Sub + Private Sub CargaPersonal() DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa) DdlPersonal.DataBind() @@ -904,15 +948,7 @@ Partial Class ContabilidadC_RegPrePoliza Dim IdCtaContable As Integer = 0 Dim PorcentajeImpuesto As Decimal = 0 - 'Registra movimieno bancario - If CveConcepto = 30 Then - CveIE = ObjIE.AddBancos_IE(CveCuenta, CveTipoTransaccion, TxtFecha.Text, Folio, Beneficiario, ImporteDocumento, CveMoneda, 0, Observaciones, "", False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario" - CveIEInsertado = CveIE - If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then - FolioIE = ObjIE.Folio - End If - End If + Dim CveProveedor As Integer = -1 @@ -945,7 +981,18 @@ Partial Class ContabilidadC_RegPrePoliza CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero Else If CveConcepto = 30 Then + 'Registra movimieno bancario + If CveConcepto = 30 Then + CveIE = ObjIE.AddBancos_IE(CveCuenta, CveTipoTransaccion, TxtFecha.Text, Folio, Beneficiario, ImporteDocumento, CveMoneda, 0, Observaciones, "", False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario" + CveIEInsertado = CveIE + If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then + FolioIE = ObjIE.Folio + End If + End If + CveIE = CveIEInsertado + Else CveIE = -1 End If @@ -993,7 +1040,7 @@ Partial Class ContabilidadC_RegPrePoliza 'MENSAJE PRINCIPAL MensajeAlert.AppendFormat("

    Folio de Póliza: {1}", ObjMov.ContaIdPoliza, ObjMov.ContaFolio) - MensajeAlert.AppendFormat("

    Prepóliza: {1}", CvePrePoliza, ObjMov.ContaFolio) + MensajeAlert.AppendFormat("

    Prepóliza: {1}", CvePrePoliza, ObjMov.ContaFolio) 'Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion) Else Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico") @@ -1671,7 +1718,12 @@ Partial Class ContabilidadC_RegPrePoliza Protected Sub DdlProveedores_SelectedIndexChanged1(sender As Object, e As EventArgs) Dim ddl As DropDownList = CType(sender, DropDownList) Dim ddl2 As DropDownList = DirectCast(ddl.BindingContainer, GridViewRow).FCDropDownList("DdlCompras") - CargaCompras2(ddl.SelectedValue.ToEntero, ddl2) + If DdlConceptosContables.SelectedValue.ToEntero.Contiene(18, 60) Then + CargaNotasCreditoCompras(ddl.SelectedValue.ToEntero, ddl2) + Else + CargaCompras2(ddl.SelectedValue.ToEntero, ddl2) + End If + End Sub Private Sub CargaCompras2(CveProveedor As Integer, ddl As DropDownList) diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 2210878a2..a358c4250 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -514,7 +514,7 @@ Partial Class ContabilidadC_RegPrePolizaS Else DdlPersonal.Visible = False End If - If DdlConceptosContables.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39) Then + If DdlConceptosContables.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then CargaClientes() DdlClientes.Visible = True DdlVentas.Visible = True @@ -542,7 +542,11 @@ Partial Class ContabilidadC_RegPrePolizaS End Sub Private Sub CargaCuentasContables() - DdlCtaContable.DataSource = Session("DtCuentas") + Dim ObjConta As New ClsContabilidad + If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then + DdlCtaContable.DataSource = ObjConta.DtResultados + End If + ObjConta.Dispose() DdlCtaContable.DataBind() DdlCtaContable.Items.Insert(0, New ListItem("Sin Asignar", "0")) End Sub @@ -1058,8 +1062,13 @@ Partial Class ContabilidadC_RegPrePolizaS DdlTipoGastoE.DataBind() DdlTipoGastoE.Items.Insert(0, New ListItem("Sin Asignar", "0")) End Sub - Private Sub CargaCtaContableE() - DdlCtaContableE.DataSource = Session("DtCuentas") + Private Sub CargaCtaContableE() + Dim ObjConta As New ClsContabilidad + If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then + DdlCtaContableE.DataSource = ObjConta.DtResultados + End If + ObjConta.Dispose() + DdlCtaContableE.DataBind() DdlCtaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0")) End Sub @@ -1086,7 +1095,7 @@ Partial Class ContabilidadC_RegPrePolizaS Else DdlClasificacionesE.Visible = False End If - If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39) Then + If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then CargaClientesE() DdlClientesE.Visible = True DdlVentasE.Visible = True From 95ea41211d59728ccf46b7436a93b75553ef578f Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 22 Jan 2021 12:57:32 -0700 Subject: [PATCH 10/18] - --- Inventarios/RecepcionAlmacen.aspx.vb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index fc9a9f92b..0a4a9ebf9 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -938,11 +938,11 @@ Partial Class Inventarios_RecepcionAlmacen TotalCompraOC = ObjCompras.DtResultados.Rows(0)("SubTotal").ToString.ToDecimal - ObjCompras.DtResultados.Rows(0)("Descuentos").ToString.ToDecimal CveTipoCompra = ObjCompras.DtResultados.Rows(0)("CveTipoCompra").ToString.ToEntero - If CveTipoCompra = 9 Then + If CveTipoCompra = 9 Then ' apoyo logistico CargaAlmacenes(-1, "27", CveTipoCompra) ElseIf CveTipoCompra = 10 Then CargaAlmacenes(-1, CveTipoCompra:=CveTipoCompra) - ElseIf TipoMovimiento = 3 Then + ElseIf TipoMovimiento = 3 Then 'devolucion al proveedor CargaAlmacenes(-1, "21,2", CveTipoCompra) Else CargaAlmacenes(-1) @@ -967,11 +967,14 @@ Partial Class Inventarios_RecepcionAlmacen CargaSoloUsados = True SumarImporteUsados = True DtRecepcion = ObjInventario.DtResultados.Copy() - If UsuarioActual.CveRol = 1 Then - CargaAlmacenes(-1, "22", CveTipoCompra) - Else - CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra) + If TipoMovimiento <> 3 Then 'sino es devolucion/NC + If UsuarioActual.CveRol = 1 Then + CargaAlmacenes(-1, "22", CveTipoCompra) + Else + CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra) + End If End If + Else DtRecepcion = ObjInventario.DtResultados.Copy() From dc02f72de4774507c38f71842b2db2f15928ad64 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 22 Jan 2021 12:57:45 -0700 Subject: [PATCH 11/18] cambio en msg, de error --- Contabilidad/RepIVA.aspx.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 0ac1a8eb6..58f533539 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -147,10 +147,10 @@ public partial class Contabilidad_RepIVA : ClsPaginas } if (e.Row.DBCampo("PorcentajeIVA").ToDecimal() > 0) { - Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() > 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() > 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0)); + Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0)); Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal() + Math.Round(e.Row.DBCampo("IVANoDeducible").ToDecimal()), 2); - if (dif > 1) + if (Math.Abs(dif) > 1) { e.Row.ForeColor = System.Drawing.Color.Red; e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err"; From be1609541aa31ddbb76f917aa1a144ae93f1bcf8 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 22 Jan 2021 12:57:59 -0700 Subject: [PATCH 12/18] cambio a tolower --- Compras/PopUpVerFactura.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 99cd97ad1..1eaa7301e 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -910,7 +910,7 @@ Partial Class PopUpVerFactura If Archivo.Exists Then HttpContext.Current.Response.Clear() HttpContext.Current.Response.ClearContent() - HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = "xml", "application/xml", "application/pdf") + HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name).ToLower = "xml", "application/xml", "application/pdf") 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) From 65ca32dd5b8c49ce54e752dd571b0edcf71a5a31 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 22 Jan 2021 12:58:30 -0700 Subject: [PATCH 13/18] e1 --- Ventas/ProductosServicios.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index d6c0cbaf4..4526e1692 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -244,7 +244,7 @@ Partial Class ProductosyServicios End If - If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) And CvePS = -1 Then + If UsuarioActual.CveEmpresa.Contiene(72, 80) And CvePS = -1 Then 'DivDatos.Attributes("class") = "col-md-12" TxtPS.Enabled = False DivDdlTipo.Visible = True From 1ae37845c4f77f1f92039a888508b418595ae582 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 22 Jan 2021 20:07:15 -0700 Subject: [PATCH 14/18] Reporte Agredores Fechas --- App_Code/ClsBancos.vb | 4 +- Bancos/PagoAcreedor.aspx | 87 +++++++++++++++++++++++++++++++++++++ Bancos/PagoAcreedor.aspx.cs | 22 +++++++++- 3 files changed, 111 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 4e3b0b213..5098d660e 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -4350,11 +4350,13 @@ Public Class ClsBancos Return Retorno End Function - Public Function GetAcreedoresReporte(CveEmpresa As Integer) As Boolean + Public Function GetAcreedoresReporte(CveEmpresa As Integer, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Banc_AcreedorReporte") With SqlAdapter.SelectCommand.Parameters .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF End With Try SqlAdapter.Fill(Data) diff --git a/Bancos/PagoAcreedor.aspx b/Bancos/PagoAcreedor.aspx index e51215961..934cc2d4e 100644 --- a/Bancos/PagoAcreedor.aspx +++ b/Bancos/PagoAcreedor.aspx @@ -385,6 +385,93 @@ + + +
    +
    +
    + + +
    +
    +
    + +
    Fecha Inicio:
    +
    +
    + <%--width: 120px !important;--%> + + + + + + + + + + <%----%> + + + <%----%> + + +
    +
    +
    Fecha Fin:
    +
    + +
    + <%--width: 120px !important;--%> + + + + + + + + <%----%> + + + <%----%> + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs index cdcd5066d..bf115dfad 100644 --- a/Bancos/PagoAcreedor.aspx.cs +++ b/Bancos/PagoAcreedor.aspx.cs @@ -931,14 +931,29 @@ public partial class Bancos_PagoAcreedor : ClsPaginas #region"REPORTE" protected void CargaReporte() { + + DateTime FInicio = MinFecha; + DateTime FFin = MaxFecha; + + if(TxtFechaInicio.Text.Length == 10) + { + FInicio = TxtFechaInicio.Text.ToDate(); + } + + if(TxtFechaFin.Text.Length == 10) + { + FFin = TxtFechaFin.Text.ToDate(); + } + ClsBancos bancos = new ClsBancos(); - if (bancos.GetAcreedoresReporte(UsuarioActual.CveEmpresa)) + if (bancos.GetAcreedoresReporte(UsuarioActual.CveEmpresa, FInicio, FFin)) { GvReporte.DataSource = bancos.DtResultados; GvReporte.DataBind(); } bancos.Dispose(); UpReporte.Update(); + } protected void GvReporte_RowDataBound(object sender, GridViewRowEventArgs e) { @@ -970,4 +985,9 @@ public partial class Bancos_PagoAcreedor : ClsPaginas UpDatos.Update(); UpMovAcreedor.Update(); } + + protected void BtnConsultarReporte_Click(object sender, EventArgs e) + { + CargaReporte(); + } } From 17b0f4824fcf666d7d51a4d656aa4317dfd649c4 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 22 Jan 2021 20:53:26 -0700 Subject: [PATCH 15/18] Crm terminado --- App_Code/ClsPaginas.vb | 4 +- CRM/CatEmpresasCRM.aspx | 62 +++++++++++--- CRM/CatEmpresasCRM.aspx.cs | 171 ++++++++++++++++++++++++++++++++++++- CRM/EmpresaCRM.aspx.cs | 3 + 4 files changed, 225 insertions(+), 15 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 507d7bc15..e8509be9f 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7475,11 +7475,11 @@ Public Class ClsPaginas ' nombreautorizo = "Lic. LUIS JORGE CONTRERAS LANDGRAVE" 'End If Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta)) - If Not Archivo.Exists OrElse EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 122, 126) Then + If Not Archivo.Exists OrElse EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 122, 126, 158) Then params.Add(New ReportParameter("Descuento", DtDetalle.SUM("Descuento").ToString.FormatoNumero(2))) End If 'DATOS PARA DESCUENTO - If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 119, 122, 126) Then 'EMPRESAS QUE YA TIENEN EL AJUSTE EN EL FORMATO + If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 119, 122, 126, 158) Then 'EMPRESAS QUE YA TIENEN EL AJUSTE EN EL FORMATO params.Add(New ReportParameter("SubTotal", ObjOC.SubTotal.ToString)) params.Add(New ReportParameter("SubTotal2", DtDetalle.SUM("Total").ToString)) Else diff --git a/CRM/CatEmpresasCRM.aspx b/CRM/CatEmpresasCRM.aspx index 4d47b17ab..1e7e82f94 100644 --- a/CRM/CatEmpresasCRM.aspx +++ b/CRM/CatEmpresasCRM.aspx @@ -13,11 +13,14 @@
  • Agregar
  • +
  • + Cargar Prospectos +
  • - +
    @@ -47,9 +50,9 @@ - + -
    +
    " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
    @@ -59,7 +62,7 @@ - + @@ -72,21 +75,21 @@ - + - - + + - - + + - + @@ -95,14 +98,49 @@ - - + + +