This commit is contained in:
@@ -227,14 +227,13 @@
|
||||
<asp:ListItem Text="Turno" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1">Proyecto: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:Label ID="LblProyecto" CssClass="col-md-1 " runat="server" Text="Proyecto:"></asp:Label>
|
||||
<div runat="server" id="divddlproyeto" class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" CssClass="select2me" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">SubProyecto:</label>
|
||||
<asp:Label ID="LblSubProyeccto" CssClass="col-md-1 " runat="server" Text="SubProyecto:"></asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
@@ -454,7 +453,9 @@
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<div style="width: 70px; text-align: right;">
|
||||
<div style="width: 100px; text-align: right;white-space: nowrap;padding-right: 10px;">
|
||||
<asp:HyperLink ID="HypXml" Visible="false" NavigateUrl="#" runat="server">XML</asp:HyperLink>
|
||||
<asp:HyperLink ID="HypPDF" Visible="false" NavigateUrl="#" runat="server"><i class="fa fa-ad-pdf"></i></asp:HyperLink>
|
||||
<asp:LinkButton runat="server" ID="LnkTimbrar" CssClass="btn btn-circle btn-sm blue mysmallbtn" Text="<i class='fa fa-bell'></i>" OnClick="LnkTimbrar_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea Timbrar?" data-btn-ok-label="si" />
|
||||
<asp:LinkButton runat="server" ID="ImgDelete" CssClass="btn btn-circle btn-sm red mysmallbtn" Text="<i class='icon-trash'></i>" OnClick="ImgDelete_Click" CommandArgument='<%# Eval("CveNomina") %>' Visible='<%# (Eval("CveNomina").ToString() != "" && Eval("SeTimbro").ToString() == "False"? true :false)%>' data-popout="true" data-original-title="¿Está seguro que desea eliminar la nómina?" data-btn-ok-label="si" />
|
||||
<asp:LinkButton runat="server" ID="LnkCancelar" CssClass="btn btn-circle btn-sm red mysmallbtn" Text="<i class='fas fa-ban'></i>" OnClick="LnkCancelar_Click" CommandArgument='<%# Eval("CveNomina") %>' Visible='<%# (Eval("CveNomina").ToString() != "" && PermisoCancelarEmitido && Eval("SeTimbro").ToString() == "True"? true :false)%>' data-popout="true" data-original-title="¿Está seguro que desea cancelar la nómina?" data-btn-ok-label="si" />
|
||||
@@ -2075,6 +2076,10 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<asp:TextBox ID="TxtCvePeriodo" CssClass="TxtCvePeriodo hidden" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCvePersonal" CssClass="TxtCvePersonal hidden" runat="server"></asp:TextBox>
|
||||
<asp:Button ID="BtnGeneratepdf" CssClass="BtnGeneratepdf hidden" OnClick="BtnGeneratepdf_Click" UseSubmitBehavior="false" runat="server" Text="Button" />
|
||||
<asp:Button ID="BtnGenerateXml" CssClass="BtnGenerateXml hidden" OnClick="BtnGenerateXml_Click" UseSubmitBehavior="false" runat="server" Text="Button" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
@@ -2155,7 +2160,18 @@
|
||||
//$('.GvConceptossimulador').append($('#Totalesperdeduccion'));
|
||||
$('.GvConceptossimulador').append($('#trnetoapagar'));
|
||||
}
|
||||
|
||||
function GETPDF(CvePersonal, CvePeriodo) {
|
||||
//alert("CvePeriodo:" + CvePersonal + " ,CvePeriodo:" + CvePeriodo)
|
||||
$('.TxtCvePersonal').val(CvePersonal);
|
||||
$('.TxtCvePeriodo').val(CvePeriodo);
|
||||
$('.BtnGeneratepdf').click();
|
||||
}
|
||||
function GETXML(CvePersonal, CvePeriodo) {
|
||||
//alert("CvePeriodo:" + CvePersonal + " ,CvePeriodo:" + CvePeriodo)
|
||||
$('.TxtCvePersonal').val(CvePersonal);
|
||||
$('.TxtCvePeriodo').val(CvePeriodo);
|
||||
$('.BtnGenerateXml').click();
|
||||
}
|
||||
function ADSReady() {
|
||||
|
||||
setTimeout(function () { FiltrarTablaFreezcol('.TxtBusqueda', '.GvNominas'); }, 250);
|
||||
|
||||
@@ -177,6 +177,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargarCentrosDeCosto(DdlProyecto, null, LblProyecto, LblSubProyeccto);
|
||||
cargaEjercicios();
|
||||
CargaTiposPeriodo();
|
||||
cargaPeriodos();
|
||||
@@ -872,6 +873,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
else
|
||||
{
|
||||
//onclick()
|
||||
e.Row.FCHyperLink("HypPDF").Attributes.Add("onclick", string.Format("GETPDF({0},{1})", cvePersonal, CvePeriodo));
|
||||
e.Row.FCHyperLink("HypXml").Attributes.Add("onclick", string.Format("GETXML({0},{1})", cvePersonal, CvePeriodo));
|
||||
e.Row.FindControl("HypPDF").Visible = true;
|
||||
e.Row.FindControl("HypXml").Visible = true;
|
||||
e.Row.CssClass = "success";
|
||||
}
|
||||
|
||||
@@ -898,6 +904,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
else
|
||||
{
|
||||
|
||||
e.Row.FCHyperLink("HypPDF").Attributes.Add("onclick", string.Format("GETPDF({0},{1})", cvePersonal, CvePeriodo));
|
||||
//e.Row.FindControl("HypPDF").Visible = true;
|
||||
e.Row.CssClass = "SubTotales";
|
||||
}
|
||||
e.Row.FindControl("LnkSobreRecibo").Visible = false;
|
||||
@@ -2285,7 +2293,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (cveSupProyecto != -5 && oldcveSupProyecto != -5) { Fila++; newsubproyectoTitulo = true; }
|
||||
}
|
||||
column = 1;
|
||||
libro.Cell(Fila, column).Value = erow["Codigo"];
|
||||
libro.Cell(Fila, column).Value = string.Format("'{0}", erow["Codigo"]);
|
||||
column++;
|
||||
if (newsubproyectoTitulo) { libro.Cell(Fila - 1, column).Value = subproyecto; }
|
||||
if (newsubproyecto) { libro.Cell(Fila - 3, column).Value = "Total"; }
|
||||
@@ -2318,6 +2326,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
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++;
|
||||
@@ -2340,6 +2352,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
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++;
|
||||
@@ -3976,7 +3992,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
bool continuar = true;
|
||||
string[] getcolumnas = new string[] { "CvePersonal", "CveMetodoPago", "SumaPercepciones", "Total", "SalarioDiario", "SalarioDiarioIMSS", "SalarioDiarioIntegrado", "DiasLaborados", "DiasFaltados", "DiasVacaciones", "DiasIncapacidad" };
|
||||
|
||||
|
||||
DataTable dtr = dtempleados.FiltraParametros(string.Format("(CvePersonal={0} OR {0}=-1) AND CvePersonal > 0 AND NomAutorizado =0", FiltroCvePersonal), "", getcolumnas);
|
||||
DataTable dtconp = null;
|
||||
int CvePeriodoSeleccionado = DdlPeriodo.SelectedValue.ToEntero();//cambiar reparar
|
||||
@@ -4876,4 +4892,89 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void BtnGeneratepdf_Click(object sender, EventArgs e)
|
||||
{
|
||||
byte[] pdf = new byte[1];
|
||||
string nombre = "recibo";
|
||||
int CvePersonal = TxtCvePersonal.Text.ToEntero(); int CvePeriodo = TxtCvePeriodo.Text.ToEntero();
|
||||
if (CvePersonal > 0)
|
||||
{
|
||||
using (ClsNominas ObjNomina = new ClsNominas())
|
||||
{
|
||||
if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
nombre = ObjNomina.SerieFolio;
|
||||
|
||||
}
|
||||
}
|
||||
pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta);
|
||||
}
|
||||
else
|
||||
{
|
||||
byte[] pdf2 = new byte[1];
|
||||
bool notfirst = false;
|
||||
foreach (DataRow dr in dtempleados.Rows)
|
||||
{
|
||||
if (notfirst)
|
||||
{
|
||||
|
||||
pdf2 = GeneraPDFNomina(dr["CvePersonal"].ToString().ToEntero(), CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta);
|
||||
byte[] newByteArray2 = pdf.Concat(pdf2).ToArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
pdf = GeneraPDFNomina(dr["CvePersonal"].ToString().ToEntero(), CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta);
|
||||
}
|
||||
notfirst = true;
|
||||
}
|
||||
}
|
||||
ImprimirbytesPDF(pdf, nombre);
|
||||
|
||||
}
|
||||
|
||||
protected void BtnGenerateXml_Click(object sender, EventArgs e)
|
||||
{
|
||||
string Ruta = "";
|
||||
string PathXML = "";
|
||||
using (ClsNominas ObjNomina = new ClsNominas())
|
||||
{
|
||||
if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
Ruta = $@"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{UsuarioActual.CveEmpresa}\";
|
||||
PathXML = $@"{Ruta}XML\Nomina\{ObjNomina.SerieFolio}.xml";
|
||||
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML))
|
||||
{
|
||||
System.IO.FileInfo file = new System.IO.FileInfo(PathXML);
|
||||
string mimeType = "text/plain";
|
||||
try
|
||||
{
|
||||
mimeType = MimeMapping.GetMimeMapping(PathXML);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
// Response.Write(path)
|
||||
Response.Clear();
|
||||
Response.ClearHeaders();
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(file.Name)}");
|
||||
Response.AddHeader("Content-Length", file.Length.ToString());
|
||||
Response.ContentType = mimeType;
|
||||
Response.Flush();
|
||||
Response.TransmitFile(file.FullName);
|
||||
Response.End();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
441
Nomina/ReportedeAcumulados.aspx
Normal file
441
Nomina/ReportedeAcumulados.aspx
Normal file
@@ -0,0 +1,441 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ReportedeAcumulados.aspx.cs" Inherits="Nomina_ReportedeAcumulados" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
@media (min-width: 992px) {
|
||||
.mediocol {
|
||||
width: 4.15%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.GvConceptos tr td a {
|
||||
color: #5b9bd1;
|
||||
}
|
||||
|
||||
.txtgridsimula {
|
||||
width: 100% !important;
|
||||
min-width: 60px;
|
||||
max-width: 80px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
a.sline {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
td.cellFail {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.addropzone {
|
||||
min-height: 130px;
|
||||
}
|
||||
|
||||
span.font-black {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.TotalWhite {
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
|
||||
.isOnlyVisible {
|
||||
color: #666;
|
||||
/*text-decoration: line-through;*/
|
||||
}
|
||||
|
||||
.isOnlyBisibleP td:nth-child(1) {
|
||||
/*text-decoration: line-through;*/
|
||||
}
|
||||
|
||||
.isOnlyBisibleD td:nth-last-child(3) {
|
||||
/*text-decoration: line-through;*/
|
||||
}
|
||||
|
||||
.isEditedP td:nth-child(-n+3) {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.isEditedD td:nth-last-child(-n+3) {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.isOnlyBisibleP td:nth-child(-n+3) {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.isOnlyBisibleD td:nth-last-child(-n+3) {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.isOnlyBisibleP td:nth-child(-n+3) a {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.isOnlyBisibleD td:nth-last-child(-n+3) a {
|
||||
color: #999;
|
||||
}
|
||||
.isOnlyBisibleO td:nth-last-child(-n+3) a {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.GvConceptos {
|
||||
border: 1px solid #E87E04;
|
||||
}
|
||||
|
||||
.ddlInfolabel {
|
||||
font-size: 13px;
|
||||
color: #888888;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
table.GvConceptos td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.GvConceptos.table > tbody > tr > th {
|
||||
border-top: 1px solid #E87E04;
|
||||
color: #fff;
|
||||
font-size: 15px;
|
||||
background-color: #E87E04;
|
||||
}
|
||||
|
||||
.GvConceptos.table > tbody > tr.thTituloConcepto > th:nth-child(1),
|
||||
.GvConceptos.table > tbody > tr:not(.thTituloConcepto) > th:nth-child(3),
|
||||
.GvConceptos.table > tbody > tr > td:nth-child(3) {
|
||||
border-right: 1px solid #E87E04;
|
||||
}
|
||||
|
||||
.dtosEmpleado {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.dtosEmpleado a {
|
||||
color: #2196f3;
|
||||
}
|
||||
|
||||
.dtosEmpleado .row {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.GvConceptos.table > tbody > tr > td span {
|
||||
display: block;
|
||||
min-height: 12px;
|
||||
}
|
||||
|
||||
.GvConceptos.table > tbody > tr.ConceptosTotales {
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkFormatoTabular" OnClick="LnkFormatoTabular_Click" CssClass="" runat="server"><i class="fa fa-ad-excel"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1">Ejercicio: </label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicios" runat="server" Style="width: 100% !important;" CssClass="select2me" DataValueField="Ejercicio" DataTextField="Ejercicio"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Tipo Período:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" CssClass="select2me" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Style="width: 100% !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 mediocol">del:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:TextBox ID="TxtPeriodoInicio" Text="0" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
<label class="col-md-1 mediocol">al:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:TextBox ID="TxtPeriodoFin" Text="99" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" Text="Consultar" Visible="true" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Agrupador:</label>
|
||||
<div class="col-md-1">
|
||||
|
||||
<asp:DropDownList ID="DdlAgrupadorB" runat="server" Style="width: 100% !important;" CssClass="select2me">
|
||||
<asp:ListItem Text="Sin Agrupación" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Centro de costos" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Departamento" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Turno:</label>
|
||||
<div class="col-md-2" style="width: 110px !important;">
|
||||
<asp:DropDownList ID="DdlTurno" runat="server" AppendDataBoundItems="true" CssClass="select2me" DataTextField="Turno" DataValueField="CveTurno" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList></td>
|
||||
</div>
|
||||
<asp:Label ID="LblFechaPago" runat="server" Visible="false" CssClass="col-md-1 ">Fecha Pago:</asp:Label>
|
||||
<div class="col-md-1" id="DivFechaPago" runat="server" visible="false">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtFechaPago" runat="server" CssClass="form-control" CausesValidation="true" Width="100%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaPago" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="TxtFechaPago" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="TxtFechaPago" Display="None" ErrorMessage="El campo <b>''Fecha Pago''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="TxtFechaPago" Display="None" ErrorMessage="El campo <b>''Fecha Pago''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
|
||||
<label class="col-md-1 " style="line-height: 1;">Régimen:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlRegimenContratacion" runat="server" Style="width: 100% !important;" CssClass="select2me">
|
||||
<asp:ListItem Text="Asalariados" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Asimilados" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Todos" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<asp:Label ID="LblProyecto" CssClass="col-md-1 " runat="server" Text="Proyecto:"></asp:Label>
|
||||
<div runat="server" id="divddlproyeto" class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" CssClass="select2me" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label ID="LblSubProyeccto" CssClass="col-md-1 " runat="server" Text="SubProyecto:"></asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:ListBox ID="DdlSubProyecto" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
<%--<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>--%>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" AutoPostBack="True">
|
||||
<ajax:TabPanel ID="TabNominas" runat="server" HeaderText="Acumulados nómina">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet light xspadding bordered " id="pnldl">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Acumulados nómina</span>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<asp:TextBox CssClass="TxtBusqueda form-control input-sm" runat="server" onkeyup="FiltrarTablaFreezcol('.TxtBusqueda','.GvNominas')" Style="display: inline-block; margin-right: -20px; width: 150px;"></asp:TextBox>
|
||||
<a href="javascript:;" onclick="FiltrarTablaFreezcol('.TxtBusqueda','.GvNominas')" style="margin-top: -3px;" class="btn btn-circle btn-sm font-bold yellow-gold"><i class="icon-magnifier" style="font-weight: bold;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
<asp:GridView ID="GvNominas" runat="server" DataKeyNames="CvePersonal,Nombre,Codigo,Turno,Departamento,SubProyecto" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound"
|
||||
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvNominas" Style="text-align: center;" GridLines="None" data-cols="2" data-rows="2" data-heighterror="360">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate></HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="20px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Nombre</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="300px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<div style="width: 70px; text-align: right;">
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos"></HeaderStyle>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno"></AlternatingRowStyle>
|
||||
<RowStyle CssClass="Texto"></RowStyle>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
730
Nomina/ReportedeAcumulados.aspx.cs
Normal file
730
Nomina/ReportedeAcumulados.aspx.cs
Normal file
@@ -0,0 +1,730 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
|
||||
public partial class Nomina_ReportedeAcumulados : ClsPaginas
|
||||
{
|
||||
#region Propiedades
|
||||
private int FilaConceptos
|
||||
{
|
||||
get { return 5; }
|
||||
}
|
||||
|
||||
private DataTable dtConceptos
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["dtConceptos"] == null) { return null; }
|
||||
else { return (DataTable)ViewState["dtConceptos"]; }
|
||||
}
|
||||
|
||||
set { ViewState["dtConceptos"] = value; }
|
||||
}
|
||||
|
||||
private DataTable dtempleados
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["dtempleados"] == null) { return null; }
|
||||
else { return (DataTable)ViewState["dtempleados"]; }
|
||||
}
|
||||
|
||||
set { ViewState["dtempleados"] = value; }
|
||||
}
|
||||
|
||||
protected int FiltCveProyecto
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["FiltCveProyecto"] == null) { return 0; }
|
||||
else { return ViewState["FiltCveProyecto"].ToString().ToEntero(); }
|
||||
}
|
||||
|
||||
set { ViewState["FiltCveProyecto"] = value; }
|
||||
}
|
||||
protected int FiltCveSubProyecto
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["FiltCveSubProyecto"] == null) { return 0; }
|
||||
else { return ViewState["FiltCveSubProyecto"].ToString().ToEntero(); }
|
||||
}
|
||||
|
||||
set { ViewState["FiltCveSubProyecto"] = value; }
|
||||
}
|
||||
protected int FiltCveTurno
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["FiltCveTurno"] == null) { return 0; }
|
||||
else { return ViewState["FiltCveTurno"].ToString().ToEntero(); }
|
||||
}
|
||||
|
||||
set { ViewState["FiltCveTurno"] = value; }
|
||||
}
|
||||
protected int FiltCvePeriodoI
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["FiltCvePeriodoI"] == null) { return 0; }
|
||||
else { return ViewState["FiltCvePeriodoI"].ToString().ToEntero(); }
|
||||
}
|
||||
|
||||
set { ViewState["FiltCvePeriodoI"] = value; }
|
||||
}
|
||||
protected int FiltCvePeriodoF
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["FiltCvePeriodoF"] == null) { return 0; }
|
||||
else { return ViewState["FiltCvePeriodoF"].ToString().ToEntero(); }
|
||||
}
|
||||
|
||||
set { ViewState["FiltCvePeriodoF"] = value; }
|
||||
}
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
cargaEjercicios();
|
||||
CargaTiposPeriodo();
|
||||
CargarCentrosDeCosto(DdlProyecto,null,LblProyecto,LblSubProyeccto,"");//DdlSubProyecto
|
||||
divddlproyeto.Visible = DdlProyecto.Visible;
|
||||
//CargarCentrosDeCosto(DdlProyecto As DropDownList, DdlSubProyecto As DropDownList, LthProyectoP As Label, LblSubProyecto As Label, Optional AplicaTodos As String = "Todos", Optional DdlSubProyectoMultiple As ListBox = Nothing)
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
FiltCveProyecto = DdlProyecto.SelectedValue.ToEntero();
|
||||
FiltCveSubProyecto = -1;
|
||||
FiltCveTurno = DdlTurno.SelectedValue.ToEntero();
|
||||
FiltCvePeriodoI = TxtPeriodoInicio.Text.ToEntero();
|
||||
FiltCvePeriodoF = TxtPeriodoFin.Text.ToEntero();
|
||||
cargaDatos();
|
||||
}
|
||||
|
||||
private void cargaEjercicios()
|
||||
{
|
||||
int EjercicioActual = UsuarioActual.Empresa.EjercicioActual;
|
||||
if (EjercicioActual == 0)
|
||||
{
|
||||
EjercicioActual = DateTime.Now.Year;
|
||||
}
|
||||
DataTable dtejercicio = null;
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetEjercicios(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
dtejercicio = objnom.DtResultados;
|
||||
}
|
||||
}
|
||||
DdlEjercicios.DataSource = dtejercicio;
|
||||
DdlEjercicios.DataBind();
|
||||
ListItem litem = null;
|
||||
if ((dtejercicio != null) && dtejercicio.Rows.Count > 0)
|
||||
{
|
||||
if (dtejercicio.COUNT("Ejercicio", string.Format("Ejercicio={0}", EjercicioActual)) == 0)
|
||||
{
|
||||
litem = new ListItem(EjercicioActual.ToString(), EjercicioActual.ToString());
|
||||
DdlEjercicios.Items.Insert(0, litem);
|
||||
}
|
||||
if (dtejercicio.COUNT("Ejercicio", string.Format("Ejercicio={0}", (EjercicioActual - 1))) == 0)
|
||||
{
|
||||
litem = new ListItem((EjercicioActual - 1).ToString(), (EjercicioActual - 1).ToString());
|
||||
DdlEjercicios.Items.Insert(1, litem);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
litem = new ListItem(EjercicioActual.ToString(), EjercicioActual.ToString());
|
||||
DdlEjercicios.Items.Insert(0, litem);
|
||||
litem = new ListItem((EjercicioActual - 1).ToString(), (EjercicioActual - 1).ToString());
|
||||
DdlEjercicios.Items.Insert(0, litem);
|
||||
|
||||
}
|
||||
if (DdlEjercicios.Items.Count > 0)
|
||||
{
|
||||
DdlEjercicios.SelectedIndex = 0;
|
||||
}
|
||||
DdlEjercicios.SelectedValueExist(DateTime.Now.Year.ToString());
|
||||
}
|
||||
private void CargaTiposPeriodo()
|
||||
{
|
||||
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo.FiltraParametros("Estatus = 'Activo'");
|
||||
DdlTipoPeriodo.DataBind();
|
||||
DdlTipoPeriodo.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
if (DdlTipoPeriodo.Items.Count > 0)
|
||||
{
|
||||
DdlTipoPeriodo.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void cargaDatos()
|
||||
{
|
||||
int CveEmpresa = UsuarioActual.CveEmpresa;
|
||||
int Ejercicio = DdlEjercicios.SelectedValue.ToEntero();
|
||||
bool continuar = false;
|
||||
dtempleados = null;
|
||||
dtConceptos = null;
|
||||
DataTable dtPeriodo = new DataTable();
|
||||
DataTable dtasistencia = new DataTable();
|
||||
|
||||
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetNominaAcumulado(Ejercicio, FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodoI, FiltCvePeriodoF, CveEmpresa, DdlRegimenContratacion.SelectedValue.ToEntero()) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
{
|
||||
dtempleados = objnom.DTSetResultados.Tables[1];
|
||||
dtConceptos = objnom.DTSetResultados.Tables[0];
|
||||
continuar = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region CargaGrid
|
||||
if (continuar)
|
||||
{
|
||||
|
||||
string ctipo = "P";
|
||||
|
||||
int CurrentColumn = 2;
|
||||
BoundField bf;
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
int SoloVisible = row["SoloVisible"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.BackColor = System.Drawing.Color.Transparent;
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.CssClass = " ";
|
||||
GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = " ";
|
||||
if (SoloVisible == 1)
|
||||
{
|
||||
|
||||
GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = "isOnlyVisible ";
|
||||
}
|
||||
GvNominas.Columns[CurrentColumn].Visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) != 0);
|
||||
bf = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
bf.DataField = string.Format("V_{0}", CveConcepto);
|
||||
bf.HeaderText = Concepto;
|
||||
if (GvNominas.Columns[CurrentColumn].Visible)
|
||||
{
|
||||
CurrentColumn++;
|
||||
}
|
||||
}
|
||||
if (true)
|
||||
{
|
||||
BoundField field = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
|
||||
field.HeaderText = "Percepciones";
|
||||
field.DataField = "SumaPercepciones";
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns[CurrentColumn].Visible = true;
|
||||
CurrentColumn++;
|
||||
}
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
int SoloVisible = row["SoloVisible"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.BackColor = System.Drawing.Color.Transparent;
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.CssClass = " ";
|
||||
GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = " ";
|
||||
if (SoloVisible == 1)
|
||||
{
|
||||
GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = "isOnlyVisible ";
|
||||
}
|
||||
GvNominas.Columns[CurrentColumn].Visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) != 0);
|
||||
bf = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
bf.DataField = string.Format("V_{0}", CveConcepto);
|
||||
bf.HeaderText = Concepto;
|
||||
if (GvNominas.Columns[CurrentColumn].Visible)
|
||||
{
|
||||
CurrentColumn++;
|
||||
}
|
||||
}
|
||||
|
||||
if (true)
|
||||
{
|
||||
BoundField field = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
field.HeaderText = "Deducciones";
|
||||
field.DataField = "SumaDeducciones";
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.CssClass = " ";
|
||||
GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = " ";
|
||||
GvNominas.Columns[CurrentColumn].Visible = true;
|
||||
CurrentColumn++;
|
||||
|
||||
field = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
field.HeaderText = "Total";
|
||||
field.DataField = "Total";
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.DarkGray;
|
||||
field.ItemStyle.CssClass = "TotalWhite";
|
||||
field.HeaderStyle.CssClass = "TotalWhite";
|
||||
|
||||
GvNominas.Columns[CurrentColumn].Visible = true;
|
||||
CurrentColumn++;
|
||||
}
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('O') AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
int SoloVisible = row["SoloVisible"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.BackColor = System.Drawing.Color.Transparent;
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.CssClass = " ";
|
||||
GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = " ";
|
||||
if (SoloVisible == 1)
|
||||
{
|
||||
GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = "isOnlyVisible ";
|
||||
}
|
||||
GvNominas.Columns[CurrentColumn].Visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) != 0);
|
||||
bf = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
bf.DataField = string.Format("V_{0}", CveConcepto);
|
||||
bf.HeaderText = Concepto;
|
||||
|
||||
if (GvNominas.Columns[CurrentColumn].Visible)
|
||||
{
|
||||
CurrentColumn++;
|
||||
}
|
||||
}
|
||||
if (true)
|
||||
{
|
||||
BoundField field = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
field.HeaderText = "Obligaciones";
|
||||
field.DataField = "SumaObligaciones";
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.CssClass = " ";
|
||||
GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = " ";
|
||||
GvNominas.Columns[CurrentColumn].Visible = true;
|
||||
CurrentColumn++;
|
||||
}
|
||||
for (int i = CurrentColumn; i < 102; i++)
|
||||
{
|
||||
bf = (BoundField)GvNominas.Columns[i];
|
||||
bf.DataField = "";
|
||||
bf.HeaderText = "";
|
||||
GvNominas.Columns[i].ItemStyle.BackColor = System.Drawing.Color.Transparent;
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.CssClass = " ";
|
||||
GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = " ";
|
||||
GvNominas.Columns[i].Visible = false;
|
||||
|
||||
}
|
||||
bool tr = false;
|
||||
setGVNominas();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
GvNominas.DataSource = null;
|
||||
GvNominas.DataBind();
|
||||
}
|
||||
#endregion
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
private void setGVNominas()
|
||||
{
|
||||
string filtrogrupo = "";
|
||||
DataTable dt = dtempleados.Copy();
|
||||
if (DdlAgrupadorB.SelectedValue == "1")
|
||||
{
|
||||
foreach (DataRow drow in dtempleados.FiltraParametros("CvePersonal > 0", "", new string[] { "CveSubProyecto", "SubProyecto" }).Rows)
|
||||
{
|
||||
DataRow dr = dt.NewRow();
|
||||
filtrogrupo = (drow["CveSubProyecto"] == DBNull.Value ? "CveSubProyecto IS NULL AND CvePersonal>0 " : string.Format("CveSubProyecto = {0} AND CvePersonal>0", drow["CveSubProyecto"]));
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("EsPadre = 1 ").Rows)
|
||||
{
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
dr[string.Format("V_{0}", CveConcepto)] = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), filtrogrupo);
|
||||
}
|
||||
dr["CveSubProyecto"] = drow["CveSubProyecto"];
|
||||
dr["SubProyecto"] = drow["SubProyecto"];
|
||||
dr["SumaPercepciones"] = dtempleados.SUM("SumaPercepciones", filtrogrupo);
|
||||
dr["SumaDeducciones"] = dtempleados.SUM("SumaDeducciones", filtrogrupo);
|
||||
dr["Total"] = dtempleados.SUM("Total", filtrogrupo);
|
||||
dr["SumaObligaciones"] = dtempleados.SUM("SumaObligaciones", filtrogrupo);
|
||||
|
||||
dt.Rows.Add(dr);
|
||||
}
|
||||
dt.AcceptChanges();
|
||||
dt = dt.FiltraParametros("", "CveSubProyecto,SubProyecto,Codigo,Nombre");
|
||||
}
|
||||
if (DdlAgrupadorB.SelectedValue == "2")
|
||||
{
|
||||
|
||||
foreach (DataRow drow in dtempleados.FiltraParametros("CvePersonal > 0", "", new string[] { "CveDepartamento", "Departamento" }).Rows)
|
||||
{
|
||||
DataRow dr = dt.NewRow();
|
||||
filtrogrupo = (drow["CveDepartamento"] == DBNull.Value ? "CveDepartamento IS NULL AND CvePersonal>0 " : string.Format("CveDepartamento = {0} AND CvePersonal>0", drow["CveDepartamento"]));
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("EsPadre = 1 ").Rows)
|
||||
{
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
dr[string.Format("V_{0}", CveConcepto)] = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), filtrogrupo);
|
||||
}
|
||||
dr["CveDepartamento"] = drow["CveDepartamento"];
|
||||
dr["Departamento"] = drow["Departamento"];
|
||||
dr["SumaPercepciones"] = dtempleados.SUM("SumaPercepciones", filtrogrupo);
|
||||
dr["SumaDeducciones"] = dtempleados.SUM("SumaDeducciones", filtrogrupo);
|
||||
dr["Total"] = dtempleados.SUM("Total", filtrogrupo);
|
||||
dr["SumaObligaciones"] = dtempleados.SUM("SumaObligaciones", filtrogrupo);
|
||||
|
||||
dt.Rows.Add(dr);
|
||||
}
|
||||
dt.AcceptChanges();
|
||||
dt = dt.FiltraParametros("", "CveDepartamento,Departamento,Codigo,Nombre");
|
||||
}
|
||||
GvNominas.DataSource = dt;
|
||||
GvNominas.DataBind();
|
||||
}
|
||||
|
||||
|
||||
protected void LnkFormatoTabular_Click(object sender, EventArgs e)
|
||||
{
|
||||
FiltCveProyecto = DdlProyecto.SelectedValue.ToEntero();
|
||||
FiltCveSubProyecto = -1;
|
||||
FiltCveTurno = DdlTurno.SelectedValue.ToEntero();
|
||||
FiltCvePeriodoI = TxtPeriodoInicio.Text.ToEntero();
|
||||
FiltCvePeriodoF = TxtPeriodoFin.Text.ToEntero();
|
||||
cargaDatos();
|
||||
if (dtempleados.Rows.Count > 0)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
|
||||
var libro = wb.AddWorksheet("Nomina");
|
||||
int column = 1;
|
||||
libro.Cell(1, column).Value = " ";
|
||||
libro.Cell(2, column).Value = "Codigo";
|
||||
libro.Cell(3, column).Value = " ";
|
||||
column++;
|
||||
libro.Cell(1, column).Value = " ";
|
||||
libro.Cell(2, column).Value = "Empleado";
|
||||
libro.Cell(3, column).Value = " ";
|
||||
libro.Column(column).Width = 35;
|
||||
|
||||
int iniciotipe = column;
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo ='P' AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
|
||||
column++;
|
||||
libro.Cell(2, column).Value = row["Concepto"].ToString();
|
||||
libro.Cell(3, column).Value = row["Codigo"].ToString();
|
||||
libro.Column(column).Width = 15;
|
||||
if ((dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0))
|
||||
{
|
||||
libro.Column(column).Hide();
|
||||
}
|
||||
|
||||
}
|
||||
column++;
|
||||
libro.Range(2, column, 3, column).Merge().Value = "Percepciones";
|
||||
libro.Column(column).Width = 15;
|
||||
if (iniciotipe < column)
|
||||
{
|
||||
libro.Range(1, iniciotipe + 1, 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
|
||||
libro.Range(1, iniciotipe + 1, 1, column).Merge().Value = "Percepciones";
|
||||
}
|
||||
iniciotipe = column;
|
||||
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'D' AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
column++;
|
||||
libro.Cell(2, column).Value = row["Concepto"].ToString();
|
||||
libro.Cell(3, column).Value = row["Codigo"].ToString();
|
||||
libro.Column(column).Width = 15;
|
||||
if ((dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0))
|
||||
{
|
||||
libro.Column(column).Hide();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
column++;
|
||||
libro.Range(2, column, 3, column).Merge().Value = "Deducciones";
|
||||
libro.Column(column).Width = 15;
|
||||
|
||||
if (iniciotipe < column)
|
||||
{
|
||||
libro.Range(1, iniciotipe + 1, 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
|
||||
libro.Range(1, iniciotipe + 1, 1, column).Merge().Value = "Deducciones";
|
||||
}
|
||||
|
||||
column++;
|
||||
libro.Cell(1, column).Value = " ";
|
||||
libro.Range(2, column, 3, column).Merge().Value = "Total";
|
||||
libro.Column(column).Width = 15;
|
||||
iniciotipe = column;
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'O' AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
column++;
|
||||
libro.Cell(2, column).Value = row["Concepto"].ToString();
|
||||
libro.Cell(3, column).Value = row["Codigo"].ToString();
|
||||
libro.Column(column).Width = 15;
|
||||
if ((dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0))
|
||||
{
|
||||
libro.Column(column).Hide();
|
||||
}
|
||||
|
||||
}
|
||||
column++;
|
||||
libro.Range(2, column, 3, column).Merge().Value = "Obligaciones";
|
||||
libro.Column(column).Width = 15;
|
||||
|
||||
|
||||
if (iniciotipe < column)
|
||||
{
|
||||
libro.Range(1, iniciotipe + 1, 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
|
||||
libro.Range(1, iniciotipe + 1, 1, column).Merge().Value = "Obligaciones";
|
||||
}
|
||||
|
||||
libro.Row(1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Row(2).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Row(3).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Row(1).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(177, 160, 199));
|
||||
libro.Row(2).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
||||
libro.Row(3).Cell(1).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
||||
libro.Row(3).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
||||
|
||||
int Fila = 3;
|
||||
int cveSupProyecto = -5;
|
||||
string subproyecto = "";
|
||||
string subproyectoold = "";
|
||||
int oldcveSupProyecto = -5;
|
||||
bool newsubproyecto = false;
|
||||
bool newsubproyectoTitulo = false;
|
||||
foreach (DataRow erow in dtempleados.FiltraParametros("", "CveSubProyecto").Rows)
|
||||
{
|
||||
Fila++;
|
||||
newsubproyecto = false; newsubproyectoTitulo = false;
|
||||
if (cveSupProyecto != erow["CveSubProyecto"].ToString().ToEntero())
|
||||
{
|
||||
|
||||
if (oldcveSupProyecto != -5) { Fila += 2; newsubproyecto = true; }
|
||||
oldcveSupProyecto = cveSupProyecto;
|
||||
cveSupProyecto = erow["CveSubProyecto"].ToString().ToEntero();
|
||||
subproyecto = erow["SubProyecto"].ToString();
|
||||
if (cveSupProyecto != -5 && oldcveSupProyecto != -5) { Fila++; newsubproyectoTitulo = true; }
|
||||
}
|
||||
column = 1;
|
||||
libro.Cell(Fila, column).Value = string.Format("'{0}",erow["Codigo"]);
|
||||
column++;
|
||||
if (newsubproyecto) { libro.Cell(Fila - 3, column).Value = string.Format("Total {0}", subproyectoold); }
|
||||
if (newsubproyectoTitulo) { libro.Cell(Fila - 1, column).Value = subproyecto; subproyectoold = subproyecto; }
|
||||
libro.Cell(Fila, column).Value = erow["Nombre"];
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'P' 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).Value = erow["SumaPercepciones"];
|
||||
if (newsubproyecto)
|
||||
{
|
||||
libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaPercepciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
}
|
||||
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'D' 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).Value = erow["SumaDeducciones"];
|
||||
if (newsubproyecto)
|
||||
{
|
||||
libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaDeducciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
}
|
||||
|
||||
column++;
|
||||
libro.Cell(Fila, column).Value = erow["Total"];
|
||||
if (newsubproyecto)
|
||||
{
|
||||
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).Value = erow["SumaObligaciones"];
|
||||
if (newsubproyecto)
|
||||
{
|
||||
libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaObligaciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
}
|
||||
if (newsubproyectoTitulo) { libro.Range(Fila - 1, 1, Fila - 1, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(184, 204, 228)); }
|
||||
if (newsubproyecto)
|
||||
{
|
||||
libro.Range(Fila - 3, 1, Fila - 3, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(184, 204, 228));
|
||||
libro.Range(Fila - 3, 3, Fila - 3, column).Style.NumberFormat.Format = "$###,###,##0.00";
|
||||
libro.Range(Fila - 3, 3, Fila - 3, column).DataType = ClosedXML.Excel.XLDataType.Number;
|
||||
}
|
||||
libro.Range(Fila , 3, Fila , column).Style.NumberFormat.Format = "$###,###,##0.00";
|
||||
libro.Range(Fila, 3, Fila, column).DataType = ClosedXML.Excel.XLDataType.Number;
|
||||
|
||||
}
|
||||
|
||||
if (true)
|
||||
{
|
||||
|
||||
Fila++;
|
||||
oldcveSupProyecto = cveSupProyecto; newsubproyecto = true;
|
||||
column = 1;
|
||||
column++;
|
||||
libro.Cell(Fila - 3, column).Value = string.Format("Total {0}", subproyectoold);
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'P' AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
|
||||
column++;
|
||||
libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
|
||||
}
|
||||
|
||||
column++;
|
||||
libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaPercepciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'D' AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
|
||||
column++;
|
||||
libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
}
|
||||
|
||||
column++;
|
||||
libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaDeducciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
|
||||
column++;
|
||||
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)
|
||||
{
|
||||
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
|
||||
column++;
|
||||
libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
}
|
||||
|
||||
column++;
|
||||
libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaObligaciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
|
||||
libro.Range(Fila - 3, 1, Fila - 3, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(184, 204, 228));
|
||||
libro.Range(Fila - 3, 3, Fila - 3, column).Style.NumberFormat.Format = "$###,###,##0.00";
|
||||
libro.Range(Fila - 3, 3, Fila - 3, column).DataType = ClosedXML.Excel.XLDataType.Number;
|
||||
|
||||
libro.Range(Fila, 3, Fila, column).Style.NumberFormat.Format = "$###,###,##0.00";
|
||||
libro.Range(Fila, 3, Fila, column).DataType = ClosedXML.Excel.XLDataType.Number;
|
||||
}
|
||||
libro.Range(4, 1, 4, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
||||
|
||||
|
||||
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", "Acumulados nomina"));
|
||||
Response.BinaryWrite(memoryStream.ToArray());
|
||||
Response.End();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Alert("Ocurrio un error al generar el Formato de nominas" + ex.ToString());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("No se encontraron resultados con los filtros seleccionaddos");
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvNominas_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
Literal LtlNombre = e.Row.FCLiteral("LtlNombre");
|
||||
int cvePersonal = e.Row.DataKey("CvePersonal").ToEntero();
|
||||
string Nombre = e.Row.DataKey("Nombre").ToString();
|
||||
string Codigo = e.Row.DataKey("Codigo").ToString();
|
||||
string Turno = e.Row.DataKey("Turno").ToString();
|
||||
string Departamento = e.Row.DataKey("Departamento").ToString();
|
||||
string SubProyecto = e.Row.DataKey("SubProyecto").ToString();
|
||||
if (cvePersonal > 0)
|
||||
{
|
||||
LtlNombre.Text = String.Format("<a class=\"Texto sline\" href=\"/RH/Personal.aspx?CvePersonal={0}\"><span style=\"display:inline-block;min-width:31px;\">{2}</span> <span style=\"display:inline-block;\">{1}</span></a>", cvePersonal, Nombre, Codigo);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
LtlNombre.Text = "Total General";
|
||||
if (Turno.Length == 0 && SubProyecto.Length > 0)
|
||||
{
|
||||
LtlNombre.Text = String.Format("<b>Centro de costos: {0}<b>", SubProyecto);
|
||||
}
|
||||
else if (Turno.Length > 0)
|
||||
{
|
||||
LtlNombre.Text = String.Format("<b>Turno: {0}<b>", SubProyecto);
|
||||
}
|
||||
else if (Departamento.Length > 0)
|
||||
{
|
||||
LtlNombre.Text = String.Format("<b>Departamento: {0}<b>", Departamento);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
e.Row.CssClass = "SubTotales";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user