This commit is contained in:
2021-01-13 15:27:29 -07:00
23 changed files with 2027 additions and 913 deletions

View File

@@ -1061,7 +1061,7 @@ Public Class ClsCRM
Return retorno
End Function
Public Function RepAcercamientosDetalle(CveEmpresa As Int32, cveVendedor As Int32, cveMedioCaptacion As Int32, cveProbabilidadAcercamiento As Int32, cveEtapaProceso As Int32, sFecha As String, sFechaIni As String, sFechaFin As String) As Boolean
Public Function RepAcercamientosDetalle(CveEmpresa As Int32, cveVendedor As Int32, cveMedioCaptacion As Int32, cveProbabilidadAcercamiento As Int32, cveEtapaProceso As Int32, sFecha As String, sFechaIni As String, sFechaFin As String, Optional CveTipoProceso As Integer = -1) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_CRM_RepAcercamientosDetalle", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
@@ -1073,6 +1073,7 @@ Public Class ClsCRM
.Add("@SFecha", SqlDbType.VarChar).Value = sFecha
.Add("@SFechaIni", SqlDbType.VarChar).Value = sFechaIni
.Add("@SFechaFin", SqlDbType.VarChar).Value = sFechaFin
.Add("@CveTipoProceso", SqlDbType.Int).Value = CveTipoProceso
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -1985,7 +1985,7 @@ Public Class ClsNominas
End Try
Return retorno
End Function
Public Function GetNominaEmpleado(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer, Optional RegimenContratacion As Integer = 1) As Boolean
Public Function GetNominaEmpleado(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer, Optional RegimenContratacion As Integer = 1, Optional CvePersonal As Integer = -1) As Boolean
Dim retorno As Boolean = False
Try
DTSet = New DataSet()
@@ -1998,6 +1998,7 @@ Public Class ClsNominas
.Add("@Agrupador", SqlDbType.VarChar).Value = Agrupador
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@RegimenContratacion", SqlDbType.Int).Value = RegimenContratacion
.Add("@CvePersonal", SqlDbType.Decimal).Value = CvePersonal
End With

View File

@@ -2159,7 +2159,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el reporte de Altas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
OnError("Ocurrió un error al actualizar las bajas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno

View File

@@ -74,7 +74,7 @@ Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
'Dim contextc = Microsoft.AspNet.SignalR.GlobalHost.ConnectionManager.GetHubContext(Of MyGPSHub)()
'SendNotificacionGPS(contextc, 5, 1727, "Encabezado", "Mensaje", 2, "{""timeOut"":15000, ""extendedTimeOut"":16000}", "142608__autistic-lucario__error.wav", 0, SQLToGmapsJArray("POINT (-99.211688 19.717715)", "POINT").ToString())
Using ObjGPS As New ClsSisNotificaciones
ObjGPS.ObtenerNotificaciones()
Retorno = $"[""IsOk""=""{ObjGPS.ObtenerNotificaciones()}""]"
End Using
context.Response.Write(Retorno)
End Sub

View File

@@ -643,7 +643,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
CveVendedor = ObjCRM.DtResultados.FiltroPrimeroValor("CveVendedorAsignado").ToEntero();
CveSubProyecto = ObjCRM.DtResultados.FiltroPrimeroValor("CveSubProyecto").ToEntero();
CveCliente = ObjCRM.DtResultados.FiltroPrimeroValor("CveCliente").ToEntero();
CveGiroClasificacion = ObjCRM.DtResultados.FiltroPrimeroValor("CveGiroClasificacion").ToEntero();
CveGiroClasificacion = ObjCRM.DtResultados.FiltroPrimeroValor("CveGiroClasificacion") != "" ? ObjCRM.DtResultados.FiltroPrimeroValor("CveGiroClasificacion").ToEntero() : -1;
if (!(CveCliente > 0))
{

View File

@@ -42,25 +42,19 @@ public partial class CRM_RepAcercamientos : ClsPaginas
protected void CargaDatos()
{
CveVendedor = DdlVendedor.SelectedValue.ToEntero();
if (CveVendedor > 0)
string FechaInicio = TxtFechaInicio.Text == "" ? "-1" : TxtFechaInicio.Text;
string FechaFin = TxtFechaFin.Text == "" ? "-1" : TxtFechaFin.Text;
int CvePS = DdlPS.SelectedValue.ToEntero() == 0 ? -1 : DdlPS.SelectedValue.ToEntero();
ClsCRM ObjCRM = new ClsCRM();
if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin, CvePS: CvePS, CveGiroClasificacion:DdlGiroClasificacion.SelectedValue.ToEntero()))
{
string FechaInicio = TxtFechaInicio.Text == "" ? "-1" : TxtFechaInicio.Text;
string FechaFin = TxtFechaFin.Text == "" ? "-1" : TxtFechaFin.Text;
int CvePS = DdlPS.SelectedValue.ToEntero() == 0 ? -1 : DdlPS.SelectedValue.ToEntero();
ClsCRM ObjCRM = new ClsCRM();
if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin, CvePS: CvePS, CveGiroClasificacion:DdlGiroClasificacion.SelectedValue.ToEntero()))
{
GVDatos.DataSource = ObjCRM.DtResultados;
GVDatos.DataBind();
}
ObjCRM.Dispose();
UPDatos.Update();
}else
{
Alert("El Campo Vendedor es requerido",ModExtensiones.TipoMensaje.MsgError);
GVDatos.DataSource = ObjCRM.DtResultados;
GVDatos.DataBind();
}
ObjCRM.Dispose();
UPDatos.Update();
}
protected void GVDatos_RowDataBound(object sender, GridViewRowEventArgs e)

View File

@@ -266,7 +266,7 @@
<asp:HyperLink href='<%# Eval("CveAcercamiento","/CRM/Acercamiento.aspx?CveAcercamiento={0}")%>' runat="server" Text='<%# Eval("NombreAcercamiento")%>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Medio Captacion">
<asp:TemplateField HeaderText="Medio Captación">
<ItemTemplate>
<asp:Label ID="lblmedioCaptacion" runat="server" Text='<%# Eval("MedioCaptacion")%>'> </asp:Label>
</ItemTemplate>
@@ -286,7 +286,7 @@
<asp:Label ID="lblnombre" runat="server" Text='<%# Eval("Nombre")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Telefono">
<asp:TemplateField HeaderText="Teléfono">
<ItemTemplate>
<asp:Label ID="lbltelefonoOficina" runat="server" Text='<%# Eval("TelefonoOficina")%>'> </asp:Label>
</ItemTemplate>

View File

@@ -85,9 +85,9 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
RcveMedioCaptacion = Request["cveMedioCaptacion"] == null ? -1 : Request["cveMedioCaptacion"].ToString().ToEntero();
RcveProbabilidadAcercamiento = Request["cveProbabilidadAcercamiento"] == null ? -1 : Request["cveProbabilidadAcercamiento"].ToString().ToEntero();
RcveEtapaProceso = Request["cveEtapaProceso"] == null ? -1 : Request["cveEtapaProceso"].ToString().ToEntero();
RsFecha = Request["Fecha"] == null ? "" : Request["Fecha"].ToString();
RsFechaIni = Request["FechaInicio"] == null ? "" : Request["FechaInicio"].ToString();
RsFechaFin = Request["FechaFin"] == null ? "" : Request["FechaFin"].ToString();
RsFecha = Request["Fecha"] == null ? Extensiones.ModExtensiones.MinFecha.ToString() : Request["Fecha"].ToString();
RsFechaIni = Request["FechaInicio"] == null ? Extensiones.ModExtensiones.MinFecha.ToString() : Request["FechaInicio"].ToString();
RsFechaFin = Request["FechaFin"] == null ? Extensiones.ModExtensiones.MaxFecha.ToString() : Request["FechaFin"].ToString();
try { RsFechaIni = RsFechaIni.ToDateTime().ToString("yyyy/MM/dd"); TxtFechaInicio.Text = RsFechaIni.ToDateTime().ToString("dd/MM/yyyy"); }
catch (Exception) { RsFechaIni = ""; }
try { RsFechaFin = RsFechaFin.ToDateTime().ToString("yyyy/MM/dd"); TxtFechaFin.Text = RsFechaFin.ToDateTime().ToString("dd/MM/yyyy"); }
@@ -192,7 +192,7 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
protected void cargarDatos()
{
ClsCRM ObjRepA = new ClsCRM();
ObjRepA.RepAcercamientosDetalle(UsuarioActual.CveEmpresa, RcveVendedor, RcveMedioCaptacion, RcveProbabilidadAcercamiento, RcveEtapaProceso, RsFecha, RsFechaIni, RsFechaFin);
ObjRepA.RepAcercamientosDetalle(UsuarioActual.CveEmpresa, RcveVendedor, RcveMedioCaptacion, RcveProbabilidadAcercamiento, RcveEtapaProceso, RsFecha, RsFechaIni, RsFechaFin,CveTipoProceso:DdlTipoProceso.SelectedValue.ToEntero());
GVRepAcercamientosDetalle.DataSource = ObjRepA.DtResultados;
ObjRepA.Dispose();
GVRepAcercamientosDetalle.DataBind();
@@ -218,8 +218,8 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
// RsFecha = Request["CveGrupo1"] == null ? "" : Request["CveGrupo1"].ToString();
// break;
//}
RsFechaIni = TxtFechaInicio.Text.Length > 0 ? TxtFechaInicio.Text.ToDateTime().ToString("yyyy/MM/dd") : "";
RsFechaFin = TxtFechaFin.Text.Length > 0 ? TxtFechaFin.Text.ToDateTime().ToString("yyyy/MM/dd") : "";
RsFechaIni = TxtFechaInicio.Text.Length > 0 ? TxtFechaInicio.Text.ToDateTime().ToString("yyyy/MM/dd") : Extensiones.ModExtensiones.MinFecha.ToString();
RsFechaFin = TxtFechaFin.Text.Length > 0 ? TxtFechaFin.Text.ToDateTime().ToString("yyyy/MM/dd") : Extensiones.ModExtensiones.MaxFecha.ToString();
RcveVendedor = DdlVendedor.SelectedValue.ToEntero();
RcveMedioCaptacion = DdlMedioCaptacion.SelectedValue.ToEntero();
RcveProbabilidadAcercamiento = DdlProbabilidad.SelectedValue.ToEntero();

View File

@@ -131,9 +131,17 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas
HyperLinkField hypt = new HyperLinkField();
hypt.DataTextField = $"Total";
hypt.HeaderText = $"Total";
hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2" , "Grupo1" };
string strfilstros = string.Format("&cveVendedor={0}&cveMedioCaptacion={1}&cveProbabilidadAcercamiento={2}", cveVendedor, cveMedioCaptacion, cveProbabilidadAcercamiento);
hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}{strfilstros}";
string strfilstros = "";
if (DdlGrupo1.SelectedValue == "1") {
hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2", "Grupo1", "CveVendedor" };
strfilstros = string.Format("&cveMedioCaptacion={0}&cveProbabilidadAcercamiento={1}", cveMedioCaptacion, cveProbabilidadAcercamiento);
hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&cveVendedor={{3}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}{strfilstros}";
}
else {
hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2" , "Grupo1" };
strfilstros = string.Format("&cveVendedor={0}&cveMedioCaptacion={1}&cveProbabilidadAcercamiento={2}", cveVendedor, cveMedioCaptacion, cveProbabilidadAcercamiento);
hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&c&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}{strfilstros}";
}
switch (idgrupo1)
{
case 1:

View File

@@ -537,16 +537,8 @@ Aguinaldoapagar
if (Listaparametros!= null)
{
foreach (parametroQuery pr in Listaparametros)
{
if (pr.SqlDataType != null)
{
if (pr.ParameterDirection != null)
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Direction = pr.ParameterDirection;
else
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Value = pr.SqlValue != null ? pr.SqlValue : DBNull.Value;
}
else
SqlAdapter.SelectCommand.Parameters.AddWithValue(pr.ParameterName, pr.SqlValue);
{
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Direction = pr.ParameterDirection;
}
}
@@ -586,15 +578,7 @@ Aguinaldoapagar
{
foreach (parametroQuery pr in Listaparametros)
{
if ( pr.SqlDataType != null)
{
if ( pr.ParameterDirection != null)
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Direction = pr.ParameterDirection;
else
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Value = pr.SqlValue != null ? pr.SqlValue : DBNull.Value;
}
else
SqlAdapter.SelectCommand.Parameters.AddWithValue(pr.ParameterName, pr.SqlValue);
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Direction = pr.ParameterDirection;
}
}
@@ -714,18 +698,18 @@ Aguinaldoapagar
}
}
public class parametroQuery
{
public parametroQuery(string parameterName, object sqlValue, SqlDbType sqlDataType = default(SqlDbType), ParameterDirection parameterDirection = default(ParameterDirection))
{
this.ParameterName = parameterName;
this.SqlDataType = sqlDataType;
this.ParameterDirection = parameterDirection;
this.SqlValue = sqlValue;
}
//public class parametroQuery
//{
// public parametroQuery(string parameterName, object sqlValue, SqlDbType sqlDataType = default(SqlDbType), ParameterDirection parameterDirection = default(ParameterDirection))
// {
// this.ParameterName = parameterName;
// this.SqlDataType = sqlDataType;
// this.ParameterDirection = parameterDirection;
// this.SqlValue = sqlValue;
// }
public string ParameterName { get; set; }
public SqlDbType SqlDataType { get; set; }
public ParameterDirection ParameterDirection { get; set; }
public object SqlValue { get; set; }
}
// public string ParameterName { get; set; }
// public SqlDbType SqlDataType { get; set; }
// public ParameterDirection ParameterDirection { get; set; }
// public object SqlValue { get; set; }
//}

View File

