This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2024-04-02 12:16:16 -07:00
parent 37635a919b
commit 9a62c8ba73
6 changed files with 189 additions and 16 deletions

View File

@@ -1132,6 +1132,7 @@
<asp:ListItem Text="Infonavit(Porcentaje)" Value="5001"></asp:ListItem>
<asp:ListItem Text="Infonavit(Factor Descuento)" Value="5002"></asp:ListItem>
<asp:ListItem Text="Infonavit(Cuota Fija)" Value="5003"></asp:ListItem>
<asp:ListItem Text="Infonavit(Cuota Fija por período)" Value="5004"></asp:ListItem>
</asp:DropDownList>
</div>
</div>

View File

@@ -749,6 +749,16 @@ public partial class Nomina_Nomina2 : ClsPaginas
GvNominas.Columns[CurrentColumn].Visible = true;
CurrentColumn++;
field = (BoundField)GvNominas.Columns[CurrentColumn];
field.HeaderText = "Especie";
field.DataField = "SumaEspecie";
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
GvNominas.Columns[CurrentColumn].ItemStyle.CssClass = " ";
GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = " ";
GvNominas.Columns[CurrentColumn].Visible = (dtempleados.SUM("SumaEspecie") != 0);
CurrentColumn++;
field = (BoundField)GvNominas.Columns[CurrentColumn];
field.HeaderText = "Total";
field.DataField = "Total";
@@ -1118,6 +1128,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
dr["SubProyecto"] = drow["SubProyecto"];
dr["SumaPercepciones"] = dtempleados.SUM("SumaPercepciones", filtrogrupo);
dr["SumaDeducciones"] = dtempleados.SUM("SumaDeducciones", filtrogrupo);
dr["SumaEspecie"] = dtempleados.SUM("SumaEspecie", filtrogrupo);
dr["Total"] = dtempleados.SUM("Total", filtrogrupo);
dr["SumaObligaciones"] = dtempleados.SUM("SumaObligaciones", filtrogrupo);
@@ -1142,6 +1154,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
dr["Departamento"] = drow["Departamento"];
dr["SumaPercepciones"] = dtempleados.SUM("SumaPercepciones", filtrogrupo);
dr["SumaDeducciones"] = dtempleados.SUM("SumaDeducciones", filtrogrupo);
dr["SumaEspecie"] = dtempleados.SUM("SumaEspecie", filtrogrupo);
dr["Total"] = dtempleados.SUM("Total", filtrogrupo);
dr["SumaObligaciones"] = dtempleados.SUM("SumaObligaciones", filtrogrupo);
@@ -1166,6 +1180,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
dr["Turno"] = drow["Turno"];
dr["SumaPercepciones"] = dtempleados.SUM("SumaPercepciones", filtrogrupo);
dr["SumaDeducciones"] = dtempleados.SUM("SumaDeducciones", filtrogrupo);
dr["SumaEspecie"] = dtempleados.SUM("SumaEspecie", filtrogrupo);
dr["Total"] = dtempleados.SUM("Total", filtrogrupo);
dr["SumaObligaciones"] = dtempleados.SUM("SumaObligaciones", filtrogrupo);
@@ -4338,6 +4354,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
SubTotales.EstatusD = -2;
SubTotales.ImporteD = dtPerEmpleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", SRCvePersonal));
NConcepto especie = new NConcepto();
especie.CveConceptoD = 0;
especie.ConceptoD = "Especie";
especie.EstatusD = -3;
especie.ImporteD = dtPerEmpleados.SUM("SumaEspecie", string.Format("CvePersonal = {0}", SRCvePersonal));
NConcepto Totales = new NConcepto();
Totales.CveConceptoD = 0;
Totales.ConceptoD = "Total";
@@ -4345,6 +4367,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
Totales.ImporteD = dtPerEmpleados.SUM("Total", string.Format("CvePersonal = {0}", SRCvePersonal));
lconc.Add(SubTotales);
if (especie.ImporteD > 0)
{
lconc.Add(especie);
}
lconc.Add(Totales);
GvConceptos.DataSource = lconc;
GvConceptos.DataBind();
@@ -4455,6 +4481,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
SubTotales.EstatusD = -2;
SubTotales.ImporteD = dtPerEmpleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", SRCvePersonal));
NConcepto especie = new NConcepto();
especie.CveConceptoD = 0;
especie.ConceptoD = "Especie";
especie.EstatusD = -3;
especie.ImporteD = dtPerEmpleados.SUM("SumaEspecie", string.Format("CvePersonal = {0}", SRCvePersonal));
NConcepto Totales = new NConcepto();
Totales.CveConceptoD = 0;
Totales.ConceptoD = "Total";
@@ -4462,6 +4494,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
Totales.ImporteD = dtPerEmpleados.SUM("Total", string.Format("CvePersonal = {0}", SRCvePersonal));
lconc.Add(SubTotales);
if (especie.ImporteD > 0)
{
lconc.Add(especie);
}
lconc.Add(Totales);
DataTable dtCon = new DataTable();
@@ -4969,6 +5005,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Merge().Value = "Deducciones";
}
column++;
libro.Cell(filainicio + 1, column).Value = " ";
libro.Range(filainicio + 2, column, filainicio + 3, column).Merge().Value = "Despensa";
libro.Column(column).Width = 15;
column++;
libro.Cell(filainicio + 1, column).Value = " ";
libro.Range(filainicio + 2, column, filainicio + 3, column).Merge().Value = "Total";
@@ -5084,7 +5124,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
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"];
if (newsubproyecto)
{
libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaEspecie", 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["Total"];
@@ -5352,7 +5398,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
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"];
if (newsubproyecto)
{
libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaEspecie", 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["Total"];
@@ -5898,8 +5951,51 @@ public partial class Nomina_Nomina2 : ClsPaginas
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", drow2["SumaDeducciones"])); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
paragraphh.ParagraphFormat.Style = styilostrong;
}
}
if(drow2["SumaEspecie"].ToString().ToDecimal()>0)
{
rowx = new GemBox.Document.Tables.TableRow(document);
tconeptos.Rows.Add(rowx);
{
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh);
paragraphh.ParagraphFormat.Style = styilo;
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
paragraphh.ParagraphFormat.Style = styilo;
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
paragraphh.ParagraphFormat.Style = styilo;
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
paragraphh.ParagraphFormat.Style = styilo;
}
{
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh);
paragraphh.ParagraphFormat.Style = styilo;
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, "Especie"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
paragraphh.ParagraphFormat.Style = styilo;
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
paragraphh.ParagraphFormat.Style = styilostrong;
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", drow2["SumaEspecie"])); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
paragraphh.ParagraphFormat.Style = styilostrong;
}
}
{
rowx = new GemBox.Document.Tables.TableRow(document);
@@ -6225,10 +6321,60 @@ public partial class Nomina_Nomina2 : ClsPaginas
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal > 0 AND CveSubProyecto={0}", CveSubProyecto)))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
paragraphh.ParagraphFormat.Style = styilostrong;
}
}
if(dtempleados.SUM("SumaEspecie", string.Format("CvePersonal > 0 AND CveSubProyecto={0}", CveSubProyecto))>0)
{
rowx = new GemBox.Document.Tables.TableRow(document);
tconeptos.Rows.Add(rowx);
{
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh);
paragraphh.ParagraphFormat.Style = styilo;
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
paragraphh.ParagraphFormat.Style = styilo;
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
paragraphh.ParagraphFormat.Style = styilo;
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
paragraphh.ParagraphFormat.Style = styilo;
}
{
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh);
paragraphh.ParagraphFormat.Style = styilostrong;
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, "Especie"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
paragraphh.ParagraphFormat.Style = styilo;
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
paragraphh.ParagraphFormat.Style = styilostrong;
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", dtempleados.SUM("SumaEspecie", string.Format("CvePersonal > 0 AND CveSubProyecto={0}", CveSubProyecto)) )); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
paragraphh.ParagraphFormat.Style = styilostrong;
//SumaEspecie
}
}
//no empleados
{
@@ -6579,7 +6725,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage);
paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", dtempleados.SUM("SumaDeducciones", "CvePersonal > 0 "))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
paragraphh.ParagraphFormat.Style = styilostrong;
//SumaEspecie
}
}
{
@@ -7918,7 +8064,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
SubTotales.ConceptoD = "Total Deducciones";
SubTotales.EstatusD = -2;
SubTotales.ImporteD = dtempleadosSimula.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", SRCvePersonal));
NConcepto especie = new NConcepto();
especie.CveConceptoD = 0;
especie.ConceptoD = "Especie";
especie.EstatusD = -3;
especie.ImporteD = dtempleadosSimula.SUM("SumaEspecie", string.Format("CvePersonal = {0}", SRCvePersonal));
NConcepto Totales = new NConcepto();
Totales.CveConceptoD = 0;
Totales.ConceptoD = "Total";
@@ -7926,6 +8077,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
Totales.ImporteD = dtempleadosSimula.SUM("Total", string.Format("CvePersonal = {0}", SRCvePersonal));
lconc.Add(SubTotales);
if (especie.ImporteD > 0)
{
lconc.Add(especie);
}
lconc.Add(Totales);
DataTable dtCon = new DataTable();