[FEAT(Nominas)] sen agrega periodo en rep movimientos permanentes
This commit is contained in:
@@ -3391,7 +3391,7 @@ Public Class ClsNominas
|
||||
End Function
|
||||
#Region "MovtosPermanentes"
|
||||
|
||||
Public Function GetMovtoPermanenteRepFechas(cvePersonal As Int32, cveEmpresa As Int32, cveTipo As Int32, cveSaldo As Int32, cveEstatus As Int32, cveConcepto As Int32, STRFechaInicio As String, STRFechaFin As String) As Boolean
|
||||
Public Function GetMovtoPermanenteRepFechas(cvePersonal As Int32, cveEmpresa As Int32, cveTipo As Int32, cveSaldo As Int32, cveEstatus As Int32, cveConcepto As Int32, STRFechaInicio As String, STRFechaFin As String, Optional CvePeriodo As Integer = -1) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_GetMovtoPermanenteRepFechas", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -3401,6 +3401,7 @@ Public Class ClsNominas
|
||||
.Add("@CveSaldo", SqlDbType.Int).Value = cveSaldo
|
||||
.Add("@CveEstatus", SqlDbType.Int).Value = cveEstatus
|
||||
.Add("@CveConcepto", SqlDbType.Int).Value = cveConcepto
|
||||
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||
.Add("@STRFechaInicio", SqlDbType.VarChar).Value = STRFechaInicio
|
||||
.Add("@STRFechaFin", SqlDbType.VarChar).Value = STRFechaFin
|
||||
End With
|
||||
|
||||
@@ -130,8 +130,6 @@
|
||||
|
||||
<label class="col-md-1 mediocol">del:</label>
|
||||
<div class="col-md-1">
|
||||
<%--<asp:TextBox ID="TxtPeriodoInicio" Text="0" CssClass="form-control" runat="server"></asp:TextBox>--%>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtRpdFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
@@ -139,13 +137,10 @@
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TxtRpdFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender3" TargetControlID="TxtRpdFechaInicio" PopupButtonID="LnkRpdFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvRpdFechaInicio" runat="server" ControlToValidate="TxtRpdFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaInicio"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 mediocol">al:</label>
|
||||
<div class="col-md-1">
|
||||
<%--<asp:TextBox ID="TxtPeriodoFin" Text="99" CssClass="form-control" runat="server"></asp:TextBox>--%>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtRpdFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
@@ -153,8 +148,6 @@
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender5" runat="server" TargetControlID="TxtRpdFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender4" TargetControlID="TxtRpdFechaFin" PopupButtonID="LnkFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvRpdFechaFin" runat="server" ControlToValidate="TxtRpdFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaFin"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -164,10 +157,31 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="portlet-body" >
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-1 compoonenlabel" style="max-width: 65px;">Ejercicio: </label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicios" runat="server" OnSelectedIndexChanged="DdlEjercicios_SelectedIndexChanged" AutoPostBack="true" Style="width: 100% !important;" CssClass="select2me" DataValueField="Ejercicio" DataTextField="Ejercicio"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 compoonenlabel" style="max-width: 100px;">Tipo Período:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" OnSelectedIndexChanged="DdlTipoPeriodo_SelectedIndexChanged" CssClass="select2me" AutoPostBack="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Style="width: 100% !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 compoonenlabel">Período:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" CssClass="select2me" DataTextField="NominaEstatus" DataValueField="CvePeriodo" Style="width: 100% !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using ClosedXML.Excel;
|
||||
using Extensiones;
|
||||
using Profact.TimbraCFDI40;
|
||||
using static Extensiones.ModExtensiones;
|
||||
|
||||
public partial class Nomina_RepMovtosPermanentes : ClsPaginas
|
||||
{
|
||||
@@ -70,6 +72,39 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
protected void DdlEjercicios_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
cargaPeriodos();
|
||||
}
|
||||
|
||||
protected void DdlTipoPeriodo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
cargaPeriodos(1);
|
||||
}
|
||||
private void cargaPeriodos(int tipo = 0)
|
||||
{
|
||||
int tipoPeriodo = DdlTipoPeriodo.SelectedValue.ToEntero();
|
||||
int ejercicio = DdlEjercicios.SelectedValue.ToEntero();
|
||||
DataTable dtPeriodos = null;
|
||||
if (DdlTipoPeriodo.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
using (ClsNominas objperiodos = new ClsNominas())
|
||||
{
|
||||
if (objperiodos.GetPeriodos(tipoPeriodo, UsuarioActual.CveEmpresa, ejercicio, -1, -1))
|
||||
{
|
||||
|
||||
dtPeriodos = objperiodos.DtResultados.FiltraParametros("Estatus IN (1,2,3,4,5)");
|
||||
}
|
||||
}
|
||||
}
|
||||
DdlPeriodo.DataSource = dtPeriodos;
|
||||
DdlPeriodo.DataBind();
|
||||
DdlPeriodo.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
if (tipo == 1 && dtPeriodos != null && dtPeriodos.Rows.Count > 0)
|
||||
{
|
||||
DdlPeriodo.SelectedValue = dtPeriodos.Rows[0]["CvePeriodo"].ToString();
|
||||
}
|
||||
}
|
||||
protected void CargaCombos()
|
||||
{
|
||||
DDlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa);
|
||||
@@ -88,6 +123,20 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas
|
||||
DDLSaldo.SelectedValueExist(RcveSaldo.ToString());
|
||||
DDLEstatus.SelectedValueExist(RcveEstatus.ToString());
|
||||
DDLConcepto.SelectedValueExist(RcveConcepto.ToString());
|
||||
|
||||
|
||||
DataTable dtejercicio = null;
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetEjercicios(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
dtejercicio = objnom.DtResultados;
|
||||
}
|
||||
}
|
||||
DdlEjercicios.DataSource = dtejercicio;
|
||||
DdlEjercicios.DataBind();
|
||||
DdlTipoPeriodo.DataSource = get_GlobalDTTipoPeriodos(UsuarioActual.CveEmpresa);
|
||||
DdlTipoPeriodo.DataBind();
|
||||
}
|
||||
protected void cargardatos()
|
||||
{
|
||||
@@ -95,7 +144,8 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas
|
||||
{
|
||||
//string fechaInicio = "";
|
||||
//string fechaFin = "";
|
||||
ObjGetM.GetMovtoPermanenteRepFechas(RcvePersonal, UsuarioActual.CveEmpresa, RcveTipo, RcveSaldo, RcveEstatus, RcveConcepto, fechaInicio.ToDateTime().ToString("yyyy-MM-dd"), fechaFin.ToDateTime().ToString("yyyy-MM-dd"));
|
||||
int CvePeriodo = DdlPeriodo.SelectedValue.ToEntero() > 0 ? DdlPeriodo.SelectedValue.ToEntero() : -1;
|
||||
ObjGetM.GetMovtoPermanenteRepFechas(RcvePersonal, UsuarioActual.CveEmpresa, RcveTipo, RcveSaldo, RcveEstatus, RcveConcepto, fechaInicio.ToDateTime().ToString("yyyy-MM-dd"), fechaFin.ToDateTime().ToString("yyyy-MM-dd"), CvePeriodo);
|
||||
GVGetMovtoPermanenteRep.DataSource = ObjGetM.DtResultados;
|
||||
GVGetMovtoPermanenteRep.DataBind();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user