This commit is contained in:
@@ -10005,28 +10005,31 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
libro.Cell(row, column++).Value = "XTIPOPEDIDO";
|
||||
libro.Cell(row, column++).Value = "XNUMERO";
|
||||
libro.Cell(row, column++).Value = "XIMPORTE";
|
||||
//libro.Cell(row, column++).Value = "CLABE";
|
||||
//libro.Cell(row, column++).Value = "Neto";
|
||||
|
||||
int maxxolumn = column;
|
||||
libro.Range(row, 1, row, column - 1).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Range(row, 1, row, column - 1).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
||||
DataRow dcon;
|
||||
decimal subtotal = 0;
|
||||
if (dtempleados != null && dtempleados.Rows.Count > 0 && dtConceptos != null && dtConceptos.Rows.Count > 0 && (dcon = dtConceptos.FiltroPrimero("Tipo ='P' AND Codigo = 'P028' ")) != null)
|
||||
DataTable dt = null;
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
foreach (DataRow dRow in dtempleados.FiltraParametros("CvePersonal > 0").Rows)
|
||||
objnom.GetEfectivaleXLS(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa, -1);
|
||||
dt = objnom.DtResultados;
|
||||
}
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
{
|
||||
|
||||
foreach (DataRow dRow in dt.Rows)
|
||||
{
|
||||
decimal importe = dRow[string.Format("V_{0}", dcon["CveConcepto"])].ToString().ToDecimal();
|
||||
if (importe > 0)
|
||||
{
|
||||
subtotal = subtotal + importe;
|
||||
row++;
|
||||
column = 1;
|
||||
libro.Cell(row, column++).Value = "'103646-1";
|
||||
libro.Cell(row, column++).Value = "'DISPERSION";
|
||||
libro.Cell(row, column++).Value = string.Format("'{0}", dRow["Codigo"]);
|
||||
libro.Cell(row, column++).Value = importe;
|
||||
}
|
||||
decimal importe = dRow["Importe"].ToString().ToDecimal();
|
||||
subtotal = subtotal + importe;
|
||||
row++;
|
||||
column = 1;
|
||||
libro.Cell(row, column++).Value = string.Format("'{0}", dRow["XCLIENTE"]);
|
||||
libro.Cell(row, column++).Value = string.Format("'{0}", dRow["XTIPOPEDIDO"]);
|
||||
libro.Cell(row, column++).Value = string.Format("'{0}", dRow["CodigoDispersionVale"]);
|
||||
libro.Cell(row, column++).Value = importe;
|
||||
}
|
||||
}
|
||||
libro.Cell(1, 2).Value = subtotal;
|
||||
|
||||
Reference in New Issue
Block a user