This commit is contained in:
@@ -1772,10 +1772,13 @@ Public Class ClsNominas
|
|||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||||
.Add("@cveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@cveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@Limpiar", SqlDbType.Int).Value = Limpiar
|
'.Add("@Limpiar", SqlDbType.Int).Value = Limpiar
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(DTSet)
|
||||||
|
If (DTSet.Tables.Count > 0) Then
|
||||||
|
Data = DTSet.Tables(0)
|
||||||
|
End If
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al obtener el finiquito.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al obtener el finiquito.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
|||||||
@@ -1,20 +1,35 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Finiquito.aspx.vb" Inherits="Nomina_Finiquito" %>
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Finiquito.aspx.cs" Inherits="Nomina_Finiquito" %>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
<style>
|
<style>
|
||||||
.GvConceptos.table > tbody > tr > th {
|
.GvConceptos.table > tbody > tr > th {
|
||||||
border-top: 1px solid #c49f47;
|
border-top: 1px solid #E87E04;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
background-color: #c49f47;
|
background-color: #E87E04;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.portlet > .portlet-title {
|
||||||
|
min-height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.portlet > .portlet-title > .caption {
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 5px 0 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.portlet > .portlet-title > .tools {
|
||||||
|
padding: 5px 0 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
.GvConceptos.table > tbody > tr.thTituloConcepto > th:nth-child(1),
|
.GvConceptos.table > tbody > tr.thTituloConcepto > th:nth-child(1),
|
||||||
.GvConceptos.table > tbody > tr:not(.thTituloConcepto) > th:nth-child(2),
|
.GvConceptos.table > tbody > tr:not(.thTituloConcepto) > th:nth-child(2),
|
||||||
.GvConceptos.table > tbody > tr > td:nth-child(2) {
|
.GvConceptos.table > tbody > tr > td:nth-child(2) {
|
||||||
border-right: 1px solid #c49f47;
|
border-right: 1px solid #E87E04;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dtosEmpleado {
|
.dtosEmpleado {
|
||||||
@@ -73,7 +88,7 @@
|
|||||||
<div class="row ">
|
<div class="row ">
|
||||||
<div class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1">
|
<div class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1">
|
||||||
|
|
||||||
<div class="portlet box yellow smallpadding" id="pnldl">
|
<div class="portlet box yellow-gold smallpadding" id="pnldl">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption ">
|
<div class="caption ">
|
||||||
<i class="icon-pin "></i>
|
<i class="icon-pin "></i>
|
||||||
@@ -121,11 +136,15 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="portlet box yellow smallpadding" id="pnlSobreRecivo">
|
<ajax:TabContainer ID="Tab" runat="server" Width="100%" AutoPostBack="True">
|
||||||
<div class="portlet-title">
|
<ajax:TabPanel ID="TabSobreRecibo" runat="server" HeaderText="Sobre Recibo">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<div class="portlet box yellow-gold smallpadding" id="pnlSobreRecivo">
|
||||||
|
<div class="portlet-title" style="display: none;">
|
||||||
<div class="caption ">
|
<div class="caption ">
|
||||||
<i class="icon-pin "></i>
|
<i class="icon-pin "></i>
|
||||||
<span class="caption-subject bold uppercase">Sobre Recibo</span>
|
<span class="caption-subject bold uppercase ">Sobre Recibo</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||||
@@ -170,6 +189,184 @@
|
|||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
<ajax:TabPanel ID="TabAguinaldo" runat="server" HeaderText="Aguinaldo">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet light xspadding bordered" id="pnlAguinaldo">
|
||||||
|
<div class="portlet-title" style="display: none;">
|
||||||
|
<div class="caption ">
|
||||||
|
<i class="icon-pin font-yellow-gold "></i>
|
||||||
|
<span class="caption-subject bold uppercase font-yellow-gold ">Aguinaldo</span>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body " style="padding: 0px;">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3 ">
|
||||||
|
<div class="indicador2 red">
|
||||||
|
<div class="visual">$</div>
|
||||||
|
<div class="value"> <asp:Label ID="LblAguinaldoCompleto" runat="server" Text="$ ##,###.##"></asp:Label>
|
||||||
|
</div>
|
||||||
|
<div class="details">Aguinaldo ejercicio completo </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="indicador2 red">
|
||||||
|
<div class="visual">$</div>
|
||||||
|
<div class="value"> <asp:Label ID="LblAguinaldo" runat="server" Text="$ ##,###.##"></asp:Label>
|
||||||
|
</div>
|
||||||
|
<div class="details">Aguinaldo </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="indicador2 red">
|
||||||
|
<div class="visual"><i class="fa fa-money"></i></div>
|
||||||
|
<div class="value"> <asp:Label ID="LblAguinaldoPagado" runat="server" Text="$ ##,###.##"></asp:Label>
|
||||||
|
</div>
|
||||||
|
<div class="details">Aguinaldo Pagado</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="indicador2 bluesky">
|
||||||
|
<div class="visual"><i class="fa fa-money"></i></div>
|
||||||
|
<div class="value"> <asp:Label ID="LblAguinaldoporPagar" runat="server" Text="$ ##,###.##"></asp:Label>
|
||||||
|
</div>
|
||||||
|
<div class="details">Aguinaldo por pagar</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3 ">
|
||||||
|
<div class="indicador2 green">
|
||||||
|
<div class="visual"><i class="fa fa-cubes"></i></div>
|
||||||
|
<div class="value"> <asp:Label ID="Label1" runat="server" Text="###"></asp:Label>
|
||||||
|
</div>
|
||||||
|
<div class="details">Dias Ejercicio </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="indicador2 green">
|
||||||
|
<div class="visual"><i class="fa fa-cubes"></i></div>
|
||||||
|
<div class="value"> <asp:Label ID="Label2" runat="server" Text="###"></asp:Label>
|
||||||
|
</div>
|
||||||
|
<div class="details">Dias Laborados </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="indicador2 green">
|
||||||
|
<div class="visual"><i class="fa fa-cubes"></i></div>
|
||||||
|
<div class="value"> <asp:Label ID="Label3" runat="server" Text="###"></asp:Label>
|
||||||
|
</div>
|
||||||
|
<div class="details">Dias pago Aguinaldo</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
<ajax:TabPanel ID="TabVacaciones" runat="server" HeaderText="Vacaciones">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet light xspadding bordered" id="pnlVacaciones">
|
||||||
|
<div class="portlet-title" style="display: none;">
|
||||||
|
<div class="caption ">
|
||||||
|
<i class="icon-pin font-yellow-gold "></i>
|
||||||
|
<span class="caption-subject bold uppercase font-yellow-gold ">Vacaciones</span>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body " style="padding: 0px;">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtAntiguedad" runat="server" CssClass="form-control"></asp:TextBox>
|
||||||
|
<asp:Label runat="server" Text="Antiguedad" AssociatedControlID="TxtAntiguedad"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtdiasVacaciones" runat="server" CssClass="form-control"></asp:TextBox>
|
||||||
|
<asp:Label runat="server" Text="Días Vacaciones(ejercicio)" AssociatedControlID="TxtdiasVacaciones"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtDiasLaborados" runat="server" CssClass="form-control"></asp:TextBox>
|
||||||
|
<asp:Label runat="server" Text="Días Laborados " AssociatedControlID="TxtDiasLaborados"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtDiasProporcion" runat="server" CssClass="form-control"></asp:TextBox>
|
||||||
|
<asp:Label runat="server" Text="Días Proporcional" AssociatedControlID="TxtDiasProporcion"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtVaciones" runat="server" CssClass="form-control"></asp:TextBox>
|
||||||
|
<asp:Label runat="server" Text="Vacaciones" AssociatedControlID="TxtVaciones"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtDiasPago" runat="server" CssClass="form-control"></asp:TextBox>
|
||||||
|
<asp:Label runat="server" Text="Días Pagados" AssociatedControlID="TxtDiasPago"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtDiasPendientes" runat="server" CssClass="form-control"></asp:TextBox>
|
||||||
|
<asp:Label runat="server" Text="Días pendientes " AssociatedControlID="TxtDiasPendientes"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtVacacionesporPagar" runat="server" CssClass="form-control"></asp:TextBox>
|
||||||
|
<asp:Label runat="server" Text="Vacaciones por pagar" AssociatedControlID="TxtVacacionesporPagar"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtPorcentjePrima" runat="server" CssClass="form-control"></asp:TextBox>
|
||||||
|
<asp:Label runat="server" Text="Porcentaje Prima" AssociatedControlID="TxtPrimaPagada"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtPrimaVacacional" runat="server" CssClass="form-control"></asp:TextBox>
|
||||||
|
<asp:Label runat="server" Text="Prima Vacacional" AssociatedControlID="TxtPrimaPagada"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtPrimaPagada" runat="server" CssClass="form-control"></asp:TextBox>
|
||||||
|
<asp:Label runat="server" Text="Prima Vac. Pagada" AssociatedControlID="TxtPrimaPagada"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtPrimaPorPagar" runat="server" CssClass="form-control"></asp:TextBox>
|
||||||
|
<asp:Label runat="server" Text="Prima vac. por Pagar" AssociatedControlID="TxtPrimaPorPagar"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
</ajax:TabContainer>
|
||||||
|
|
||||||
|
|
||||||
<div id="ModalConceptos" class="modal ADS fade " role="dialog">
|
<div id="ModalConceptos" class="modal ADS fade " role="dialog">
|
||||||
|
|
||||||
@@ -227,18 +424,17 @@
|
|||||||
<h4>Debe llenar los siguientes valores para continuar</h4>
|
<h4>Debe llenar los siguientes valores para continuar</h4>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlMotivoBaja" runat="server" AppendDataBoundItems="True" DataTextField="MotivoBaja" DataValueField="CveMotivoBaja" CssClass="form-control select2me" ValidationGroup="GrpGuardar">
|
<asp:DropDownList ID="DdlMotivoBaja" runat="server" AppendDataBoundItems="True" DataTextField="MotivoBaja" DataValueField="CveMotivoBaja" Width="100%"
|
||||||
|
CssClass="form-control select2me" ValidationGroup="GrpGuardar">
|
||||||
<asp:ListItem Selected="True" Text="Sin asignar Motivo de Baja" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Sin asignar Motivo de Baja" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:Label runat="server" Text="Motivo de Baja: " AssociatedControlID="DdlMotivoBaja"></asp:Label>
|
<asp:Label runat="server" Text="Motivo de Baja: " AssociatedControlID="DdlMotivoBaja"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
<div class="">
|
<div class="">
|
||||||
¿es Liquidación?
|
|
||||||
<asp:CheckBox ID="ChkesLiquidacion" CssClass="chksino" Text=" " runat="server" />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6" style="padding-right: 0px">
|
<div class="col-md-6" style="padding-right: 0px">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright" style="width: 120px; display: inline-block">
|
||||||
<asp:TextBox ID="TxtFechaBaja" runat="server" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaBaja" runat="server" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RfvTxtFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" CssClass="help-block errorimput"
|
<asp:RequiredFieldValidator ID="RfvTxtFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" CssClass="help-block errorimput"
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> es necesario "
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> es necesario "
|
||||||
@@ -249,23 +445,24 @@
|
|||||||
<asp:CompareValidator ID="CVFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar" Visible="False"></asp:CompareValidator>
|
<asp:CompareValidator ID="CVFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar" Visible="False"></asp:CompareValidator>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<span class="input-group-btn " style="display: inline-block">
|
||||||
<div class="col-md-6" style="padding-left: 0px">
|
|
||||||
|
|
||||||
<span class="input-group-btn ">
|
|
||||||
<asp:LinkButton ID="ImgFechaBaja" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="ImgFechaBaja" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-6" style="padding-left: 0px">
|
||||||
|
¿es Liquidación?
|
||||||
|
<asp:CheckBox ID="ChkesLiquidacion" CssClass="chksino" Text=" " runat="server" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" AppendDataBoundItems="true" CssClass="form-control select2me" AutoPostBack="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" OnSelectedIndexChanged="DdlTipoPeriodo_SelectedIndexChanged">
|
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="form-control select2me" AutoPostBack="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" OnSelectedIndexChanged="DdlTipoPeriodo_SelectedIndexChanged">
|
||||||
<asp:ListItem Selected="True" Text="Ordinario" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Ordinario" Value="-1"></asp:ListItem>
|
||||||
<asp:ListItem Text="Extraordinario" Value="6"></asp:ListItem>
|
<asp:ListItem Text="Extraordinario" Value="6"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:Label runat="server" Text="Tipo Período: " AssociatedControlID="DdlTipoPeriodo"></asp:Label>
|
<asp:Label runat="server" Text="Tipo Período: " AssociatedControlID="DdlTipoPeriodo"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlPeriodo" runat="server" AppendDataBoundItems="true" CssClass="form-control select2me" DataTextField="NominaEstatus" DataValueField="CvePeriodo">
|
<asp:DropDownList ID="DdlPeriodo" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="form-control select2me" DataTextField="NominaEstatus" DataValueField="CvePeriodo">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:Label runat="server" Text="Período:" AssociatedControlID="DdlPeriodo"></asp:Label>
|
<asp:Label runat="server" Text="Período:" AssociatedControlID="DdlPeriodo"></asp:Label>
|
||||||
|
|||||||
440
Nomina/Finiquito.aspx.cs
Normal file
440
Nomina/Finiquito.aspx.cs
Normal file
@@ -0,0 +1,440 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using Microsoft.VisualBasic;
|
||||||
|
using System.Data;
|
||||||
|
using Extensiones;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
partial class Nomina_Finiquito : ClsPaginas
|
||||||
|
{
|
||||||
|
private class ConceptosPersonal
|
||||||
|
{
|
||||||
|
public ConceptosPersonal()
|
||||||
|
{
|
||||||
|
Concepto = "";
|
||||||
|
ConceptoD = "";
|
||||||
|
CveConcepto = 0;
|
||||||
|
CveConceptoD = 0;
|
||||||
|
Estatus = 0;
|
||||||
|
Estatus = 0;
|
||||||
|
}
|
||||||
|
public string Concepto { get; set; }
|
||||||
|
public int CveConcepto { get; set; }
|
||||||
|
public decimal Importe { get; set; }
|
||||||
|
public int Estatus { get; set; }
|
||||||
|
|
||||||
|
public string ConceptoD { get; set; }
|
||||||
|
public int CveConceptoD { get; set; }
|
||||||
|
public decimal ImporteD { get; set; }
|
||||||
|
public int EstatusD { get; set; }
|
||||||
|
}
|
||||||
|
#region Propiedades
|
||||||
|
private int CvePersonal
|
||||||
|
{
|
||||||
|
get { return ViewState["CvePersonal"] != null ? ViewState["CvePersonal"].ToString().ToEntero() : 0; }
|
||||||
|
set { ViewState["CvePersonal"] = value; }
|
||||||
|
}
|
||||||
|
private int CveTipoPeriodo
|
||||||
|
{
|
||||||
|
get { return ViewState["CveTipoPeriodo"] != null ? ViewState["CveTipoPeriodo"].ToString().ToEntero() : 0; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["CveTipoPeriodo"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private int CvePeriodoFiniquito
|
||||||
|
{
|
||||||
|
get { return ViewState["CvePeriodoFiniquito"] != null ? ViewState["CvePeriodoFiniquito"].ToString().ToEntero() : 0; }
|
||||||
|
set { ViewState["CvePeriodoFiniquito"] = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
private int GCEstatus
|
||||||
|
{
|
||||||
|
get { return ViewState["GCEstatus"] != null ? ViewState["GCEstatus"].ToString().ToEntero() : 0; }
|
||||||
|
set { ViewState["GCEstatus"] = value; }
|
||||||
|
}
|
||||||
|
private int GCCveConcepto
|
||||||
|
{
|
||||||
|
get { return ViewState["GCCveConcepto"] != null ? ViewState["GCCveConcepto"].ToString().ToEntero() : 0; }
|
||||||
|
set { ViewState["GCCveConcepto"] = value; }
|
||||||
|
}
|
||||||
|
private decimal GCImporte
|
||||||
|
{
|
||||||
|
get { return ViewState["GCImporte"] != null ? ViewState["GCImporte"].ToString().ToDecimal() : 0; }
|
||||||
|
set { ViewState["GCImporte"] = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private DataTable DTConceptosPersonal
|
||||||
|
{
|
||||||
|
get { return ViewState["DTConceptosPersonal"] != null ? (DataTable)ViewState["DTConceptosPersonal"] : null; }
|
||||||
|
set { ViewState["DTConceptosPersonal"] = value; }
|
||||||
|
}
|
||||||
|
private DataTable DTConceptos
|
||||||
|
{
|
||||||
|
get { return ViewState["DTConceptos"] != null ? (DataTable)ViewState["DTConceptos"] : null; }
|
||||||
|
set { ViewState["DTConceptos"] = value; }
|
||||||
|
}
|
||||||
|
private bool esLiquidacion
|
||||||
|
{
|
||||||
|
get { return ViewState["esLiquidacion"] != null ? System.Convert.ToBoolean(ViewState["esLiquidacion"]) : false; }
|
||||||
|
set { ViewState["esLiquidacion"] = value; }
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private List<ConceptosPersonal> ConceptsPersonas
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
List<ConceptosPersonal> listaconceptos = new List<ConceptosPersonal>();
|
||||||
|
decimal TotalP = 0;
|
||||||
|
decimal TotalD = 0;
|
||||||
|
if ((!Information.IsNothing(DTConceptosPersonal) && DTConceptosPersonal.Rows.Count > 0))
|
||||||
|
{
|
||||||
|
DataTable dtP = DTConceptosPersonal.FiltraParametros("Tipo=1");
|
||||||
|
DataTable dtD = DTConceptosPersonal.FiltraParametros("Tipo=2");
|
||||||
|
var noP = dtP.Rows.Count;
|
||||||
|
var noD = dtD.Rows.Count;
|
||||||
|
var max = noP > noD ? noP : noD;
|
||||||
|
TotalP = dtP.SUM("Importe").ToString().ToDecimal();
|
||||||
|
TotalD = dtD.SUM("Importe").ToString().ToDecimal();
|
||||||
|
for (int index = 0; index <= max; index++)
|
||||||
|
{
|
||||||
|
ConceptosPersonal obj = new ConceptosPersonal();
|
||||||
|
if (index < noP)
|
||||||
|
{
|
||||||
|
obj.Importe = dtP.Rows[index]["Importe"].ToString().ToDecimal();
|
||||||
|
obj.CveConcepto = dtP.Rows[index]["CveConcepto"].ToString().ToEntero();
|
||||||
|
obj.Concepto = dtP.Rows[index]["Concepto"].ToString();
|
||||||
|
obj.Estatus = dtP.Rows[index]["Estatus"].ToString().ToEntero();
|
||||||
|
}
|
||||||
|
else if (index == noP)
|
||||||
|
{
|
||||||
|
obj.Estatus = -1;
|
||||||
|
obj.Concepto = "Agregar";
|
||||||
|
}
|
||||||
|
if (index < noD)
|
||||||
|
{
|
||||||
|
obj.ImporteD = dtD.Rows[index]["Importe"].ToString().ToDecimal();
|
||||||
|
obj.CveConceptoD = dtD.Rows[index]["CveConcepto"].ToString().ToEntero();
|
||||||
|
obj.ConceptoD = dtD.Rows[index]["Concepto"].ToString();
|
||||||
|
obj.EstatusD = dtD.Rows[index]["Estatus"].ToString().ToEntero();
|
||||||
|
}
|
||||||
|
else if (index == noD)
|
||||||
|
{
|
||||||
|
obj.EstatusD = -1;
|
||||||
|
obj.ConceptoD = "Agregar";
|
||||||
|
}
|
||||||
|
listaconceptos.Add(obj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
listaconceptos.Add(new ConceptosPersonal());
|
||||||
|
|
||||||
|
|
||||||
|
ConceptosPersonal objST = new ConceptosPersonal();
|
||||||
|
objST.Importe = TotalP;
|
||||||
|
objST.CveConcepto = 0;
|
||||||
|
objST.Concepto = "Total Percepciones";
|
||||||
|
objST.Estatus = -2;
|
||||||
|
objST.ImporteD = TotalD;
|
||||||
|
objST.CveConceptoD = 0;
|
||||||
|
objST.ConceptoD = "Total Deducciones";
|
||||||
|
objST.EstatusD = -2;
|
||||||
|
|
||||||
|
listaconceptos.Add(objST);
|
||||||
|
|
||||||
|
ConceptosPersonal objT = new ConceptosPersonal();
|
||||||
|
|
||||||
|
objT.CveConcepto = 0;
|
||||||
|
objT.Concepto = "";
|
||||||
|
objT.Estatus = -3;
|
||||||
|
objT.ImporteD = objST.Importe + objST.ImporteD;
|
||||||
|
objT.CveConceptoD = 0;
|
||||||
|
objT.ConceptoD = "Total";
|
||||||
|
objT.EstatusD = -3;
|
||||||
|
listaconceptos.Add(objT);
|
||||||
|
return listaconceptos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!Page.IsPostBack)
|
||||||
|
{
|
||||||
|
CargaDdlPersonal();
|
||||||
|
CargaMotivoBaja();
|
||||||
|
CvePeriodoFiniquito = 0;
|
||||||
|
if (Request["CvePersonal"] != null && Request["CvePersonal"].ToString().ToEntero() > 0)
|
||||||
|
{
|
||||||
|
CvePersonal = Request["CvePersonal"].ToString().ToEntero();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CvePersonal = -1;
|
||||||
|
}
|
||||||
|
if (!CargaDatosFiniquito())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
RegistraScript("$('#ModalEmpleados').modal();");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CvePersonal > 0 & CvePeriodoFiniquito > 0)
|
||||||
|
{
|
||||||
|
LtlEmpleadoCancelar.Visible = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CargaMotivoBaja()
|
||||||
|
{
|
||||||
|
DdlMotivoBaja.DataSource = GlobalDTMotivoBaja.FiltraParametros("CveEmpresa = " + UsuarioActual.CveEmpresa);
|
||||||
|
DdlMotivoBaja.DataBind();
|
||||||
|
}
|
||||||
|
private void CargaDdlPersonal()
|
||||||
|
{
|
||||||
|
ClsRH ObjPersonal = new ClsRH();
|
||||||
|
if (ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa))
|
||||||
|
{
|
||||||
|
DdlPersonal.DataSource = ObjPersonal.DtResultados;
|
||||||
|
DdlPersonal.DataBind();
|
||||||
|
}
|
||||||
|
ObjPersonal.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool CargaDatosFiniquito()
|
||||||
|
{
|
||||||
|
bool retorno = true;
|
||||||
|
if (CvePersonal > 0)
|
||||||
|
{
|
||||||
|
DdlPersonal.SelectedValueExist(CvePersonal.ToString());
|
||||||
|
string Nombre = "";
|
||||||
|
string FechaBaja = "";
|
||||||
|
string EstatusPersonal = "";
|
||||||
|
CvePeriodoFiniquito = 0;
|
||||||
|
CveTipoPeriodo = 0;
|
||||||
|
esLiquidacion = false;
|
||||||
|
pnlupValoresFiniquito.Visible = false;
|
||||||
|
DdlMotivoBaja.SelectedValue = "-1";
|
||||||
|
using (ClsRH ObjPersonal = new ClsRH())
|
||||||
|
{
|
||||||
|
if (ObjPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
DataRow prow = ObjPersonal.DtResultados.Rows[0];
|
||||||
|
Nombre = prow["Nombre"].ToString();
|
||||||
|
FechaBaja = string.Format("{0:dd/MM/yyyy}", ObjPersonal.FechaBaja);
|
||||||
|
EstatusPersonal = string.Format("{0}", prow["EstatusPersonal"]);
|
||||||
|
CveTipoPeriodo = prow["CveTipoPeriodo"].ToString().ToEntero();
|
||||||
|
}
|
||||||
|
if (ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
DataRow prow = ObjPersonal.DtResultados.Rows[0];
|
||||||
|
CvePeriodoFiniquito = prow["CvePeriodoFiniquito"].ToString().ToEntero();
|
||||||
|
FechaBaja = string.Format("{0:dd/MM/yyyy}", prow["FechaFin"]);
|
||||||
|
DdlMotivoBaja.SelectedValueExist(prow["CveMotivoBaja"].ToString().ToEntero());
|
||||||
|
var stringesliquidacion = prow["esLiquidacion"].ToString();
|
||||||
|
esLiquidacion = (stringesliquidacion == "True" || stringesliquidacion == "1");
|
||||||
|
ChkesLiquidacion.Checked = esLiquidacion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (DdlMotivoBaja.SelectedValue.ToEntero() > 0)
|
||||||
|
LblMotivoBaja.Text = DdlMotivoBaja.SelectedItem.Text;
|
||||||
|
else
|
||||||
|
LblMotivoBaja.Text = "";
|
||||||
|
HypEmpleado.Text = Nombre;
|
||||||
|
HypEmpleado.NavigateUrl = string.Format("/RH/Personal.aspx?CvePersonal={0}", CvePersonal);
|
||||||
|
LblFechaBaja.Text = FechaBaja;
|
||||||
|
LblEstatus.Text = EstatusPersonal;
|
||||||
|
TxtFechaBaja.Text = FechaBaja;
|
||||||
|
DdlTipoPeriodo_SelectedIndexChanged(null, null);
|
||||||
|
LblPerido.Text = DdlPeriodo.SelectedItem.Text;
|
||||||
|
if (CvePeriodoFiniquito <= 0)
|
||||||
|
retorno = false;
|
||||||
|
pnlupValoresFiniquito.Visible = true;
|
||||||
|
using (ClsNominas ObjNom = new ClsNominas())
|
||||||
|
{
|
||||||
|
if (ObjNom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa))
|
||||||
|
{
|
||||||
|
DataRow finrow = ObjNom.DtResultados.Rows[0];
|
||||||
|
TxtAntiguedad.Text = $"{finrow["Antiguedad"]}";
|
||||||
|
TxtdiasVacaciones.Text = $"{finrow["Diasvacaciones"]}";
|
||||||
|
TxtDiasLaborados.Text = $"{finrow["diaslaborados"]}";
|
||||||
|
TxtDiasProporcion.Text = $"{finrow["diasProporcion"]}";
|
||||||
|
|
||||||
|
TxtVaciones.Text = $"{finrow["Vacaciones"]}";
|
||||||
|
TxtDiasPago.Text = $"{finrow["Diasvacaciones"]}";
|
||||||
|
TxtDiasPendientes.Text = $"{finrow["diasporpagar"]}";
|
||||||
|
TxtVacacionesporPagar.Text = $"{finrow["VacacionesporPagar"]}";
|
||||||
|
|
||||||
|
TxtPorcentjePrima.Text = $"{finrow["PrimaPorcentaje"]}";
|
||||||
|
TxtPrimaVacacional.Text = $"{finrow["PrimaVacacional"]}";
|
||||||
|
TxtPrimaPagada.Text = $"{finrow["PrimaPagada"]}";
|
||||||
|
TxtPrimaPorPagar.Text = $"{finrow["PrimaVacacionalPorPagar"]}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
GvConceptos.DataSource = ConceptsPersonas;
|
||||||
|
GvConceptos.DataBind();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
retorno = false;
|
||||||
|
return retorno;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void LnkCampiarEmpleado_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
CvePersonal = DdlPersonal.SelectedValue.ToEntero();
|
||||||
|
|
||||||
|
|
||||||
|
using (ClsRH ObjPersonal = new ClsRH())
|
||||||
|
{
|
||||||
|
if (ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (pnlupValoresFiniquito.Visible)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
if (!CargaDatosFiniquito())
|
||||||
|
RegistraScript("$('#ModalEmpleados').modal('hide');");
|
||||||
|
upDatos.Update();
|
||||||
|
}
|
||||||
|
protected void LnkCalcular_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
protected void LnkAutorizar_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
protected void LnkTimbrar_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
protected void LnkFormatoRenuncia_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
protected void DdlPersonal_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Response.Redirect($"/Nomina/Finiquito.aspx?CvePersonal={DdlPersonal.SelectedValue}");
|
||||||
|
}
|
||||||
|
protected void DdlTipoPeriodo_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
int CveTipoPeriodoactual = DdlTipoPeriodo.SelectedValue.ToEntero() > 0 ? DdlTipoPeriodo.SelectedValue.ToEntero() : CveTipoPeriodo;
|
||||||
|
string fechabaja = TxtFechaBaja.Text;
|
||||||
|
DataTable dtperiodos = new DataTable();
|
||||||
|
ClsNominas ObjPeriodos = new ClsNominas();
|
||||||
|
if (ObjPeriodos.GetPeriodos(-1, UsuarioActual.CveEmpresa, -1, -1, -1))
|
||||||
|
{
|
||||||
|
dtperiodos = ObjPeriodos.DtResultados;
|
||||||
|
if (Information.IsNothing(sender) && CvePeriodoFiniquito > 0)
|
||||||
|
{
|
||||||
|
DataRow row = dtperiodos.FiltroPrimero(string.Format("CvePeriodo={0} ", CvePeriodoFiniquito));
|
||||||
|
if (!Information.IsNothing(row))
|
||||||
|
{
|
||||||
|
CveTipoPeriodoactual = row["CveTipoPeriodo"].ToString().ToEntero();
|
||||||
|
DdlTipoPeriodo.SelectedValueExist(CveTipoPeriodoactual == 6 ? "6" : "-1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dtperiodos = ObjPeriodos.DtResultados.FiltraParametros(string.Format("(Estatus IN (1,2,3,4) AND CveTipoPeriodo={0}) ", CveTipoPeriodoactual));
|
||||||
|
// FechaInicio, P.FechaFin
|
||||||
|
DdlPeriodo.Items.Clear();
|
||||||
|
DdlPeriodo.Items.Add(new ListItem("Seleccione", "-1"));
|
||||||
|
DdlPeriodo.SelectedValue = "-1";
|
||||||
|
DdlPeriodo.DataSource = dtperiodos;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
DdlPeriodo.DataSource = null;
|
||||||
|
ObjPeriodos.Dispose();
|
||||||
|
DdlPeriodo.DataBind();
|
||||||
|
if (fechabaja.Length > 0 && dtperiodos.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
if ((CvePeriodoFiniquito > 0) && Information.IsNothing(sender))
|
||||||
|
DdlPeriodo.SelectedValueExist(CvePeriodoFiniquito);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DataRow row = dtperiodos.FiltroPrimero(string.Format("(FechaInicio<='{0:yyyy/MM/dd}' AND FechaFin>='{0:yyyy/MM/dd}') ", fechabaja.ToDate()));
|
||||||
|
if (!Information.IsNothing(row))
|
||||||
|
DdlPeriodo.SelectedValueExist(row["CvePeriodo"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void GvConceptos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||||
|
{
|
||||||
|
// Datakeys
|
||||||
|
// Concepto,CveConcepto,Importe,Estatus,ConceptoD,CveConceptoD,ImporteD,EstatusD
|
||||||
|
int CveConcepto = e.Row.DataKey("CveConcepto").ToEntero();
|
||||||
|
int CveConceptoD = e.Row.DataKey("CveConceptoD").ToEntero();
|
||||||
|
// Dim Importe As Decimal = e.Row.DataKey("Importe").ToDecimal()
|
||||||
|
// Dim ImporteD As Decimal = e.Row.DataKey("ImporteD").ToDecimal()
|
||||||
|
int Estatus = e.Row.DataKey("Estatus").ToEntero();
|
||||||
|
int EstatusD = e.Row.DataKey("EstatusD").ToEntero();
|
||||||
|
|
||||||
|
// Controles
|
||||||
|
Label LtlConcepto = e.Row.FCLabel("LtlConcepto");
|
||||||
|
LinkButton LnkConcepto = e.Row.FCLinkButton("LnkConcepto");
|
||||||
|
Label LtlConceptoD = e.Row.FCLabel("LtlConceptoD");
|
||||||
|
LinkButton LnkConceptoD = e.Row.FCLinkButton("LnkConceptod");
|
||||||
|
Label LtlImporte = e.Row.FCLabel("LtlImporte");
|
||||||
|
LinkButton LnkImporte = e.Row.FCLinkButton("LnkImporte");
|
||||||
|
Label LtlImporteD = e.Row.FCLabel("LtlImporteD");
|
||||||
|
LinkButton LnkImporteD = e.Row.FCLinkButton("LnkImporteD");
|
||||||
|
|
||||||
|
if (Estatus < -1 | EstatusD < -1)
|
||||||
|
e.Row.CssClass = "ConceptosTotales";
|
||||||
|
if (CveConcepto == 0 && (Estatus == 0 || Estatus == -1 || Estatus == -3))
|
||||||
|
LtlImporte.Text = "";
|
||||||
|
|
||||||
|
if (CveConceptoD == 0 && (EstatusD == 0 || EstatusD == -1))
|
||||||
|
LtlImporteD.Text = "";
|
||||||
|
|
||||||
|
if (Estatus == -1)
|
||||||
|
LtlConcepto.Visible = false;
|
||||||
|
else if (Estatus > 0)
|
||||||
|
LtlImporte.Visible = false;
|
||||||
|
|
||||||
|
if (EstatusD == -1)
|
||||||
|
LtlConceptoD.Visible = false;
|
||||||
|
else if (EstatusD > 0)
|
||||||
|
LtlImporteD.Visible = false;
|
||||||
|
|
||||||
|
|
||||||
|
LnkConcepto.Visible = !LtlConcepto.Visible;
|
||||||
|
LnkConceptoD.Visible = !LtlConceptoD.Visible;
|
||||||
|
LnkImporte.Visible = !LtlImporte.Visible;
|
||||||
|
LnkImporteD.Visible = !LtlImporteD.Visible;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void LnkConcepto_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
GridViewRow gvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||||
|
GCEstatus = gvRow.DataKey("Estatus").ToEntero();
|
||||||
|
GCCveConcepto = gvRow.DataKey("CveConcepto").ToEntero();
|
||||||
|
GCImporte = gvRow.DataKey("Importe").ToDecimal();
|
||||||
|
OpenModalConceptos(1);
|
||||||
|
}
|
||||||
|
protected void LnkConceptoD_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
GridViewRow gvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||||
|
GCEstatus = gvRow.DataKey("Estatus").ToEntero();
|
||||||
|
GCCveConcepto = gvRow.DataKey("CveConcepto").ToEntero();
|
||||||
|
GCImporte = gvRow.DataKey("Importe").ToDecimal();
|
||||||
|
OpenModalConceptos(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OpenModalConceptos(int Tipo)
|
||||||
|
{
|
||||||
|
if (GCEstatus == -1)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
}
|
||||||
|
RegistraScript("$('#ModalConceptos').modal();");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void LnkAceptarConceptos_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RegistraScript("$('#ModalConceptos').modal('hide');");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
|
||||||
Partial Class Nomina_Finiquito
|
Partial Class Nomina_FiniquitoVB
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
Private Class ConceptosPersonal
|
Private Class ConceptosPersonal
|
||||||
Public Sub New()
|
Public Sub New()
|
||||||
@@ -215,8 +215,8 @@ Partial Class Nomina_Finiquito
|
|||||||
CvePersonal = -1
|
CvePersonal = -1
|
||||||
End If
|
End If
|
||||||
If Not CargaDatosFiniquito() Then
|
If Not CargaDatosFiniquito() Then
|
||||||
RegistraScript("$('#ModalEmpleados').modal();")
|
|
||||||
End If
|
End If
|
||||||
|
RegistraScript("$('#ModalEmpleados').modal();")
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -264,7 +264,7 @@ Partial Class Nomina_Finiquito
|
|||||||
DdlMotivoBaja.SelectedValueExist(ObjPersonal.DtResultados.Rows(0)("CveMotivoBaja").ToString().ToEntero())
|
DdlMotivoBaja.SelectedValueExist(ObjPersonal.DtResultados.Rows(0)("CveMotivoBaja").ToString().ToEntero())
|
||||||
Dim stringesliquidacion = ObjPersonal.DtResultados.Rows(0)("esLiquidacion").ToString()
|
Dim stringesliquidacion = ObjPersonal.DtResultados.Rows(0)("esLiquidacion").ToString()
|
||||||
esLiquidacion = (stringesliquidacion = "True" OrElse stringesliquidacion = "1")
|
esLiquidacion = (stringesliquidacion = "True" OrElse stringesliquidacion = "1")
|
||||||
|
ChkesLiquidacion.Checked = esLiquidacion
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
If DdlMotivoBaja.SelectedValue.ToEntero() > 0 Then
|
If DdlMotivoBaja.SelectedValue.ToEntero() > 0 Then
|
||||||
@@ -277,11 +277,12 @@ Partial Class Nomina_Finiquito
|
|||||||
LblFechaBaja.Text = FechaBaja
|
LblFechaBaja.Text = FechaBaja
|
||||||
LblEstatus.Text = EstatusPersonal
|
LblEstatus.Text = EstatusPersonal
|
||||||
TxtFechaBaja.Text = FechaBaja
|
TxtFechaBaja.Text = FechaBaja
|
||||||
|
DdlTipoPeriodo_SelectedIndexChanged(Nothing, Nothing)
|
||||||
|
LblPerido.Text = DdlPeriodo.SelectedItem.Text
|
||||||
If CvePeriodoFiniquito <= 0 Then
|
If CvePeriodoFiniquito <= 0 Then
|
||||||
DdlTipoPeriodo_SelectedIndexChanged(Nothing, Nothing)
|
|
||||||
retorno = False
|
retorno = False
|
||||||
pnlupValoresFiniquito.Visible = True
|
|
||||||
End If
|
End If
|
||||||
|
pnlupValoresFiniquito.Visible = True
|
||||||
Using ObjNom As New ClsNominas()
|
Using ObjNom As New ClsNominas()
|
||||||
'If ObjNom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa) Then
|
'If ObjNom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa) Then
|
||||||
' DTConceptosPersonal = ObjNom.DtResultados
|
' DTConceptosPersonal = ObjNom.DtResultados
|
||||||
@@ -342,10 +343,20 @@ Partial Class Nomina_Finiquito
|
|||||||
Dim fechabaja As String = TxtFechaBaja.Text
|
Dim fechabaja As String = TxtFechaBaja.Text
|
||||||
Dim dtperiodos As New DataTable
|
Dim dtperiodos As New DataTable
|
||||||
Dim ObjPeriodos As New ClsNominas
|
Dim ObjPeriodos As New ClsNominas
|
||||||
If ObjPeriodos.GetPeriodos(CveTipoPeriodoactual, UsuarioActual.CveEmpresa, -1, -1, -1) Then
|
If ObjPeriodos.GetPeriodos(-1, UsuarioActual.CveEmpresa, -1, -1, -1) Then
|
||||||
dtperiodos = ObjPeriodos.DtResultados.FiltraParametros("Estatus IN (1,2,3,4)")
|
dtperiodos = ObjPeriodos.DtResultados
|
||||||
|
If IsNothing(sender) AndAlso CvePeriodoFiniquito > 0 Then
|
||||||
|
Dim row As DataRow = dtperiodos.FiltroPrimero(String.Format("CvePeriodo={0} ", CvePeriodoFiniquito))
|
||||||
|
If Not IsNothing(row) Then
|
||||||
|
CveTipoPeriodoactual = row("CveTipoPeriodo").ToString().ToEntero()
|
||||||
|
DdlTipoPeriodo.SelectedValueExist(If(CveTipoPeriodoactual = 6, "6", "-1"))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
dtperiodos = ObjPeriodos.DtResultados.FiltraParametros(String.Format("(Estatus IN (1,2,3,4) AND CveTipoPeriodo={0}) ", CveTipoPeriodoactual))
|
||||||
'FechaInicio, P.FechaFin
|
'FechaInicio, P.FechaFin
|
||||||
|
DdlPeriodo.Items.Clear()
|
||||||
|
DdlPeriodo.Items.Add(New ListItem("Seleccione", "-1"))
|
||||||
|
DdlPeriodo.SelectedValue = "-1"
|
||||||
DdlPeriodo.DataSource = dtperiodos
|
DdlPeriodo.DataSource = dtperiodos
|
||||||
Else
|
Else
|
||||||
DdlPeriodo.DataSource = Nothing
|
DdlPeriodo.DataSource = Nothing
|
||||||
@@ -353,10 +364,15 @@ Partial Class Nomina_Finiquito
|
|||||||
ObjPeriodos.Dispose()
|
ObjPeriodos.Dispose()
|
||||||
DdlPeriodo.DataBind()
|
DdlPeriodo.DataBind()
|
||||||
If fechabaja.Length > 0 AndAlso dtperiodos.Rows.Count > 0 Then
|
If fechabaja.Length > 0 AndAlso dtperiodos.Rows.Count > 0 Then
|
||||||
Dim row As DataRow = dtperiodos.FiltroPrimero(String.Format("FechaInicio<='{0:yyyy/MM/dd}' AND FechaFin>='{0:yyyy/MM/dd}'", fechabaja.ToDate()))
|
If (CvePeriodoFiniquito > 0) AndAlso IsNothing(sender) Then
|
||||||
If Not IsNothing(row) Then
|
DdlPeriodo.SelectedValueExist(CvePeriodoFiniquito)
|
||||||
DdlPeriodo.SelectedValueExist(row("CvePeriodo"))
|
Else
|
||||||
|
Dim row As DataRow = dtperiodos.FiltroPrimero(String.Format("(FechaInicio<='{0:yyyy/MM/dd}' AND FechaFin>='{0:yyyy/MM/dd}') ", fechabaja.ToDate()))
|
||||||
|
If Not IsNothing(row) Then
|
||||||
|
DdlPeriodo.SelectedValueExist(row("CvePeriodo"))
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
<style>
|
<style>
|
||||||
|
span.font-black{
|
||||||
|
color:#333;
|
||||||
|
}
|
||||||
.GvConceptos {
|
.GvConceptos {
|
||||||
border: 1px solid #E87E04;
|
border: 1px solid #E87E04;
|
||||||
}
|
}
|
||||||
@@ -375,10 +378,58 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header ">
|
<div class="modal-header ">
|
||||||
<h4 class="modal-title">
|
<h4 class="modal-title">Sobre Recibo</h4>
|
||||||
<asp:Label ID="LblEmpleado" runat="server" Text="Label"></asp:Label></h4>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
<div class="portlet light xspadding bordered " id="pnlDatos">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption ">
|
||||||
|
<i class="fa fa-user font-yellow-gold"></i>
|
||||||
|
<span class="caption-subject bold font-black uppercase">Trabajador :<asp:Label ID="LblEmpleado" runat="server" Text=""></asp:Label></span>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body " style="padding: 0px;">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2 bold">No. Trabajador</div>
|
||||||
|
<div class="col-md-4"><asp:Label ID="LblCodigoEmpleado" runat="server"></asp:Label></div>
|
||||||
|
<div class="col-md-2 bold">Días Trabajados</div>
|
||||||
|
<div class="col-md-4"><asp:Label ID="LblDiasLaborados" runat="server"></asp:Label></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2 bold">Afi IMSS </div>
|
||||||
|
<div class="col-md-4"><asp:Label ID="LblNSS" runat="server"></asp:Label> </div>
|
||||||
|
<div class="col-md-2 bold">Faltas</div>
|
||||||
|
<div class="col-md-4"><asp:Label ID="LblDiasFaltados" runat="server"></asp:Label></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2 bold">R.F.C.</div>
|
||||||
|
<div class="col-md-4"><asp:Label ID="LblRFC" runat="server"></asp:Label></div>
|
||||||
|
<div class="col-md-2 bold">Retardos</div>
|
||||||
|
<div class="col-md-4"><asp:Label ID="LblDiasRetardos" runat="server"></asp:Label></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2 bold">Curp</div>
|
||||||
|
<div class="col-md-4"><asp:Label ID="LblCURP" runat="server"></asp:Label></div>
|
||||||
|
<div class="col-md-2 bold">Días Vacaciones</div>
|
||||||
|
<div class="col-md-4"><asp:Label ID="LblDiasVacaciones" runat="server"></asp:Label></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2 bold">Tipo de Pago</div>
|
||||||
|
<div class="col-md-4"><asp:Label ID="LblTipoPeriodo" runat="server"></asp:Label></div>
|
||||||
|
<div class="col-md-2 bold">Días Incapacidad</div>
|
||||||
|
<div class="col-md-4"><asp:Label ID="LblDiasIncapacidad" runat="server"></asp:Label></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2 bold">Fecha de Pago</div>
|
||||||
|
<div class="col-md-4"><asp:Label ID="LblFechaPagosrb" runat="server"></asp:Label></div>
|
||||||
|
<div class="col-md-2 bold">Periodo del</div>
|
||||||
|
<div class="col-md-4"><asp:Label ID="LblFecha" runat="server"></asp:Label></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<ajax:TabContainer ID="TabPersonal" runat="server" Width="100%">
|
<ajax:TabContainer ID="TabPersonal" runat="server" Width="100%">
|
||||||
<ajax:TabPanel ID="TabSobreRecivo" runat="server" HeaderText="Sobre Recibo">
|
<ajax:TabPanel ID="TabSobreRecivo" runat="server" HeaderText="Sobre Recibo">
|
||||||
|
|||||||
@@ -840,7 +840,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
{
|
{
|
||||||
if (!dontsaveconcepto)//el usuario definira si desea actualizar o no el concepto en el periodo
|
if (!dontsaveconcepto)//el usuario definira si desea actualizar o no el concepto en el periodo
|
||||||
{
|
{
|
||||||
if (!objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento, UsuarioActual.CveUsuario,true))
|
if (!objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento, UsuarioActual.CveUsuario, true))
|
||||||
{
|
{
|
||||||
rollback = true;
|
rollback = true;
|
||||||
}
|
}
|
||||||
@@ -924,6 +924,58 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
}
|
}
|
||||||
private void mostrarConceptos()
|
private void mostrarConceptos()
|
||||||
{
|
{
|
||||||
|
#region "Llenado de datos empleado"
|
||||||
|
string CodigoEmpleado = "";
|
||||||
|
string NombreCompleto = "";
|
||||||
|
string RFC = "";
|
||||||
|
string CURP = "";
|
||||||
|
string TipoPeriodo = "";
|
||||||
|
string NSS = "";
|
||||||
|
string DiasLaborados = "";
|
||||||
|
string DiasFaltados = "";
|
||||||
|
string DiasVacaciones = "";
|
||||||
|
string FechaInicio = "";
|
||||||
|
string FechaFin = "";
|
||||||
|
string DiasRetardos = "";
|
||||||
|
string DiasIncapacidad = "";
|
||||||
|
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||||
|
if (drow != null)
|
||||||
|
{
|
||||||
|
DiasLaborados = string.Format("{0}", drow["DiasLaborados"].ToString().ToEntero());
|
||||||
|
DiasFaltados = string.Format("{0}", drow["DiasFaltados"].ToString().ToEntero());
|
||||||
|
DiasVacaciones = string.Format("{0}", drow["DiasVacaciones"].ToString().ToEntero());
|
||||||
|
FechaInicio = string.Format("{0:dd/MM/yyyy}", drow["FechaInicio"]);
|
||||||
|
FechaFin = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]);
|
||||||
|
DiasRetardos = string.Format("{0}", drow["DiasRetardos"].ToString().ToEntero());
|
||||||
|
DiasIncapacidad = string.Format("{0}", drow["DiasIncapacidad"].ToString().ToEntero());
|
||||||
|
}
|
||||||
|
|
||||||
|
using (ClsRH objrh = new ClsRH())
|
||||||
|
{
|
||||||
|
if (objrh.GetPersonal(SRCvePersonal, UsuarioActual.CveEmpresa) && objrh.DtResultados.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
DataRow erow = objrh.DtResultados.Rows[0];
|
||||||
|
CodigoEmpleado = erow["Codigo"].ToString();
|
||||||
|
NombreCompleto = erow["NombreCompleto"].ToString();
|
||||||
|
RFC = erow["RFC"].ToString();
|
||||||
|
CURP = erow["CURP"].ToString();
|
||||||
|
TipoPeriodo = erow["TipoPeriodo"].ToString();
|
||||||
|
NSS = erow["NSS"].ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LblCodigoEmpleado.Text = CodigoEmpleado;
|
||||||
|
//LblNombreCompleto.Text = NombreCompleto;
|
||||||
|
LblRFC.Text = RFC;
|
||||||
|
LblCURP.Text = CURP;
|
||||||
|
LblTipoPeriodo.Text = TipoPeriodo;
|
||||||
|
LblNSS.Text = NSS;
|
||||||
|
LblDiasLaborados.Text = DiasLaborados;
|
||||||
|
LblDiasFaltados.Text = DiasFaltados;
|
||||||
|
LblDiasVacaciones.Text = DiasVacaciones;
|
||||||
|
LblFecha.Text = string.Format("{0} al {1}",FechaInicio, FechaFin);
|
||||||
|
LblDiasRetardos.Text = DiasRetardos;
|
||||||
|
LblDiasIncapacidad.Text = DiasIncapacidad;
|
||||||
|
#endregion
|
||||||
#region "Sobre Recibo"
|
#region "Sobre Recibo"
|
||||||
{
|
{
|
||||||
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ");
|
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ");
|
||||||
@@ -1375,6 +1427,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
public double ImporteP { get; set; }
|
public double ImporteP { get; set; }
|
||||||
public double ValorP { get; set; }
|
public double ValorP { get; set; }
|
||||||
public int EstatusP { get; set; }
|
public int EstatusP { get; set; }
|
||||||
|
public bool isEditedP { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public string NoConceptoD { get; set; }
|
public string NoConceptoD { get; set; }
|
||||||
@@ -1384,6 +1437,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
public double ImporteD { get; set; }
|
public double ImporteD { get; set; }
|
||||||
public double ValorD { get; set; }
|
public double ValorD { get; set; }
|
||||||
public int EstatusD { get; set; }
|
public int EstatusD { get; set; }
|
||||||
|
public bool isEditedD { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void GvConceptos_RowDataBound(object sender, GridViewRowEventArgs e)
|
protected void GvConceptos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||||
@@ -1409,6 +1463,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
LinkButton LnkImporte = e.Row.FCLinkButton("LnkImporte");
|
LinkButton LnkImporte = e.Row.FCLinkButton("LnkImporte");
|
||||||
Label LtlImporteD = e.Row.FCLabel("LtlImporteD");
|
Label LtlImporteD = e.Row.FCLabel("LtlImporteD");
|
||||||
LinkButton LnkImporteD = e.Row.FCLinkButton("LnkImporteD");
|
LinkButton LnkImporteD = e.Row.FCLinkButton("LnkImporteD");
|
||||||
|
//isEditedD
|
||||||
|
|
||||||
if (Estatus < -1 | EstatusD < -1)
|
if (Estatus < -1 | EstatusD < -1)
|
||||||
e.Row.CssClass = "ConceptosTotales";
|
e.Row.CssClass = "ConceptosTotales";
|
||||||
@@ -3094,8 +3149,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
int CveMoneda = 1;
|
int CveMoneda = 1;
|
||||||
#endregion
|
#endregion
|
||||||
#region PropNominaDetalle
|
#region PropNominaDetalle
|
||||||
int CveConcepto=0;
|
int CveConcepto = 0;
|
||||||
decimal ImporteConcepto=0, ImporteGravadoConcepto=0, ImporteExentoConcepto = 0;
|
decimal ImporteConcepto = 0, ImporteGravadoConcepto = 0, ImporteExentoConcepto = 0;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@@ -3149,10 +3204,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
foreach (DataRow rcon in dtconp.Rows)
|
foreach (DataRow rcon in dtconp.Rows)
|
||||||
{
|
{
|
||||||
|
|
||||||
CveConcepto =rcon["CveConcepto"].ToString().ToEntero();
|
CveConcepto = rcon["CveConcepto"].ToString().ToEntero();
|
||||||
ImporteConcepto =rcon["ImporteConcepto"].ToString().ToDecimal();
|
ImporteConcepto = rcon["ImporteConcepto"].ToString().ToDecimal();
|
||||||
ImporteGravadoConcepto =rcon["ImporteGravadoConcepto"].ToString().ToDecimal();
|
ImporteGravadoConcepto = rcon["ImporteGravadoConcepto"].ToString().ToDecimal();
|
||||||
ImporteExentoConcepto = ImporteConcepto -ImporteGravadoConcepto ;
|
ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
|
||||||
if (continuar)
|
if (continuar)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user