@@ -4,6 +4,37 @@
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.dtosEmpleado .row {
padding-top: 10px;
padding-bottom: 10px;
}
a.TextLink {
color: #2196f3;
}
.dtosEmpleado {
font-size: 14px;
}
.dnone {
display: none !important;
}
.GvConceptos tr td a {
color: #5b9bd1;
}
.GvConceptos {
border: 1px solid #E87E04;
}
table.GvConceptos td {
white-space: nowrap;
}
.GvConceptos.table > tbody > tr > th {
border-top: 1px solid #E87E04;
color: #fff;
@@ -11,41 +42,12 @@
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:not(.thTituloConcepto) > th:nth-child(2),
.GvConceptos.table > tbody > tr > td:nth-child(2) {
.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;
@@ -58,24 +60,21 @@
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Finiquito
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:HyperLink ID="HypCambiarEmpleado" onclick="$('#ModalEmpleados').modal();" runat="server"><i class="fa fa-exchange" aria-hidden="true"></i>Cambiar Empleado</asp:HyperLink></li>
<asp:LinkButton ID="LnkAutorizar" Visible="false" OnClick="LnkAutorizar_Click" runat="server"><i class='material-icons'>done_all</i>Autorizar</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkReCalcular" OnClick="LnkCalcular_Click" runat="server"><i class="fa fa-pencil"></i>ReCalcular </asp:LinkButton></li>
<asp:LinkButton ID="LnkTimbrar" Visible="false" OnClick="LnkTimbrar_Click" runat="server"><i class="fa fa-bell"></i>Timbrar</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkAutorizar" OnClick="LnkAutorizar_Click" runat="server"><i class='material-icons'>done_all</i>Autorizar</asp:LinkButton></li>
<li>
<asp:LinkButton ID="LnkTimbrar" OnClick="LnkTimbrar_Click" runat="server"><i class="fa fa-bell"></i>Timbrar</asp:LinkButton></li>
<li>
<asp:LinkButton ID="LnkFormatoRenuncia" OnClick="LnkFormatoRenuncia_Click" runat="server"><i class="fa fa-bell"></i>Formato Renuncia</asp:LinkButton></li>
<asp:LinkButton ID="LnkFormatoRenuncia" OnClick="LnkFormatoRenuncia_Click" runat="server"><i class="fa fa-bell"></i>Formato Finiquito</asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
@@ -83,79 +82,177 @@
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="upDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row ">
<div class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1">
<div class="portlet box yellow-gold smallpadding" id="pnldl">
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin "></i>
<span class="caption-subject bold uppercase">Datos del Empleado</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>
<div class="portlet-body dtosEmpleado">
<div class="row ">
<div class="col-sm-4 col-lg-3">Empleado: </div>
<div class="col-sm-8 col-lg-9">
<asp:HyperLink ID="HypEmpleado" CssClass="LinkEmpleado" runat="server"></asp:HyperLink>
</div>
</div>
<div class="row ">
<div class="col-sm-4 col-lg-3">Estatus</div>
<div class="col-sm-8 col-lg-9">
<asp:Label ID="LblEstatus" runat="server" Text=""></asp:Label>
</div>
</div>
<div class="row ">
<div class="col-sm-4 col-lg-3">Motivo Baja</div>
<div class="col-sm-8 col-lg-9 ">
<asp:Label ID="LblMotivoBaja" runat="server" Text=""></asp:Label>
</div>
</div>
<div class="row ">
<div class="col-sm-4 col-lg-3">Fecha Baja</div>
<div class="col-sm-8 col-lg-9">
<asp:Label ID="LblFechaBaja" runat="server" Text=""></asp:Label>
</div>
</div>
<div class="row ">
<div class="col-sm-4 col-lg-3">Perido Finiquito</div>
<div class="col-sm-8 col-lg-9">
<asp:Label ID="LblPerido" runat="server" Text=""></asp:Label>
</div>
</div>
</div>
</div>
</div>
</div>
<ajax:TabContainer ID="Tab" runat="server" Width="100%" AutoPostBack="True">
<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="row ">
<div class="col-sm-6 ">
<%--class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1"--%>
<div class="portlet light xspadding bordered" id="pnldl">
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin "></i>
<span class="caption-subject bold uppercase ">Sobre Recibo</span>
<i class="fa fa-bookmark font-yellow-gold"></i>
<span class="caption-subject bold uppercase font-yellow-gold">Datos del Empleado</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>
<div class="portlet-body " style="padding: 0px;">
<div class="portlet-body dtosEmpleado">
<div class="row ">
<div class="col-sm-3">
<span class="bold">Codigo:</span>
<br />
<asp:HyperLink ID="HypCodigo" CssClass="LinkEmpleado TextLink" Text="--" runat="server"></asp:HyperLink>
</div>
<div class="col-sm-9">
<span class="bold">Empleado:</span>
<br />
<asp:HyperLink ID="HypEmpleado" CssClass="LinkEmpleado TextLink" Text="--" runat="server"></asp:HyperLink>
</div>
</div>
<div class="row ">
<div class="col-sm-3 ">
<span class="bold">Fecha alta:</span>
<br />
<asp:Label ID="LblFechaAlta" runat="server" Text="--"></asp:Label>
</div>
<div class="col-sm-5">
<span class="bold">Puesto:</span>
<br />
<asp:Label ID="LblPuesto" runat="server" Text="--"></asp:Label>
</div>
<div class="col-sm-4">
<span class="bold">Salario:</span>
<br />
<asp:Label ID="LblSalario" runat="server" Text="--"></asp:Label>
</div>
</div>
<div class="row ">
</div>
</div>
</div>
</div>
<asp:GridView ID="GvConceptos" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptos"
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound"
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,EstatusP,ConceptoD,CveConceptoD,ImporteD,EstatusD">
<div class="col-sm-6 ">
<%--class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1"--%>
<div class="portlet light xspadding bordered" id="pnlfiniqito">
<div class="portlet-title">
<div class="caption ">
<i class="fa fa-bookmark font-yellow-gold"></i>
<span class="caption-subject bold uppercase font-yellow-gold">Información finiquito</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">
<asp:LinkButton ID="LnkGuardarDatos" OnClick="LnkGuardarDatos_Click" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>
</div>
</div>
</div>
<div class="portlet-body dtosEmpleado">
<div class="row">
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<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:DropDownList>
<asp:RequiredFieldValidator ID="RfvMotivoBaja" runat="server" ControlToValidate="DdlMotivoBaja" CssClass=" dnone" InitialValue="-1"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Seleccione el <b>''motivo''</b>."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Motivo de Baja: " AssociatedControlID="DdlMotivoBaja"></asp:Label>
</div>
<ajax:ValidatorCalloutExtender ID="vcoMotivoBaja" runat="server" HighlightCssClass="vco" TargetControlID="RfvMotivoBaja" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-4">
<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:RequiredFieldValidator ID="RfvTxtFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" CssClass="dnone"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> es necesario "
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Fecha de Baja: " AssociatedControlID="TxtFechaBaja"></asp:Label>
<ajax:MaskedEditExtender ID="MKEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" BehaviorID="_content_MKEFechaBaja" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" PopupButtonID="ImgFechaBaja" PopupPosition="BottomRight" BehaviorID="_content_CEFechaBaja"></ajax:CalendarExtender>
<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>
<span class="input-group-btn " style="display: inline-block">
<asp:LinkButton ID="ImgFechaBaja" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:ValidatorCalloutExtender ID="vcoTxtFechaBaja" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaBaja" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-3">
¿es liquidación?<br />
<asp:CheckBox ID="ChkesLiquidacion" CssClass="chksino" Text=" " runat="server" />
</div>
<div class="col-md-1">
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtAntiguedad" runat="server" Enabled="false" Text="--" CausesValidation="True" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Antiguedad: " AssociatedControlID="TxtAntiguedad"></asp:Label>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDiasTransAnio" runat="server" Enabled="false" Text="--" CausesValidation="True" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Dias trans. en el año: " AssociatedControlID="TxtDiasTransAnio"></asp:Label>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtSalarioMinimo" runat="server" Enabled="false" Text="--" CausesValidation="True" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Salario minimo: " AssociatedControlID="TxtSalarioMinimo"></asp:Label>
</div>
</div>
</div>
<%--<div class="form-group form-md-line-input input-iconright">
<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 Text="Extraordinario" Value="6"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Tipo Período: " AssociatedControlID="DdlTipoPeriodo"></asp:Label>
</div>
<div class="form-group form-md-line-input input-iconright">
<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:DropDownList>
<asp:Label runat="server" Text="Período:" AssociatedControlID="DdlPeriodo"></asp:Label>
</div>--%>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="portlet light xspadding bordered" id="pnlNomina">
<div class="portlet-title">
<div class="caption ">
<i class="fa fa-bookmark font-yellow-gold"></i>
<span class="caption-subject bold uppercase font-yellow-gold">Finiquito (Ordinario)</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">
<%--<a onclick="$('#C_BtnImprimirsobrerecibo').click()" class="btn btn-default">Imprimir</a>--%>
</div>
</div>
</div>
<div class="portlet-body ">
<asp:GridView ID="GvFinOrdinario" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptos"
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound" ShowHeaderWhenEmpty="true"
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,ValorP,EstatusP,ConceptoD,CveConceptoD,ImporteD,isOnlyBisibleP,isOnlyBisibleD,EstatusD,ValorD,isEditedD,isEditedP">
<Columns>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
@@ -164,353 +261,156 @@
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="37%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Valor">
<ItemTemplate>
<asp:Label ID="LtlValorP" runat="server" Text='<%# Eval("ValorP", "{0:##,###.##}") %>' Style="word-break: break-all;"></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>'></asp:LinkButton>
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="37%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Valor">
<ItemTemplate>
<asp:Label ID="LtlValorD" runat="server" Text='<%# Eval("ValorD", "{0:##,###.##}") %>' Style="word-break: break-all;"></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>'></asp:LinkButton>
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="SearchADHeader" />
</asp:GridView>
</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>
<div class="col-sm-6">
<div class="portlet light xspadding bordered" id="pnlFiniquito">
<div class="portlet-title">
<div class="caption ">
<i class="fa fa-bookmark font-yellow-gold"></i>
<span class="caption-subject bold uppercase font-yellow-gold">Finiquito (Indemnización)</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">
<%--<a onclick="$('#C_BtnImprimirsobrerecibo').click()" class="btn btn-default">Imprimir</a>--%>
</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">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalConceptos" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header ">
<h4 class="modal-title">LtlTituloConcepto</h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlConcepto" runat="server" AppendDataBoundItems="true" CssClass="form-control select2me" DataTextField="NominaEstatus" DataValueField="CvePeriodo">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Concepto:" AssociatedControlID="DdlConcepto"></asp:Label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtImporte" CssClass="form-control" runat="server"></asp:TextBox>
<asp:Label runat="server" Text="Importe:" AssociatedControlID="TxtImporte"></asp:Label>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="LnkAceptarConceptos" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpSeleccionar" OnClick="LnkAceptarConceptos_Click"> Aceptar</asp:LinkButton>
<asp:Literal ID="Literal1" Visible="false" runat="server"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button></asp:Literal>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<div class="portlet-body ">
<asp:GridView ID="GVFinIndemnizacion" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptos"
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound" ShowHeaderWhenEmpty="true"
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,ValorP,EstatusP,ConceptoD,CveConceptoD,ImporteD,isOnlyBisibleP,isOnlyBisibleD,EstatusD,ValorD,isEditedD,isEditedP">
<Columns>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConcepto" runat="server" Text='<%# Eval("ConceptoP") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConcepto" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoP") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="37%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Valor">
<ItemTemplate>
<asp:Label ID="LtlValorP" runat="server" Text='<%# Eval("ValorP", "{0:##,###.##}") %>' Style="word-break: break-all;"></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="37%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Valor">
<ItemTemplate>
<asp:Label ID="LtlValorD" runat="server" Text='<%# Eval("ValorD", "{0:##,###.##}") %>' Style="word-break: break-all;"></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="SearchADHeader" />
</asp:GridView>
</div>
</div>
</div>
</div>
<div id="ModalEmpleados" class="modal ADS fade " role="dialog" data-backdrop="static" data-keyboard="false">
<div id="ModalEmpleados" class="modal ADS fade " role="dialog" data-backdrop="static" data-keyboard="false">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalEmpleados" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header ">
<h4 class="modal-title">Seleccione un Empleado</h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPersonal" DataTextField="Nombre" DataValueField="CvePersonal" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlPersonal_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Empleado: " AssociatedControlID="DdlPersonal"></asp:Label>
</div>
<asp:Panel ID="pnlupValoresFiniquito" runat="server" Visible="false">
<h4>Debe llenar los siguientes valores para continuar</h4>
<div class="form-group form-md-line-input input-iconright">
<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:DropDownList>
<asp:Label runat="server" Text="Motivo de Baja: " AssociatedControlID="DdlMotivoBaja"></asp:Label>
</div>
<div class="">
</div>
<div class="row">
<div class="col-md-6" style="padding-right: 0px">
<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: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 "
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Fecha de Baja: " AssociatedControlID="TxtFechaBaja"></asp:Label>
<ajax:MaskedEditExtender ID="MKEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" BehaviorID="_content_MKEFechaBaja" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" PopupButtonID="ImgFechaBaja" PopupPosition="BottomRight" BehaviorID="_content_CEFechaBaja"></ajax:CalendarExtender>
<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>
<span class="input-group-btn " style="display: inline-block">
<asp:LinkButton ID="ImgFechaBaja" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</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 class="form-group form-md-line-input input-iconright">
<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 Text="Extraordinario" Value="6"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Tipo Período: " AssociatedControlID="DdlTipoPeriodo"></asp:Label>
</div>
<div class="form-group form-md-line-input input-iconright">
<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:DropDownList>
<asp:Label runat="server" Text="Período:" AssociatedControlID="DdlPeriodo"></asp:Label>
</div>
</asp:Panel>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="LnkCampiarEmpleado" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpSeleccionar" OnClick="LnkCampiarEmpleado_Click"> Aceptar</asp:LinkButton>
<asp:Literal ID="LtlEmpleadoCancelar" Visible="false" runat="server"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button></asp:Literal>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalEmpleados" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header ">
<h4 class="modal-title">Seleccione un empleado</h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPersonal" DataTextField="Nombre" DataValueField="CvePersonal" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Empleado: " AssociatedControlID="DdlPersonal"></asp:Label>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="modal-footer">
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="LnkCampiarEmpleado" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpSeleccionarEmpleado" OnClick="LnkCampiarEmpleado_Click"> Aceptar</asp:LinkButton>
<asp:Literal ID="LtlEmpleadoCancelar" Visible="false" runat="server"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button></asp:Literal>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<%--"<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"2\">Percepciones</th><th scope=\"col\" colspan=\"2\">Deducciones</th> </tr>"--%>
<script>
function insertParam(key, value) {
key = encodeURIComponent(key); value = encodeURIComponent(value);
var s = document.location.search;
var kvp = key + "=" + value;
var r = new RegExp("(&|\\?)" + key + "=[^\&]*");
s = s.replace(r, "$1" + kvp);
if (!RegExp.$1) { s += (s.length > 0 ? '&' : '?') + kvp; };
//again, do what you will here
document.location.search = s;
}
function ADSBegin() {
if ($('.thTituloConcepto').length == 0) {
$('.GvConceptos').prepend("<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"2\">Percepciones</th><th scope=\"col\" colspan=\"2\">Deducciones</th> </tr>");
if ($('.GvConceptos .thTituloConcepto').length == 0) {
$('.GvConceptos').prepend("<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"3\">Percepciones</th><th scope=\"col\" colspan=\"3\">Deducciones</th> </tr>");
}
}
</script>
</asp:Content>

View File

@@ -1,213 +1,69 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualBasic;
using System.Data;
using Extensiones;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Extensiones;
partial class Nomina_Finiquito : ClsPaginas
public partial class Nomina_Finiquito : ClsPaginas
{
private class NConcepto
{
//Concepto,CveConcepto,Importe,Estatus,ConceptoD,CveConceptoD,ImporteD,EstatusD
public string NoConceptoP { get; set; }
public string ConceptoP { get; set; }
public string LabelValorP { get; set; }
public int CveConceptoP { get; set; }
public double ImporteP { get; set; }
public double ValorP { get; set; }
public int EstatusP { get; set; }
public bool isEditedP { get; set; }
public string NoConceptoD { get; set; }
public string ConceptoD { get; set; }
public string LabelValorD { get; set; }
public int CveConceptoD { get; set; }
public double ImporteD { get; set; }
public double ValorD { get; set; }
public int EstatusD { get; set; }
public bool isEditedD { get; set; }
}
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; }
//set { ViewState["CvePersonal"] = value; }
}
private int CveTipoPeriodo
private int CvePersonalAltas
{
get { return ViewState["CveTipoPeriodo"] != null ? ViewState["CveTipoPeriodo"].ToString().ToEntero() : 0; }
set
{
ViewState["CveTipoPeriodo"] = value;
}
get { return ViewState["CvePersonalAltas"] != null ? ViewState["CvePersonalAltas"].ToString().ToEntero() : 0; }
set { ViewState["CvePersonalAltas"] = value; }
}
private int CvePeriodoIndemnizacion
{
get { return ViewState["CvePeriodoIndemnizacion"] != null ? ViewState["CvePeriodoIndemnizacion"].ToString().ToEntero() : 0; }
set { ViewState["CvePeriodoIndemnizacion"] = value; }
}
private int CvePeriodoFiniquito
{
get { return ViewState["CvePeriodoFiniquito"] != null ? ViewState["CvePeriodoFiniquito"].ToString().ToEntero() : 0; }
set { ViewState["CvePeriodoFiniquito"] = value; }
}
private int GCEstatus
private DateTime FechaInicio
{
get { return ViewState["GCEstatus"] != null ? ViewState["GCEstatus"].ToString().ToEntero() : 0; }
set { ViewState["GCEstatus"] = value; }
get { return ViewState["FechaInicio"] != null ? (DateTime)ViewState["FechaInicio"] : DateTime.Now; }
set { ViewState["FechaInicio"] = value; }
}
private int GCCveConcepto
private DataTable DtAltas
{
get { return ViewState["GCCveConcepto"] != null ? ViewState["GCCveConcepto"].ToString().ToEntero() : 0; }
set { ViewState["GCCveConcepto"] = value; }
get { return ViewState["DtAltas"] != null ? (DataTable)ViewState["DtAltas"] : null; }
set { ViewState["DtAltas"] = 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;
}
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
CargaDdlPersonal();
CargaMotivoBaja();
CvePeriodoFiniquito = 0;
GvFinOrdinario.DataSource = new DataTable();
GVFinIndemnizacion.DataSource = new DataTable();
GvFinOrdinario.DataBind();
GVFinIndemnizacion.DataBind();
if (Request["CvePersonal"] != null && Request["CvePersonal"].ToString().ToEntero() > 0)
{
CvePersonal = Request["CvePersonal"].ToString().ToEntero();
ViewState["CvePersonal"] = Request["CvePersonal"].ToString().ToEntero();
CargaPersonal();
CargaMotivoBaja();
}
else
{
CvePersonal = -1;
CargaDdlPersonal();
ViewState["CvePersonal"] = -1;
LtlEmpleadoCancelar.Visible = false;
RegistraScript("$('#ModalEmpleados').modal();");
}
if (!CargaDatosFiniquito())
{
}
RegistraScript("$('#ModalEmpleados').modal();");
}
if (CvePersonal > 0 & CvePeriodoFiniquito > 0)
{
LtlEmpleadoCancelar.Visible = true;
}
}
@@ -218,222 +74,148 @@ partial class Nomina_Finiquito : ClsPaginas
}
private void CargaDdlPersonal()
{
ClsRH ObjPersonal = new ClsRH();
if (ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa))
using (ClsRH ObjPersonal = new ClsRH())
{
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(-1, UsuarioActual.CveEmpresa))
{
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();
}
DdlPersonal.DataSource = ObjPersonal.DtResultados;
DdlPersonal.DataBind();
}
}
}
private void CargaPersonal()
{
using (ClsRH ObjPersonal = new ClsRH())
{
if (ObjPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) && ObjPersonal.DtResultados.Rows.Count > 0)
{
DataRow drow = ObjPersonal.DtResultados.Rows[0];
HypCodigo.Text = drow["Codigo"].ToString();
HypEmpleado.Text = drow["NombreCompleto"].ToString();
LblPuesto.Text = drow["Puesto"].ToString();
LblSalario.Text = drow["SalarioDiario"].ToString();
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"]}";
}
if (ObjNom.DTSetResultados.Tables.Count > 5)
{
DataTable dtconceptos = ObjNom.DTSetResultados.Tables[1];
DataTable dtconpersonal = ObjNom.DTSetResultados.Tables[5];
int maxFila = dtconpersonal.MAX("Fila", "Tipo<3").ToEntero();
List<NConcepto> lfin = new List<NConcepto>();
if (maxFila > 0)
DtAltas = ObjPersonal.DtResultados.FiltraParametros("", "FechaInicio");
DataRow da = ObjPersonal.DtResultados.Rows[0];
CvePersonalAltas = da["CvePersonalAltas"].ToString().ToEntero();
LblFechaAlta.Text = string.Format("{0:dd/MM/yyyy}", da["FechaInicio"]);
FechaInicio = LblFechaAlta.Text.ToDateTime();
TxtFechaBaja.Text = string.Format("{0:dd/MM/yyyy}", da["FechaFin"]);
DdlMotivoBaja.SelectedValueExist(da["CveMotivoBaja"]);
ChkesLiquidacion.Checked = (da["esLiquidacion"].ToString() == "1" || da["esLiquidacion"].ToString().ToUpper() == "TRUE");
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero();
if (CvePeriodoIndemnizacion > 0)
{
DataRow conPerrow;
DataRow conrow;
NConcepto sr;
for (int i = 1; i <= maxFila; i++)
{
sr = new NConcepto();
conPerrow = dtconpersonal.FiltroPrimero(string.Format("Tipo=1 AND Fila ={0}", i));
if (conPerrow != null)
{
sr.CveConceptoP = conPerrow["CveConcepto"].ToString().ToEntero();
conrow = dtconceptos.FiltroPrimero(string.Format("CveConcepto ={0}", sr.CveConceptoP));
sr.ConceptoP = conrow["Concepto"].ToString();
sr.ValorP = conPerrow["Valor"].ToString().ToDouble();
sr.ImporteP = conPerrow["Importe"].ToString().ToDouble();
sr.NoConceptoP = conrow["Codigo"].ToString();
}
conPerrow = dtconpersonal.FiltroPrimero(string.Format("Tipo=2 AND Fila ={0}", i));
if (conPerrow != null)
{
sr.CveConceptoD = conPerrow["CveConcepto"].ToString().ToEntero();
conrow = dtconceptos.FiltroPrimero(string.Format("CveConcepto ={0}", sr.CveConceptoD));
sr.ConceptoD = conrow["Concepto"].ToString();
sr.ValorD= conPerrow["Valor"].ToString().ToDouble();
sr.ImporteD = conPerrow["Importe"].ToString().ToDouble();
sr.NoConceptoD = conrow["Codigo"].ToString();
}
lfin.Add(sr);
}
loadsobrerecibo();
}
GvConceptos.DataSource = lfin;
GvConceptos.DataBind();
}
CamposCalculados();
}
//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)
private void CamposCalculados()
{
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))
TxtSalarioMinimo.Text = "123.22";
if (TxtFechaBaja.Text.Length > 9)
{
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;
DateTime fechafin = TxtFechaBaja.Text.ToDateTime();
decimal antiguedad = getyearsresult(fechafin, FechaInicio);
TxtAntiguedad.Text = string.Format("{0}", antiguedad);
TxtDiasTransAnio.Text = string.Format("{0}", fechafin.DayOfYear);
}
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"]);
}
TxtAntiguedad.Text = "--";
TxtDiasTransAnio.Text = "--";
}
}
private decimal getyearsresult(DateTime fechafin, DateTime fechainicio)
{
decimal retorno = 0;
DateTime zeroTime = new DateTime(1, 1, 1);
TimeSpan span;
if (fechainicio < fechafin)
{
span = fechafin - fechainicio;
decimal years = (zeroTime + span).Year - 1;
retorno = Math.Round(years + (span.TotalDays.ToString().ToDecimal() / 365), 4);
}
return retorno;
}
protected void LnkConcepto_Click(object sender, EventArgs e)
{
//SRCveConcepto = ((LinkButton)sender).CommandArgument.ToEntero();
//SRTipoConcepto = ((LinkButton)sender).CommandArgument;
//#region carga conceptos
//DataTable dtCon;
//if (SRCveConcepto > 0)
//{
// DataRow drow = dtConceptos.FiltroPrimero(string.Format("CveConcepto={0}", SRCveConcepto));
// if (drow != null)
// {
// SRTipoConcepto = drow["Tipo"].ToString();
// }
// else
// {
// SRCveConcepto = 0;
// SRTipoConcepto = "D";
// }
//}
//if (SRTipoConcepto == "P")
//{
// dtCon = dtConceptos.FiltraParametros("Tipo ='P' AND EsPadre = 1 ").Copy();
//}
//else
//{
// dtCon = dtConceptos.FiltraParametros("Tipo ='D' AND EsPadre = 1 ").Copy();
// SRTipoConcepto = "D";
//}
//dtCon.Columns.Add(new DataColumn("CodigoConcepto"));
//foreach (DataRow trow in dtCon.Rows)
//{
// trow["CodigoConcepto"] = string.Format("{0} - {1}", trow["Codigo"], trow["Concepto"]);
//}
//dtCon.AcceptChanges();
//DataRow row = dtCon.NewRow();
//row["CveConcepto"] = "-1";
//row["CodigoConcepto"] = "Seleccione";
//dtCon.Rows.InsertAt(row, 0);
//#endregion
//DdlmcConceptos.DataSource = dtCon;
//DdlmcConceptos.DataBind();
//if (SRCveConcepto > 0)
//{
// DdlmcConceptos.SelectedValueExist(SRCveConcepto);
//}
//DdlmcConceptos_SelectedIndexChanged(DdlmcConceptos, null);
//RegistraScript(string.Format("$('#ModalUpConcepto').on('shown.bs.modal', function () {{$('#{0}').trigger('focus')}});$('#ModalUpConcepto').modal();", TxtmcImporte.ClientID));
//UPpanelModalUpConcepto.Update();
}
int CveConceptoPolgvc, CveConceptoDolgvc;
protected void GvConceptos_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.RowIndex == 0)
{
CveConceptoPolgvc = 1;
CveConceptoDolgvc = 1;
}
// Datakeys
// Concepto,CveConcepto,Importe,Estatus,ConceptoD,CveConceptoD,ImporteD,EstatusD
int CveConcepto = e.Row.DataKey("CveConceptoP").ToEntero();
@@ -442,7 +224,11 @@ partial class Nomina_Finiquito : ClsPaginas
// Dim ImporteD As Decimal = e.Row.DataKey("ImporteD").ToDecimal()
int Estatus = e.Row.DataKey("EstatusP").ToEntero();
int EstatusD = e.Row.DataKey("EstatusD").ToEntero();
int isOnlyBisibleP = e.Row.DataKey("isOnlyBisibleP").ToEntero();
int isOnlyBisibleD = e.Row.DataKey("isOnlyBisibleD").ToEntero();
bool isEditedP = e.Row.DataKey("isEditedP").ToEntero() > 0;
bool isEditedD = e.Row.DataKey("isEditedD").ToEntero() > 0;
//isEditedD
// Controles
Label LtlConcepto = e.Row.FCLabel("LtlConcepto");
LinkButton LnkConcepto = e.Row.FCLinkButton("LnkConcepto");
@@ -452,63 +238,292 @@ partial class Nomina_Finiquito : ClsPaginas
LinkButton LnkImporte = e.Row.FCLinkButton("LnkImporte");
Label LtlImporteD = e.Row.FCLabel("LtlImporteD");
LinkButton LnkImporteD = e.Row.FCLinkButton("LnkImporteD");
//isEditedD
if (isOnlyBisibleP == 1)
{
e.Row.CssClass = string.Format("{0} isOnlyBisibleP", e.Row.CssClass);
}
if (isOnlyBisibleD == 1)
{
e.Row.CssClass = string.Format("{0} isOnlyBisibleD", e.Row.CssClass);
}
if (isEditedP)
{
e.Row.CssClass = string.Format("{0} isEditedP", e.Row.CssClass);
}
if (isEditedD)
{
e.Row.CssClass = string.Format("{0} isEditedD", e.Row.CssClass);
}
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; }
LtlImporte.Visible = false;
LtlImporteD.Visible = false;
if (Estatus < -1 | EstatusD < -1)
{
e.Row.CssClass = "ConceptosTotales";
if (CveConcepto == 0 && (Estatus == 0 || Estatus == -1 || Estatus == -3))
LtlImporte.Text = "";
LtlImporte.Visible = true;
LtlImporteD.Visible = true;
}
LnkImporte.CommandArgument = (CveConcepto > 0 ? CveConcepto.ToString() : "P");
LnkImporteD.CommandArgument = (CveConceptoD > 0 ? CveConceptoD.ToString() : "D");
if (CveConceptoD == 0 && (EstatusD == 0 || EstatusD == -1))
LtlImporteD.Text = "";
LnkImporte.Text = (CveConcepto > 0 ? string.Format("${0:N2}", e.Row.DataKey("ImporteP").ToDecimal()) : (CveConceptoPolgvc > 0 ? "<i class=\"fa fa-plus\"></i>" : ""));
LnkImporteD.Text = (CveConceptoD > 0 ? string.Format("${0:N2}", e.Row.DataKey("ImporteD").ToDecimal()) : (CveConceptoDolgvc > 0 ? "<i class=\"fa fa-plus\"></i>" : ""));
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;
if (CveConcepto == 0 && (Estatus == 0 || Estatus == -1 || Estatus == -3)) { LtlImporte.Text = ""; }
if (CveConceptoD == 0 && (EstatusD == 0 || EstatusD == -1)) { LtlImporteD.Text = ""; }
LnkConcepto.Visible = !LtlConcepto.Visible;
LnkConceptoD.Visible = !LtlConceptoD.Visible;
LnkImporte.Visible = !LtlImporte.Visible;
LnkImporteD.Visible = !LtlImporteD.Visible;
CveConceptoPolgvc = CveConcepto;
CveConceptoDolgvc = CveConceptoD;
}
}
protected void LnkConcepto_Click(object sender, EventArgs e)
protected void LnkTimbrar_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);
Alert("El finiquito se ha timbrado satisfactoriamente");
LnkTimbrar.Visible = false;
}
private void OpenModalConceptos(int Tipo)
protected void LnkFormatoRenuncia_Click(object sender, EventArgs e)
{
if (GCEstatus == -1)
}
protected void LnkCambiarEmpleado_Click(object sender, EventArgs e)
{
CargaDdlPersonal();
this.RegistraScript("$('#ModalEmpleados').modal();");
UpModalEmpleados.Update();
}
private class NConcepto
{
public string NoConceptoP { get; set; }
public string ConceptoP { get; set; }
public string LabelValorP { get; set; }
public int CveConceptoP { get; set; }
public double ImporteP { get; set; }
public double ValorP { get; set; }
public int EstatusP { get; set; }
public int isEditedP { get; set; }
public int isOnlyBisibleP { get; set; }
public string NoConceptoD { get; set; }
public string ConceptoD { get; set; }
public string LabelValorD { get; set; }
public int CveConceptoD { get; set; }
public double ImporteD { get; set; }
public double ValorD { get; set; }
public int EstatusD { get; set; }
public int isEditedD { get; set; }
public int isOnlyBisibleD { get; set; }
}
private List<NConcepto> cargasobrericiboconceptos(DataTable dtConceptos, DataTable dtempleadosConceptos, DataTable dtempleados)
{
int SRCvePersonal = this.CvePersonal;
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ");
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 ");
dtper.Columns.Add("BorradoLogico", typeof(int));
dtded.Columns.Add("BorradoLogico", typeof(int));
foreach (DataRow row in dtper.Rows)
{
int BorradoLogico = 0;
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) != 0))
{
BorradoLogico = 1;
}
row["BorradoLogico"] = BorradoLogico;
}
dtper.AcceptChanges();
foreach (DataRow row in dtded.Rows)
{
int BorradoLogico = 0;
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) != 0))
{
BorradoLogico = 1;
}
row["BorradoLogico"] = BorradoLogico;
}
dtded.AcceptChanges();
dtper = dtper.FiltraParametros("BorradoLogico=0");
dtded = dtded.FiltraParametros("BorradoLogico=0");
int maxper = dtper.Rows.Count;
int maxded = dtded.Rows.Count;
int i = 0;
List<NConcepto> lconc = new List<NConcepto>();
for (i = 0; i < maxper || i < maxded; i++)
{
NConcepto nConcepto = new NConcepto();
DataRow row;
if (maxper > i)
{
row = dtper.Rows[i];
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
string Concepto = row["Concepto"].ToString();
string Codigo = row["Codigo"].ToString();
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
nConcepto.CveConceptoP = CveConcepto;
nConcepto.ConceptoP = Concepto;
nConcepto.NoConceptoP = Codigo;
nConcepto.ImporteP = Importe;
nConcepto.ValorP = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
nConcepto.isOnlyBisibleP = row["SoloVisible"].ToString().ToEntero();
nConcepto.isEditedP = dtempleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal));
}
if (maxded > i)
{
row = dtded.Rows[i];
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
string Concepto = row["Concepto"].ToString();
string Codigo = row["Codigo"].ToString();
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
nConcepto.CveConceptoD = CveConcepto;
nConcepto.ConceptoD = Concepto;
nConcepto.NoConceptoD = Codigo;
nConcepto.ImporteD = Importe;
nConcepto.ValorD = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
nConcepto.isOnlyBisibleD = row["SoloVisible"].ToString().ToEntero();
nConcepto.isEditedD = dtempleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal));
}
lconc.Add(nConcepto);
}
lconc.Add(new NConcepto());
NConcepto SubTotales = new NConcepto();
SubTotales.CveConceptoP = 0;
SubTotales.ConceptoP = "Total Percepciones";
SubTotales.EstatusP = -2;
SubTotales.ImporteP = dtempleados.SUM("SumaPercepciones", string.Format("CvePersonal = {0}", SRCvePersonal));
///Alert(SubTotales.ImporteP.ToString());
SubTotales.CveConceptoD = 0;
SubTotales.ConceptoD = "Total Deducciones";
SubTotales.EstatusD = -2;
SubTotales.ImporteD = dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", SRCvePersonal));
NConcepto Totales = new NConcepto();
Totales.CveConceptoD = 0;
Totales.ConceptoD = "Total";
Totales.EstatusD = -3;
Totales.ImporteD = dtempleados.SUM("Total", string.Format("CvePersonal = {0}", SRCvePersonal));
lconc.Add(SubTotales);
lconc.Add(Totales);
return lconc;
}
protected void LnkGuardarDatos_Click(object sender, EventArgs e)
{
if (LblFechaAlta.Text.ToDate() > TxtFechaBaja.Text.ToDate())
{
Alert("la fecha de baja no puede ser menor a la fecha alta", ModExtensiones.TipoMensaje.MsgAdvertencia);
}
else
{
bool continuar = false;
using (ClsRH ObjPersonal = new ClsRH())
using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL()))
{
if (ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), -1, DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
{
DataRow da = ObjPersonal.DtResultados.Rows[0];
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero();
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa);
}
if (continuar)
{
ObjPersonal.Commit();
}
else
{
ObjPersonal.RollBack();
}
if (continuar) { loadsobrerecibo(); }
}
}
RegistraScript("$('#ModalConceptos').modal();");
}
public void loadsobrerecibo()
{
List<NConcepto> finordin = null;
List<NConcepto> finindem = null;
DataTable dtConceptos = null;
DataTable dtempleadosConceptos = null;
DataTable dtempleados = null;
using (ClsNominas objnom = new ClsNominas())
{
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoFiniquito, UsuarioActual.CveEmpresa, 1, 3, CvePersonal) && objnom.DTSetResultados.Tables.Count > 1)
{
dtempleados = objnom.DTSetResultados.Tables[3];
dtempleadosConceptos = objnom.DTSetResultados.Tables[4];
dtConceptos = objnom.DTSetResultados.Tables[0];
}
if (dtConceptos != null && dtempleadosConceptos != null && dtempleados != null)
{
finordin = cargasobrericiboconceptos(dtConceptos, dtempleadosConceptos, dtempleados);
}
dtempleadosConceptos = null;
dtempleados = null;
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoIndemnizacion, UsuarioActual.CveEmpresa, 1, 3, CvePersonal) && objnom.DTSetResultados.Tables.Count > 1)
{
dtempleados = objnom.DTSetResultados.Tables[3];
dtempleadosConceptos = objnom.DTSetResultados.Tables[4];
dtConceptos = objnom.DTSetResultados.Tables[0];
}
if (dtConceptos != null && dtempleadosConceptos != null && dtempleados != null)
{
finindem = cargasobrericiboconceptos(dtConceptos, dtempleadosConceptos, dtempleados);
}
}
GvFinOrdinario.DataSource = finordin;
GVFinIndemnizacion.DataSource = finindem;
GvFinOrdinario.DataBind();
GVFinIndemnizacion.DataBind();
LnkGuardarDatos.Enabled = false;
LnkGuardarDatos.CssClass = "btn btn-default";
LnkGuardarDatos.ToolTip = "el finiquito ha sido capturado.";
LnkAutorizar.Visible = true;
}
protected void LnkAceptarConceptos_Click(object sender, EventArgs e)
protected void LnkAutorizar_Click(object sender, EventArgs e)
{
RegistraScript("$('#ModalConceptos').modal('hide');");
Alert("El finiquito se ha autorizado satisfactoriamente.");
LnkAutorizar.Visible = false;
LnkTimbrar.Visible = true;
}
}
}

516
Nomina/FiniquitoOld.aspx Normal file
View File

@@ -0,0 +1,516 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="FiniquitoOld.aspx.cs" Inherits="Nomina_Finiquito" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.GvConceptos.table > tbody > tr > th {
border-top: 1px solid #E87E04;
color: #fff;
font-size: 15px;
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:not(.thTituloConcepto) > th:nth-child(2),
.GvConceptos.table > tbody > tr > td:nth-child(2) {
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">
Finiquito
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:HyperLink ID="HypCambiarEmpleado" onclick="$('#ModalEmpleados').modal();" runat="server"><i class="fa fa-exchange" aria-hidden="true"></i>Cambiar Empleado</asp:HyperLink></li>
<li>
<asp:LinkButton ID="LnkReCalcular" OnClick="LnkCalcular_Click" runat="server"><i class="fa fa-pencil"></i>ReCalcular </asp:LinkButton></li>
<li>
<asp:LinkButton ID="LnkAutorizar" OnClick="LnkAutorizar_Click" runat="server"><i class='material-icons'>done_all</i>Autorizar</asp:LinkButton></li>
<li>
<asp:LinkButton ID="LnkTimbrar" OnClick="LnkTimbrar_Click" runat="server"><i class="fa fa-bell"></i>Timbrar</asp:LinkButton></li>
<li>
<asp:LinkButton ID="LnkFormatoRenuncia" OnClick="LnkFormatoRenuncia_Click" runat="server"><i class="fa fa-bell"></i>Formato Renuncia</asp:LinkButton></li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="upDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row ">
<div class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1">
<div class="portlet box yellow-gold smallpadding" id="pnldl">
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin "></i>
<span class="caption-subject bold uppercase">Datos del Empleado</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>
<div class="portlet-body dtosEmpleado">
<div class="row ">
<div class="col-sm-4 col-lg-3">Empleado: </div>
<div class="col-sm-8 col-lg-9">
<asp:HyperLink ID="HypEmpleado" CssClass="LinkEmpleado" runat="server"></asp:HyperLink>
</div>
</div>
<div class="row ">
<div class="col-sm-4 col-lg-3">Estatus</div>
<div class="col-sm-8 col-lg-9">
<asp:Label ID="LblEstatus" runat="server" Text=""></asp:Label>
</div>
</div>
<div class="row ">
<div class="col-sm-4 col-lg-3">Motivo Baja</div>
<div class="col-sm-8 col-lg-9 ">
<asp:Label ID="LblMotivoBaja" runat="server" Text=""></asp:Label>
</div>
</div>
<div class="row ">
<div class="col-sm-4 col-lg-3">Fecha Baja</div>
<div class="col-sm-8 col-lg-9">
<asp:Label ID="LblFechaBaja" runat="server" Text=""></asp:Label>
</div>
</div>
<div class="row ">
<div class="col-sm-4 col-lg-3">Perido Finiquito</div>
<div class="col-sm-8 col-lg-9">
<asp:Label ID="LblPerido" runat="server" Text=""></asp:Label>
</div>
</div>
</div>
</div>
</div>
</div>
<ajax:TabContainer ID="Tab" runat="server" Width="100%" AutoPostBack="True">
<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 ">
<i class="icon-pin "></i>
<span class="caption-subject bold uppercase ">Sobre Recibo</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>
<div class="portlet-body " style="padding: 0px;">
<asp:GridView ID="GvConceptos" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptos"
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound"
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,EstatusP,ConceptoD,CveConceptoD,ImporteD,EstatusD">
<Columns>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConcepto" runat="server" Text='<%# Eval("ConceptoP") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConcepto" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoP") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="37%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="37%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
</Columns>
</asp:GridView>
</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">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalConceptos" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header ">
<h4 class="modal-title">LtlTituloConcepto</h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlConcepto" runat="server" AppendDataBoundItems="true" CssClass="form-control select2me" DataTextField="NominaEstatus" DataValueField="CvePeriodo">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Concepto:" AssociatedControlID="DdlConcepto"></asp:Label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtImporte" CssClass="form-control" runat="server"></asp:TextBox>
<asp:Label runat="server" Text="Importe:" AssociatedControlID="TxtImporte"></asp:Label>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="LnkAceptarConceptos" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpSeleccionar" OnClick="LnkAceptarConceptos_Click"> Aceptar</asp:LinkButton>
<asp:Literal ID="Literal1" Visible="false" runat="server"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button></asp:Literal>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div id="ModalEmpleados" class="modal ADS fade " role="dialog" data-backdrop="static" data-keyboard="false">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalEmpleados" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header ">
<h4 class="modal-title">Seleccione un Empleado</h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPersonal" DataTextField="Nombre" DataValueField="CvePersonal" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlPersonal_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Empleado: " AssociatedControlID="DdlPersonal"></asp:Label>
</div>
<asp:Panel ID="pnlupValoresFiniquito" runat="server" Visible="false">
<h4>Debe llenar los siguientes valores para continuar</h4>
<div class="form-group form-md-line-input input-iconright">
<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:DropDownList>
<asp:Label runat="server" Text="Motivo de Baja: " AssociatedControlID="DdlMotivoBaja"></asp:Label>
</div>
<div class="">
</div>
<div class="row">
<div class="col-md-6" style="padding-right: 0px">
<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: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 "
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Fecha de Baja: " AssociatedControlID="TxtFechaBaja"></asp:Label>
<ajax:MaskedEditExtender ID="MKEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" BehaviorID="_content_MKEFechaBaja" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" PopupButtonID="ImgFechaBaja" PopupPosition="BottomRight" BehaviorID="_content_CEFechaBaja"></ajax:CalendarExtender>
<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>
<span class="input-group-btn " style="display: inline-block">
<asp:LinkButton ID="ImgFechaBaja" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</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 class="form-group form-md-line-input input-iconright">
<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 Text="Extraordinario" Value="6"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Tipo Período: " AssociatedControlID="DdlTipoPeriodo"></asp:Label>
</div>
<div class="form-group form-md-line-input input-iconright">
<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:DropDownList>
<asp:Label runat="server" Text="Período:" AssociatedControlID="DdlPeriodo"></asp:Label>
</div>
</asp:Panel>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="LnkCampiarEmpleado" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpSeleccionar" OnClick="LnkCampiarEmpleado_Click"> Aceptar</asp:LinkButton>
<asp:Literal ID="LtlEmpleadoCancelar" Visible="false" runat="server"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button></asp:Literal>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<%--"<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"2\">Percepciones</th><th scope=\"col\" colspan=\"2\">Deducciones</th> </tr>"--%>
<script>
function insertParam(key, value) {
key = encodeURIComponent(key); value = encodeURIComponent(value);
var s = document.location.search;
var kvp = key + "=" + value;
var r = new RegExp("(&|\\?)" + key + "=[^\&]*");
s = s.replace(r, "$1" + kvp);
if (!RegExp.$1) { s += (s.length > 0 ? '&' : '?') + kvp; };
//again, do what you will here
document.location.search = s;
}
function ADSBegin() {
if ($('.thTituloConcepto').length == 0) {
$('.GvConceptos').prepend("<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"2\">Percepciones</th><th scope=\"col\" colspan=\"2\">Deducciones</th> </tr>");
}
}
</script>
</asp:Content>

514
Nomina/FiniquitoOld.aspx.cs Normal file
View File

@@ -0,0 +1,514 @@
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 NConcepto
{
//Concepto,CveConcepto,Importe,Estatus,ConceptoD,CveConceptoD,ImporteD,EstatusD
public string NoConceptoP { get; set; }
public string ConceptoP { get; set; }
public string LabelValorP { get; set; }
public int CveConceptoP { get; set; }
public double ImporteP { get; set; }
public double ValorP { get; set; }
public int EstatusP { get; set; }
public bool isEditedP { get; set; }
public string NoConceptoD { get; set; }
public string ConceptoD { get; set; }
public string LabelValorD { get; set; }
public int CveConceptoD { get; set; }
public double ImporteD { get; set; }
public double ValorD { get; set; }
public int EstatusD { get; set; }
public bool isEditedD { get; set; }
}
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"]}";
}
if (ObjNom.DTSetResultados.Tables.Count > 5)
{
DataTable dtconceptos = ObjNom.DTSetResultados.Tables[1];
DataTable dtconpersonal = ObjNom.DTSetResultados.Tables[5];
int maxFila = dtconpersonal.MAX("Fila", "Tipo<3").ToEntero();
List<NConcepto> lfin = new List<NConcepto>();
if (maxFila > 0)
{
DataRow conPerrow;
DataRow conrow;
NConcepto sr;
for (int i = 1; i <= maxFila; i++)
{
sr = new NConcepto();
conPerrow = dtconpersonal.FiltroPrimero(string.Format("Tipo=1 AND Fila ={0}", i));
if (conPerrow != null)
{
sr.CveConceptoP = conPerrow["CveConcepto"].ToString().ToEntero();
conrow = dtconceptos.FiltroPrimero(string.Format("CveConcepto ={0}", sr.CveConceptoP));
sr.ConceptoP = conrow["Concepto"].ToString();
sr.ValorP = conPerrow["Valor"].ToString().ToDouble();
sr.ImporteP = conPerrow["Importe"].ToString().ToDouble();
sr.NoConceptoP = conrow["Codigo"].ToString();
}
conPerrow = dtconpersonal.FiltroPrimero(string.Format("Tipo=2 AND Fila ={0}", i));
if (conPerrow != null)
{
sr.CveConceptoD = conPerrow["CveConcepto"].ToString().ToEntero();
conrow = dtconceptos.FiltroPrimero(string.Format("CveConcepto ={0}", sr.CveConceptoD));
sr.ConceptoD = conrow["Concepto"].ToString();
sr.ValorD= conPerrow["Valor"].ToString().ToDouble();
sr.ImporteD = conPerrow["Importe"].ToString().ToDouble();
sr.NoConceptoD = conrow["Codigo"].ToString();
}
lfin.Add(sr);
}
}
GvConceptos.DataSource = lfin;
GvConceptos.DataBind();
}
}
//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("CveConceptoP").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("EstatusP").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');");
}
}

View File

@@ -229,7 +229,7 @@ Partial Class Nomina_Nomina
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
If UsuarioActual.CveEmpresa = 80 OrElse UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 119 Then
If UsuarioActual.CveEmpresa.Contiene(1, 80, 72, 119, 153, 158) Then
Response.Redirect("/Nomina/Nomina2.aspx")
End If
CargaTiposPeriodo()

View File

@@ -8,6 +8,13 @@
color: #5b9bd1;
}
.txtgridsimula {
width: 100% !important;
min-width: 60px;
max-width: 80px;
text-align: right;
}
a.sline {
white-space: nowrap;
}
@@ -60,10 +67,13 @@
.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;
@@ -1087,7 +1097,7 @@
</div>
</div>
<div class="portlet-body">
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
@@ -1098,7 +1108,7 @@
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtvacFechaPago" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
@@ -1127,7 +1137,7 @@
</div>
</div>
<div class="col-md-6">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtvacFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<ajax:MaskedEditExtender ID="MeeVacFechaFin" runat="server" TargetControlID="TxtvacFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
@@ -1613,7 +1623,7 @@
</asp:UpdatePanel>
</div>
<div id="DSimulador" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpSimulador" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<asp:UpdatePanel ID="UpSimulador" class="modal-dialog modal-lg" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content rowpadding">
<div class="modal-header">
@@ -1650,6 +1660,76 @@
</table>--%>
<asp:GridView ID="GvConceptossimulador" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptossimulador"
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound" ShowHeaderWhenEmpty="true"
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,ValorP,EstatusP,ConceptoD,CveConceptoD,ImporteD,EstatusD,ValorD,isOnlyBisibleD,isOnlyBisibleP,isEditedD,isEditedP">
<Columns>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConcepto" runat="server" Text='<%# Eval("ConceptoP") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConcepto" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoP") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="23.33%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Valor">
<ItemTemplate>
<asp:Label ID="LtlValorP" runat="server" Text='<%# Eval("ValorP", "{0:##,###.##}") %>' ></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="5%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' ></asp:Label>
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="5%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="23.33%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Valor">
<ItemTemplate>
<asp:Label ID="LtlValorD" runat="server" Text='<%# Eval("ValorD", "{0:##,###.##}") %>' ></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="5%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' ></asp:Label>
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="5%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConceptoO" runat="server" Text='<%# Eval("ConceptoO") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConceptoO" runat="server" Text='<%# Eval("ConceptoO") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="23.33%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Valor">
<ItemTemplate>
<asp:Label ID="LtlValorO" runat="server" Text='<%# Eval("ValorO", "{0:##,###.##}") %>' ></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="5%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporteO" runat="server" Text='<%# Eval("ImporteO", "${0:N}") %>' ></asp:Label>
<asp:LinkButton ID="LnkImporteO" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ImporteO", "${0:N}") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="5%" />
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="SearchADHeader" />
</asp:GridView>
<asp:GridView ID="GVConceptosSimuladorObligaciones" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptossimulador"
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound" ShowHeaderWhenEmpty="true"
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,ValorP,EstatusP,ConceptoD,CveConceptoD,ImporteD,EstatusD,ValorD,isOnlyBisibleD,isOnlyBisibleP,isEditedD,isEditedP">
<Columns>
@@ -1673,7 +1753,7 @@
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Concepto">
<%--<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
@@ -1692,7 +1772,7 @@
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
</asp:TemplateField>--%>
</Columns>
<HeaderStyle CssClass="SearchADHeader" />
</asp:GridView>
@@ -1709,7 +1789,8 @@
<tr id="trnetoapagar">
<td colspan="5" class="text-left">Neto a pagar</td>
<td colspan="1">
<asp:TextBox ID="TxtNetoaPagar" CssClass="maskedmoney" runat="server"></asp:TextBox></td>
<asp:TextBox ID="TxtNetoaPagar" CssClass="maskedmoney txtgridsimula" runat="server"></asp:TextBox></td>
<td colspan="3"></td>
</tr>
</table>
@@ -2060,7 +2141,7 @@
$('.GvConceptos').prepend("<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"3\">Percepciones</th><th scope=\"col\" colspan=\"3\">Deducciones</th> </tr>");
}
if ($('.GvConceptossimulador .thTituloConcepto').length == 0) {
$('.GvConceptossimulador').prepend("<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"3\">Percepciones</th><th scope=\"col\" colspan=\"3\">Deducciones</th> </tr>");
$('.GvConceptossimulador').prepend("<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"3\">Percepciones</th><th scope=\"col\" colspan=\"3\">Deducciones</th> <th scope=\"col\" colspan=\"3\">Obligaciones</th> </tr>");
}
//$('.GvConceptossimulador').append($('#Totalesperdeduccion'));
$('.GvConceptossimulador').append($('#trnetoapagar'));

View File

@@ -1924,6 +1924,20 @@ public partial class Nomina_Nomina2 : ClsPaginas
public int EstatusD { get; set; }
public int isEditedD { get; set; }
public int isOnlyBisibleD { get; set; }
public string NoConceptoO { get; set; }
public string ConceptoO { get; set; }
public string LabelValorO { get; set; }
public int CveConceptoO { get; set; }
public double ImporteO { get; set; }
public double ValorO { get; set; }
public int EstatusO { get; set; }
public int isEditedO { get; set; }
public int isOnlyBisibleO { get; set; }
}
int CveConceptoPolgvc, CveConceptoDolgvc;
@@ -1958,6 +1972,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
LinkButton LnkImporte = e.Row.FCLinkButton("LnkImporte");
Label LtlImporteD = e.Row.FCLabel("LtlImporteD");
LinkButton LnkImporteD = e.Row.FCLinkButton("LnkImporteD");
//isEditedD
if (isOnlyBisibleP == 1)
{
@@ -2009,6 +2024,22 @@ public partial class Nomina_Nomina2 : ClsPaginas
LnkImporte.Visible = !LtlImporte.Visible;
LnkImporteD.Visible = !LtlImporteD.Visible;
LinkButton LnkConceptoO = e.Row.FCLinkButton("LnkConceptoO");
LinkButton LnkImporteO = e.Row.FCLinkButton("LnkImporteO");
if (LnkConceptoO != null)
{
LnkConceptoO.Visible = false;
LnkImporteO.Visible = false;
if (e.Row.DBCampo("ImporteO").ToDecimal() == 0)
{
e.Row.FCLabel("LtlConceptoO").Visible = false;
e.Row.FCLabel("LtlImporteO").Visible = false;
if (e.Row.DataKey("isOnlyBisibleO").ToEntero() == 1)
{
e.Row.CssClass = string.Format("{0} isOnlyBisibleO", e.Row.CssClass);
}
}
}
CveConceptoPolgvc = CveConcepto;
CveConceptoDolgvc = CveConceptoD;
@@ -3772,6 +3803,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
int CvePersonal = 0;
int CveNomina = 0;
int CveMetodoPago = 0;
double SubTotal = 0;
double Total = 0;
int CveMoneda = 1;
#endregion
@@ -3789,7 +3821,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
CveNomina = 0;
CvePersonal = rtemp["CvePersonal"].ToString().ToEntero();
CveMetodoPago = rtemp["CveMetodoPago"].ToString().ToEntero();
SubTotal = 0;//cambiar reparar
Total = 0;//cambiar reparar
SubTotal = rtemp["SumaPercepciones"].ToString().ToDouble();
Total = rtemp["Total"].ToString().ToDouble();
if (CvePersonal > 0)
{
@@ -3797,13 +3832,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
if (objNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodoSeleccionado, -1, UsuarioActual.CveEmpresa))
{
if (objNomina.DtResultados.Rows.Count > 0)
{
CveNomina = objNomina.CveNomina;
}
else
{
if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoSeleccionado, Total, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoSeleccionado, SubTotal, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
"", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{
CveNomina = objNomina.CveNomina;
@@ -4094,8 +4130,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ");
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 ");
DataTable dtObl = dtConceptos.FiltraParametros("Tipo IN ('O') AND EsPadre = 1 ");
dtper.Columns.Add("BorradoLogico", typeof(int));
dtded.Columns.Add("BorradoLogico", typeof(int));
dtObl.Columns.Add("BorradoLogico", typeof(int));
foreach (DataRow row in dtper.Rows)
{
@@ -4119,13 +4157,26 @@ public partial class Nomina_Nomina2 : ClsPaginas
row["BorradoLogico"] = BorradoLogico;
}
dtded.AcceptChanges();
foreach (DataRow row in dtObl.Rows)
{
int BorradoLogico = 0;
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0))
{
BorradoLogico = 1;
}
row["BorradoLogico"] = BorradoLogico;
}
dtObl.AcceptChanges();
dtper = dtper.FiltraParametros("BorradoLogico=0");
dtded = dtded.FiltraParametros("BorradoLogico=0");
dtObl = dtObl.FiltraParametros("BorradoLogico=0");
int maxper = dtper.Rows.Count;
int maxded = dtded.Rows.Count;
int maxObl = dtObl.Rows.Count;
int i = 0;
List<NConcepto> lconc = new List<NConcepto>();
for (i = 0; i < maxper || i < maxded; i++)
for (i = 0; i < maxper || i < maxded || i < maxObl; i++)
{
NConcepto nConcepto = new NConcepto();
DataRow row;
@@ -4157,6 +4208,20 @@ public partial class Nomina_Nomina2 : ClsPaginas
nConcepto.ImporteD = Importe;
nConcepto.ValorD = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", 1));
}
if (maxObl > i)
{
row = dtObl.Rows[i];
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
string Concepto = row["Concepto"].ToString();
string Codigo = row["Codigo"].ToString();
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", 1));
nConcepto.CveConceptoO = CveConcepto;
nConcepto.ConceptoO = Concepto;
nConcepto.NoConceptoO = Codigo;
nConcepto.ImporteO = Importe;
nConcepto.ValorO = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", 1));
}
lconc.Add(nConcepto);
}
@@ -4173,6 +4238,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
SubTotales.ConceptoD = "Total Deducciones";
SubTotales.EstatusD = -2;
SubTotales.ImporteD = dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", 1));
SubTotales.CveConceptoD = 0;
SubTotales.ConceptoO = "Total Obligaciones";
SubTotales.EstatusO = -2;
SubTotales.ImporteO = dtempleados.SUM("SumaObligaciones", string.Format("CvePersonal = {0}", 1));
//NConcepto Totales = new NConcepto();
//Totales.CveConceptoD = 0;

View File

@@ -227,6 +227,8 @@ Partial Class Nomina_ReportePTU
End If
GVCalcularUtilidades.DataSource = dt
GVCalcularUtilidades.DataBind()
upDatosPA_N.Update()
End Sub
Protected Sub GVTipoPeriodo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then

View File

@@ -474,7 +474,7 @@
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList Width ="100%" ID="DdlTipoContrato" runat="server" AppendDataBoundItems="True" DataTextField="txtoddl" DataValueField="CveTipoContrato" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:DropDownList Width ="100%" ID="DdlTipoContrato" runat="server" AppendDataBoundItems="True" DataTextField="TipoContrato" DataValueField="CveTipoContrato" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
@@ -4711,7 +4711,7 @@
</div>
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtSalarioDiarioImSS" Enabled="true" CssClass="form-control" runat="server"></asp:TextBox>
<asp:TextBox ID="TxtSalarioDiarioImSS" Enabled="false" CssClass="form-control" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtSalarioDiarioImSS">Salario diario(IMSS):</asp:Label>
</div>

View File

@@ -1001,10 +1001,9 @@ Partial Class RH_Personal
End Sub
Private Sub CargaTiposContrato()
Dim dt As DataTable = GlobalDTTiposContrato
'dt.Columns.Add("txtoddl", GetType(String), "CodigoTipoContrato + ' ' + TipoContrato")
'DdlTipoContrato.DataSource = dt
'DdlTipoContrato.DataBind()
Dim dt As DataTable = GlobalDTTiposContrato
DdlTipoContrato.DataSource = dt
DdlTipoContrato.DataBind()
End Sub
Private Sub CargaTurno()
@@ -6208,7 +6207,12 @@ Partial Class RH_Personal
Alert("Se actualizo el calculo de fonacot")
End If
End Sub
Protected Sub LnkCalcularFactor_Click(sender As Object, e As EventArgs)
Protected Sub LnkCalcularFactor_Click(sender As Object, e As EventArgs)
getdatosFI()
RegistraScript("$('#DmodalFactordeIntegraccion').modal()")
End Sub
Private Sub getdatosFI()
If TxtFIAguinaldo.Text = "0" Or TxtFIAguinaldo.Text = "" Or TxtFIAguinaldo.Text = "-1" Then
TxtFIAguinaldo.Text = "15"
End If
@@ -6237,10 +6241,8 @@ Partial Class RH_Personal
End If
End If
End Using
End If
RegistraScript("$('#DmodalFactordeIntegraccion').modal()")
UpFactordeintegracion.Update()
End If
UpFactordeintegracion.Update()
End Sub
Private Sub calcularSDI()
Dim SD As Decimal = TxtFISalariodiario.Text.ToDecimal()
@@ -6282,15 +6284,25 @@ Partial Class RH_Personal
End If
End Using
End Sub
Protected Sub LnkModificarSalarioGuardar_Click(sender As Object, e As EventArgs)
Protected Sub LnkModificarSalarioGuardar_Click(sender As Object, e As EventArgs)
getdatosFI()
TxtFISalariodiario.Text = TxtSalarioDiarioM.Text
calcularSDI()
TxtSalarioDiarioImSS.Text = TxtFISalarioDiarioIntegrado.Text
TxtSalarioDiarioIntegrado.Text = TxtFISalarioDiarioIntegrado.Text
Using ObjPersonal As ClsRH = New ClsRH()
If ObjPersonal.UpdateSalarios(CvePersonal, TxtFechamodSalario.Text.ToDate().ToString("yyyy/MM/dd"), UsuarioActual.CveEmpresa, TxtSalarioDiarioM.Text.ToDecimal(), TxtSalarioDiarioIntegrado.Text.ToDecimal(), TxtSalarioDiarioImSS.Text.ToDecimal(), TxtSalarioDiarioPago.Text.ToDecimal()) Then
If ObjPersonal.UpdateSalarios(CvePersonal, TxtFechamodSalario.Text.ToDate().ToString("yyyy/MM/dd"), UsuarioActual.CveEmpresa, TxtSalarioDiarioM.Text.ToDecimal(), TxtFISalarioDiarioIntegrado.Text.ToDecimal(), TxtFISalarioDiarioIntegrado.Text.ToDecimal(), TxtSalarioDiarioM.Text.ToDecimal()) Then
TxtSalarioDiario.Text = TxtSalarioDiarioM.Text
TxtFISalariodiario.Text = TxtSalarioDiarioM.Text
TxtSalarioCotizado.Text = TxtSalarioDiarioImSS.Text
TxtSDI.Text = TxtSalarioDiarioIntegrado.Text
TxtFISalarioDiarioIntegrado.Text = TxtSalarioDiarioIntegrado.Text
TxtFISalarioDiarioIntegrado.Text = TxtSalarioDiarioIntegrado.Text
UpModSalario.Update()
UpDatos.Update()
Alert("Se ha actualizado el salario", TipoMensaje.ToastInformacion)
End If

View File

@@ -869,15 +869,20 @@
//
function ShowToast(text, header, type, footer, sound,persistencia,coords) {
var snd = new Audio("/Sonidos/" + sound);
let playPromise;
snd.onended=function(){
if (persistencia) {
snd.play();
playPromise = snd.play();
snd.currentTime = 0;
}
};
toastr.options = {
"closeButton": true,
"onHidden": function(){ persistencia = false; snd.pause(); snd.currentTime = 0; },
"onHidden": function () { persistencia = false; if (playPromise !== undefined) { playPromise.then(_ => { snd.pause(); }).catch(error => { }); } snd.currentTime = 0; },
"debug": false,
"newestOnTop": true,
"progressBar": false,
@@ -914,6 +919,9 @@
snd.play();
snd.currentTime = 0;
}
var Cves= <%= If(UsuarioActual IsNot Nothing, UsuarioActual.CveUsuario, -1) %>;
function UpdateNotificacion(CveNotificacionBitacora) {
var request = {
Metodo: "UpdateNotificacion",
@@ -965,7 +973,7 @@
var notificationHub = $.connection.myGPSHub;
notificationHub.client.addLatestNotification = function (data, user, header, tipo, options, sound, Cve,Persistencia,Coords) {
notificationHub.client.addLatestNotification = function (data, user, header, tipo, options, sound, Cve, Persistencia, Coords) {
var tipoNotificacion = "success";
switch (tipo) {
case 0:
@@ -980,8 +988,12 @@
default:
tipoNotificacion = "success";
}
notificationHub.server.disparaNotificacionUsuario(user, data, header, tipoNotificacion, options, sound, $.connection.hub.id, Cve,Persistencia,Coords);
//notificationHub.server.disparaNotificacionUsuario(user, data, header, tipoNotificacion, options, sound, $.connection.hub.id, Cve,Persistencia,Coords);
console.log("change1");
if (Cves == user) {
ShowToast(data, header, tipoNotificacion, options, sound, Persistencia, Coords);
}
}
notificationHub.client.mostrarNotificacion = function (data, header, type, options, sound, Cve,Persistencia,coords) {

View File

@@ -154,6 +154,10 @@