From f8a3e8acf0243ade78a9cfb2a8d80874b8ea0e2a Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Tue, 21 Apr 2020 10:27:26 -0700 Subject: [PATCH 01/17] --- App_Code/ClsPaginas.vb | 6 +- Compras/PopUpVerFactura.aspx.vb | 2 +- Metronic/assets/admin/layout/css/custom.css | 2 +- OI/RepTareas2.aspx | 384 ++++++++++++++++++++ OI/RepTareas2.aspx.cs | 22 ++ 5 files changed, 413 insertions(+), 3 deletions(-) create mode 100644 OI/RepTareas2.aspx create mode 100644 OI/RepTareas2.aspx.cs diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index c8d07a432..d3c2859a4 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5161,7 +5161,11 @@ Public Class ClsPaginas Dim ds As New DataSet For Each rpds As ReportDataSource In DataSource Dim dt As DataTable = DirectCast(rpds.Value, Data.DataTable) - dt = dt.Copy() + If dt Is Nothing Then + dt = New DataTable + Else + dt = dt.Copy() + End If dt.TableName = rpds.Name ds.Tables.Add(dt) Next diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index e66384a6e..131a8528e 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -3572,7 +3572,7 @@ Partial Class PopUpVerFactura #Region "OP = 'CAN' - CANCELACION" Public Sub ImprimeCancelacion(CveVenta As Integer) Dim ObjVentas As New ClsVentas - If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then + If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then Dim drv As DataRow = ObjVentas.DtResultados.Rows(0) Dim FolioFiscal = drv("FolioFiscal").ToString Dim SelloCancelacion = drv("SelloCancelacion").ToString diff --git a/Metronic/assets/admin/layout/css/custom.css b/Metronic/assets/admin/layout/css/custom.css index 480722787..992599c9a 100644 --- a/Metronic/assets/admin/layout/css/custom.css +++ b/Metronic/assets/admin/layout/css/custom.css @@ -1838,7 +1838,7 @@ div.md-checkbox { position: relative; } - .form-group.form-md-line-input .form-control ~ label { + .form-group.form-md-line-input .form-control:not(textarea) ~ label { bottom: auto; padding-bottom: 28px; } diff --git a/OI/RepTareas2.aspx b/OI/RepTareas2.aspx new file mode 100644 index 000000000..b49be0b16 --- /dev/null +++ b/OI/RepTareas2.aspx @@ -0,0 +1,384 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepTareas2.aspx.cs" Inherits="OI_RepTareas2" %> + + + + + + + + + + + +
  • + Agregar Tarea +
  • +
    + + + + + + + + + + + + diff --git a/OI/RepTareas2.aspx.cs b/OI/RepTareas2.aspx.cs new file mode 100644 index 000000000..6662bf5e9 --- /dev/null +++ b/OI/RepTareas2.aspx.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using Extensiones; + +public partial class OI_RepTareas2 : System.Web.UI.Page +{ + public const string iddivAgregar = "divModalAgregarEvento"; + protected void Page_Load(object sender, EventArgs e) + { + + } + + protected void LnkAddEvento_Click(object sender, EventArgs e) + { + + this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregar)); + } +} \ No newline at end of file From 7387cde4d69eba4491a163dc3e430895dbb16bcf Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Tue, 21 Apr 2020 11:25:27 -0700 Subject: [PATCH 02/17] correcciones --- Empresas/140/Formatos/Traslado.rdlc | 45 ++++------------------------- 1 file changed, 6 insertions(+), 39 deletions(-) diff --git a/Empresas/140/Formatos/Traslado.rdlc b/Empresas/140/Formatos/Traslado.rdlc index 9cfc9c2ca..a7dbec927 100644 --- a/Empresas/140/Formatos/Traslado.rdlc +++ b/Empresas/140/Formatos/Traslado.rdlc @@ -540,7 +540,7 @@ - =Sum(Fields!Cantidad.Value, "DsInventarios") + =Sum(iif(Not Fields!Clasificacion.Value = "USADOS",CInt(Fields!Cantidad.Value),0),"DsInventarios") - =Sum(iif(Fields!Clasificacion.Value = "USADOS",Fields!Cantidad.Value,0),"DsInventarios") + =Sum(iif(Fields!Clasificacion.Value = "USADOS",CInt(Fields!Cantidad.Value),0),"DsInventarios") - - true - true - - - - - =Parameters!SubProyecto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - true true @@ -849,7 +816,7 @@ - Origen 2: + Origen: @@ -911,7 +878,7 @@ 0.00711cm 0.6cm 14.27979cm - 8 + 7 @@ -930,7 +897,7 @@ 0.1121cm 2.53711cm 4.08574cm - 9 + 8 From 6c23e773a1f8b50e2fbacb398ff84edac1b67b5f Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Tue, 21 Apr 2020 16:39:15 -0700 Subject: [PATCH 03/17] terminando circulares detalle --- Empresas/141/Formatos/Factura.rdlc | 6 +++++- OI/CircularDetalle.aspx | 2 +- OI/CircularDetalle.aspx.vb | 27 ++++++++++++++++++++++++--- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/Empresas/141/Formatos/Factura.rdlc b/Empresas/141/Formatos/Factura.rdlc index c16252ec5..f9d135e02 100644 --- a/Empresas/141/Formatos/Factura.rdlc +++ b/Empresas/141/Formatos/Factura.rdlc @@ -1546,7 +1546,11 @@ - FACTURA + =Switch( + Parameters!TipoDocumento.Value = "Ing","FACTURA", + Parameters!TipoDocumento.Value = "Egs","NOTA DE CREDITO", + Parameters!TipoDocumento.Value = "Ant","ANTICIPO" +) + + + Textbox1 + 0.69667in + 1.88417in + 0.25in + 2.55208in + + + 2pt + 2pt + 2pt + 2pt + + + + 2in + + + + + + + + + + + + + + + + + + + + +
  • + Agregar CheckList
  • +
  • + Cambiar Estatus
  • +
  • + Agregar Comentario
  • +
  • + Agregar Tema
  • +
  • + Agregar Archivo
  • + +
    +
    +
    + + + + + +
    +
    + + +
    +
    + + Tarea +
    +
    + +
    +
    +
    +
    + + + +
    +
    + + + +
    + +
    +
    +

    Para

    +
    +
    + +
    +
    + + +
    +
    +

    C. C. Para

    +
    +
    + +
    +
    +
    +
    +
    +
    + + + + <%----%> + +
    +
    +
    +
    + + + + <%----%> + +
    +
    +
    +
    +
    +
    + + + + + + + + Prioridad: + +
    +
    +
    +
    + + + + Tema: +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + Estatus +
    +
    + +
    +
    +
    + + + + +
    + + + Estatus: +
    +
    + Avance: + +
    + +
    +
    +
    +
    + + + +
    +
    + + Archivo +
    +
    +
    +
    +
    +
    + +
    +
    +
    + +
    + +
    + +
    +
    +
    +
    +
    +
    + +
    + + + +
    +
    + + CheckList +
    +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + Agregar + <%--Agregar--%> +
    +
    + + + + + + + + + + + <%--
    --%>
    +                                                
    +                                                     
    +                                                
    +                                                <%--
    --%> +
    +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + Miembros +
    +
    + +
    +
    +
    + <%--
    +
    +
    + + + Usuario: +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + +
    Para
    jorge caudillo
    Con copia para
    Julian Moreno
    --%> + + + + + + Para + + + <%----%> + + + + + + C. C. Para + + + + + + Usuario + + + + + + Rol + + + + + + +
    +
    +
    +
    +
    + Guardar +
    +
    + +
    +
    + + Registro de actividades +
    +
    + +
    +
    + +
    +
    +
    + + + + + + + + + +
    + + + + + + + + + diff --git a/OI/TareaDetalle.aspx.cs b/OI/TareaDetalle.aspx.cs new file mode 100644 index 000000000..477602ab3 --- /dev/null +++ b/OI/TareaDetalle.aspx.cs @@ -0,0 +1,691 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using Extensiones; + +public partial class OI_TareaDetalle : ClsPaginas +{ + #region Propiedades + public const string iddivAgregar = "divModalAgregarActividad"; + public const string iddivAgregarArchivo = "divModalAgregarArchivo"; + public const string iddivAgregarTema = "divModalAgregartema"; + public const string iddivCambiarEstatus = "divModalCambiarEstatus"; + public int RCveEvento { get { return ViewState["RCveEvento"] != null ? ViewState["RCveEvento"].ToString().ToEntero() : 0; } set { ViewState["RCveEvento"] = value; } } + public int Folio { get { return ViewState["Folio"] != null ? ViewState["Folio"].ToString().ToEntero() : 0; } set { ViewState["Folio"] = value; } } + public decimal Avance { get { return ViewState["Avance"] != null ? ViewState["Avance"].ToString().ToEntero() : 0; } set { ViewState["Avance"] = value; } } + public int CveUsuarioPara { get { return ViewState["CveUsuarioPara"].ToString().ToEntero(); } set { ViewState["CveUsuarioPara"] = value; } } + public int CveUsuarioCCPara { get { return ViewState["CveUsuarioCCPara"].ToString().ToEntero(); } set { ViewState["CveUsuarioCCPara"] = value; } } + public bool EsNuevo { get { return Convert.ToBoolean(ViewState["EsNuevo"]); } set { ViewState["EsNuevo"] = value; } } + + public System.Data.DataTable CheckListNew { get { return ViewState["CheckListNew"] != null ? (System.Data.DataTable)ViewState["CheckListNew"] : null; } set { ViewState["CheckListNew"] = value; } } + public int chklistitemindex { get { return ViewState["chklistitemindex"] != null ? ViewState["chklistitemindex"].ToString().ToEntero() : 0; } set { ViewState["chklistitemindex"] = value; } } + + #endregion + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + EsNuevo = true; + CveUsuarioPara = 0; + CveUsuarioCCPara = 0; + if (Request["Archivo"] != null) + { + string strArchivo = string.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ModExtensiones.Decripta(Request["Archivo"].ToString())); + if (System.IO.File.Exists(strArchivo)) + { + try + { + string filename = ModExtensiones.Decripta(Request["filename"].ToString()); + + System.IO.FileInfo file = new System.IO.FileInfo(strArchivo); + string mimeType = "text/plain"; + try { mimeType = MimeMapping.GetMimeMapping(strArchivo); } + catch (Exception) { } + // Response.Write(path) + Response.Clear(); + Response.ClearHeaders(); + Response.ClearContent(); + Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(filename)}"); + Response.AddHeader("Content-Length", file.Length.ToString()); + Response.ContentType = mimeType; + Response.Flush(); + Response.TransmitFile(file.FullName); + Response.End(); + } + catch (Exception) + { + this.RegistraScript("window.close();"); + } + } + else + { + this.RegistraScript("window.close();"); + } + } + else + { + + CargaTemas(); + CargaEstatus(); + cargaUsuarios(); + if (Request["CveEvento"] != null) + { + RCveEvento = Request["CveEvento"].ToString().ToEntero(); + } + if (RCveEvento > 0) + { + EsNuevo = false; + LoadTarea(); + } + else + { + LtlTitulo.Text = "Tarea Nueva"; + TxtArchivo.Visible = true; + CveUsuarioCCPara = UsuarioActual.CveUsuario; + } + SetUsuarios(); + HypArchivo.Visible = !TxtArchivo.Visible; + } + } + } + private void CargaTemas() + { + DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario)); + DdlTema.DataBind(); + DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1")); + + } + private void CargaEstatus() + { + + DdlEventoEstatus.DataSource = GlobalDTOIEstatusEventos;//get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario)); + DDlEstatus.DataSource = DdlEventoEstatus.DataSource; + DdlEventoEstatus.DataBind(); + DDlEstatus.DataBind(); + DdlEventoEstatus.Enabled = false; + //DdlEventoEstatus.Items.Insert(0, new ListItem("Seleccione", "-1")); + + } + private void cargaUsuarios() + { + string FiltroAD = ""; + + GVUsuarios.DataSource = get_GlobalDTUsuarios().FiltraParametros(String.Format("CveEmpresa = {0} AND Estatus =1 {1}", UsuarioActual.CveEmpresa, FiltroAD), "Rol ASC"); + GVUsuarios.DataBind(); + } + private void cargaActividades(ClsOIEventos ObjOI) + { + GvActividades.DataSource = null; + if (ObjOI.GetEventosComentarios(RCveEvento)) + { + GvActividades.DataSource = ObjOI.DtResultados; + } + GvActividades.DataBind(); + UpActividades.Update(); + } + private void SetUsuarios() + { + StringBuilder para = new StringBuilder(); + StringBuilder CCpara = new StringBuilder(); + foreach (GridViewRow gvRow in GVUsuarios.Rows) + { + if (gvRow.RowType == DataControlRowType.DataRow) + { + int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero(); + CheckBox chkpara = gvRow.FCCheckBox("ChkPara"); + CheckBox chkCCpara = gvRow.FCCheckBox("ChkCCP"); + chkpara.Checked = false; + chkCCpara.Checked = false; + + if (EsNuevo) + { + chkpara.Enabled = true; + chkCCpara.Enabled = true; + //if (CveUsuario == CveUsuarioCCPara) + //{ + // chkCCpara.Enabled = false; + //} + } + else + { + + chkpara.Enabled = false; + chkCCpara.Enabled = false; + } + + if (CveUsuario == CveUsuarioPara) + { + chkpara.Checked = true; + para.AppendFormat("\"{0}\"",gvRow.DataKey("Nombre").ToString()); + } + if (CveUsuario == CveUsuarioCCPara) + { + chkCCpara.Checked = true; + CCpara.AppendFormat("\"{0}\"", gvRow.DataKey("Nombre").ToString()); + } + + } + LtlPara.Text = para.ToString(); + LtlCCPara.Text = CCpara.ToString(); + } + } + + public void LoadTarea() + { + GVcheklist.DataSource = new System.Data.DataTable(); + using (ClsOIEventos ObjOI_E = new ClsOIEventos()) + { + if (ObjOI_E.GetOI_Eventos2(RCveEvento, UsuarioActual.CveEmpresa) && ObjOI_E.DtResultados.Rows.Count > 0) + { + PnlUsuarios.Visible = true; + portletMiembros.Visible = false; + LnkUpFile.Visible = true; + System.Data.DataRow drow = ObjOI_E.DtResultados.Rows[0]; + + Folio = drow["Folio"].ToString().ToEntero(); + Avance = drow["Avance"].ToString().ToDecimal(); + + TxtAsunto.Text = drow["Asunto"].ToString(); + TxtDescripcion.Text = drow["Descripcion"].ToString(); + DdlPrioridad.SelectedValueExist(drow["Prioridad"].ToString()); + txtFechaI.Text = string.Format("{0:dd/MM/yyyy HH:mm}", drow["FechaInicio"]); + txtFechaF.Text = string.Format("{0:dd/MM/yyyy HH:mm}", drow["FechaFin"]); + DdlTema.SelectedValueExist(drow["CveRevision"].ToString()); + DdlEventoEstatus.SelectedValueExist(drow["CveEventoEstatus"].ToString()); + DDlEstatus.SelectedValueExist(drow["CveEventoEstatus"].ToString()); + HypArchivo.Text = string.Format("{0}
    ", drow["Archivo"].ToString()); + HypArchivo.NavigateUrl = string.Format("~/OI/TareaDetalle.aspx?Archivo={0}&filename={1}", ModExtensiones.Encripta(string.Format("OIFiles\\{0}\\{1}", Folio, drow["Archivo"])), ModExtensiones.Encripta(drow["Archivo"].ToString())); + TxtArchivo.Visible = (drow["Archivo"].ToString().Length == 0); + portletArchivo.Visible = !TxtArchivo.Visible; + LnkUpFile.Text = (portletArchivo.Visible ? "Actualizar archivo" : "Agregar archivo"); + CveUsuarioCCPara = drow["CveUsuarioDe"].ToString().ToEntero(); + CveUsuarioPara = drow["CveUsuarioPara"].ToString().ToEntero(); + TxtAvance.Text = string.Format("{0:##0}", drow["Avance"]); + //OIE.[CveEvento], OIE.[CveTipoEvento], OIE.[Folio], OIE.[Asunto], OIE.[Descripcion], OIE.[Prioridad], OIE.[CveUsuarioDe], OIE.[CveUsuarioPara], + //OIE.[CveEventoEstatus], OIE.[FechaInicio], OIE.[FechaFin], OIE.[FechaRealTermino], OIE.[CveRevision], OIE.[Archivo], OIE.[FechaIng], + //OIE.[CveUsuarioIng], OIE.[CveEmpresa], OIE.[CveUsuarioModifico], OIE.[Avance] + + LtlTitulo.Text = drow["Titulo"].ToString(); + if (ObjOI_E.Getcheklist(RCveEvento)) + { + GVcheklist.DataSource = ObjOI_E.DtResultados; + if (ObjOI_E.DtResultados.Rows.Count > 0) + { + portletChekList.Visible = true; + LnkAgregarCheckList.Visible = false; + } + } + cargaActividades(ObjOI_E); + } + } + GVcheklist.DataBind(); + } + + protected void LnkGuardar_Click(object sender, EventArgs e) + { + if (EsNuevo) + { + string errorMessage = ""; + int cveUsuarioDe = -1; + int cveUsuarioPara = -1; + + foreach (GridViewRow gvRow in GVUsuarios.Rows) + { + if (gvRow.RowType == DataControlRowType.DataRow) + { + int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero(); + CheckBox chkpara = gvRow.FCCheckBox("ChkPara"); + CheckBox chkCCpara = gvRow.FCCheckBox("ChkCCP"); + if (chkpara.Checked) + { + cveUsuarioPara = CveUsuario; + } + if (chkCCpara.Checked) + { + cveUsuarioDe = CveUsuario; + } + } + } + + OITipoEventos cveTipoEvento = OITipoEventos.Tarea; + string asunto = TxtAsunto.Text; + string descripcion = TxtDescripcion.Text; + int prioridad = DdlPrioridad.SelectedValue.ToEntero(); + + + string fechaInicio = ""; + if (txtFechaI.Text.ToDateTimeExcat().Year <= 1999) + { + if (txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999) + { + errorMessage = "no se ingreso una fecha de inicio valida"; + + } + else + { + fechaInicio = txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").ToString("yyyy/MM/dd HH:mm"); + } + } + else + { + fechaInicio = txtFechaI.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm"); + } + string fechaFin = ""; + if (txtFechaF.Text.ToDateTimeExcat().Year <= 1999) + { + if (txtFechaF.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999) + { + errorMessage = "no se ingreso una fecha fin valida"; + + } + else + { + fechaFin = string.Format("{0:yyyy/MM/dd} 23:59", txtFechaF.Text.ToDateTimeExcat("dd/MM/yyyy")); + } + } + else + { + fechaFin = txtFechaF.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm"); + } + int cveRevision = DdlTema.SelectedValue.ToEntero(); + string archivoname = ""; + string rutaarchivoOri = ""; + string ArchivoExtencion = ""; + foreach (Archivo item in TxtArchivo.getfiles().Archivos) + { + archivoname = item.filenameO; + ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion); + rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.patch, item.filename); + } + + + int cveUsuarioIng = UsuarioActual.CveUsuario; + int cveEmpresa = UsuarioActual.CveEmpresa; + bool Continuar = false; + int Folio = -1; + int CveEvento = -1; + + if (cveUsuarioDe <= 0) + { + errorMessage = "no se selecciono el miembro 'C C Para'"; + } + if (cveUsuarioPara <= 0) + { + errorMessage = "no se selecciono el miembro 'Para'"; + + } + if (errorMessage.Length == 0) + { + using (ClsOIEventos objOI = new ClsOIEventos()) + { + objOI.IniciaTransacSQL(); + Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, cveUsuarioIng, cveEmpresa); + CveEvento = objOI.CveEvento; + Folio = objOI.Folio; + if (Continuar) + { + foreach (System.Data.DataRow item in CheckListNew.Rows) + { + if (Continuar) + { + Continuar = objOI.Addcheklist(CveEvento, item["EventoComentario"].ToString(), UsuarioActual.CveUsuario); + + } + + } + } + if (Continuar && CveEvento > 0) + { + objOI.Commit(); + + } + else + { + objOI.RollBack(); + Continuar = false; + } + } + if (Continuar && CveEvento > 0) + { + if (rutaarchivoOri.Length > 0) + { + string ruta = string.Format("{0}OIFiles\\", UsuarioActual.Empresa.Ruta); + if (!System.IO.Directory.Exists(ruta)) + { + System.IO.Directory.CreateDirectory(ruta); + } + ruta = string.Format("{0}{1}\\", ruta, Folio); + if (!System.IO.Directory.Exists(ruta)) + { + System.IO.Directory.CreateDirectory(ruta); + } + 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)); + } + } + else + { + this.Alert(errorMessage, ModExtensiones.TipoMensaje.MsgAdvertencia); + + } + } + } + + protected void LnkEliminarchek_Click(object sender, EventArgs e) + { + GridViewRow gvrow = (GridViewRow)((LinkButton)sender).NamingContainer; + + if (EsNuevo) + { + CheckListNew = CheckListNew.FiltraParametros(string.Format("CveEventoCheckList <> {0}", gvrow.DataKey("CveEventoCheckList"))); + GVcheklist.DataSource = CheckListNew; + GVcheklist.DataBind(); + } + else + { + using (ClsOIEventos objOI = new ClsOIEventos()) + { + if (objOI.Removecheklist(gvrow.DataKey("CveEventoCheckList").ToEntero(), gvrow.DataKey("CveEvento").ToEntero(), UsuarioActual.CveUsuario)) + { + Alert("Se ha eliminado la actividad", ModExtensiones.TipoMensaje.ToastInformacion); + if (objOI.Getcheklist(RCveEvento)) + { + GVcheklist.DataSource = objOI.DtResultados; + GVcheklist.DataBind(); + cargaActividades(objOI); + } + } + } + } + } + protected void LnkAgregarCheckList_Click(object sender, EventArgs e) + { + portletChekList.Visible = true; + LnkAgregarCheckList.Visible = false; + if (RCveEvento > 0) + { + + } + else + { + GVcheklist.Columns[0].Visible = false; + CheckListNew = new System.Data.DataTable(); + //CveEventoCheckList,CveEvento,CveTipoEvento,EventoComentario,Estatus,CveUsuario,Usuario,FechaIng + CheckListNew.Columns.Add("CveEventoCheckList", typeof(int)); + CheckListNew.Columns.Add("CveEvento", typeof(int)); + CheckListNew.Columns.Add("CveTipoEvento", typeof(int)); + CheckListNew.Columns.Add("EventoComentario", typeof(String)); + CheckListNew.Columns.Add("Estatus", typeof(bool)); + CheckListNew.Columns.Add("CveUsuario", typeof(int)); + CheckListNew.Columns.Add("Usuario", typeof(string)); + CheckListNew.Columns.Add("FechaIng", typeof(DateTime)); + + } + UpChkList.Update(); + } + protected void LnkAgregarchklistitem_Click(object sender, EventArgs e) + { + if (RCveEvento > 0) + { + using (ClsOIEventos objOI = new ClsOIEventos()) + { + if (objOI.Addcheklist(RCveEvento, TxtActividad.Text, UsuarioActual.CveUsuario)) + { + Alert("Se ha agregó la actividad", ModExtensiones.TipoMensaje.ToastInformacion); + if (objOI.Getcheklist(RCveEvento)) + { + GVcheklist.DataSource = objOI.DtResultados; + GVcheklist.DataBind(); + cargaActividades(objOI); + } + } + } + + } + else + { + System.Data.DataRow drow = CheckListNew.NewRow(); + drow["CveEventoCheckList"] = chklistitemindex++; + drow["EventoComentario"] = TxtActividad.Text; + drow["Estatus"] = false; + //CveEventoCheckList,CveEvento,CveTipoEvento,EventoComentario,Estatus,CveUsuario,Usuario,FechaIng + CheckListNew.Rows.Add(drow); + GVcheklist.DataSource = CheckListNew; + GVcheklist.DataBind(); + } + TxtActividad.Text = ""; + } + protected void ChkEstatus_CheckedChanged(object sender, EventArgs e) + { + CheckBox chk = (CheckBox)sender; + GridViewRow gvrow = (GridViewRow)chk.NamingContainer; + using (ClsOIEventos objOI = new ClsOIEventos()) + { + if (objOI.Upcheklist(gvrow.DataKey("CveEventoCheckList").ToEntero(), gvrow.DataKey("CveEvento").ToEntero(), gvrow.DataKey("EventoComentario"), chk.Checked, UsuarioActual.CveUsuario)) + { + Alert("Se actualizo el estatus de la actividad", ModExtensiones.TipoMensaje.ToastInformacion); + if (objOI.Getcheklist(RCveEvento)) + { + GVcheklist.DataSource = objOI.DtResultados; + GVcheklist.DataBind(); + cargaActividades(objOI); + } + } + } + } + protected void LnkEditarCheck_Click(object sender, EventArgs e) + { + + } + + protected void BtnCambiarEstatus_Click(object sender, EventArgs e) + { + using (ClsOIEventos objOI = new ClsOIEventos()) + { + + + if (objOI.UpdateEstatusEvento2(DDlEstatus.SelectedValue.ToEntero(), -1, RCveEvento, UsuarioActual.CveUsuario)) + { + //CargaEstatusEventos(DdlEventoEstatus.SelectedValue.ToEntero); + + //if (DdlEventoEstatus.SelectedValue.ToEntero == 3 | DdlEventoEstatus.SelectedValue.ToEntero == 1) + // EnviarCorreoCambioEstatus(false); + //CargaDatos(); + string mensaje = string.Format("Se cambio el Estatus de \"{0}\" a \"{1}\"", DdlEventoEstatus.SelectedItem.Text, DDlEstatus.SelectedItem.Text); + DdlEventoEstatus.SelectedValueExist(DDlEstatus.SelectedValue); + UpEstatus.Update(); + this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivCambiarEstatus)); + Alert(mensaje, ModExtensiones.TipoMensaje.ToastInformacion); + cargaActividades(objOI); + } + + } + + } + + protected void LnkcambiarEstatus_Click(object sender, EventArgs e) + { + this.RegistraScript(string.Format("$('#{0}').modal()", iddivCambiarEstatus)); + + } + + + + protected void LnkSinfuncion_Click(object sender, EventArgs e) + { + + } + + protected void LnkAgregarTema_Click(object sender, EventArgs e) + { + + + this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarTema)); + + } + + protected void BtnAgregarTema_Click(object sender, EventArgs e) + { + + using (ClsOIEventos objoi = new ClsOIEventos()) + { + if (objoi.AddRevisionesEventos(TxtTema.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) + { + Alert("Tema agregada con éxito.", ModExtensiones.TipoMensaje.MsgInformacion); + this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarTema)); + TxtTema.Text = ""; + set_GlobalDTOIRevision(-1, objoi.DtResultados); + CargaTemas(); + UpContenido.Update(); + } + else { Alert("Ocurrió un error al agregar la revisión. Por favor vuelva a intentar.", ModExtensiones.TipoMensaje.MsgError); } + + } + } + + protected void LnkAgregarActividad_Click(object sender, EventArgs e) + { + + this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregar)); + } + + protected void BtnAgregarComentario_Click(object sender, EventArgs e) + { + string Comentario = TxtComentario.Text; + int CveComentario = 0; + string archivoname = ""; + string rutaarchivoOri = ""; + string ArchivoExtencion = ""; + foreach (Archivo item in Txtfilecomentario.getfiles().Archivos) + { + archivoname = item.filenameO; + ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion); + rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.patch, item.filename); + } + using (ClsOIEventos objoi = new ClsOIEventos()) + { + CveComentario = objoi.AddEventoComentario(RCveEvento, Comentario, archivoname, UsuarioActual.CveUsuario); + if (CveComentario > 0) { cargaActividades(objoi); } + } + Txtfilecomentario.Text = ""; + if (CveComentario > 0) + { + if (rutaarchivoOri.Length > 0) + { + string ruta = string.Format("{0}OIFiles\\", UsuarioActual.Empresa.Ruta); + if (!System.IO.Directory.Exists(ruta)) + { + System.IO.Directory.CreateDirectory(ruta); + } + ruta = string.Format("{0}{1}\\", ruta, Folio); + if (!System.IO.Directory.Exists(ruta)) + { + System.IO.Directory.CreateDirectory(ruta); + } + 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 agregado", ModExtensiones.TipoMensaje.ToastInformacion); + //this.Alert("Se ha agregado la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/TareaDetalle.aspx?CveEvento={0}\");", CveEvento)); + } + + } + + protected void GvActividades_RowDataBound(object sender, GridViewRowEventArgs e) + { + if (e.Row.RowType == DataControlRowType.DataRow) + { + HyperLink HplA = e.Row.FCHyperLink("HplA"); + string archivoname = e.Row.DBCampo("Archivo"); + string CveComentario = e.Row.DBCampo("CveEventoComentario"); + HplA.Visible = archivoname != ""; + if (HplA.Visible) + { + HplA.NavigateUrl = string.Format("~/OI/TareaDetalle.aspx?Archivo={0}&filename={1}", ModExtensiones.Encripta(string.Format("OIFiles\\{0}\\{1}", Folio, archivoname)), ModExtensiones.Encripta(archivoname)); + } + + } + //Visible='<%# Eval("Archivo").ToString() != "" %>' data-archivo ='<%# string.Format("",Eval("CveEventoComentario").ToString()) %>' + //string.Format("~/OI/TareaDetalle.aspx?Archivo={0}&filename={1}", ModExtensiones.Encripta(string.Format("OIFiles\\{0}\\{1}", Folio, drow["Archivo"])), ModExtensiones.Encripta(drow["Archivo"].ToString())) + } + + protected void LnkUpFile_Click(object sender, EventArgs e) + { + this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarArchivo)); + + } + + protected void BtnActualizarArchivo_Click(object sender, EventArgs e) + { + string archivoname = ""; + string rutaarchivoOri = ""; + string ArchivoExtencion = ""; + foreach (Archivo item in txtActualizarArchivo.getfiles().Archivos) + { + archivoname = item.filenameO; + ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion); + rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.patch, item.filename); + } + string ruta = string.Format("{0}OIFiles\\", UsuarioActual.Empresa.Ruta); + if (!System.IO.Directory.Exists(ruta)) + { + System.IO.Directory.CreateDirectory(ruta); + } + ruta = string.Format("{0}{1}\\", ruta, Folio); + if (!System.IO.Directory.Exists(ruta)) + { + System.IO.Directory.CreateDirectory(ruta); + } + string rutafin = string.Format("{0}{1}", ruta, archivoname);//, ArchivoExtencion); + int index = 0; + while (System.IO.File.Exists(rutafin)) + { + archivoname = string.Format("{0}{1}", index++, archivoname); + rutafin = string.Format("{0}{1}", ruta, archivoname); + } + System.IO.File.Move(rutaarchivoOri, rutafin); + bool continuar = false; + using (ClsOIEventos objoi = new ClsOIEventos()) + { + continuar = objoi.AddUPEventoArchivo(RCveEvento, archivoname, UsuarioActual.CveUsuario); + + } + if (continuar) + { + LoadTarea(); + this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarArchivo)); + this.Alert("Archivo Actualizado", ModExtensiones.TipoMensaje.ToastInformacion); + } + UpContenido.Update(); + } + + protected void BtnUpAvance_Click(object sender, EventArgs e) + { + + bool continuar = false; + using (ClsOIEventos objoi = new ClsOIEventos()) + { + continuar = objoi.UPEventoAAvance(RCveEvento, TxtAvance.Text.ToDecimal(), UsuarioActual.CveUsuario); + if (continuar){ + if (objoi.DtResultados.Rows.Count > 0) + { + LtlTitulo.Text = objoi.DtResultados.Rows[0]["Titulo"].ToString(); + } + cargaActividades(objoi); + } + } + if (continuar) + { + this.Alert("Avance Actualizado", ModExtensiones.TipoMensaje.ToastInformacion); + + } + UpTitulo.Update(); + } +} \ No newline at end of file diff --git a/Scripts/custom.js b/Scripts/custom.js index 2e9e49583..4212ccf60 100644 --- a/Scripts/custom.js +++ b/Scripts/custom.js @@ -1993,7 +1993,7 @@ function AddFunctionPS(inputProducto, inputAlmace, datos) { }); } - textoOld = texto + textoOld = texto; }; let GETPSALMACEN = function () { @@ -2016,10 +2016,10 @@ function AddFunctionPS(inputProducto, inputAlmace, datos) { }; lupa.bind("click", function () { buscaPS(Minput.val()); - }) + }); Minput.bind("copy paste cut", function () { buscaPS(Minput.val()); - }) + }); Minput.bind("keyup ", function (e) { if (e.keyCode == 13) { buscaPS(Minput.val()); @@ -2027,7 +2027,7 @@ function AddFunctionPS(inputProducto, inputAlmace, datos) { } else { buscaPSTimer(Minput.val()); } - }) + }); PSModal.on('click', '.list-group-item ', function (e) { let $this = $(this).hasClass('list-group-item') ? $(this) : $(this).closest('.list-group-item'); @@ -2054,7 +2054,7 @@ function AddFunctionPS(inputProducto, inputAlmace, datos) { }); PSModal.on('shown.bs.modal', function () { Minput.focus(); - }) + }); PSModal.on('click', '.item-almacen', function (e) { let $this = $(this).hasClass('item-almacen') ? $(this) : $(this).closest('.item-almacen'); let cveps = $(PSModal.find('.active')).data('cve'); From 52356a9e7553ed4a4c0df4c74546c57c322bf00a Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 23 Apr 2020 16:02:34 -0700 Subject: [PATCH 15/17] soporte y atendiendo tareas en CRM --- CRM/CatProbabilidadAcercamiento.aspx | 5 +-- CRM/EmpresaCRM.aspx.cs | 48 ++++++++++++++++++++++++---- CRM/RepAcercamientosProcesos.aspx.cs | 8 +++++ OC/OC.aspx.vb | 26 +++++++++++++-- 4 files changed, 77 insertions(+), 10 deletions(-) diff --git a/CRM/CatProbabilidadAcercamiento.aspx b/CRM/CatProbabilidadAcercamiento.aspx index 30b72d4c0..9e7699641 100644 --- a/CRM/CatProbabilidadAcercamiento.aspx +++ b/CRM/CatProbabilidadAcercamiento.aspx @@ -38,11 +38,12 @@ CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true" GridLines="None" AutoGenerateColumns="false" OnRowDeleting="GVDatos_RowDeleting" OnRowDataBound="GVDatos_RowDataBound"> - + + <%-- - + --%> <%-- diff --git a/CRM/EmpresaCRM.aspx.cs b/CRM/EmpresaCRM.aspx.cs index 3e3673985..33c26c6dd 100644 --- a/CRM/EmpresaCRM.aspx.cs +++ b/CRM/EmpresaCRM.aspx.cs @@ -302,7 +302,13 @@ public partial class CRM_EmpresaCRM : ClsPaginas } if (!ObjBitacora.AddEventoBitacora(Mensaje, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM)) + { HuboError = true; + }else + { + string asunto = String.Format("Se registró la empresa {0} con datos RFC: {1}, Vendedor: {2}", NombreEmpresa, RFC, Vendedor); + mandarCorreo(asunto, Mensaje); + } } } } @@ -316,10 +322,15 @@ public partial class CRM_EmpresaCRM : ClsPaginas if ((CveEncuestaAplicada != 0) && ObjCRM.UpdateEmpresCRM(NombreEmpresa, RFC, CveMedioCaptacion, CveEmpresaCRM, CveVendedorActualizar, UsuarioActual.CveUsuario, CveSubProyecto: CveSubProyecto, Correo: Correo)) { - //if (ObjBitacora.AddEventoBitacora(String.Format("Se actualizó la empresa {0} con RFC {1}", NombreEmpresa, RFC), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM)) - //{ - HuboError = false; - //} + if (!ObjBitacora.AddEventoBitacora(String.Format("Se actualizó la empresa {0} con RFC {1}", NombreEmpresa, RFC), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM)) + { + HuboError = true; + }else + { + string asunto = String.Format("Se actualizó la empresa {0}",NombreEmpresa); + string mensaje = String.Format("Se actualizó la empresa {0} con RFC {1} por el usuario {2}", NombreEmpresa, RFC,UsuarioActual.Nombre); + mandarCorreo(asunto, mensaje); + } } } @@ -563,8 +574,8 @@ public partial class CRM_EmpresaCRM : ClsPaginas protected void CargaSucursales() { - DdlSucursales.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1); - DdlSucursales.DataBind(); + //DdlSucursales.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1); + //DdlSucursales.DataBind(); DdlSucursales.Items.Insert(0, new ListItem("Todos ", "-1")); } @@ -856,6 +867,9 @@ public partial class CRM_EmpresaCRM : ClsPaginas if (ObjBitacora.AddEventoBitacora(String.Format("Se registró un Contacto con Nombre: {0}{1}{2}{3}", NombreContacto, TelefonoOficina, Celular, Correo), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM)) { + string asunto = "Se registró un Contacto"; + string mensaje = String.Format("Se registró un Contacto con Nombre: {0}{1}{2}{3}. Realzado por el usuario {4}", NombreContacto, TelefonoOficina, Celular, Correo,UsuarioActual.Nombre); + mandarCorreo(asunto, mensaje); HuboError = false; Alert("El Contacto fue creado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion); } @@ -933,7 +947,12 @@ public partial class CRM_EmpresaCRM : ClsPaginas Alert("El Contacto ha sido eliminado.", ModExtensiones.TipoMensaje.MsgInformacion); if (ObjBitacora.AddEventoBitacora(String.Format("Se eliminó el contacto {0}", NombreContacto), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM)) + { + string asunto = "Se eliminó el contacto"; + string mensaje = String.Format("Se eliminó el contacto {0} por el usuario {1}", NombreContacto,UsuarioActual.Nombre); + mandarCorreo(asunto, mensaje); ObjCRM.Commit(); + } } else { @@ -1079,6 +1098,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas if (ObjEventos.AddEventoAgenda(DdlTipoAgenda.SelectedValue.ToEntero(), TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridadAgenda.SelectedValue.ToEntero(), FechaInicio, FechaInicio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM, CveContactoCRM: DdlContactoAgenda.SelectedValue.ToEntero())) { + mandarCorreo(TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text); limpiarModalAgendar(); RegistraScript("$('#ModalAgenda').modal('hide')"); Alert("El Evento se agendó correctamente", ModExtensiones.TipoMensaje.MsgInformacion); @@ -1389,6 +1409,9 @@ public partial class CRM_EmpresaCRM : ClsPaginas { if (ObjBitacora.AddEventoBitacora(String.Format("Se registró el Acercamiento {0} como Proceso de Tipo {1}, con Vendedor {2} y Contacto Principal {3}.", NombreAcercamiento, DdlTipoProceso.SelectedItem, DdlVendedor.SelectedItem, DdlContactoPrincipal.SelectedValue == "-1" ? "aun no asignado" : DdlContactoPrincipal.SelectedItem.Text), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM, CveTipoProcesoCRM: CveTipoProceso, CveAcercamientoCRM: CveAcercamiento, CveContactoCRM: CveContactoPrincipal, CveEtapaProcesoCRM: CveEtapaProcesoActual)) { + string asunto = String.Format("Se registró el Acercamiento {0}",NombreAcercamiento); + string mensaje = String.Format("Se registró el Acercamiento {0} como Proceso de Tipo {1}, con Vendedor {2} y Contacto Principal {3}.", NombreAcercamiento, DdlTipoProceso.SelectedItem, DdlVendedor.SelectedItem, DdlContactoPrincipal.SelectedValue == "-1" ? "aun no asignado" : DdlContactoPrincipal.SelectedItem.Text); + mandarCorreo(asunto, mensaje); HuboError = false; } } @@ -1471,4 +1494,17 @@ public partial class CRM_EmpresaCRM : ClsPaginas } } #endregion + private void mandarCorreo(string Asunto, string body) + { + DataTable Usuarios = get_GlobalDTUsuarios(CveEmpresa:UsuarioActual.CveEmpresa); + int CveUsuario = Usuarios.FiltroPrimeroValor("CveUsuario",String.Format("CveVendedor = {0}",DdlVendedor.SelectedValue)).ToEntero(); + if (CveUsuario != UsuarioActual.CveUsuario) + { + string correoVendedor = Usuarios.FiltroPrimeroValor("Correo", String.Format("CveUsuario = {0}", CveUsuario)); + ClsSisMail Mail = new ClsSisMail(); + List LSRutasMail = new List(); + //ClsSisMail.ArchivoMail itemMail = new ClsSisMail.ArchivoMail(); + Mail.SendMail(ClsPaginas.EmpresaNotificaciones, correoVendedor, Asunto,body); + } + } } \ No newline at end of file diff --git a/CRM/RepAcercamientosProcesos.aspx.cs b/CRM/RepAcercamientosProcesos.aspx.cs index 420dff2cd..b37b05f13 100644 --- a/CRM/RepAcercamientosProcesos.aspx.cs +++ b/CRM/RepAcercamientosProcesos.aspx.cs @@ -107,6 +107,14 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas DdlMedioCaptacion.SelectedValue = "-1"; DdlProbabilidad.SelectedValue = "-1"; DdlTipoProceso.SelectedIndex = 0; + + int n; + string CveProbabilidadAcercamiento = Request["CveProbabilidadAcercamiento"]; + bool isNumeric = int.TryParse(CveProbabilidadAcercamiento, out n); + if (isNumeric) + { + DdlProbabilidad.SelectedValue = CveProbabilidadAcercamiento; + } upDatosRepA.Update(); } protected void cargarDatos() diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index e6b297b53..8455fd396 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -470,6 +470,19 @@ Partial Class OC ViewState("CveDireccionEnvio") = value End Set End Property + + Private Property MonedaTexto As String + Get + If ViewState("MonedaTexto") Is Nothing Then + Return "" + Else + Return ViewState("MonedaTexto").ToString.ToEntero + End If + End Get + Set(value As String) + ViewState("CveDireccionEnvio") = value + End Set + End Property Private Property NumRow As Integer #End Region @@ -1254,7 +1267,7 @@ Partial Class OC TxtDescrip.Text = objOC.Descripcion TxtJustificacion.Text = objOC.Justificacion DdlMoneda.SelectedValueExist(objOC.CveMoneda.ToString) - + MonedaTexto = DdlMoneda.SelectedItem.Text Select Case objOC.PorcentajeIVA.ToString.ToDouble Case 0 DdlIVA.SelectedValue = "1" @@ -1745,6 +1758,7 @@ Partial Class OC If CveEmpresaActual.Contiene(13, 14, 24) Then DdlMoneda.Items.Insert(0, New ListItem("Seleccione", "-1")) End If + End Sub Private Sub CargaClasificaciones() Dim TipoClasif As Integer = -1 @@ -2894,6 +2908,11 @@ Partial Class OC 'COMMIT If Not TieneError Then + If MonedaTexto <> DdlMoneda.SelectedItem.Text Then + If Not OCBitacora.AddEventoBitacora(String.Format("Se cambió el valor de moneda de '{0}' a '{1}'", MonedaTexto, DdlMoneda.SelectedItem.Text), "-1", UsuarioActual.CveUsuario, CveEmpresaActual, CveOC:=CveOrdenCompra) Then + TieneError = True + End If + End If OC.Commit() If Conta IsNot Nothing Then Conta.Commit() @@ -5279,6 +5298,7 @@ Partial Class OC 'MONEDA PREFERENTE If CveOrdenCompra <= 0 Then DdlMoneda.SelectedValueExist(Objeto.CveMonedaPreferente) + MonedaTexto = DdlMoneda.SelectedItem.Text End If 'MUESTRA IVA PROVEEDOR EXTRANJERO @@ -7638,5 +7658,7 @@ Partial Class OC End Sub #End Region - + Protected Sub DdlMoneda_Change() Handles DdlMoneda.SelectedIndexChanged + MonedaTexto = DdlMoneda.SelectedItem.Text + End Sub End Class From 1dda3207f5e232ef918f769781af9af74f9e2aa5 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 23 Apr 2020 19:28:28 -0700 Subject: [PATCH 16/17] terminando mejoras de crm y se agrego una expression al reporte de factura para econo --- CRM/RepAcercamientosProcesos.aspx | 4 +++- CRM/RepAcercamientosRechazos.aspx | 4 +++- Empresas/141/Formatos/Factura.rdlc | 24 +++++++++++++++++++++++- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/CRM/RepAcercamientosProcesos.aspx b/CRM/RepAcercamientosProcesos.aspx index 20b4d8e37..86033c53b 100644 --- a/CRM/RepAcercamientosProcesos.aspx +++ b/CRM/RepAcercamientosProcesos.aspx @@ -34,7 +34,7 @@
  • - Ver Grafica +
  • @@ -86,6 +86,7 @@ + @@ -98,6 +99,7 @@ + diff --git a/CRM/RepAcercamientosRechazos.aspx b/CRM/RepAcercamientosRechazos.aspx index 380159036..92c87d3e6 100644 --- a/CRM/RepAcercamientosRechazos.aspx +++ b/CRM/RepAcercamientosRechazos.aspx @@ -34,7 +34,7 @@
  • - Ver Grafica +
  • @@ -86,6 +86,7 @@ + @@ -98,6 +99,7 @@ + diff --git a/Empresas/141/Formatos/Factura.rdlc b/Empresas/141/Formatos/Factura.rdlc index ca6ada751..00b8b801b 100644 --- a/Empresas/141/Formatos/Factura.rdlc +++ b/Empresas/141/Formatos/Factura.rdlc @@ -2462,7 +2462,29 @@ - Tipo de Comprobante:I Ingreso,Moneda: + Tipo de Comprobante:I + + + + =UCase(Parameters!TipoDocumento.Value) + + + + ,Moneda: