From 38352b3d81083c33c0ab6c91305f0677c2cea27d Mon Sep 17 00:00:00 2001 From: Luis Carlos Quijada Date: Tue, 8 Jul 2025 17:02:23 -0600 Subject: [PATCH 01/44] Cambios ExpDetalle Importacion --- Export/ExpDetalle.aspx | 33 ++++++++++++-- Export/RepExportaciones.aspx | 49 +++++++++++++++----- Export/RepExportaciones.aspx.cs | 80 +++++++++++++++++++++++++++++++-- 3 files changed, 145 insertions(+), 17 deletions(-) diff --git a/Export/ExpDetalle.aspx b/Export/ExpDetalle.aspx index ac4590e6d..ea0f598b6 100644 --- a/Export/ExpDetalle.aspx +++ b/Export/ExpDetalle.aspx @@ -70,14 +70,26 @@
- + +
@@ -132,6 +144,14 @@ +
@@ -842,5 +862,12 @@
+ diff --git a/Export/RepExportaciones.aspx b/Export/RepExportaciones.aspx index 951f87ba6..4e7769fe5 100644 --- a/Export/RepExportaciones.aspx +++ b/Export/RepExportaciones.aspx @@ -53,6 +53,21 @@ width: 100%; height: 500px; } + +#<%= GVExportaciones.ClientID %> .btn, +#<%= GVExportaciones.ClientID %> .btn-circle { + display: inline-block !important; + width: auto !important; + min-width: 0 !important; + max-width: none !important; + vertical-align: middle !important; + margin-bottom: 0 !important; + margin-right: 4px; + float: none !important; + clear: none !important; +} + + @@ -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 02/44] 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 + @@ -221,17 +224,25 @@ table.adssigscroll {
-
-
Proveedor
-
+
+
+
Proveedor
- -
+
+
Producto
- -
+
+
Existencia
+ + + + + +
+
+
Fecha Fin
@@ -243,69 +254,72 @@ table.adssigscroll {
- -
- - - - -
- -
+
+
Ver por
+
+
Tránsito?
+ + + + + + +
> -
- -
- +
+
+
Clasificación
+
- -
- + +
+
Unidad de medida
+
- -
- - <%----%> -
- -
- + +
+
Tipo Almacen
+
- -
- - - - - + +
+
Almacén
+ +
+ +
+
Incluir Proyectados
+ + + + + - <%----%>
- - -
- +
+
Producto
+
- Orden: -
+
+
Orden
@@ -314,32 +328,16 @@ table.adssigscroll {
-
-
- Marca: -
- - - -
-
-
- -
- - - - - - + +
+
Marca
+ + +
+ - -
- - -
@@ -352,8 +350,8 @@ table.adssigscroll {
- + From 047a40cc5c3e8f1cd1c68abb7835d680593a8da3 Mon Sep 17 00:00:00 2001 From: SLopez Date: Thu, 10 Jul 2025 11:36:27 -0700 Subject: [PATCH 13/44] =?UTF-8?q?Documento=20Importaci=C3=B3n=20terminado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Export/ExpDetalle.aspx.cs | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Export/ExpDetalle.aspx.cs b/Export/ExpDetalle.aspx.cs index 8a29aa951..4045fd175 100644 --- a/Export/ExpDetalle.aspx.cs +++ b/Export/ExpDetalle.aspx.cs @@ -1198,10 +1198,32 @@ public partial class Export_ExpDetalle : ClsPaginas row["ValorUnitarioMN"] = Convert.ToDecimal(row["ValorTotalMXP"]) / cantidad; } } + ReportDataSource RDSPartidas = new ReportDataSource(); RDSPartidas.Name = "DsPartidas"; RDSPartidas.Value = DTPartidas; lrds.Add(RDSPartidas); + + var EmpaquesAgrupado = from row in DTPartidas.AsEnumerable() + where !string.IsNullOrWhiteSpace(row.Field("TipoEmpaque")) + group row by row.Field("TipoEmpaque") into g + select new + { + TipoEmpaque = g.Key, + Cantidad = g.Sum(r => r.Field("Cantidad")) + }; + DataTable DTBultos = new DataTable(); + DTBultos.Columns.Add("TipoEmpaque", typeof(string)); + DTBultos.Columns.Add("Cantidad", typeof(decimal)); + + foreach (var item in EmpaquesAgrupado) + { + DTBultos.Rows.Add(item.TipoEmpaque, item.Cantidad); + } + ReportDataSource RDSBultos = new ReportDataSource(); + RDSBultos.Name = "DsBultos"; + RDSBultos.Value = DTBultos; + lrds.Add(RDSBultos); } } @@ -1212,7 +1234,7 @@ public partial class Export_ExpDetalle : ClsPaginas NombreArchivo = NumFactura; } - string Formato = "FormatoExportacion.mrt"; + string Formato = "FormatoImportacion.mrt"; para.Add(new ReportParameter("Formato", "PDF")); string Ruta = ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\{UsuarioActual.CveEmpresa}\Formatos\{Formato}"; From a7ca525f301b5a20a11c9cac51fe6cdc903aaf26 Mon Sep 17 00:00:00 2001 From: JPerez Date: Thu, 10 Jul 2025 16:41:48 -0700 Subject: [PATCH 14/44] --FIX subproyecto promociones --- Ventas/Promociones.aspx.vb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Ventas/Promociones.aspx.vb b/Ventas/Promociones.aspx.vb index 16c5f2b0a..5f5b44abd 100644 --- a/Ventas/Promociones.aspx.vb +++ b/Ventas/Promociones.aspx.vb @@ -281,6 +281,12 @@ Partial Class Ventas_Promociones 'DdlPS.Items.Insert(0, New ListItem("Todos", "-1")) End If + If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso Request("CvePromocion") IsNot Nothing AndAlso Request("CvePromocion").ToString.ToEntero > 0 Then + If DdlSubProyecto.Items.FindByValue("-1") Is Nothing Then + DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) + End If + End If + DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa) DdlVendedor.DataBind() DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1")) From aa4ab138013f35749dc1ef2cd2773a8c0bcd77fa Mon Sep 17 00:00:00 2001 From: JPerez Date: Thu, 10 Jul 2025 16:42:03 -0700 Subject: [PATCH 15/44] --FIX kardex horizontal --- Inventarios/KardexAlmacenHorizontal.aspx | 31 ++++++++++----------- Inventarios/KardexAlmacenHorizontal.aspx.vb | 29 +++++++++---------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Inventarios/KardexAlmacenHorizontal.aspx b/Inventarios/KardexAlmacenHorizontal.aspx index 43c8ba7ca..94fae70d0 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx +++ b/Inventarios/KardexAlmacenHorizontal.aspx @@ -261,15 +261,6 @@
-
-
Tránsito?
- - - - - - -
@@ -282,7 +273,7 @@
-
+ -
-
Almacén
- -
-
Incluir Proyectados
@@ -311,6 +296,20 @@
+
+
Tránsito?
+ + + + + + +
+
+
Almacén
+ +
diff --git a/Inventarios/KardexAlmacenHorizontal.aspx.vb b/Inventarios/KardexAlmacenHorizontal.aspx.vb index 39b1117ca..f543c7a54 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx.vb +++ b/Inventarios/KardexAlmacenHorizontal.aspx.vb @@ -184,7 +184,7 @@ Partial Class Inventarios_KardexAlmacenHorizontal dt = ObjMovimientos.DtResultados Dim ListaBorrar As New List(Of DataColumn) - If Not TienePermisoImportes AndAlso DdlExistencia.SelectedValue.ToEntero = 2 Then + If Not TienePermisoImportes AndAlso DdlExistencia.SelectedValue.ToEntero().Contiene(2, 4) Then dt.Columns.RemoveAt(dt.Columns.Count - 2) 'CP-quito columna de importe total dt.Columns.RemoveAt(dt.Columns.Count - 2) 'Valor-quito columna de importe total End If @@ -247,17 +247,21 @@ Partial Class Inventarios_KardexAlmacenHorizontal 'Dim Liga As String = String.Format($"/Inventarios/Kardex.aspx?CvePS={ddlProducto2.SelectedValue.ToEntero}&CveAlmacen={e.Row.DataKey("CveAlmacen")}&CveUM={DdlUnidadMedida.SelectedValue.ToEntero}&FechaI={TxtFechaI.Text}&FechaF={TxtFechaF.Text}") 'e.Row.FCHyperLink("HplAlmacen").NavigateUrl = Liga - If e.Row.RowIndex = 0 Then + If e.Row.RowIndex = 0 AndAlso DdlExistencia.SelectedValue.ToEntero().Contiene(2, 4) Then e.Row.CssClass = "Totales" End If - 'e.Row.Attributes.Add("style", " max-height:31px!important") - e.Row.HorizontalAlign = HorizontalAlign.Right - e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left - e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left - e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left + If DdlExistencia.SelectedValue.ToEntero = 3 Then + e.Row.HorizontalAlign = HorizontalAlign.Left + Else + e.Row.HorizontalAlign = HorizontalAlign.Right + e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left + e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left + e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left + End If + Dim Index As Integer = 0 For Each Cells As TableCell In e.Row.Cells @@ -315,17 +319,15 @@ Partial Class Inventarios_KardexAlmacenHorizontal 'Escondo CvePS y CveAlmacén (Se generan por autogeneratecolumns por eso se borran por aqui). ' e.Row.Cells(0).Width = New Unit("200px") - - If DdlExistencia.SelectedValue.ToEntero = 2 Then + If DdlExistencia.SelectedValue.ToEntero.Contiene(2, 3, 4) Then Try + If DdlExistencia.SelectedValue.ToEntero = 3 Then + e.Row.Cells(1).Visible = False + End If e.Row.Cells(2).Visible = False e.Row.Cells(3).Visible = False Catch ex As Exception - End Try - - Else - e.Row.Cells(0).Visible = False End If If e.Row.RowType = DataControlRowType.Header Then @@ -334,7 +336,6 @@ Partial Class Inventarios_KardexAlmacenHorizontal End Sub Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - Imprimir("Excel") End Sub Private Sub Imprimir(Optional reporte As String = "PDF") From c9e641710c07353d511fe2b58eb23f9eda3cc36b Mon Sep 17 00:00:00 2001 From: JPerez Date: Fri, 11 Jul 2025 10:24:33 -0700 Subject: [PATCH 16/44] agregar columnas de PL1 y PL2, en la descarga de excel --- Ventas/Ventas.aspx.vb | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 8a1b3c747..65774ea22 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -42057,6 +42057,7 @@ Partial Class Ventas Where row.RowType = DataControlRowType.DataRow Select New With { + .CveVentaDetalle = row.DataKey("CveVentaDetalle").ToEntero(), .Codigo = row.DataKey("Codigo").Trim(), .NumeroParte = row.DataKey("NumeroParte").Trim(), .Descripcion = row.DataKey("PS").Trim(), @@ -42065,13 +42066,32 @@ Partial Class Ventas .Precio = row.FCLiteral("LtlPU").Text.Trim().ToDecimal(), .SubImporte = row.DataKey("TotalImporte").ToDecimal(), .MargenUtilidad = row.FCLabel("LblCostoPorcentaje").Text.Replace("%", "").Replace(" ", "").Trim().ToDecimal(), - .UltimoCosto = row.FCLabel("LblCosto").Text.Trim().ToDecimal() + .UltimoCosto = row.FCLabel("LblCosto").Text.Trim().ToDecimal(), + .PL1 = 0D, + .PL2 = 0D }).QueryToDataTable(True) If DtExcel.Rows.Count < 1 Then Alert("No hay resultados en la busqueda.", TipoMensaje.MsgAdvertencia) Exit Sub End If + Dim DtPreciosLista As DataTable = Nothing + + If UsuarioActual.CveEmpresa = 189 Then + Dim ObjVta As New ClsVentas + If ObjVta.GetVentaDetallePreciosLista(Me.CveVenta, UsuarioActual.CveEmpresa) Then + DtPreciosLista = ObjVta.DtResultados.Copy() + End If + ObjVta.Dispose() + + If DtPreciosLista IsNot Nothing Then + For Each Row As DataRow In DtExcel.Rows + Row("PL1") = DtPreciosLista.FiltroPrimeroValor("PL1", $"CveVentaDetalle={Row("CveVentaDetalle")}").ToDecimal() + Row("PL2") = DtPreciosLista.FiltroPrimeroValor("PL2", $"CveVentaDetalle={Row("CveVentaDetalle")}").ToDecimal() + Next + End If + End If + Dim folio = LblSerie.Text + "-" + TxtFolio.Text @@ -42085,6 +42105,9 @@ Partial Class Ventas DtExcel.Columns("MargenUtilidad").ColumnName = "Margen de utilidad" DtExcel.Columns("UltimoCosto").ColumnName = "Último costo" + 'QUITAR COLUMNA DE VENTA DETALLE, EL USUARIO NO DEBE VERLA + DtExcel.Columns.Remove("CveVentaDetalle") + SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet) Dim FileExcel As New ExcelFile() @@ -42109,6 +42132,10 @@ Partial Class Ventas worksheet.Columns(7).Style.NumberFormat = "#,##0.00" 'ULTIMO COSTO worksheet.Columns(8).Style.NumberFormat = "$#,##0.00_);($#,##0.00)" + 'PL1 + worksheet.Columns(9).Style.NumberFormat = "$#,##0.00_);($#,##0.00)" + 'PL2 + worksheet.Columns(10).Style.NumberFormat = "$#,##0.00_);($#,##0.00)" Dim columnCount As Integer = worksheet.CalculateMaxUsedColumns() For i As Integer = 0 To columnCount From 83545b7710685051afd40f7c803dc04ea9cbabce Mon Sep 17 00:00:00 2001 From: JPerez Date: Fri, 11 Jul 2025 11:03:10 -0700 Subject: [PATCH 17/44] --FIX envio polizas virtuales --- Ventas/Ventas.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 65774ea22..8f601ab49 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -37655,7 +37655,7 @@ Partial Class Ventas Try Using wc As New HttpClient() - Dim Url As New Uri("http://polizavirtual.com.mx/webservice/api/Venta") + Dim Url As New Uri("https://polizavirtual.com.mx/webservice/api/Venta") Dim Parametros As New List(Of KeyValuePair(Of String, String)) From b742c58824f6638e263235fcd9bd8d29f1462265 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 11 Jul 2025 12:53:11 -0700 Subject: [PATCH 18/44] =?UTF-8?q?-=20correcci=C3=B3n=20con=20el=20cambio?= =?UTF-8?q?=20de=20dll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/Timbrado.vb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index e5770fa7b..944995939 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -2734,7 +2734,7 @@ concep.DescripcionesEspecificas.NumeroSerie) #Region "C O M P L E M E N T O D E N O M I N A" If ObjCFDITimbre.Comprobante.TipoComprobante = "N" Then - + cfdi.TieneSubsidio = True ' bandera par activar que se vaya la opción de totalotrosingresos si es igual a cero 'cfdi.Esquema.AgregarEsquema("http://www.sat.gob.mx/nomina12 http://www.sat.gob.mx/sitio_internet/cfd/nomina/nomina12.xsd") cfdi.Nomina12(ObjCFDITimbre.Nomina.TipoNomina, ObjCFDITimbre.Nomina.FechaPago.ToString("yyyy-MM-dd"), ObjCFDITimbre.Nomina.FechaInicio.ToDate().ToString("yyyy-MM-dd"), ObjCFDITimbre.Nomina.FechaFin.ToDate().ToString("yyyy-MM-dd"), ObjCFDITimbre.Nomina.NumDiasPagados, If(ObjCFDITimbre.Nomina.Percepciones IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Percepciones.Count > 0, ObjCFDITimbre.Nomina.TotalPercepciones, 0), If(ObjCFDITimbre.Nomina.Deducciones IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Deducciones.Count > 0, ObjCFDITimbre.Nomina.TotalDeducciones, 0), If(ObjCFDITimbre.Nomina.OtrosPagos IsNot Nothing AndAlso ObjCFDITimbre.Nomina.OtrosPagos.Count > 0, ObjCFDITimbre.Nomina.TotalOtrosPagos, 0)) @@ -2742,7 +2742,6 @@ concep.DescripcionesEspecificas.NumeroSerie) If UsuarioActual.Empresa.UsaAC Then cfdi.Nomina12EntidadSNCF("IF", 90) - #Region "Receptor" cfdi.Nomina12Receptor(ObjCFDITimbre.Nomina.Receptor.CURP, From d943e372bf7fcd712958ee925b06140a70d2474a Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 11 Jul 2025 12:53:23 -0700 Subject: [PATCH 19/44] - --- Bancos/FluctuacionCambiaria.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index b5664eab5..f98cd4fd3 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -641,7 +641,7 @@ Partial Class Bancos_FluctuacionCambiaria End Sub Private Function AjusteFluctuacion(CvePrePoliza As Integer, TipoFluctuacion As Integer, CveConcepto As Integer, FechaUltimoDaMes As Date, ByRef ObjConta As ClsContabilidad, Optional CveVenta As Integer = -1, Optional CveCliente As Integer = -1, Optional CveCompra As Integer = -1, Optional CveProveedor As Integer = -1) As Boolean - If Not UsuarioActual.CveEmpresa.Contiene(119, 172, 174) Then Return True + If Not UsuarioActual.CveEmpresa.Contiene(119, 172, 174, 189) Then Return True Dim ErrorRegistrar As Boolean = False Dim tdt As DataTable = VerificacionFluctuacion(TipoFluctuacion, FechaUltimoDiaMes) From f6044c97ac5d56641b3769150c4c92c16a62841d Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 11 Jul 2025 12:53:36 -0700 Subject: [PATCH 20/44] =?UTF-8?q?--=20correcci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/ConciliacionesBancarias.aspx.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Bancos/ConciliacionesBancarias.aspx.vb b/Bancos/ConciliacionesBancarias.aspx.vb index d7655d6e1..eac3b39ba 100644 --- a/Bancos/ConciliacionesBancarias.aspx.vb +++ b/Bancos/ConciliacionesBancarias.aspx.vb @@ -182,7 +182,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx If Not CBool(Dr("FueConciliado").ToString) And Dr("CveIE").ToString.ToEntero > 0 Then For Each DrE As DataRow In DtDatosEdoCuenta.Rows If ((Dr("FechaDocumento").ToString.ToDate = DrE("FechaDocumento").ToString.ToDate And Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 1) Or (Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 2)) And Not CBool(DrE("Seleccionado").ToString) And Not CBool(DrE("FueConciliado").ToString) And Not CBool(Dr("Seleccionado").ToString) Then - Dim FechaConciliado As Date = TxtFechaAplicado.Text.ToDate 'If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate) + Dim FechaConciliado As Date = If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate) If Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, FechaConciliado, -1, 1, 1, UsuarioActual.CveUsuario) Or Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, FechaConciliado, DrE("CveIEEstadoCuenta").ToString.ToEntero, 1, 2, UsuarioActual.CveUsuario) Then ErrorTrans = True @@ -289,7 +289,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx Dim CveIE As Integer = 0 For Each Gvr As GridViewRow In GvDatos.Rows If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then - Dim FechaConciliado As Date = TxtFechaAplicado.Text.ToDate 'If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate) + Dim FechaConciliado As Date = If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate) If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, FechaConciliado, -1, 1, 1, UsuarioActual.CveUsuario) Then ErrorTrans = True Else @@ -303,7 +303,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx Next For Each Gvr As GridViewRow In GvEdoConciliacion.Rows If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then - Dim FechaConciliado As Date = TxtFechaAplicado.Text.ToDate 'If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate) + Dim FechaConciliado As Date = If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate) If Not ObjBancos.UpdateConciliacionBancaria(CveIE, FechaConciliado, Gvr.DataKey("CveIEEstadoCuenta").ToEntero, 1, 2, UsuarioActual.CveUsuario) Then 'If Not ObjBancos.UpdateIEEstadoCuenta(Gvr.DataKey("CveIEEstadoCuenta").ToEntero, Gvr.DataKey("Importe").ToDouble, True, CveIE, Gvr.DataKey("Referencia").ToString, ' Gvr.DataKey("Tipo").ToString, Gvr.DataKey("FechaDocumento").ToDate, Gvr.DataKey("CveCuenta").ToEntero) Then From 36218717c7a97e7f678fc5fc06b67e8c0f33ce8a Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 11 Jul 2025 12:53:48 -0700 Subject: [PATCH 21/44] - acomodo --- Nomina/RepMovtosPermanentes.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Nomina/RepMovtosPermanentes.aspx b/Nomina/RepMovtosPermanentes.aspx index 549f6d52f..40e85b556 100644 --- a/Nomina/RepMovtosPermanentes.aspx +++ b/Nomina/RepMovtosPermanentes.aspx @@ -228,7 +228,7 @@ - + From aa2993946ce508561660c5a7f7f1491c5c4694fa Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 11 Jul 2025 12:53:56 -0700 Subject: [PATCH 22/44] -- mejora --- Ventas/ProductosServicios.aspx | 2 +- Ventas/ProductosServicios.aspx.vb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index 1ead86d18..53bbac7b2 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -286,7 +286,7 @@
-
+
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index d57e9aae0..7198a0e00 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -414,6 +414,10 @@ Partial Class ProductosyServicios divPrecio.Visible = True End If + If UsuarioActual.CveRol = 1 Then + divPSExtranjero.Visible = True + End If + If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then '' empresa deduce IEPS divIEPS.Visible = True End If From e7828875ce96f20245254cd73bc9881b7c6537b9 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 11 Jul 2025 12:54:26 -0700 Subject: [PATCH 23/44] -- mejora mensaje de error --- 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 b9ee9e5b3..f82e1c46b 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -9803,7 +9803,7 @@ Partial Class Compras_Compras respuesta = False 'La fecha de la compra esta por fuera de lo permitido mes actual o mes anterior If FechaCompra.Month > MesReembolsoInt Then - Alert($"La fecha de la compra que se quiere registrar esta adelantada al mes de la comprobación (Reembolso {TxtRembolsoNumero.Text} ,Fecha comprobación {FechaReembolso.ToString("dd/MM/yyyy")}).", TipoMensaje.MsgAdvertencia) + Alert($"La fecha de la compra que se quiere registrar esta adelantada al mes de la comprobación (Reembolso {TxtRembolsoNumero.Text} Personal: {DdlPersonal.SelectedItem.Text} ,Fecha comprobación {FechaReembolso.ToString("dd/MM/yyyy")}).", TipoMensaje.MsgAdvertencia) Else Alert($"La fecha de la compra que se quiere registrar es anterior al mes permitido por la comprobación (Reembolso {TxtRembolsoNumero.Text}, Fecha comprobación {FechaReembolso.ToString("dd/MM/yyyy")}).", TipoMensaje.MsgAdvertencia) End If From 7e0b2243d50150429d83316447d2322463fc8f59 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 11 Jul 2025 12:56:02 -0700 Subject: [PATCH 24/44] =?UTF-8?q?--=20mejora=20la=20conversi=C3=B3n=20de?= =?UTF-8?q?=20monedas=20en=20el=20indicador?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OC/RepOC.aspx.vb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/OC/RepOC.aspx.vb b/OC/RepOC.aspx.vb index 0136764eb..9d82d6360 100644 --- a/OC/RepOC.aspx.vb +++ b/OC/RepOC.aspx.vb @@ -402,15 +402,16 @@ Partial Class RepOC Dim Cantidad As Integer = DtOC.COUNT("CveOrdenCompra") Dim TotalPesos As Double = DtOC.SUM("Total", "CveMoneda = 1") Dim TotalDolares As Double = DtOC.SUM("Total", "CveMoneda = 2") - Dim Total As Double = TotalPesos + (TotalDolares * GlobalTipoCambio) + 'Dim Total As Double = TotalPesos + (TotalDolares * GlobalTipoCambio) + Dim TotalMN As Decimal = DtOC.AsEnumerable() _ + .Sum(Function(row) Math.Round(Convert.ToDecimal(row.Field(Of Decimal)("Total")) * Convert.ToDecimal(row.Field(Of Decimal)("TipoCambio")), 2)) - MuestraIndicador(DivIndicadores, "green-haze", "fa fa-money", "Órdenes de Compra", Cantidad.ToString, "Cantidad", "$" + Total.FormatoNumero, "Total", "$" + TotalPesos.FormatoNumero, "Pesos", "$" + TotalDolares.FormatoNumero, "Dólares") + + MuestraIndicador(DivIndicadores, "green-haze", "fa fa-money", "Órdenes de Compra", Cantidad.ToString, "Cantidad", "$" + TotalMN.FormatoNumero, "Total", "$" + TotalPesos.FormatoNumero, "Pesos", "$" + TotalDolares.FormatoNumero, "Dólares") UPPIndicador.Update() - DivIndicadoresCompradoRecibido.Visible = True DivIndicadoresCompradoRecibido.InnerHtml = String.Empty - Dim Recibidos As Decimal = DtOC.SUM("Comprado") Dim Comprados As Decimal = DtOC.SUM("Recibido") From fc567bc062fef6d3469f155a356bfa89c4603d90 Mon Sep 17 00:00:00 2001 From: Luis Carlos Quijada Date: Fri, 11 Jul 2025 14:48:55 -0600 Subject: [PATCH 25/44] Cambios Importaciones Exportacion PDF --- Export/ExpDetalle.aspx | 6 ++++-- Export/ExpDetalle.aspx.cs | 37 +++++++++++++++++++++++-------------- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/Export/ExpDetalle.aspx b/Export/ExpDetalle.aspx index 22b8ebf68..47880c56a 100644 --- a/Export/ExpDetalle.aspx +++ b/Export/ExpDetalle.aspx @@ -5,8 +5,10 @@ - Exportación: - + + + +
  • diff --git a/Export/ExpDetalle.aspx.cs b/Export/ExpDetalle.aspx.cs index 4045fd175..a166ebb37 100644 --- a/Export/ExpDetalle.aspx.cs +++ b/Export/ExpDetalle.aspx.cs @@ -56,16 +56,13 @@ public partial class Export_ExpDetalle : ClsPaginas LblTipoExp.InnerText = EsImportacion ? "Tipo Importación:" : "Tipo Exportación:"; - if (EsImportacion) - { - LblExp.Text = "Importaciones"; - } - else - { - LblExp.Text = "Exportación"; - } + // Asigna el texto descriptivo + LblTipoOperacion.Text = EsImportacion ? "Importación: " : "Exportación: "; + // Asigna el número de clave CveExportacion = !string.IsNullOrEmpty(Request["CveExportacion"]) ? Request["CveExportacion"].ToEntero() : -1; + LblCveExportacion.Text = CveExportacion > 0 ? CveExportacion.ToString() : ""; + InicializarValores(); CargaDatos(); } @@ -152,7 +149,7 @@ public partial class Export_ExpDetalle : ClsPaginas DTExportaciones = Exportaciones.DtResultados; if (DTExportaciones.Rows.Count > 0) { - LblExp.Text = DTExportaciones.FiltroPrimeroValor("CveExportacion"); + LblCveExportacion.Text = DTExportaciones.FiltroPrimeroValor("CveExportacion"); DdlSubProyecto.SelectedValue = DTExportaciones.FiltroPrimeroValor("CveSubProyecto"); @@ -1031,7 +1028,9 @@ public partial class Export_ExpDetalle : ClsPaginas int CveEmpresa = UsuarioActual.CveEmpresa; DataTable DTExportaciones = new DataTable(); ClsExportaciones Exportaciones = new ClsExportaciones(); - if (Exportaciones.GetExportacion(CveExportacion, CveEmpresa)) + + bool EsExportacion = !EsImportacion; + if (Exportaciones.GetExportacion(CveExportacion, CveEmpresa, EsExportacion)) { DTExportaciones = Exportaciones.DtResultados; if (DTExportaciones.Rows.Count > 0) @@ -1227,14 +1226,24 @@ public partial class Export_ExpDetalle : ClsPaginas } } - string NombreArchivo = $"Exportacion_{CveExportacion}"; + string NombreArchivo; + string Formato; + + if (EsExportacion) + { + NombreArchivo = $"Exportacion_{CveExportacion}"; + Formato = "FormatoExportacion.mrt"; + } + else + { + NombreArchivo = $"Importacion_{CveExportacion}"; + Formato = "FormatoImportacion.mrt"; + } string CveVenta = DTExportaciones.FiltroPrimeroValor("CveVenta"); ; - if (CveVenta != "" && CveVenta != "-1") + if (EsExportacion && CveVenta != "" && CveVenta != "-1") { NombreArchivo = NumFactura; } - - string Formato = "FormatoImportacion.mrt"; para.Add(new ReportParameter("Formato", "PDF")); string Ruta = ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\{UsuarioActual.CveEmpresa}\Formatos\{Formato}"; From 3db652dcb51471049520ca80e86f4383161e512e Mon Sep 17 00:00:00 2001 From: SLopez Date: Fri, 11 Jul 2025 18:04:30 -0700 Subject: [PATCH 26/44] =?UTF-8?q?Cambios=20en=20el=20documento=20exportaci?= =?UTF-8?q?=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Export/ExpDetalle.aspx.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Export/ExpDetalle.aspx.cs b/Export/ExpDetalle.aspx.cs index a166ebb37..c0eac7c49 100644 --- a/Export/ExpDetalle.aspx.cs +++ b/Export/ExpDetalle.aspx.cs @@ -1039,9 +1039,12 @@ public partial class Export_ExpDetalle : ClsPaginas string ClienteExportador = DTExportaciones.FiltroPrimeroValor("ClienteExportador"); string DirExportador = DTExportaciones.FiltroPrimeroValor("DirExportador"); string RFCExp = DTExportaciones.FiltroPrimeroValor("RFCExp"); + string PPSExp = DTExportaciones.FiltroPrimeroValor("PPSExp"); + string IMMEXexp = DTExportaciones.FiltroPrimeroValor("IMMEXexp"); string ClienteImportador = DTExportaciones.FiltroPrimeroValor("ClienteImportador"); string DirImportador = DTExportaciones.FiltroPrimeroValor("DirImportador"); string RFCImp = DTExportaciones.FiltroPrimeroValor("RFCImp"); + string PPSImp = DTExportaciones.FiltroPrimeroValor("PPSImp"); string IMMEXimp = DTExportaciones.FiltroPrimeroValor("IMMEXimp"); string NumFactura = DTExportaciones.FiltroPrimeroValor("SerieFolio"); string ClaveSATPedimento = DTExportaciones.FiltroPrimeroValor("ClaveSATPedimento"); @@ -1071,6 +1074,7 @@ public partial class Export_ExpDetalle : ClsPaginas string ClienteConsignatario = DTExportaciones.FiltroPrimeroValor("ClienteConsignatario"); string DirConsignatario = DTExportaciones.FiltroPrimeroValor("DirConsignatario"); string RFCCon = DTExportaciones.FiltroPrimeroValor("RFCCon"); + string PPSCon = DTExportaciones.FiltroPrimeroValor("PPSCon"); string IMMEXcon = DTExportaciones.FiltroPrimeroValor("IMMEXcon"); decimal IncFletes = 0.00m; @@ -1086,6 +1090,18 @@ public partial class Export_ExpDetalle : ClsPaginas decimal TotalInc = 0.00m; decimal TotalDec = 0.00m; + string Sellos = ""; + for (int i = 1; i <= 3; i++) + { + string sello = DTExportaciones.FiltroPrimeroValor($"Sello{i}"); + if (sello != "") + { + if(Sellos == "") + Sellos += sello; + else + Sellos += $", {sello}"; + } + } string DescContenedor = DTExportaciones.FiltroPrimeroValor("DescripcionContenedor"); string ContenedorPlaca = DTExportaciones.FiltroPrimeroValor("ContenedorPlaca"); string Proveedor = DTExportaciones.FiltroPrimeroValor("Proveedor"); @@ -1105,9 +1121,12 @@ public partial class Export_ExpDetalle : ClsPaginas para.Add(new ReportParameter("ClienteExportador", ClienteExportador)); para.Add(new ReportParameter("DirExportador", DirExportador)); para.Add(new ReportParameter("RFCExp", RFCExp)); + para.Add(new ReportParameter("PPSExp", PPSExp)); + para.Add(new ReportParameter("IMMEXexp", IMMEXexp)); para.Add(new ReportParameter("ClienteImportador", ClienteImportador)); para.Add(new ReportParameter("DirImportador", DirImportador)); para.Add(new ReportParameter("RFCImp", RFCImp)); + para.Add(new ReportParameter("PPSImp", PPSImp)); para.Add(new ReportParameter("IMMEXimp", IMMEXimp)); para.Add(new ReportParameter("NumFactura", NumFactura)); para.Add(new ReportParameter("ClaveSATPedimento", ClaveSATPedimento)); @@ -1121,6 +1140,7 @@ public partial class Export_ExpDetalle : ClsPaginas para.Add(new ReportParameter("ClienteConsignatario", ClienteConsignatario)); para.Add(new ReportParameter("DirConsignatario", DirConsignatario)); para.Add(new ReportParameter("RFCCon", RFCCon)); + para.Add(new ReportParameter("PPSCon", PPSCon)); para.Add(new ReportParameter("IMMEXcon", IMMEXcon)); ClsExportaciones Gastos = new ClsExportaciones(); @@ -1158,6 +1178,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("Sellos", Sellos)); para.Add(new ReportParameter("DescContenedor", DescContenedor)); para.Add(new ReportParameter("ContenedorPlaca", ContenedorPlaca)); para.Add(new ReportParameter("Proveedor", Proveedor)); From 9452dcb4d2d430a924ddde977fadb1ebf9798825 Mon Sep 17 00:00:00 2001 From: JPerez Date: Sat, 12 Jul 2025 01:15:19 -0700 Subject: [PATCH 27/44] --Cambios clase, cancelacion timbre --- App_Code/ClsGenerales.vb | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 9df264da9..ba614ae20 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -4018,7 +4018,7 @@ Public Class ClsGenerales End Try Return Retorno End Function - Public Function CancelarTimbreTimbrado(CveTimbre As Integer, FechaCancelacion As DateTime, CvePACCancelacion As Integer, SelloCancelacion As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Public Function CancelarTimbreTimbrado(CveTimbre As Integer, FechaCancelacion As DateTime, CvePACCancelacion As Integer, SelloCancelacion As String, CveUsuario As Integer, CveEmpresa As Integer, Optional RegenerarTimbre As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_TimbreTimbradoCancelar") @@ -4030,6 +4030,27 @@ Public Class ClsGenerales .Add("@SelloCancelacion", SqlDbType.VarChar).Value = SelloCancelacion .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@RegenerarTimbre", SqlDbType.Bit).Value = RegenerarTimbre + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar el timbrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + + Public Function ReactivarTimbreEntregaAlmacen(CveTimbre As Integer, CveEntregaAlmacen As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Gral_TimbreReactivarUpdate") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveTimbre", SqlDbType.Int).Value = CveTimbre + .Add("@CveEntregaAlmacen", SqlDbType.Int).Value = CveEntregaAlmacen + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try @@ -4040,6 +4061,7 @@ Public Class ClsGenerales End Try Return Retorno End Function + Public Function RemoveGralTimbre(CveTimbre As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_TimbreRemove") From 5d06af3dc7d6dfed34be5a2f0db4ca251e7a7a26 Mon Sep 17 00:00:00 2001 From: SLopez Date: Sat, 12 Jul 2025 13:27:58 -0700 Subject: [PATCH 28/44] =?UTF-8?q?Cambios=20en=20documento=20exportaci?= =?UTF-8?q?=C3=B3n=20y=20creaci=C3=B3n=20de=20tabla=20Exp=5FExportacionesD?= =?UTF-8?q?escargas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Export/ExpDetalle.aspx.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Export/ExpDetalle.aspx.cs b/Export/ExpDetalle.aspx.cs index c0eac7c49..f5a72afff 100644 --- a/Export/ExpDetalle.aspx.cs +++ b/Export/ExpDetalle.aspx.cs @@ -1211,6 +1211,18 @@ public partial class Export_ExpDetalle : ClsPaginas DTPartidas.Columns["ValorUnitarioMN"].DefaultValue = 0.0m; foreach (DataRow row in DTPartidas.Rows) { + string PSCodigoSinDescripcion = row["PSCodigoSinDescripcion"].ToString(); + if (PSCodigoSinDescripcion != "") + row["PSCodigo"] = PSCodigoSinDescripcion; + + string FraccionArancelaria = row["FraccionArancelaria"].ToString(); + if (FraccionArancelaria.Contains("-")) + { + string[] partes = FraccionArancelaria.Split('-'); + if (partes[0] != "") + row["FraccionArancelaria"] = partes[0]; + } + decimal cantidad = Convert.ToDecimal(row["Cantidad"]); if (cantidad > 0) { @@ -1246,6 +1258,7 @@ public partial class Export_ExpDetalle : ClsPaginas lrds.Add(RDSBultos); } } + Partidas.Dispose(); string NombreArchivo; string Formato; From 8b198856ac3848a329e651f0c87f0c845676d9d7 Mon Sep 17 00:00:00 2001 From: JPerez Date: Sat, 12 Jul 2025 14:31:19 -0700 Subject: [PATCH 29/44] --BDH.Opcion de cancelacion en recolecciones --- Inventarios/RepEntregaAlmacenRuta.aspx | 303 +++++++++++------- Inventarios/RepEntregaAlmacenRuta.aspx.cs | 359 +++++++++++++++++++--- 2 files changed, 506 insertions(+), 156 deletions(-) diff --git a/Inventarios/RepEntregaAlmacenRuta.aspx b/Inventarios/RepEntregaAlmacenRuta.aspx index 4fe1a652b..2d9e59f2c 100644 --- a/Inventarios/RepEntregaAlmacenRuta.aspx +++ b/Inventarios/RepEntregaAlmacenRuta.aspx @@ -15,7 +15,6 @@ - @@ -32,7 +31,7 @@
    - Sucursal: + Sucursal:
    @@ -43,63 +42,61 @@
    - -
    -
    - - - - + +
    +
    + + + + +
    + + + + + +
    - - - - - - -
    - -
    -
    - - - - + +
    +
    + + + + +
    + + + + + +
    - - - - - - -
    - +
    - @@ -109,75 +106,68 @@ " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
  • - - - + + - - - + + + - + - - - - - - - - - - - - - - - - - + - - - + + + + + + + + + + + + - - - + + - - - - + + + +<%-- --%> + - - + + - + - - + + - - + + - - - + + + - - - + + + @@ -188,10 +178,10 @@ - -
    @@ -1009,6 +1009,7 @@
    Filtrar por Sucursal: +