From 4610696cc66252459825fb16df94a38e64a627b3 Mon Sep 17 00:00:00 2001 From: SLopez Date: Tue, 8 Jul 2025 09:30:33 -0700 Subject: [PATCH 1/4] =?UTF-8?q?Cambios=20en=20doc=20exportaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Export/ExpDetalle.aspx.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Export/ExpDetalle.aspx.cs b/Export/ExpDetalle.aspx.cs index 995c5e416..fb8071c4d 100644 --- a/Export/ExpDetalle.aspx.cs +++ b/Export/ExpDetalle.aspx.cs @@ -1010,7 +1010,9 @@ public partial class Export_ExpDetalle : ClsPaginas DataRow RowExp = DTExportaciones.Rows[0]; string ClienteExportador = DTExportaciones.FiltroPrimeroValor("ClienteExportador"); string DirExportador = DTExportaciones.FiltroPrimeroValor("DirExportador"); + string RFCExp = DTExportaciones.FiltroPrimeroValor("RFCExp"); string ClienteImportador = DTExportaciones.FiltroPrimeroValor("ClienteImportador"); + string DirImportador = DTExportaciones.FiltroPrimeroValor("DirImportador"); string RFCImp = DTExportaciones.FiltroPrimeroValor("RFCImp"); string IMMEXimp = DTExportaciones.FiltroPrimeroValor("IMMEXimp"); string NumFactura = DTExportaciones.FiltroPrimeroValor("SerieFolio"); @@ -1056,6 +1058,7 @@ public partial class Export_ExpDetalle : ClsPaginas decimal TotalInc = 0.00m; decimal TotalDec = 0.00m; + string DescContenedor = DTExportaciones.FiltroPrimeroValor("DescripcionContenedor"); string ContenedorPlaca = DTExportaciones.FiltroPrimeroValor("ContenedorPlaca"); string Proveedor = DTExportaciones.FiltroPrimeroValor("Proveedor"); string SCAC = DTExportaciones.FiltroPrimeroValor("SCAC"); @@ -1073,7 +1076,9 @@ public partial class Export_ExpDetalle : ClsPaginas para.Add(new ReportParameter("CveExportacion", CveExportacion.ToString())); para.Add(new ReportParameter("ClienteExportador", ClienteExportador)); para.Add(new ReportParameter("DirExportador", DirExportador)); + para.Add(new ReportParameter("RFCExp", RFCExp)); para.Add(new ReportParameter("ClienteImportador", ClienteImportador)); + para.Add(new ReportParameter("DirImportador", DirImportador)); para.Add(new ReportParameter("RFCImp", RFCImp)); para.Add(new ReportParameter("IMMEXimp", IMMEXimp)); para.Add(new ReportParameter("NumFactura", NumFactura)); @@ -1125,6 +1130,7 @@ public partial class Export_ExpDetalle : ClsPaginas para.Add(new ReportParameter("DecOtros", DecOtros.ToString("#,###.####"))); para.Add(new ReportParameter("TotalDec", TotalDec.ToString("#,###.####"))); + para.Add(new ReportParameter("DescContenedor", DescContenedor)); para.Add(new ReportParameter("ContenedorPlaca", ContenedorPlaca)); para.Add(new ReportParameter("Proveedor", Proveedor)); para.Add(new ReportParameter("SCAC", SCAC)); From 4136c80cb4e59397a4e6c40134554bd7dbd0c2e4 Mon Sep 17 00:00:00 2001 From: Jorge Luis caudillo esparza Date: Tue, 8 Jul 2025 10:50:07 -0700 Subject: [PATCH 2/4] Nom --- Nomina/Nomina.aspx.cs | 20 -------------------- Nomina/RepMovtosPermanentes.aspx | 21 --------------------- Nomina/RepMovtosPermanentes.aspx.cs | 22 ++++++++++++++-------- 3 files changed, 14 insertions(+), 49 deletions(-) diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 8ea08208b..ac434e9b8 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -9814,26 +9814,6 @@ public partial class Nomina_Nomina2 : ClsPaginas script = string.Format("Savexml(\"{0} {1}.xml\", $('.ltlxml').html());", Xmlname, empleado); - //System.IO.FileInfo file = new System.IO.FileInfo(PathXML); - //string mimeType = "text/plain"; - //try - //{ - // mimeType = MimeMapping.GetMimeMapping(PathXML); - //} - //catch (Exception) - //{ - - //} - //// Response.Write(path) - //Response.Clear(); - //Response.ClearHeaders(); - //Response.ClearContent(); - //Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(file.Name)}"); - //Response.AddHeader("Content-Length", file.Length.ToString()); - //Response.ContentType = mimeType; - //Response.Flush(); - //Response.TransmitFile(file.FullName); - //Response.End(); } if (!string.IsNullOrEmpty(PathXMLF) && System.IO.File.Exists(PathXMLF)) { diff --git a/Nomina/RepMovtosPermanentes.aspx b/Nomina/RepMovtosPermanentes.aspx index 712b307ba..4a62b5de0 100644 --- a/Nomina/RepMovtosPermanentes.aspx +++ b/Nomina/RepMovtosPermanentes.aspx @@ -4,10 +4,6 @@ @@ -148,11 +163,11 @@ - + - + - > + @@ -224,14 +239,28 @@ - + - - - - - - + + + +   + + diff --git a/Export/RepExportaciones.aspx.cs b/Export/RepExportaciones.aspx.cs index d6977de3a..a93dfa6a8 100644 --- a/Export/RepExportaciones.aspx.cs +++ b/Export/RepExportaciones.aspx.cs @@ -28,7 +28,7 @@ public partial class Export_RepExportaciones : ClsPaginas private bool EsImportacion { - get{ return (ViewState["EsImportacion"] == null) ? false : Boolean.Parse(ViewState["EsImportacion"].ToString()); } + get { return (ViewState["EsImportacion"] == null) ? false : Boolean.Parse(ViewState["EsImportacion"].ToString()); } set { ViewState["EsImportacion"] = value; } } public string EmptyDataTextPersonalizado { get; set; } @@ -43,7 +43,7 @@ public partial class Export_RepExportaciones : ClsPaginas if (Request["Opcion"] != null) { if (Request["Opcion"] == "I") - EsImportacion = true; + EsImportacion = true; } Page.Title = EsImportacion ? "Importaciones" : "Exportaciones"; @@ -86,7 +86,7 @@ public partial class Export_RepExportaciones : ClsPaginas } protected void CargaExportaciones() { - + bool EsExportacion = !EsImportacion; string SubProyectos = DdlSubProyecto.GetSelectedValuesM(); SubProyectos = SubProyectos == "" ? "-1" : SubProyectos; @@ -125,4 +125,76 @@ public partial class Export_RepExportaciones : ClsPaginas Alert("La Exportación se ha eliminado correctamente."); } } -} \ No newline at end of file + + protected void GVExportaciones_RowDataBound(object sender, GridViewRowEventArgs e) + { + if (e.Row.RowType == DataControlRowType.DataRow) + { + var dataItem = (System.Data.DataRowView)e.Row.DataItem; + int cveExportacion = Convert.ToInt32(dataItem["CveExportacion"]); + HyperLink hl = (HyperLink)e.Row.FindControl("HlExpDetalle"); + + // Usa la bandera EsImportacion de la página + if (EsImportacion) + hl.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cveExportacion}&Opcion=I"; + else + hl.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cveExportacion}"; + + // EDITAR + HyperLink hlEditar = (HyperLink)e.Row.FindControl("HlEditar"); + if (EsImportacion) + hlEditar.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cveExportacion}&Opcion=I"; + else + hlEditar.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cveExportacion}"; + + // Tipo Exportación + Label lblTipoExp = (Label)e.Row.FindControl("lblTipoExp"); + if (lblTipoExp != null) + { + string valor = dataItem["TipoExportacion"].ToString(); + switch (valor) + { + case "1": + lblTipoExp.Text = "(IMP) Importación"; + break; + case "2": + lblTipoExp.Text = "(EXP) Exportación/retorno"; + break; + case "3": + lblTipoExp.Text = "(TRA) Tránsitos"; + break; + default: + lblTipoExp.Text = "Desconocido"; + break; + } + } + + // Estatus + Label lblEstatus = (Label)e.Row.FindControl("lblEstatus"); + if (lblEstatus != null) + { + string valor = dataItem["CveExportacionEstatus"].ToString(); + switch (valor) + { + case "1": + lblEstatus.Text = "Tránsito"; + break; + case "2": + lblEstatus.Text = "Completa"; + break; + default: + lblEstatus.Text = "Desconocido"; + break; + } + } + } + } + protected void GVExportaciones_RowCreated(object sender, GridViewRowEventArgs e) + { + if (e.Row.RowType == DataControlRowType.Header) + { + // Cambia el texto del primer encabezado (ajusta el índice si no es la primera columna) + e.Row.Cells[0].Text = EsImportacion ? "Importación" : "Exportación"; + } + } +} From 3abc3ddfe9d3026a61350bca88e830d07fe2ca96 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Tue, 8 Jul 2025 16:44:36 -0700 Subject: [PATCH 4/4] eFacturas impresion pdf y excel moneda y logo --- Compras/eFacturas.aspx.vb | 4 +- Empresas/Grales/Formatos/RepFacturas.rdlc | 2039 +++++++++++---------- 2 files changed, 1078 insertions(+), 965 deletions(-) diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 6d6c56058..e8ae23cd2 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -1518,7 +1518,7 @@ Partial Class Compras_eFacturas If dt IsNot Nothing Then - Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") + Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}Logo.png") Dim params As New List(Of ReportParameter) @@ -1529,7 +1529,7 @@ Partial Class Compras_eFacturas params.Add(New ReportParameter("FechaImpresion", Fecha.ToDateTime.ToShortDateString)) If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", $"file//:{Imagen.FullName}")) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If diff --git a/Empresas/Grales/Formatos/RepFacturas.rdlc b/Empresas/Grales/Formatos/RepFacturas.rdlc index 41722835f..44a646ecf 100644 --- a/Empresas/Grales/Formatos/RepFacturas.rdlc +++ b/Empresas/Grales/Formatos/RepFacturas.rdlc @@ -1,967 +1,5 @@  - - - - - - - - - - - true - true - - - - - Tipo - - - - - - - Textbox3 - - - - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Folio - - - - - - - Textbox28 - - - - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - 1.70632cm - - - 6.55172cm - - - 1.87355cm - - - 1.67935cm - - - 5.52508cm - - - - - 0.33542cm - - - - - true - true - - - - - =Fields!FechaFactura.Value - - - - - - - FechaFactura - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!NombreProveedor.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Total.Value - - - - - - - Total - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Switch(Fields!FueValidado.Value = "1","Validado", -Fields!FueValidado.Value = "2","Cancelada", -Fields!FueValidado.Value = "3","Omitida", -1=1,"No validado") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!UUID.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - 0.44125cm - - - true - true - - - - - Fecha Fact. - - - - - - - Textbox40 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.44125cm - - - true - true - - - - - Proveedor - - - - - - - Textbox42 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.44125cm - - - true - true - - - - - Importe - - - - - - - Textbox44 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.44125cm - - - true - true - - - - - EstatusSAT - - - - - - - Textbox49 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.44125cm - - - true - true - - - - - Folio Fiscal - - - - - - - Textbox4 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - =Fields!SerieFolio.Value - - - - - =Fields!FechaFactura.Value - - - =Fields!SerieFolio.Value - - - - 1.30938cm - - - true - true - - - - - =Switch(Fields!TipoComprobante.Value="I","Ingreso", -Fields!TipoComprobante.Value="E","Egreso", -Fields!TipoComprobante.Value="P","Pago" -) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 1.96039cm - - - true - true - - - - - =Fields!SerieFolio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - DataSet1 - 0.06614cm - 0.77667cm - 20.60579cm - - - - - - 0.35786in - - - - - - - Textbox1 - 0.18521cm - 3.4699cm - 0.6cm - 12.60299cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - REPORTE DE FACTURAS - - - - - - - - - - - - - - - - Textbox2 - 1.10271cm - 4.76092cm - 0.52945cm - 9.98771cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Inicio: - - - - - - - - - =IIF(Parameters!FechaInicio.Value = "-1","",Parameters!FechaInicio.Value) - - - - - - - - - - - - - - - Fecha Fin: - - - - - - - - - =IIF(Parameters!FechaFin.Value = "-1","",Parameters!FechaFin.Value) - - - - Textbox13 - 0.0259cm - 17.07478cm - 2.18834cm - 3.53188cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!LogoPath.Value - FitProportional - 0.06614cm - 2.22362cm - 2.33715cm - 3 - - - - - - - - - - - 0.76376cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 18.56637cm - 0.68085cm - 2.06587cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 29.7cm - 21cm - 0cm - 0cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox3 + + + + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio + + + + + + + Textbox28 + + + + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + 1.41528cm + + + 6.55172cm + + + 1.87355cm + + + 1.2cm + + + 1.5cm + + + 5.14577cm + + + + + 0.33542cm + + + + + true + true + + + + + =Fields!FechaFactura.Value + + + + + + + FechaFactura + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!NombreProveedor.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Total + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Abreviatura.Value + + + + + + + Abreviatura + + + 2pt + 2pt + 2pt + 2pt + + + true + + + + + + true + true + + + + + =Switch(Fields!FueValidado.Value = "1","Validado", +Fields!FueValidado.Value = "2","Cancelada", +Fields!FueValidado.Value = "3","Omitida", +1=1,"No validado") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UUID.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + 0.44125cm + + + true + true + + + + + Fecha + + + + + + + + + Fact. + + + + + + + Textbox40 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44125cm + + + true + true + + + + + Proveedor + + + + + + + Textbox42 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44125cm + + + true + true + + + + + Importe + + + + + + + Textbox44 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44125cm + + + true + true + + + + + Moneda + + + + + + + Textbox5 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44125cm + + + true + true + + + + + Estatus + + + + + + + + + SAT + + + + + + + Textbox49 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44125cm + + + true + true + + + + + Folio Fiscal + + + + + + + Textbox4 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + =Fields!SerieFolio.Value + + + + + =Fields!FechaFactura.Value + + + =Fields!SerieFolio.Value + + + + 1.25012cm + + + true + true + + + + + =Switch(Fields!TipoComprobante.Value="I","Ingreso", +Fields!TipoComprobante.Value="E","Egreso", +Fields!TipoComprobante.Value="P","Pago" +) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 1.96039cm + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + DataSet1 + 0.06614cm + 0.77667cm + 20.89683cm + + + + + + 0.35786in + + + + + + + Textbox1 + 0.18521cm + 3.4699cm + 0.6cm + 12.60299cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE FACTURAS + + + + + + + + + + + + + + + + Textbox2 + 1.10271cm + 4.76092cm + 0.52945cm + 9.98771cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Inicio: + + + + + + + + + =IIF(Parameters!FechaInicio.Value = "-1","",Parameters!FechaInicio.Value) + + + + + + + + + + + + + + + Fecha Fin: + + + + + + + + + =IIF(Parameters!FechaFin.Value = "-1","",Parameters!FechaFin.Value) + + + + Textbox13 + 0.0259cm + 17.07478cm + 2.18834cm + 3.53188cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.06614cm + 2.22362cm + 2.33715cm + 3 + + + + + + + + + + + 0.76376cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0cm + 18.56637cm + 0.68085cm + 2.06587cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0cm + 0cm + 1cm + 1cm + 0.13cm +