diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb index b8eb3b700..78af613be 100644 --- a/App_Code/ClsOIEventos.vb +++ b/App_Code/ClsOIEventos.vb @@ -2836,7 +2836,7 @@ Public Class ClsOIEventos #End Region #Region "OI_DocumentosSubCategoria" - Public Function GetDocumentoSubCategoria(Optional CveSubCategoria As Integer = -1, Optional SubCategoria As String = "-1") As Boolean + Public Function GetDocumentoSubCategoria(Optional CveSubCategoria As Integer = -1, Optional SubCategoria As String = "-1", Optional CveCategoria As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -2845,6 +2845,7 @@ Public Class ClsOIEventos With SqlAdapter.SelectCommand.Parameters .Add("@CveSubCategoria", SqlDbType.Int).Value = CveSubCategoria .Add("@SubCategoria", SqlDbType.NVarChar).Value = SubCategoria + .Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria End With Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 7cdb07053..f474affc2 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4627,7 +4627,7 @@ Public Class ClsPaginas PaginaDict.Add("/OI/CatDocumentoCategoria.aspx".ToUpper(), 760) PaginaDict.Add("/OI/CatDocumentoSubCategoria.aspx".ToUpper(), 761) PaginaDict.Add("/OI/Documentos.aspx".ToUpper(), 762) - PaginaDict.Add("/OI/DocumentoDetalle.aspx".ToUpper(), 763) + PaginaDict.Add("/OI/DocumentoDetalle.aspx".ToUpper(), -1) #End Region #Region "Planeacion" 'PLANEACIÓN diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 3e8f29ec9..39658a220 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1444,9 +1444,9 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Concepto", ConceptoFormato)) params.Add(New ReportParameter("Almacen", Almacen)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) - params.Add(New ReportParameter("CveTipoAlmacen", Almacen)) - + params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + + params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("FacturaProveedor", If(CveCompra > 0, dr("SerieFolio").ToString, ""))) @@ -1456,6 +1456,10 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Fecha", Fecha)) End If + If UsuarioActual.CveEmpresa = 72 Then + params.Add(New ReportParameter("CveTipoAlmacen", CveTipoAlmacen.ToString())) + End If + params.Add(New ReportParameter("Observaciones", Observaciones)) If UsuarioActual.CveEmpresa.Contiene(72, 80) Then diff --git a/Empresas/119/Formatos/Polizas.rdlc b/Empresas/119/Formatos/Polizas.rdlc index a2c8d63c8..30145ef5f 100644 --- a/Empresas/119/Formatos/Polizas.rdlc +++ b/Empresas/119/Formatos/Polizas.rdlc @@ -1295,6 +1295,7 @@ End + true @@ -1331,9 +1332,11 @@ + true DataSet1 End + true 0.05076cm 3.18542cm @@ -1642,7 +1645,8 @@ Textbox35 - 17.03312cm + 0.26458cm + 16.57041cm 0.52564cm 2.8175cm 2 @@ -1790,7 +1794,8 @@ ReportParameter1 - REM Reset Page Number: + + REM Reset Page Number: Shared offset As Integer Shared newPage As Object Shared currentgroup1 As Object @@ -1822,7 +1827,8 @@ End If End If Return newPage - End Function + End Function + image/jpeg diff --git a/General/PopUpPaqueteriasGuias.aspx.cs b/General/PopUpPaqueteriasGuias.aspx.cs index 80bf6aae8..c124dbd4e 100644 --- a/General/PopUpPaqueteriasGuias.aspx.cs +++ b/General/PopUpPaqueteriasGuias.aspx.cs @@ -812,25 +812,28 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas int CveVendedor = ObjVentas.DtResultados.Rows[0]["CveVendedor"].ToEntero(); int CveCliente = ObjVentas.DtResultados.Rows[0]["CveCliente"].ToEntero(); DataRow Vendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveVendedor = {0}",CveVendedor)); + DataRow VendedorAsistente = get_GlobalDTVendedores(UsuarioActual.CveEmpresa,VendedorTipo:3).FiltroPrimero(string.Format("CveSuperior = {0}", CveVendedor)); DataRow Cliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente : CveCliente).FiltroPrimero(""); - string CobranzaCorreo = ""; string CorreoEntregaAlmacen = ""; string CorreoEntregaCompras = ""; string CorreoVendedor = ""; - string CorreoAdicionalNotificacionesVendedor = ""; + string CorreoNotificaciones = ObjVentas.DtResultados.Rows[0]["CorreoNotificacion"] != null ? ObjVentas.DtResultados.Rows[0]["CorreoNotificacion"].ToString():""; + string CorreoAsistente = ""; if (Cliente != null) { - CobranzaCorreo=Cliente["CobranzaCorreo"].ToString(); CorreoEntregaAlmacen=Cliente["CorreoEntregaAlmacen"].ToString(); CorreoEntregaCompras = Cliente["CorreoEntregaCompras"].ToString(); } if (Vendedor != null) { CorreoVendedor=Vendedor["Correo"].ToString(); - CorreoAdicionalNotificacionesVendedor=Vendedor["CorreoAdicionalNotificaciones"].ToString(); + //CorreoAdicionalNotificacionesVendedor=Vendedor["CorreoAdicionalNotificaciones"].ToString(); } - - string CorreosConcat = String.Format("{0};{1};{2};{3};{4}", CobranzaCorreo, CorreoEntregaAlmacen, CorreoEntregaCompras, CorreoVendedor, CorreoAdicionalNotificacionesVendedor); + if (VendedorAsistente != null) + { + CorreoAsistente = VendedorAsistente["Correo"].ToString(); + } + string CorreosConcat = String.Format("{0};{1};{2};{3};{4}", CorreoEntregaAlmacen, CorreoEntregaCompras, CorreoVendedor, CorreoNotificaciones, CorreoAsistente); return CorreosConcat; } ObjVentas.Dispose(); diff --git a/General/RepPaqueteriasGuias.aspx.cs b/General/RepPaqueteriasGuias.aspx.cs index bddef6c59..5a4109349 100644 --- a/General/RepPaqueteriasGuias.aspx.cs +++ b/General/RepPaqueteriasGuias.aspx.cs @@ -175,6 +175,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas ViewState["Folio"] = value; } } + #endregion @@ -1008,6 +1009,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas int CveCliente = DbRowVenta["CveCliente"].ToString().ToEntero(); int CveVendedor = DbRowVenta["CveVendedor"].ToString().ToEntero(); + string CorreoNotificacion = DbRowVenta["CorreoNotificacion"] != null ? DbRowVenta["CorreoNotificacion"].ToString():""; SerieFolio = String.Format("{0}-{1}", DbRowVenta["Serie"].ToString(), DbRowVenta["Folio"].ToString().ToEntero()); NombreCliente = DbRowVenta["ClienteNombre"].ToString(); @@ -1027,7 +1029,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas Destinatario = "sig.buzon02@gmail.com"; // CORREO PRUEBA if (UsuarioActual.Empresa.Funcionalidad(280) == "1" && CveCliente > 0 && CveVendedor > 0) { - Destinatario = getCorreoNotificacion(CveCliente, CveVendedor); + Destinatario = getCorreoNotificacion(CveCliente, CveVendedor,CorreoNotificacion); } if (ObjVentas.GetVentaDetalle(CveVenta)) @@ -1037,20 +1039,24 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas } } + ObjVentas.Dispose(); } } - private string getCorreoNotificacion(int CveCliente, int CveVendedor) + private string getCorreoNotificacion(int CveCliente, int CveVendedor,string CorreoNotificacion) { DataRow DatosCliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveCliente = {0}", CveCliente)); DataRow DatosVendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveVendedor = {0}", CveVendedor)); + string CorreoAsistente = get_GlobalDTVendedores(UsuarioActual.CveEmpresa,VendedorTipo:3).FiltroPrimeroValor("Correo", string.Format("CveSuperior = {0}", CveVendedor)); if (DatosCliente != null && DatosVendedor != null) { StringBuilder correos = new StringBuilder(""); if (DatosCliente["CorreoEntregaCompras"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosCliente["CorreoEntregaCompras"].ToString())); if (DatosCliente["CorreoEntregaAlmacen"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosCliente["CorreoEntregaAlmacen"].ToString())); if (DatosVendedor["Correo"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosVendedor["Correo"].ToString())); - if (DatosVendedor["CorreoAdicionalNotificaciones"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosVendedor["CorreoAdicionalNotificaciones"].ToString())); + correos.Append(CorreoNotificacion + ";"); + correos.Append(CorreoAsistente + ";"); + //if (DatosVendedor["CorreoAdicionalNotificaciones"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosVendedor["CorreoAdicionalNotificaciones"].ToString())); return correos.ToString(); } return ""; @@ -1104,7 +1110,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas string detalle = string.Format("{0}{1}{2}", dRow["Codigo"], dRow["Cantidad"], dRow["PS"]); DetalleTable += detalle; } - + CargaDatosCorreo(CveVenta); StringBuilder strBody = new StringBuilder(); strBody.Append(""); strBody.Append(""); diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 2adc2532c..74aac45cc 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -3222,14 +3222,17 @@ Partial Class Inventarios_EntregaAlmacen Dim Destinatario As String = "" Dim MensajeEnviado = False Dim tCvecliente As Integer + Dim tCveVendedor As Integer Dim bytes() As Byte = Nothing Dim ObjVentas As New ClsVentas() Dim strBody As New StringBuilder If ObjVentas.GetVenta(tCveVenta, UsuarioActual.CveEmpresa) Then Dim dr As DataRow = ObjVentas.DtResultados.FiltroPrimero("") - Destinatario = String.Format("{0};{1}", dr("CorreoNotificacion"), dr("CorreoVendedorVenta")) - + tCveVendedor = dr("CveVendedor").ToString.ToEntero + Dim CorreoVendedor As String = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Correo", String.Format("CveVendedor = {0}", tCveVendedor)) + Dim CorreoAsistente As String = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=3).FiltroPrimeroValor("Correo", String.Format("CveSuperior = {0}", CveVendedor)) + Destinatario = String.Format("{0};{1};{2}", dr("CorreoNotificacion"), CorreoVendedor, CorreoAsistente) tCvecliente = dr("CveCliente").ToString.ToEntero Dim drC As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=tCvecliente).FiltroPrimero("") diff --git a/Inventarios/EntregasPorRealizar.aspx b/Inventarios/EntregasPorRealizar.aspx index 76ec2b76f..3bf84154d 100644 --- a/Inventarios/EntregasPorRealizar.aspx +++ b/Inventarios/EntregasPorRealizar.aspx @@ -70,7 +70,7 @@
- <%--
  • - +
  • +
  • - Imprimir PDF +
  • -
  • - Imprimir Excel -
  • --%>
    - - -
    -
    - - -
    -
    - - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    - - -
    -
    -
    - - - -
    - - -
    -
    -
    +
    + + +
    +
    + + +
    +
    + + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    + + + +
    + + +
    +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4; border: 1px solid #e5e5e5" /> + " class="btn btn-circle btn-sm label-info"> +
    + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    -
    - " style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4; border: 1px solid #e5e5e5" /> - " class="btn btn-circle btn-sm label-info"> -
    - + + + +
    +
    +
    + -
    -
    -
    - - - -
    +
    -
    - -
    - - + + +
    diff --git a/OI/DocumentoDetalle.aspx.cs b/OI/DocumentoDetalle.aspx.cs index 717c52222..ce4b59da1 100644 --- a/OI/DocumentoDetalle.aspx.cs +++ b/OI/DocumentoDetalle.aspx.cs @@ -88,6 +88,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas ViewState["CveAsignacion"] = value; } } + protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) @@ -112,19 +113,23 @@ public partial class OI_DocumentoDetalle : ClsPaginas private void CargarMensajeNuevoEditado() { string MensajeNuevoEditado = Page.Request["Mensaje"]; - if (MensajeNuevoEditado == "Nuevo") + switch (MensajeNuevoEditado) { - Alert("El Documento ha sido creado correctamente"); - } - else if (MensajeNuevoEditado == "Editado") - { - Alert("Los cambios en el Documento han sido guardado correctamente"); + case "Nuevo": + Alert("El Documento ha sido creado correctamente"); + break; + case "NuevaVersion": + Alert("Nueva versión del Documento creado correctamente"); + break; + case "Publicado": + Alert("Documento publicado"); + break; } } private void CargarUsuarios() { - GvUsuarios.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa); + GvUsuarios.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 1"); GvUsuarios.DataBind(); } @@ -171,8 +176,10 @@ public partial class OI_DocumentoDetalle : ClsPaginas private void CargarSubCategoria() { + DdlSubCategoria.Items.Clear(); + int CveCategoria = DdlCategoria.SelectedValue.ToEntero(); ClsOIEventos ObjOI = new ClsOIEventos(); - if (ObjOI.GetDocumentoSubCategoria()) + if (ObjOI.GetDocumentoSubCategoria(CveCategoria: CveCategoria)) { DdlSubCategoria.DataSource = ObjOI.DtResultados; DdlSubCategoria.DataBind(); @@ -196,6 +203,8 @@ public partial class OI_DocumentoDetalle : ClsPaginas CveUsuarioResponsable = Documento["CveUsuario"].ToString().ToEntero(); TxtDescripcion.Text = Documento["Descripcion"].ToString(); + DdlCategoria.SelectedValue = Documento["CveCategoria"].ToString(); + CargarSubCategoria(); DdlSubCategoria.SelectedValue = Documento["CveSubCategoria"].ToString(); DdlEstatus.SelectedValue = Documento["CveEstatus"].ToString(); TxtVersion.Text = Documento["Version"].ToString(); @@ -230,6 +239,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas { LkbGuardar.Visible = false; LkbActualizar.Visible = true; + LkbPublicar.Visible = true; GvUsuarios.Columns[1].Visible = false; GvUsuarios.Columns[2].Visible = true; GvUsuarios.Columns[3].Visible = true; @@ -265,14 +275,51 @@ public partial class OI_DocumentoDetalle : ClsPaginas } } + private void ConfigurarSegunEstatus() + { + bool MostrarSegunAprobado = (DdlEstatus.SelectedValue == "2"); + DivBotonesAcciones.Visible = !MostrarSegunAprobado; + UpAgregar.Visible = MostrarSegunAprobado; + } + + private void CargarCategorias() + { + ClsOIEventos ObjOI = new ClsOIEventos(); + if (ObjOI.GetDocumentoCategoria()) + { + DdlCategoria.DataSource = ObjOI.DtResultados; + } + ObjOI.Dispose(); + DdlCategoria.DataBind(); + DdlCategoria.Items.Insert(0, new ListItem("Seleccione", "-1")); + DdlSubCategoria.Items.Insert(0, new ListItem("Seleccione", "-1")); + } + + protected void DdlCategoria_SelectedIndexChanged(object sender, EventArgs e) + { + if (DdlCategoria.SelectedValue != "-1") + { + CargarSubCategoria(); + } + } + + private void EstatusMostrar(bool Mostrar) + { + DivEstatus.Visible = Mostrar; + brEstatus.Visible = Mostrar; + DivEstatusInicial.Visible = !Mostrar; + brEstatusInicial.Visible = !Mostrar; + } + private void Cargar() { - CargarSubCategoria(); + CargarCategorias(); CargarResponsable(); CargarCveDocumento(); CargarUsuarios(); if (this.CveDocumento > 0) { + EstatusMostrar(true); CargarDocumentoYaExistente(); CargarUsuariosParticipantes(); CargarUsuariosAutorizo(); @@ -281,6 +328,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas ConfigurarCamposDetalleSegunUsuario(); CargarMensajeNuevoEditado(); } + ConfigurarSegunEstatus(); } #endregion @@ -310,7 +358,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas if (!TieneError) { ObjOI.Commit(); - string ParamMensaje = LkbGuardar.Text == "Guardar" ? "Nuevo" : "Editado";//Esto indica la acción de usuario la cual se mostrará como alert al cargar la página + string ParamMensaje = LkbGuardar.Text == "Guardar" ? "Nuevo" : "NuevaVersion";//Esto indica la acción de usuario la cual se mostrará como alert al cargar la página Response.Redirect(string.Format("/OI/DocumentoDetalle.aspx?CveDocumento={0}&Mensaje={1}", CveDocumento, ParamMensaje)); } else @@ -326,7 +374,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas { int CveDocumentoPadre = this.CveDocumento > 0 ? this.CveDocumento : -1; //Asociamos el nuevo insert con un CveDocumento ya generado en caso de ser una nueva versión del documento - int CveDocumento = ObjOI.AddDocumento(DdlSubCategoria.SelectedValue.ToEntero(), TxtDescripcion.Text, TxtObs.InnerText, TxtVersion.Text, DdlEstatus.SelectedValue.ToEntero(), + int CveDocumento = ObjOI.AddDocumento(DdlSubCategoria.SelectedValue.ToEntero(), TxtDescripcion.Text, TxtObs.InnerText, TxtVersion.Text, 1, "", TxtResponsable.Text, CveDocumentoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); if (!(CveDocumento > 0)) { @@ -439,10 +487,8 @@ public partial class OI_DocumentoDetalle : ClsPaginas { try { - string Version = TxtVersion.Text; string NombreArchivo = fileItem.filenameO; //Preparamos la ruta donde moveremos el archivo cargado - //string NombreArchivoGuardado = NombreArchivo; string RutaDestino = string.Format(@"{0}DocumentosRepo\{1}\{2}", UsuarioActual.Empresa.Ruta, CveDocumento, NombreArchivo); //Movemos el archivo de la carpeta temporal hacia la carpeta de la empresa @@ -456,6 +502,30 @@ public partial class OI_DocumentoDetalle : ClsPaginas } } } + else if (this.CveDocumento > 0) + { + try + { + if (ArchivoAdjuntoNombre != "") + { + string RutaOrigen = string.Format(@"{0}DocumentosRepo\{1}\{2}", UsuarioActual.Empresa.Ruta, this.CveDocumento, ArchivoAdjuntoNombre); + string RutaDestino = string.Format(@"{0}DocumentosRepo\{1}\{2}", UsuarioActual.Empresa.Ruta, CveDocumento, ArchivoAdjuntoNombre); + + System.IO.File.Move(RutaOrigen, RutaDestino); + RutaArchivo = ArchivoAdjuntoNombre; + } + else + { + RutaArchivo = ""; + } + } + catch (Exception e) + { + Alert(e.Message); + RutaArchivo = "Error"; + } + } + return RutaArchivo; } @@ -668,8 +738,6 @@ public partial class OI_DocumentoDetalle : ClsPaginas if (ObjOI.UpdateDocumento(this.CveDocumento, DdlSubCategoria.SelectedValue.ToEntero(), TxtDescripcion.Text, TxtObs.InnerText, TxtVersion.Text, 2, "-1", TxtResponsable.Text, DateTime.Now, -1, -1, UsuarioActual.CveEmpresa)) { - Cargar(); - UpCliente.Update(); Alert("Documento publicado"); } ObjOI.Dispose(); @@ -678,6 +746,31 @@ public partial class OI_DocumentoDetalle : ClsPaginas { Alert("Los usuarios participantes aún no autorizan este Documento"); } + Response.Redirect(string.Format("/OI/DocumentoDetalle.aspx?CveDocumento={0}&Mensaje={1}", this.CveDocumento, "Publicado")); } #endregion + + #region "NUEVA VERSION" + protected void LkbNuevaVersion_Click(object sender, EventArgs e) + { + CargarUsuarios(); + LkbGuardar.Text = "Crear Nueva Versión"; + DivBotonesAcciones.Visible = true; + LkbActualizar.Visible = false; + LkbPublicar.Visible = false; + LkbGuardar.Visible = true; + GvUsuarios.Columns[1].Visible = true; + GvUsuarios.Columns[2].Visible = false; + GvUsuarios.Columns[3].Visible = false; + EstatusMostrar(false); + UpCliente.Update(); + } + #endregion + + protected void LbPruebas_Click(object sender,EventArgs e) + { + Cargar(); + UpCliente.Update(); + Alert("Documento actualizado"); + } } \ No newline at end of file