This commit is contained in:
@@ -7198,11 +7198,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
using (ClsNominas ObjMovt = new ClsNominas())
|
||||
{
|
||||
ObjMovt.GetMovtoPermanenteSaldos(UsuarioActual.CveEmpresa,SRCvePersonal, CcveMovtoPermanente);
|
||||
ObjMovt.GetMovtoPermanenteSaldos(UsuarioActual.CveEmpresa, SRCvePersonal, CcveMovtoPermanente);
|
||||
GVMovtoPermanenteSaldos.DataSource = ObjMovt.DtResultados;
|
||||
GVMovtoPermanenteSaldos.DataBind();
|
||||
}
|
||||
|
||||
|
||||
CargaConcepto();
|
||||
DdlConcepto.SelectedValueExist(cveConcepto);
|
||||
TxtDescripcion.Text = descripcion.ToString();
|
||||
@@ -8796,7 +8796,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
protected void BtnGeneratepdf_Click(object sender, EventArgs e)
|
||||
{
|
||||
byte[] pdf = new byte[1];
|
||||
string nombre = "recibo";
|
||||
string nombre = $"recibos {LtlPeriodoseleccionado.Text}";
|
||||
bool confiniquito = false;
|
||||
int CvePersonal = TxtCvePersonal.Text.ToEntero(); int CvePeriodo = TxtCvePeriodo.Text.ToEntero();
|
||||
if (CvePersonal > 0)
|
||||
@@ -8805,7 +8805,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
nombre = ObjNomina.SerieFolio;
|
||||
nombre = $"{ObjNomina.Codigo}{ObjNomina.Nombre} {ObjNomina.SerieFolio}";
|
||||
|
||||
}
|
||||
if (ObjNomina.GetNom_NominasDetalles(-1, CvePersonal, CvePeriodo, "-1"))
|
||||
@@ -9992,6 +9992,75 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void BtnEfectivaleXLS_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
|
||||
|
||||
var libro = wb.AddWorksheet("Layout");
|
||||
int row = 1;
|
||||
int column = 1;
|
||||
|
||||
libro.Cell(row, column++).Value = "XSUBTOTAL";
|
||||
//libro.Cell(row, column++).Value = "";
|
||||
row = row + 1;
|
||||
column = 1;
|
||||
|
||||
libro.Cell(row, column++).Value = "XCLIENTE";
|
||||
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)
|
||||
{
|
||||
foreach (DataRow dRow in dtempleados.FiltraParametros("CvePersonal > 0").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;
|
||||
}
|
||||
}
|
||||
}
|
||||
libro.Cell(1, 2).Value = subtotal;
|
||||
|
||||
libro.Columns().AdjustToContents(); // Adjust columns to fit content
|
||||
|
||||
System.IO.Stream fs = new System.IO.MemoryStream();
|
||||
wb.SaveAs(fs);
|
||||
fs.Position = 0;
|
||||
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
|
||||
using (System.IO.Stream input = fs)
|
||||
|
||||
{
|
||||
input.CopyTo(memoryStream);
|
||||
}
|
||||
memoryStream.Position = 0;
|
||||
|
||||
Response.Clear();
|
||||
Response.Buffer = true;
|
||||
|
||||
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "ListadePago"));
|
||||
Response.BinaryWrite(memoryStream.ToArray());
|
||||
Response.End();
|
||||
|
||||
|
||||
}
|
||||
protected void BtnModalBancosProcesar_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user