From fd3e6dda26b4f3afd14af61f78e096803a2eb9ea Mon Sep 17 00:00:00 2001 From: caudillochon Date: Tue, 25 Mar 2025 03:23:34 -0700 Subject: [PATCH 1/8] nominas css --- Metronic/assets/admin/layout/css/custom.css | 6 +- .../assets/layouts/layout3/css/custom.css | 6 +- Nomina/Nomina.aspx.cs | 327 ++++++++++++------ Scripts/custom.js | 2 +- Styles/Custom.css | 49 ++- Styles/Estilos2.css | 67 +++- 6 files changed, 335 insertions(+), 122 deletions(-) diff --git a/Metronic/assets/admin/layout/css/custom.css b/Metronic/assets/admin/layout/css/custom.css index a513b7607..f35671cd1 100644 --- a/Metronic/assets/admin/layout/css/custom.css +++ b/Metronic/assets/admin/layout/css/custom.css @@ -195,7 +195,11 @@ table > tr > th.adsCol, table.table > tr > th.adsCol { } .Totales, .table-striped > tbody > tr.Totales { - background: rgba(103, 128, 159, 0.65) !important; + background: #9cacc1 !important; + border-color: #9cacc1; +} +.Totales td, .table-striped > tbody > tr.Totales td{ + border-color: #9cacc1; } .btnopaco { diff --git a/Metronic/assets/layouts/layout3/css/custom.css b/Metronic/assets/layouts/layout3/css/custom.css index bb719eb0d..b36d43082 100644 --- a/Metronic/assets/layouts/layout3/css/custom.css +++ b/Metronic/assets/layouts/layout3/css/custom.css @@ -207,9 +207,13 @@ table > tr > th.adsCol ,table.table > tr > th.adsCol{ z-index: 550; } .Totales, .table-striped > tbody > tr.Totales { - background: rgba(103, 128, 159, 0.65) !important; + background: #9cacc1 !important; + border-color: #9cacc1 !important; } +.Totales td, .table-striped > tbody > tr.Totales td{ + border-color: #9cacc1; +} .btnopaco { background-color: rgba(0,0,0,0.2); color: #FFF; diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 2998d580c..6936779b5 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -15,6 +15,7 @@ using System.Text.RegularExpressions; using iTextSharp.text.pdf.parser; using Profact.TimbraCFDI40; using Ionic.Zip; +using DocumentFormat.OpenXml.Drawing; public partial class Nomina_Nomina2 : ClsPaginas { @@ -5098,7 +5099,27 @@ public partial class Nomina_Nomina2 : ClsPaginas var dedcborderColor = ClosedXML.Excel.XLColor.FromArgb(99, 37, 35); ClosedXML.Excel.XLColor colorperp = ClosedXML.Excel.XLColor.FromArgb(51, 153, 102); ClosedXML.Excel.XLColor colorded = ClosedXML.Excel.XLColor.FromArgb(150, 54, 52); + ClosedXML.Excel.XLColor colororange = ClosedXML.Excel.XLColor.FromArgb(247, 150, 70); ClosedXML.Excel.IXLCell celda; + DataTable dtConceptos = this.dtConceptos.FiltraParametros("(Tipo ='P' AND EsPadre = 1 AND EsFormula =0) OR (Tipo = 'D' AND EsPadre = 1 AND EsFormula =0) OR Tipo = 'O' AND EsPadre = 1 AND EsFormula =0"); + DataTable dtFiltrado = dtConceptos.Clone(); // Clonar la estructura del DataTable + + foreach (GridViewRow row in GvPersonalizarExcel.Rows) + { + string columnaDB = row.DataKey("ColumnaDB").Replace("[","").Replace("]",""); // Suponiendo que la columna "ColumnaDB" está en la segunda celda (index 1) + string tipoDB = row.DataKey("TipoDB"); // Suponiendo que la columna "TipoDB" está en la cuarta celda (index 3) + //string tipo = tipoDB == "P" ? "1" : (tipoDB == "D" ? "2" : (tipoDB == "O" ? "3" : "5")); + // Filtrar dtConceptos basado en los valores del GridView + var filasFiltradas = dtConceptos.AsEnumerable() + .Where(r => string.Format("V_{0}" , r["CveConcepto"]) == columnaDB //&& r["Tipo"].ToString() == tipoDB + ); + + if (filasFiltradas.Any()) + { + dtFiltrado.Merge(filasFiltradas.CopyToDataTable()); + } + } + dtConceptos = dtFiltrado; var libro = wb.AddWorksheet("Nomina"); int column = 1; int filainicio = 3; @@ -5136,32 +5157,37 @@ public partial class Nomina_Nomina2 : ClsPaginas Titlecell(libro, "Pago", filainicio + 3, column, false, true, PercborderColor); Titlecell(libro, "", filainicio + 4, column, true, true, PercborderColor); libro.Column(column).Width = 15; - foreach (DataRow row in dtConceptos.FiltraParametros("Tipo ='P' AND EsPadre = 1 AND EsFormula =0").Rows) + if (dtConceptos.FiltraParametros("Tipo ='P'").Rows.Count > 0) { + + foreach (DataRow row in dtConceptos.FiltraParametros("Tipo ='P'").Rows) + { + column++; + if ((dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0)) + { + libro.Column(column).Hide(); + } + else + { + Titlecell(libro, row["Concepto"].ToString(), filainicio + 2, column, true, false, PercborderColor); + Titlecell(libro, row["Codigo"].ToString(), filainicio + 3, column, false, true, PercborderColor); + Titlecell(libro, "", filainicio + 4, column, true, true, PercborderColor); + libro.Column(column).Width = 15; + } + } column++; - if ((dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0)) - { - libro.Column(column).Hide(); - } - else - { - Titlecell(libro, row["Concepto"].ToString(), filainicio + 2, column, true, false, PercborderColor); - Titlecell(libro, row["Codigo"].ToString(), filainicio + 3, column, false, true, PercborderColor); - Titlecell(libro, "", filainicio + 4, column, true, true, PercborderColor); - libro.Column(column).Width = 15; - } - } - column++; - TitleRange(libro, "Percepciones", filainicio + 2, column, filainicio + 3, column, true, true, PercborderColor); - Titlecell(libro, "", filainicio + 4, column, true, true, PercborderColor); - libro.Column(column).Width = 15; - if (iniciotipe < column) - { - libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center; - TitleRange(libro, "Percepciones", filainicio + 1, iniciotipe + 1, filainicio + 1, column, true, true, PercborderColor); - libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Merge().Value = "Percepciones"; + TitleRange(libro, "Percepciones", filainicio + 2, column, filainicio + 3, column, true, true, PercborderColor); + Titlecell(libro, "", filainicio + 4, column, true, true, PercborderColor); + libro.Column(column).Width = 15; + if (iniciotipe < column) + { + libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center; + TitleRange(libro, "Percepciones", filainicio + 1, iniciotipe + 1, filainicio + 1, column, true, true, PercborderColor); + libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Merge().Value = "Percepciones"; + } + } iniciotipe = column; int finPercepciones = iniciotipe; @@ -5172,33 +5198,37 @@ public partial class Nomina_Nomina2 : ClsPaginas TitleRange(libro, "Perm. Faltas", filainicio + 3, column, filainicio + 3, column, false, true, dedcborderColor); Titlecell(libro, "", filainicio + 4, column, true, true, dedcborderColor); libro.Column(column).Width = 15; - foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'D' AND EsPadre = 1 AND EsFormula =0").Rows) + if (dtConceptos.FiltraParametros("Tipo ='D'").Rows.Count > 0) { + foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'D'").Rows) + { + column++; + if ((dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0)) + { + libro.Column(column).Hide(); + } + else + { + Titlecell(libro, row["Concepto"].ToString(), filainicio + 2, column, true, false, dedcborderColor); + Titlecell(libro, row["Codigo"].ToString(), filainicio + 3, column, false, true, dedcborderColor); + Titlecell(libro, "", filainicio + 4, column, true, true, dedcborderColor); + libro.Column(column).Width = 15; + } + + } + column++; - if ((dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0)) + TitleRange(libro, "Deducciones", filainicio + 2, column, filainicio + 3, column, true, true, dedcborderColor); + libro.Column(column).Width = 15; + if (iniciotipe < column) { - libro.Column(column).Hide(); - } - else - { - Titlecell(libro, row["Concepto"].ToString(), filainicio + 2, column, true, false, dedcborderColor); - Titlecell(libro, row["Codigo"].ToString(), filainicio + 3, column, false, true, dedcborderColor); + libro.Range(filainicio + 1, iniciotipe + 2, filainicio + 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center; + TitleRange(libro, "Deducciones", filainicio + 1, iniciotipe + 2, filainicio + 1, column, true, true, dedcborderColor); Titlecell(libro, "", filainicio + 4, column, true, true, dedcborderColor); - libro.Column(column).Width = 15; } } - column++; - TitleRange(libro, "Deducciones", filainicio + 2, column, filainicio + 3, column, true, true, dedcborderColor); - libro.Column(column).Width = 15; - if (iniciotipe < column) - { - libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center; - TitleRange(libro, "Deducciones", filainicio + 1, iniciotipe + 1, filainicio + 1, column, true, true, dedcborderColor); - Titlecell(libro, "", filainicio + 4, column, true, true, dedcborderColor); - } - int findeducciones = column; //column++; @@ -5209,6 +5239,46 @@ public partial class Nomina_Nomina2 : ClsPaginas libro.Cell(filainicio + 1, column).Value = " "; libro.Range(filainicio + 2, column, filainicio + 3, column).Merge().Value = "Total"; libro.Column(column).Width = 15; + + int iniciotiob = column; + + + if (dtConceptos.FiltraParametros("Tipo ='O'").Rows.Count > 0) + { + + foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'O' ").Rows) + { + column++; + if ((dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0)) + { + libro.Column(column).Hide(); + } + else + { + Titlecell(libro, row["Concepto"].ToString(), filainicio + 2, column, true, false, dedcborderColor); + Titlecell(libro, row["Codigo"].ToString(), filainicio + 3, column, false, true, dedcborderColor); + Titlecell(libro, "", filainicio + 4, column, true, true, dedcborderColor); + libro.Column(column).Width = 15; + } + + } + + column++; + TitleRange(libro, "Obligaciones", filainicio + 2, column, filainicio + 3, column, true, true, dedcborderColor); + libro.Column(column).Width = 15; + if (iniciotipe < column) + { + libro.Range(filainicio + 1, iniciotiob + 1, filainicio + 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center; + TitleRange(libro, "Obligaciones", filainicio + 1, iniciotiob + 1, filainicio + 1, column, true, true, dedcborderColor); + Titlecell(libro, "", filainicio + 4, column, true, true, dedcborderColor); + } + } + + + + + + iniciotipe = column; @@ -5216,8 +5286,21 @@ public partial class Nomina_Nomina2 : ClsPaginas int maxnocolumn = column; libro.Range(filainicio + 1, 1, filainicio + 4, maxnocolumn).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; libro.Range(filainicio + 1, 1, filainicio + 4, maxnocolumn).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189)); - libro.Range(filainicio + 1, incioConceptos, filainicio + 4, finPercepciones).Style.Fill.SetBackgroundColor(colorperp); - libro.Range(filainicio + 1, finPercepciones + 1, filainicio + 4, findeducciones).Style.Fill.SetBackgroundColor(colorded); + + if (dtConceptos.FiltraParametros("Tipo ='P'").Rows.Count > 0) + { + libro.Range(filainicio + 1, incioConceptos, filainicio + 4, finPercepciones).Style.Fill.SetBackgroundColor(colorperp); + } + + if (dtConceptos.FiltraParametros("Tipo ='D'").Rows.Count > 0) + { + libro.Range(filainicio + 1, finPercepciones + 2, filainicio + 4, findeducciones).Style.Fill.SetBackgroundColor(colorded); + } + + if (dtConceptos.FiltraParametros("Tipo ='O'").Rows.Count > 0) + { + libro.Range(filainicio + 1, findeducciones + 2, filainicio + 4, maxnocolumn).Style.Fill.SetBackgroundColor(colororange); + } int Fila = filainicio + 3; int cveSupProyecto = -5; @@ -5269,70 +5352,80 @@ public partial class Nomina_Nomina2 : ClsPaginas column++; libro.Cell(Fila, column).Value = ""; - foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'P' AND EsPadre = 1 AND EsFormula =0").Rows) + + if (dtConceptos.FiltraParametros("Tipo ='P'").Rows.Count > 0) { - column++; - string Concepto = string.Format("V_{0}", row["CveConcepto"]); - libro.Cell(Fila, column).Value = erow[Concepto]; - libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\""; - - - if (newsubproyecto) + foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'P' ").Rows) { - libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); - libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;"; + column++; + string Concepto = string.Format("V_{0}", row["CveConcepto"]); + libro.Cell(Fila, column).Value = erow[Concepto]; + libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\""; + + + if (newsubproyecto) + { + libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); + libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;"; + } + } - } + column++; + libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(colorperp); + Titlecell(libro, erow["SumaPercepciones"], Fila, column, false, false, PercborderColor); + libro.Cell(Fila, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; + libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\""; + if (newsubproyecto) + { + libro.Cell(Fila - 2, column).Style.Fill.SetBackgroundColor(colorperp); + Titlecell(libro, "", Fila - 2, column, false, false, PercborderColor); + libro.Cell(Fila - 3, column).Style.Fill.SetBackgroundColor(colorperp); + libro.Cell(Fila - 3, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; + libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;"; + Titlecell(libro, dtempleados.SUM("SumaPercepciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)), Fila - 3, column, true, true, PercborderColor); + //libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaPercepciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); + } - column++; - libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(colorperp); - Titlecell(libro, erow["SumaPercepciones"], Fila, column, false, false, PercborderColor); - libro.Cell(Fila, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; - libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\""; - if (newsubproyecto) - { - libro.Cell(Fila - 2, column).Style.Fill.SetBackgroundColor(colorperp); - Titlecell(libro, "", Fila - 2, column, false, false, PercborderColor); - libro.Cell(Fila - 3, column).Style.Fill.SetBackgroundColor(colorperp); - libro.Cell(Fila - 3, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; - libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;"; - Titlecell(libro, dtempleados.SUM("SumaPercepciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)), Fila - 3, column, true, true, PercborderColor); - //libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaPercepciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); } column++; libro.Cell(Fila, column).Value = ""; - foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'D' AND EsPadre = 1 AND EsFormula =0").Rows) - { - column++; - string Concepto = string.Format("V_{0}", row["CveConcepto"]); - libro.Cell(Fila, column).Value = erow[Concepto]; - libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\""; + if (dtConceptos.FiltraParametros("Tipo ='D'").Rows.Count > 0) + { + + foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'D' ").Rows) + { + column++; + string Concepto = string.Format("V_{0}", row["CveConcepto"]); + libro.Cell(Fila, column).Value = erow[Concepto]; + libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\""; + + if (newsubproyecto) + { + libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); + libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;"; + } + } + + column++; + libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(colorded); + Titlecell(libro, erow["SumaDeducciones"], Fila, column, false, false, dedcborderColor); + libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\""; + libro.Cell(Fila, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; if (newsubproyecto) { - libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); + libro.Cell(Fila - 2, column).Style.Fill.SetBackgroundColor(colorded); + Titlecell(libro, "", Fila - 2, column, false, false, dedcborderColor); + libro.Cell(Fila - 3, column).Style.Fill.SetBackgroundColor(colorded); + libro.Cell(Fila - 3, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;"; + Titlecell(libro, dtempleados.SUM("SumaDeducciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)), Fila - 3, column, true, true, dedcborderColor); + //libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaDeducciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); } } - - column++; - libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(colorded); - Titlecell(libro, erow["SumaDeducciones"], Fila, column, false, false, dedcborderColor); - libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\""; - libro.Cell(Fila, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; - if (newsubproyecto) - { - libro.Cell(Fila - 2, column).Style.Fill.SetBackgroundColor(colorded); - Titlecell(libro, "", Fila - 2, column, false, false, dedcborderColor); - libro.Cell(Fila - 3, column).Style.Fill.SetBackgroundColor(colorded); - libro.Cell(Fila - 3, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; - libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;"; - Titlecell(libro, dtempleados.SUM("SumaDeducciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)), Fila - 3, column, true, true, dedcborderColor); - //libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaDeducciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); - } //column++; //libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166)); //libro.Cell(Fila, column).Value = erow["SumaEspecie"]; @@ -5352,25 +5445,43 @@ public partial class Nomina_Nomina2 : ClsPaginas libro.Cell(Fila - 3, column).Value = dtempleados.SUM("Total", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); } - //foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'O' AND EsPadre = 1 ").Rows) - //{ - // column++; - // string Concepto = string.Format("V_{0}", row["CveConcepto"]); - // libro.Cell(Fila, column).Value = erow[Concepto]; - - // if (newsubproyecto) - // { - // libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); - // } - //} //column++; - //libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166)); - //libro.Cell(Fila, column).Value = erow["SumaObligaciones"]; - //if (newsubproyecto) - //{ - // libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaObligaciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); - //} + //libro.Cell(Fila, column).Value = ""; + + if (dtConceptos.FiltraParametros("Tipo ='O'").Rows.Count > 0) + { + + foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'O' ").Rows) + { + column++; + string Concepto = string.Format("V_{0}", row["CveConcepto"]); + libro.Cell(Fila, column).Value = erow[Concepto]; + libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\""; + + if (newsubproyecto) + { + libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); + libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;"; + } + } + + column++; + libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(colororange); + Titlecell(libro, erow["SumaObligaciones"], Fila, column, false, false, dedcborderColor); + libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\""; + libro.Cell(Fila, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; + if (newsubproyecto) + { + libro.Cell(Fila - 2, column).Style.Fill.SetBackgroundColor(colororange); + Titlecell(libro, "", Fila - 2, column, false, false, dedcborderColor); + libro.Cell(Fila - 3, column).Style.Fill.SetBackgroundColor(colororange); + libro.Cell(Fila - 3, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; + libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;"; + Titlecell(libro, dtempleados.SUM("SumaObligaciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)), Fila - 3, column, true, true, dedcborderColor); + //libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaDeducciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); + } + } } libro.Rows(Fila - 2, Fila).Delete(); diff --git a/Scripts/custom.js b/Scripts/custom.js index 87c0f9fff..2527cecf3 100644 --- a/Scripts/custom.js +++ b/Scripts/custom.js @@ -428,7 +428,7 @@ function adssigscrollJSLoad() { let Trowthis = $(this); stylosrow = `${stylosrow} table#${Tid}.adssigscroll tr:nth-child(${numberitem}) { top: ${top}px; }`; - top = top + Trowthis.outerHeight(true); + top = top + (Trowthis.outerHeight(true)-1); numberitem = numberitem + 1; }); } diff --git a/Styles/Custom.css b/Styles/Custom.css index 6387cba6b..c1c4e6959 100644 --- a/Styles/Custom.css +++ b/Styles/Custom.css @@ -183,4 +183,51 @@ float:none; .portlet { margin-bottom :10px; } - \ No newline at end of file + + + +/*Begin ScrollADS V2*/ +/* +.divContainerads { + width: 100%; + max-height: calc(100vh - 260px); + overflow-y: auto; +} + +table.adssigscroll { + min-width: 100%; + background-color: #fff; +} + + table.adssigscroll tbody, table.adssigscroll thead { + background-color: #fff; + } + + table.adssigscroll tr { + background-color: inherit; + } + + table.adssigscroll tr.stickyRow { + position: sticky; + top: 0; + background-color: inherit; + z-index: 4; + } + +.tr_order tr > th::after { + content: "\f0dc"; + font: normal normal normal 14px / 1 FontAwesome; + display: inline-block; + margin-left: 5px; + color: #32A1CF; +} + +.tr_order tr > th.asce::after { + content: "\f0de"; +} + +.tr_order tr > th.desc::after { + content: "\f0dd"; +} +*/ +/*END ScrollADS V2*/ \ No newline at end of file diff --git a/Styles/Estilos2.css b/Styles/Estilos2.css index ec25052b2..c058024a9 100644 --- a/Styles/Estilos2.css +++ b/Styles/Estilos2.css @@ -91,6 +91,7 @@ a.cerrar_sesion:hover { .Titulos { background-color: #DDD; + border-color:#DDD; color:#333; font-size:14px; text-align:center; @@ -350,18 +351,19 @@ div.truncate:hover { width: 1px; height: 3px; } -.Totales -{ - background:rgba(103, 128, 159, 0.65); - color:#FFFFFF; - font-weight:bold; - font-style:normal; - +.Totales { + background: #9cacc1; + border-color: #9cacc1; + color: #FFFFFF; + font-weight: bold; + font-style: normal; } -tr.Totales:hover{ - - background:rgba(103, 128, 159, 0.65) !important; +.Totales td{ + border-color: #9cacc1; +} +tr .Totales:hover { + background: #9cacc1 !important; } a.Totales { @@ -696,3 +698,48 @@ input[type=date] } + +/*Begin ScrollADS V2*/ + +.divContainerads { + width: 100%; + max-height: calc(100vh - 260px); + overflow-y: auto; +} + +table.adssigscroll { + min-width: 100%; + background-color: #fff; +} + + table.adssigscroll tbody, table.adssigscroll thead { + background-color: #fff; + } + + table.adssigscroll tr { + background-color: inherit; + } + + table.adssigscroll tr.stickyRow { + position: sticky; + top: 0; /* Se mantiene pegado en la parte superior */ + background-color: inherit; /* Para que no se superponga con otros elementos */ + z-index: 4; /* Asegura que esté sobre otros elementos */ + } + +.tr_order tr > th::after { + content: "\f0dc"; + font: normal normal normal 14px / 1 FontAwesome; + display: inline-block; + margin-left: 5px; + color: #32A1CF; +} + +.tr_order tr > th.asce::after { + content: "\f0de"; +} + +.tr_order tr > th.desc::after { + content: "\f0dd"; +} +/*END ScrollADS V2*/ \ No newline at end of file From af2d7dc67c44200b4536ae26c586341091c61ca9 Mon Sep 17 00:00:00 2001 From: caudillochon Date: Tue, 25 Mar 2025 08:49:19 -0700 Subject: [PATCH 2/8] -css --- Contabilidad/RepGastosCC.aspx | 40 ----------------------------------- 1 file changed, 40 deletions(-) diff --git a/Contabilidad/RepGastosCC.aspx b/Contabilidad/RepGastosCC.aspx index c62dbfa85..bfb42896f 100644 --- a/Contabilidad/RepGastosCC.aspx +++ b/Contabilidad/RepGastosCC.aspx @@ -82,46 +82,6 @@ } - /*Begin ScrollADS V2*/ - -.divContainerads { - width: 100%; - max-height: calc(100vh - 260px); - overflow-y: auto; -} -table.adssigscroll { - min-width: 100%; - background-color: #fff; -} - table.adssigscroll tbody, table.adssigscroll thead { - background-color: #fff; - } - - table.adssigscroll tr { - background-color: inherit; - } - - table.adssigscroll tr.stickyRow { - position: sticky; - top: 0; /* Se mantiene pegado en la parte superior */ - background-color: inherit; /* Para que no se superponga con otros elementos */ - z-index: 4; /* Asegura que esté sobre otros elementos */ - } -.tr_order tr > th::after { - content: "\f0dc"; - font:normal normal normal 14px / 1 FontAwesome; - display: inline-block; - margin-left: 5px; - color: #32A1CF; -} -.tr_order tr > th.asce::after { - content: "\f0de"; -} - -.tr_order tr > th.desc::after { - content: "\f0dd"; -} - /*END ScrollADS V2*/ table.GvDatos{ From a677d2466e8cf1041f8b3318f61c1e1942f3d58d Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 25 Mar 2025 22:46:20 -0700 Subject: [PATCH 3/8] --Cambios en aplicacion de NC --- App_Code/Modelos.vb | 169 ++++++++----------------------- Ventas/FacturacionGlobal.aspx.vb | 2 +- Ventas/Ventas.aspx.vb | 143 ++++---------------------- 3 files changed, 65 insertions(+), 249 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 069f2c634..53c73fd47 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -849,53 +849,6 @@ Namespace Modelos End If End If - 'SI ES REFACTURACION - 'Dim ObjNC As List(Of Object) = Nothing - 'If ErrorList.Count = 0 Then - ' If NuevaFactura = 1 AndAlso FacturaDevolucion IsNot Nothing Then - - ' ObjNC = GeneraNC(ObjVentas, ObjConta, ObjInventario, ObjContr, FacturaDevolucion, ObjBancos, ObjEventos) - - ' If ObjNC Is Nothing Then - ' ErrorList.Add("No se pudo Cancelar la Factura") - ' End If - - ' 'Esquema viejo, evitamos que aparezca por surtir - ' If ErrorList.Count = 0 Then - ' If Not ObjInventario.ActualizarEsDevolucionVenta(CveVenta, 2) Then - ' ErrorList.Add("No se pudo Cancelar el movimiento de almacen de la Factura") - ' End If - ' End If - - ' End If - 'End If - - 'SI ES amortizacion 3.3 - 'Dim Obj2 As New List(Of Object) - - 'If ErrorList.Count = 0 Then - ' ' cambiar la condicion para saber si hay seleccionado - ' If TieneAnticipo AndAlso Me.CveTipoAmortizacionAnticipo = 2 Then - - ' If TieneAnticipo Then - ' Try - ' 'DESCOMENTAR - ' If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjContr, FacturaDevolucion, ObjBancos, Nothing, Nothing) Then - ' Obj2.Add(FacturaDevolucion) - ' End If - ' Catch ex As Exception - ' ErrorList.Add("No se pudo generarse la nota de crédito de amortización") - ' End Try - - - ' End If - - ' If Obj2 Is Nothing AndAlso Obj2.Count = 0 Then - ' ErrorList.Add("No se pudo generarse la nota de crédito de amortización") - ' End If - ' End If - 'End If - 'MARCA PARA NO SURTIR VENTA DE COTNRATO DE CONSIGNACION DE VENTA | [IPP] : PARCHE If ErrorList.Count = 0 Then If Me.CveVenta > 0 And Me.CveAlmacenExistenciasContrato > 0 And Me.TipoDocto = "Ing" Then @@ -1065,17 +1018,6 @@ Namespace Modelos SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, Me, CvePACEspecial:=CvePAC) - 'NOTA DE CREDITO - REFACTURADA - CASO ESPECIAL, TIMBRADO E IMPRESION - 'If Not IsNothing(Obj2) AndAlso Obj2.Count > 0 Then - ' Dim ofa As Modelos.Factura = CType(Obj2(0), Modelos.Factura) - ' 'asigna el foliofiscal del ingreso que se acaba de timbrar, cuando es amortización de anticipo con NC - ' If TieneAnticipo AndAlso CveTipoAmortizacionAnticipo = 2 Then - ' ofa.Timbre.CFDIRelacionados.UUID.Clear() - ' ofa.Timbre.CFDIRelacionados.UUID.Add(ObjTimbrado.UUID) - ' End If - ' ObjTimbrado.TimbrarFactura(UsuarioActual, ofa) - 'End If - If SeTimbro AndAlso Me.TipoDocto.Contiene("Ing") Then EstatusSMS = EnviarSMSTimbrado(ObjEventos) End If @@ -1085,14 +1027,6 @@ Namespace Modelos End If End If - - 'NOTA DE CREDITO DE REFACTURACION - 'If RefacturacionGeneroNC Then - ' If Not IsNothing(ObjNC) AndAlso ObjNC.Count > 0 Then - ' Dim ofa As Modelos.Factura = CType(ObjNC(0), Modelos.Factura) - ' SeTimbroNC = ObjTimbrado.TimbrarFactura(UsuarioActual, ofa) - ' End If - 'End If End If End If End If @@ -1337,7 +1271,7 @@ Namespace Modelos End Function - Private Shared Function CreaDTFactura() As DataTable + Public Shared Function CreaDTFactura() As DataTable Dim TmpDT As New DataTable TmpDT.Columns.Add("CveVenta", GetType(Integer)) TmpDT.Columns.Add("Consec", GetType(Integer)) @@ -1454,6 +1388,12 @@ Namespace Modelos TmpDT.Columns.Add("CantidadConversion", GetType(Decimal)) TmpDT.Columns("CantidadConversion").DefaultValue = 0 + 'COLUMNAS DE PV.aspx + TmpDT.Columns.Add("PUOriginal", GetType(Decimal)) + TmpDT.Columns.Add("ConsecPSPadre", GetType(Integer)) + TmpDT.Columns.Add("EliminarDB", GetType(Boolean)) + TmpDT.Columns("EliminarDB").DefaultValue = False + Return TmpDT End Function @@ -3111,7 +3051,7 @@ Namespace Modelos Pago.TCPago = DrPago("TipoCambio").ToString().ToDecimal() Pago.AplicaTraslado = False Pago.Referencia = DrPago("Folio").ToString() - Pago.CveVentaAmortizacion = DrPago("CveVenta").ToString().ToEntero() + Pago.CveVentaAmortizacion = DrPago("CveVentaNC").ToString().ToEntero() Pago.TipoPago = DrPago("TipoPago").ToString() Pago.CveClientePago = ObjFactura.CveCliente @@ -3132,11 +3072,10 @@ Namespace Modelos Dim DT As DataTable Dim CvePlantilaPoliza As Integer - Dim PorcentajeAmortizacion As Decimal = 0 - Dim sumaAmorticaciones As Decimal = 0 + Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:

" Dim idCuentaContabilizacion As Integer = 1 - Dim CveCuentaContabilizacion As Integer = 1 + Dim tipoCambio As Decimal Dim CuentasContablesInvalidas As New StringBuilder Dim CuentasContablesInvalidasSIG As New StringBuilder @@ -3764,13 +3703,13 @@ Namespace Modelos End If End If - 'PorcentajeAmortizacion = sumaAmorticaciones / TxtTotal.Text.ToDecimal importeMovimiento = 0 Case 91 'Amortizacion Nota de Credito Dim Contabilizable As Boolean = If(UsuarioActual.CveEmpresa = 119, False, True) - If ValorMultiplicador = -1 Then + 'CANCELACION + If Not ErrorPrepoliza AndAlso ValorMultiplicador = -1 Then Dim TipoCambioNC As Decimal = 1 If ObjFactura.CveMoneda = 2 Then @@ -3785,7 +3724,7 @@ Namespace Modelos End If End If - 'cuando es cancelación + 'CANCELA LA APLICACION DEL PAGO DE LA NC EN LA FACTURA APLICADA If ObjFactura.DtNCVinculadas IsNot Nothing Then For Each row2 As DataRow In ObjFactura.DtNCVinculadas.Rows @@ -3895,76 +3834,54 @@ Namespace Modelos End If End If - Else + + End If + + 'VENTA NUEVA + If Not ErrorPrepoliza AndAlso ValorMultiplicador = 1 AndAlso ObjFactura.CveTipoAmortizacionAnticipo = 4 Then + importeMovimiento = 0 + importeMX = 0 + If ObjFactura.DtAnticiposAplicados IsNot Nothing Then + Dim VentaActual As New ClsPaginas.Venta(ObjFactura, UsuarioActual) + For Each row2 As DataRow In ObjFactura.DtAnticiposAplicados.Rows If row2("CveConceptoContable").ToString().ToEntero = 12 Then - importeMovimiento = row2("Importe").ToString().ToDecimal() - sumaAmorticaciones += importeMovimiento - If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" - CveSubProyectoContabilizar = CveSubProyectoVenta + importeMovimiento = row2("Importe").ToString().ToDecimal If importeMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio, - ConceptoContable, Referencia, Concepto, - CveVenta:=row2("CveVenta").ToString.ToEntero, CveCliente:=ObjFactura.CveCliente, - CveVentaAmortizacion:=ObjFactura.CveVenta, - ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), - CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then - ErrorPrepoliza = True - End If + Dim Pago As New ClsPaginas.VentaPago + Pago.Fecha = Now + Pago.FechaDocumentoRelacionado = row2("Fecha").ToString().ToDateTime() + Pago.ImportePagoVenta = importeMovimiento + Pago.ImportePago = importeMovimiento + Pago.CveIE = row2("CveIE").ToString().ToEntero() + Pago.CveMonedaPago = row2("CveMoneda").ToString().ToEntero() + Pago.TCPago = row2("TipoCambioPago").ToString().ToDecimal() + Pago.AplicaTraslado = False + Pago.Referencia = row2("Folio").ToString() + Pago.CveVentaAmortizacion = row2("CveVenta").ToString().ToEntero() + Pago.TipoPago = "NC" + Pago.CveClientePago = ObjFactura.CveCliente + + ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(VentaActual, Pago, ObjFactura.CvePrePoliza, ObjConta, AplicarConceptoAplicacion:=True) End If End If - 'SI ES PAGO CON DEVOLUCION - If Not ErrorPrepoliza AndAlso ObjFactura.CveTipoAmortizacionAnticipo = 4 Then - If row2("CveConceptoContable").ToString().ToEntero = 277 Then - - importeMovimiento = row2("Importe").ToString().ToDecimal() - importeMX = importeMovimiento * tipoCambio - sumaAmorticaciones += importeMovimiento - - If importeMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio, 150, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=-1, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveClasificacion:=ObjFactura.DtDetalle.MAX("CveClasificacion").ToEntero(), CveSubProyecto:=ObjFactura.CveSubProyecto, Contabilizable:=Contabilizable) Then - ErrorPrepoliza = True - End If - - If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento * -1, importeMX * -1, 277, Referencia, Concepto, CveVenta:=row2("CveVenta").ToString().ToEntero(), CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento * -1, importeMX * -1, 278, Referencia, Concepto, CveVenta:=row2("CveVenta").ToString().ToEntero(), CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then - ErrorPrepoliza = True - End If - Else - ErrorPrepoliza = True - End If - End If - - End If - End If - If ErrorPrepoliza Then Exit For End If - - Next End If - If Not ErrorPrepoliza AndAlso sumaAmorticaciones <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, sumaAmorticaciones, sumaAmorticaciones * tipoCambio, 251, Referencia, Concepto, - CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), - CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then - ErrorPrepoliza = True - Else - ObjFactura.SeGuardoPrePoliza = True - End If - End If - End If + importeMovimiento = 0 + importeMX = 0 Case 4 'Venta Clasificacion @@ -4318,7 +4235,7 @@ Namespace Modelos Pago.TCPago = DrPago("TipoCambio").ToString().ToDecimal() Pago.AplicaTraslado = False Pago.Referencia = DrPago("Folio").ToString() - Pago.CveVentaAmortizacion = -1 + Pago.CveVentaAmortizacion = DrPago("CveVentaNC").ToString().ToEntero() Pago.TipoPago = DrPago("TipoPago").ToString() Pago.CveClientePago = ObjFactura.CveCliente @@ -4370,7 +4287,7 @@ Namespace Modelos Pago.TCPago = DrPago("TipoCambio").ToString().ToDecimal() Pago.AplicaTraslado = False Pago.Referencia = DrPago("Folio").ToString() - Pago.CveVentaAmortizacion = DrPago("CveVenta").ToString().ToEntero() + Pago.CveVentaAmortizacion = DrPago("CveVentaNC").ToString().ToEntero() Pago.TipoPago = DrPago("TipoPago").ToString() Pago.CveClientePago = ObjFactura.CveCliente diff --git a/Ventas/FacturacionGlobal.aspx.vb b/Ventas/FacturacionGlobal.aspx.vb index efb8fb39f..4673a443c 100644 --- a/Ventas/FacturacionGlobal.aspx.vb +++ b/Ventas/FacturacionGlobal.aspx.vb @@ -242,7 +242,7 @@ Partial Class Ventas_FacturacionGlobal Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing Try - Retorno = ObjFactura.EmitirFactura(True) + Retorno = ObjFactura.EmitirFactura(True, Modulo:="FGlobal/GuardarVenta") If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then SbAlert.AppendFormat("{0}", Retorno.Mensajes(Retorno.Mensajes.Count - 1)) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 49fa5e90a..bd1adab56 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -15313,8 +15313,7 @@ Partial Class Ventas Try Dim DT As DataTable Dim CvePlantilaPoliza As Integer - Dim PorcentajeAmortizacion As Decimal = 0 - Dim sumaAmorticaciones As Decimal = 0 + Dim ErrorPrepoliza As Boolean = False Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:

" Dim CveCuentaContabilizacion As Integer = 1 @@ -15891,133 +15890,46 @@ Partial Class Ventas End If End If - 'PorcentajeAmortizacion = sumaAmorticaciones / TxtTotal.Text.ToDecimal importeMovimiento = 0 Case 91 'Amortizacion Nota de Credito Dim Contabilizable As Boolean = If(UsuarioActual.CveEmpresa = 119, False, True) - If ValorMultiplicador = -1 Then - 'cuando es cancelación - For Each row2 As GridViewRow In GvNC.Rows - - If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 91 Then - - importeMovimiento = row2.DataKey("Importe").ToDecimal * ValorMultiplicador - sumaAmorticaciones += importeMovimiento - If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" - - CveSubProyectoContabilizar = CveSubProyectoVenta - - If importeMovimiento <> 0 Then - - Dim CveConceptoPagoNC As Integer = 251 - If ObjFactura.CveMoneda > 1 Then - CveConceptoPagoNC = 301 - End If - - If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimiento, importeMovimiento * tipoCambio, CveConceptoPagoNC, Referencia, Concepto, CveVenta:=row2.DataKey("CveVentaNC").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, importeMovimiento, importeMovimiento * tipoCambio, 91, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=row2.DataKey("CveVentaNC").ToString().ToEntero(), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then - ErrorPrepoliza = True - Exit For - End If - Else - ErrorPrepoliza = True - Exit For - End If - End If - End If - Next - - Else - - 'If DdlTipoAmortizacionAnticipo.SelectedValue <> "4" Then - - 'End If + If Not ErrorPrepoliza AndAlso ValorMultiplicador = 1 Then + Dim VentaRef As New ClsPaginas.Venta(ObjFactura, UsuarioActual) + importeMovimiento = 0 For Each row2 As GridViewRow In GVAnticipos.Rows If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 12 Then If row2.FCCheckBox("Chk" & row2.RowIndex).Checked Then + importeMovimiento = row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal - sumaAmorticaciones += importeMovimiento - If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" - CveSubProyectoContabilizar = CveSubProyectoVenta - If importeMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio, ConceptoContable, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToString().ToEntero(), CveCliente:=row2.DataKey("CveCliente").ToString().ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then - ErrorPrepoliza = True - End If - End If - End If + Dim Pago As New ClsPaginas.VentaPago + Pago.Fecha = Now + Pago.FechaDocumentoRelacionado = row2.DataKey("Fecha").ToString().ToDateTime() + Pago.ImportePagoVenta = importeMovimiento + Pago.ImportePago = importeMovimiento + Pago.CveIE = row2.DataKey("CveIE").ToString().ToEntero() + Pago.CveMonedaPago = row2.DataKey("CveMoneda").ToString().ToEntero() + Pago.TCPago = row2.DataKey("TipoCambioPago").ToString().ToDecimal() + Pago.AplicaTraslado = False + Pago.Referencia = row2.DataKey("Folio").ToString() + Pago.CveVentaAmortizacion = row2.DataKey("CveVenta").ToString().ToEntero() + Pago.TipoPago = "NC" + Pago.CveClientePago = ObjFactura.CveCliente + Pago.Referencia = Referencia - End If - - 'SI ES PAGO CON DEVOLUCION - If DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then - If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 277 Then - - If row2.FCCheckBox("Chk" & row2.RowIndex).Checked Then - importeMovimiento = row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal() * Multiplicador - importeMX = importeMovimiento * tipoCambio - sumaAmorticaciones += importeMovimiento - - If importeMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio, 150, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=-1, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveClasificacion:=ObjFactura.DtDetalle.MAX("CveClasificacion").ToEntero(), CveSubProyecto:=ObjFactura.CveSubProyecto, Contabilizable:=Contabilizable) Then - ErrorPrepoliza = True - End If - - If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento * -1, importeMX * -1, 277, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToString().ToEntero(), CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento * -1, importeMX * -1, 278, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToString().ToEntero(), CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then - ErrorPrepoliza = True - End If - Else - ErrorPrepoliza = True - End If - End If - End If + ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(VentaRef, Pago, ObjFactura.CvePrePoliza, ObjConta, AplicarConceptoAplicacion:=True) End If + End If Next - If ObjFactura.AplicaDevolucion AndAlso ObjFactura.TipoDocto = "RNC" AndAlso CveVentaDevolucion > 0 Then - Dim importeMovimientoDev As Decimal = TxtTotal.Text.ToDecimal - importeMovimientoDev = If(SaldoVentaDevolucion < importeMovimientoDev, SaldoVentaDevolucion, importeMovimientoDev) - - importeMovimiento = importeMovimientoDev * Multiplicador - importeMX = importeMovimiento * tipoCambio - - If importeMovimiento <> 0 Then - If Not ErrorPrepoliza AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio, 150, Referencia, Concepto, CveVenta:=CveVentaDevolucion, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=-1, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveClasificacion:=ObjFactura.DtDetalle.MAX("CveClasificacion").ToEntero(), CveSubProyecto:=ObjFactura.CveSubProyecto, Contabilizable:=Contabilizable) Then - ErrorPrepoliza = True - End If - - If Not ErrorPrepoliza AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento * -1, importeMX * -1, 277, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then - ErrorPrepoliza = True - End If - - If Not ErrorPrepoliza AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento * -1, importeMX * -1, 278, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then - ErrorPrepoliza = True - End If - - If Not ErrorPrepoliza Then - Dim CveConceptoPagoNC As Integer = 251 - If ObjFactura.CveMoneda > 1 Then - CveConceptoPagoNC = 301 - End If - - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimiento, importeMX, CveConceptoPagoNC, Referencia, Concepto, CveVenta:=CveVentaDevolucion, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then - ErrorPrepoliza = True - Else - ViewState("SeGuardoPrePoliza") = True - End If - End If - - End If - End If If UsuarioActual.Empresa.Funcionalidad(344) = "1" AndAlso ObjFactura.TipoDocto = "Egs" Then Dim ListaNC As List(Of Modelos.Factura) = Nothing @@ -16087,19 +15999,6 @@ Partial Class Ventas Next End If End If - If sumaAmorticaciones <> 0 Then - - Dim CveConceptoPagoNC As Integer = 251 - If ObjFactura.CveMoneda > 1 Then - CveConceptoPagoNC = 301 - End If - - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, sumaAmorticaciones, sumaAmorticaciones * tipoCambio, CveConceptoPagoNC, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then - ErrorPrepoliza = True - Else - ViewState("SeGuardoPrePoliza") = True - End If - End If End If importeMovimiento = 0 From 0778b94cc2cfb499bc5c7ab3f0e036418a325bf9 Mon Sep 17 00:00:00 2001 From: caudillochon Date: Wed, 26 Mar 2025 01:29:32 -0700 Subject: [PATCH 4/8] stylos --- Contabilidad/RepGastosCC.aspx | 2 +- Inventarios/KardexAlmacenHorizontal.aspx | 8 ++-- Metronic/assets/admin/layout/css/custom.css | 48 ++++++++++++++++++++- Scripts/custom.js | 6 +-- Styles/Estilos2.css | 6 +-- 5 files changed, 58 insertions(+), 12 deletions(-) diff --git a/Contabilidad/RepGastosCC.aspx b/Contabilidad/RepGastosCC.aspx index bfb42896f..04abfbf84 100644 --- a/Contabilidad/RepGastosCC.aspx +++ b/Contabilidad/RepGastosCC.aspx @@ -176,7 +176,7 @@ + CssClass="table table-striped table-advance table-hover Widthall GvDatos adssigrid-scroll adssigrid-order" data-cols="0" data-rows="1" GridLines="None"> diff --git a/Inventarios/KardexAlmacenHorizontal.aspx b/Inventarios/KardexAlmacenHorizontal.aspx index 2d344c96a..ce6321aff 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx +++ b/Inventarios/KardexAlmacenHorizontal.aspx @@ -165,18 +165,18 @@ table.adssigscroll { background-color: inherit; /* Para que no se superponga con otros elementos */ z-index: 4; /* Asegura que esté sobre otros elementos */ } -.tr_order tr > th::after { +.adssigrid-order tr > th::after { content: "\f0dc"; font:normal normal normal 14px / 1 FontAwesome; display: inline-block; margin-left: 5px; color: #32A1CF; } -.tr_order tr > th.asce::after { +.adssigrid-order tr > th.asce::after { content: "\f0de"; } -.tr_order tr > th.desc::after { +.adssigrid-order tr > th.desc::after { content: "\f0dd"; } /*END ScrollADS V2*/ @@ -353,7 +353,7 @@ table.adssigscroll {
+ DataKeyNames="CvePS" CssClass="adssigrid-scroll adssigrid-order table table-striped table-advance table-hover " data-cols="2" data-rows="2" data-heightmenos="300" GridLines="None" > diff --git a/Metronic/assets/admin/layout/css/custom.css b/Metronic/assets/admin/layout/css/custom.css index f35671cd1..9bbffbc6c 100644 --- a/Metronic/assets/admin/layout/css/custom.css +++ b/Metronic/assets/admin/layout/css/custom.css @@ -3008,4 +3008,50 @@ div.mypaste * { table > tbody > tr.hidetrad { display: none; -} \ No newline at end of file +} + + +/*Begin ScrollADS V2*/ + +.divContainerads { + width: 100%; + max-height: calc(100vh - 260px); + overflow-y: auto; +} + +table.adssigscroll { + min-width: 100%; + background-color: #fff; +} + + table.adssigscroll tbody, table.adssigscroll thead { + background-color: #fff; + } + + table.adssigscroll tr { + background-color: inherit; + } + + table.adssigscroll tr.stickyRow { + position: sticky; + top: 0; /* Se mantiene pegado en la parte superior */ + background-color: inherit; /* Para que no se superponga con otros elementos */ + z-index: 4; /* Asegura que esté sobre otros elementos */ + } + +.adssigrid-order tr > th::after { + content: "\f0dc"; + font: normal normal normal 14px / 1 FontAwesome; + display: inline-block; + margin-left: 5px; + color: #32A1CF; +} + +.adssigrid-order tr > th.asce::after { + content: "\f0de"; +} + +.adssigrid-order tr > th.desc::after { + content: "\f0dd"; +} +/*END ScrollADS V2*/ \ No newline at end of file diff --git a/Scripts/custom.js b/Scripts/custom.js index 2527cecf3..0cc5f1cb7 100644 --- a/Scripts/custom.js +++ b/Scripts/custom.js @@ -403,7 +403,7 @@ setswitch = function () { }; function adssigscrollJSLoad() { - $('table.adssigscrollJS:not(.adssigscroll)').each(function () { + $('table.adssigrid-scroll:not(.adssigscroll)').each(function () { try { let Tthis = $(this); let Tid = Tthis.attr('id'); @@ -474,14 +474,14 @@ table#${Tid}.adssigscroll tr:nth-child(${numberitem}) { top: ${top}px; }`; } catch (err) { - console.log("adssigscrollJS Error:" + err.message); + console.log("adssigrid-scroll Error:" + err.message); } }); } function LoadSortSticky() { - $('body').on('click', 'table.adssigscroll.tr_order tr:not(.tsorterblock) > th ', function (e) { + $('body').on('click', 'table.adssigscroll.adssigrid-order tr:not(.tsorterblock) > th ', function (e) { var tthis = $(this); if (tthis.closest('.NoClick').length == 0 && !($(e.target).is('a,input'))) { diff --git a/Styles/Estilos2.css b/Styles/Estilos2.css index c058024a9..dd3312d8c 100644 --- a/Styles/Estilos2.css +++ b/Styles/Estilos2.css @@ -727,7 +727,7 @@ table.adssigscroll { z-index: 4; /* Asegura que esté sobre otros elementos */ } -.tr_order tr > th::after { +.adssigrid-order tr > th::after { content: "\f0dc"; font: normal normal normal 14px / 1 FontAwesome; display: inline-block; @@ -735,11 +735,11 @@ table.adssigscroll { color: #32A1CF; } -.tr_order tr > th.asce::after { +.adssigrid-order tr > th.asce::after { content: "\f0de"; } -.tr_order tr > th.desc::after { +.adssigrid-order tr > th.desc::after { content: "\f0dd"; } /*END ScrollADS V2*/ \ No newline at end of file From 9d79a181510b0892426b36a4a4dddf44723b1a29 Mon Sep 17 00:00:00 2001 From: caudillochon Date: Wed, 26 Mar 2025 05:59:54 -0700 Subject: [PATCH 5/8] -- --- Styles/Custom.css | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Styles/Custom.css b/Styles/Custom.css index c1c4e6959..f9050704f 100644 --- a/Styles/Custom.css +++ b/Styles/Custom.css @@ -57,7 +57,7 @@ table.adssigscroll { z-index: 4; /* Asegura que esté sobre otros elementos */ } -.tr_order tr > th::after { +.adssigrid-order tr > th::after { content: "\f0dc"; font: normal normal normal 14px / 1 FontAwesome; display: inline-block; @@ -65,11 +65,11 @@ table.adssigscroll { color: #32A1CF; } -.tr_order tr > th.asce::after { +.adssigrid-order tr > th.asce::after { content: "\f0de"; } -.tr_order tr > th.desc::after { +.adssigrid-order tr > th.desc::after { content: "\f0dd"; } /*END ScrollADS V2*/ @@ -214,7 +214,7 @@ table.adssigscroll { z-index: 4; } -.tr_order tr > th::after { +.adssigrid-order tr > th::after { content: "\f0dc"; font: normal normal normal 14px / 1 FontAwesome; display: inline-block; @@ -222,11 +222,11 @@ table.adssigscroll { color: #32A1CF; } -.tr_order tr > th.asce::after { +.adssigrid-order tr > th.asce::after { content: "\f0de"; } -.tr_order tr > th.desc::after { +.adssigrid-order tr > th.desc::after { content: "\f0dd"; } */ From 09767a84cc0bb33d76163b631da7bc7d1894ab84 Mon Sep 17 00:00:00 2001 From: caudillochon Date: Wed, 26 Mar 2025 06:05:30 -0700 Subject: [PATCH 6/8] scroll2 --- Contabilidad/RepGastosCC.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Contabilidad/RepGastosCC.aspx b/Contabilidad/RepGastosCC.aspx index 4df2b6111..46c288faa 100644 --- a/Contabilidad/RepGastosCC.aspx +++ b/Contabilidad/RepGastosCC.aspx @@ -221,7 +221,7 @@ table.adssigscroll { From 261eb6e393ba6bfe45232b1ae0a34be03b73ecc6 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Wed, 26 Mar 2025 08:19:56 -0700 Subject: [PATCH 7/8] Proveedores correcion Tipo Fecha vencimiento correcion, Wish List Ajustes --- App_Code/ClsOC.vb | 6 ++- Compras/Proveedores.aspx | 9 ++-- Inventarios/Kardex.aspx | 77 ++++++++++++++++++++-------------- Inventarios/Kardex.aspx.vb | 33 +++++++++++---- Inventarios/RepAlmacen.aspx.vb | 1 + 5 files changed, 80 insertions(+), 46 deletions(-) diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb index b632cf800..e7b81ca0c 100644 --- a/App_Code/ClsOC.vb +++ b/App_Code/ClsOC.vb @@ -2633,7 +2633,7 @@ Public Class ClsOC End Function - Public Function PendientesCompra(CvePS As Integer, CveSubProyectos As String, CveEmpresa As Integer) As Boolean + Public Function PendientesCompra(CvePS As Integer, CveSubProyectos As String, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_PendientesCompra") @@ -2641,6 +2641,7 @@ Public Class ClsOC .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@CveSubProyectos", SqlDbType.VarChar, 100).Value = CveSubProyectos .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Opcion", SqlDbType.Int).Value = Opcion End With Try @@ -2653,7 +2654,7 @@ Public Class ClsOC Return Retorno End Function - Public Function CancelarPartidaPendiente(CveOrdenCompraDetalle As Integer, NuevaCantidad As Decimal, CveEmpresa As Integer) As Boolean + Public Function CancelarPartidaPendiente(CveOrdenCompraDetalle As Integer, NuevaCantidad As Decimal, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_CancelarPartidaPendiente") @@ -2661,6 +2662,7 @@ Public Class ClsOC .Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = CveOrdenCompraDetalle .Add("@NuevaCantidad", SqlDbType.Decimal).Value = NuevaCantidad .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Opcion", SqlDbType.Int).Value = Opcion End With Try diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx index d15ca089f..ff3731bfc 100644 --- a/Compras/Proveedores.aspx +++ b/Compras/Proveedores.aspx @@ -3288,14 +3288,11 @@
- - - + Fecha Factura Fecha Entrada - - - + +
diff --git a/Inventarios/Kardex.aspx b/Inventarios/Kardex.aspx index 08e58753a..5ac90999b 100644 --- a/Inventarios/Kardex.aspx +++ b/Inventarios/Kardex.aspx @@ -425,42 +425,17 @@
-
+
- + +
-
- -
- - -
- - - -
-
- - - -
- -
- Agregar -
-
- -
-
-
- - - - + +
@@ -497,11 +472,51 @@
+
+ + + +
+ + +
+ + + + +
+ +
+
+ REQ +
+
+ +
+ +
+ +
+
+ + + +
+ +
+ Agregar +
-
+
+ + + + + + diff --git a/Inventarios/Kardex.aspx.vb b/Inventarios/Kardex.aspx.vb index 3f8c5340b..55ae9d92f 100644 --- a/Inventarios/Kardex.aspx.vb +++ b/Inventarios/Kardex.aspx.vb @@ -334,22 +334,34 @@ Partial Class Inventarios_Kardex End Sub - Private Sub CargarOCPendientesCompra() + + Private Sub CargarOCPendientesCompra(Opcion As Integer) ' Opcion1 OC, 2 REQ + + Dim tCveSubProyectos As String = "-1" If ddlAlmacen.SelectedValue <> "" Then Dim tt As String = ddlAlmacen.GetSelectedValues() tCveSubProyectos = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen IN ({tt})").DataColumnToString("CveSubProyecto") End If + Dim ObjOC As New ClsOC - If ObjOC.PendientesCompra(ddlProducto2.SelectedValue.ToEntero, tCveSubProyectos, UsuarioActual.CveEmpresa) Then + If ObjOC.PendientesCompra(ddlProducto2.SelectedValue.ToEntero, tCveSubProyectos, UsuarioActual.CveEmpresa, Opcion:=Opcion) Then + GvOC.DataSource = ObjOC.DtResultados.Copy.FiltraParametros("", "Fecha Desc") - LnkIndicador_OC.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString() - LnkIndicador_OC2.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString() + If Opcion = 1 Then + LnkIndicador_OC.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString() + LnkIndicador_OC2.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString() + ElseIf Opcion = 2 Then + LnkIndicador_REQ.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString().ToDecimal.RoundSQL(2).ToString + End If + End If + ObjOC.Dispose() GvOC.DataBind() UpModalOC.Update() UpOCS.Update() + UpAddWishList.Update() End Sub @@ -463,7 +475,8 @@ Partial Class Inventarios_Kardex End If If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then - CargarOCPendientesCompra() + CargarOCPendientesCompra(1) + CargarOCPendientesCompra(2) CargaPreciosLista(CvePS) DivIndicadorOC.Visible = True DivIndicadorOC2.Visible = True @@ -837,6 +850,11 @@ Partial Class Inventarios_Kardex RegistraScript(String.Format("$('#{0}').modal('show');", "ModalOC")) End Sub + Protected Sub LnkIndicador_REQ_Click(sender As Object, e As EventArgs) + UpModalOC.Update() + RegistraScript(String.Format("$('#{0}').modal('show');", "ModalOC")) + End Sub + Protected Sub LnkCancelarOCDetalle_Click(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow) @@ -848,8 +866,9 @@ Partial Class Inventarios_Kardex End If Dim ObjOC As New ClsOC - If ObjOC.CancelarPartidaPendiente(CveOrdenCompraDetalle, NuevaCantidad, UsuarioActual.CveEmpresa) Then - CargarOCPendientesCompra() + If ObjOC.CancelarPartidaPendiente(CveOrdenCompraDetalle, NuevaCantidad, UsuarioActual.CveEmpresa, GlobalDTAFCaracteristicasOpciones:=1) Then + CargarOCPendientesCompra(1) + CargarOCPendientesCompra(2) Alert("La partida se cancelo correctamente.") End If diff --git a/Inventarios/RepAlmacen.aspx.vb b/Inventarios/RepAlmacen.aspx.vb index ee88947c6..1014abc19 100644 --- a/Inventarios/RepAlmacen.aspx.vb +++ b/Inventarios/RepAlmacen.aspx.vb @@ -58,6 +58,7 @@ Partial Class Inventarios_RepAlmacen If objInv.GetRepAlmacenes(FechaI, FechaF, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, DdlAplicaInventario.SelectedValue.ToEntero, Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, Gpo:=DdlGrupo.SelectedValue.ToEntero) Then + GVAlmacen.DataSource = objInv.DtResultados TmpDT = objInv.DtResultados End If From ce5e276ab48eb6cdd60269871f57c1c510fcfe9a Mon Sep 17 00:00:00 2001 From: rakcsle Date: Wed, 26 Mar 2025 15:27:34 -0700 Subject: [PATCH 8/8] Wish List --- Inventarios/Kardex.aspx | 4 +- Inventarios/Kardex.aspx.vb | 75 ++++++++++++++++++++++++++++++++------ 2 files changed, 65 insertions(+), 14 deletions(-) diff --git a/Inventarios/Kardex.aspx b/Inventarios/Kardex.aspx index 5ac90999b..15f91eb0a 100644 --- a/Inventarios/Kardex.aspx +++ b/Inventarios/Kardex.aspx @@ -488,7 +488,7 @@ REQ
- +
@@ -666,7 +666,7 @@