movtos permanentes

This commit is contained in:
Jorge Luis caudillo esparza
2025-04-25 11:46:56 -07:00
parent 6369329464
commit 437f115872
3 changed files with 122 additions and 32 deletions

View File

@@ -3380,6 +3380,31 @@ Public Class ClsNominas
End Function End Function
#Region "MovtosPermanentes" #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
Dim retorno As Boolean = False
DataAdapter("PA_GetMovtoPermanenteRepFechas", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
.Add("@CvePersonal", SqlDbType.Int).Value = cvePersonal
.Add("@CveTipo", SqlDbType.Int).Value = cveTipo
.Add("@CveSaldo", SqlDbType.Int).Value = cveSaldo
.Add("@CveEstatus", SqlDbType.Int).Value = cveEstatus
.Add("@CveConcepto", SqlDbType.Int).Value = cveConcepto
.Add("@STRFechaInicio", SqlDbType.VarChar).Value = STRFechaInicio
.Add("@STRFechaFin", SqlDbType.VarChar).Value = STRFechaFin
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch sqEx As SqlException
retorno = False
OnError("Ocurrió un error al obtener los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception
retorno = False
OnError("Ocurrió un error al obtener los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
Public Function GetMovtoPermanenteRep(cvePersonal As Int32, cveEmpresa As Int32, cveTipo As Int32, cveSaldo As Int32, cveEstatus As Int32, cveConcepto As Int32) As Boolean Public Function GetMovtoPermanenteRep(cvePersonal As Int32, cveEmpresa As Int32, cveTipo As Int32, cveSaldo As Int32, cveEstatus As Int32, cveConcepto As Int32) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_GetMovtoPermanenteRep", CommandType.StoredProcedure) DataAdapter("PA_GetMovtoPermanenteRep", CommandType.StoredProcedure)

View File

@@ -4,10 +4,10 @@
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style> <style>
.GVGetMovtoPermanenteRep .headerHide:not(Titulos) th:nth-child(2) { /* .GVGetMovtoPermanenteRep .headerHide:not(Titulos) th:nth-child(2) {
display: none; display: none;
} }
*/
.GVGetMovtoPermanenteRep tr:not(.cvetipo0) td .btnhideshow { .GVGetMovtoPermanenteRep tr:not(.cvetipo0) td .btnhideshow {
display: none; display: none;
} }
@@ -16,11 +16,17 @@
background-color: #ddd; background-color: #ddd;
} }
.GVGetMovtoPermanenteRep tr:not(.cvetipo0) td:nth-child(2) { /*.GVGetMovtoPermanenteRep tr:not(.cvetipo0) td:nth-child(1) {
display: none; display: none;
} }
.GVGetMovtoPermanenteRep tr:.cvetipo0 td:nth-child(2) {
display: none;
}*/
.GVGetMovtoPermanenteRep tr:not(.cvetipo0) td .lblcodigo { .GVGetMovtoPermanenteRep tr:not(.cvetipo0) td .lblconcepto {
display: none;
}
.GVGetMovtoPermanenteRep tr.cvetipo0 td .lblcodigo {
display: none; display: none;
} }
@@ -28,7 +34,7 @@
display: none; display: none;
} }
/* Ocultar las columnas 3 a 9 en filas que no tienen la clase cvetipo0 */ /* Ocultar las columnas 3 a 9 en filas que no tienen la clase cvetipo0 */
.GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(3), /*.GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(3),
.GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(4), .GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(4),
.GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(5), .GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(5),
.GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(6), .GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(6),
@@ -36,11 +42,11 @@
.GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(8), .GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(8),
.GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(9) { .GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(9) {
display: none; display: none;
} }*/
.GVGetMovtoPermanenteRep td:nth-child(10), .GVGetMovtoPermanenteRep td:nth-child(3),
.GVGetMovtoPermanenteRep td:nth-child(11), .GVGetMovtoPermanenteRep td:nth-child(4),
.GVGetMovtoPermanenteRep td:nth-child(12), .GVGetMovtoPermanenteRep td:nth-child(5),
.GVGetMovtoPermanenteRep td:nth-child(13), .GVGetMovtoPermanenteRep td:nth-child(13),
.GVGetMovtoPermanenteRep td:nth-child(14) { .GVGetMovtoPermanenteRep td:nth-child(14) {
text-align: right text-align: right
@@ -51,6 +57,7 @@
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Reporte de Movimientos Permanentes
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content> </asp:Content>
@@ -67,8 +74,8 @@
<div class="portlet-title portlet-filterT smalltitle"> <div class="portlet-title portlet-filterT smalltitle">
<div class="titlefiltros caption"> <div class="titlefiltros caption">
<div class="row"> <div class="row">
<label class="col-md-1 compoonenlabel" style="max-width: 65px;">Tipo: </label> <label class="col-md-1 compoonenlabel" style="max-width: 65px; display:none;">Tipo: </label>
<div class="col-md-1"> <div class="col-md-1" style=" display:none;">
<asp:DropDownList ID="DDlTipo" runat="server" Style="width: 100% !important;" CssClass="select2me"> <asp:DropDownList ID="DDlTipo" runat="server" Style="width: 100% !important;" CssClass="select2me">
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem> <asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Movimientos Permanentes" Value="1"></asp:ListItem> <asp:ListItem Text="Movimientos Permanentes" Value="1"></asp:ListItem>
@@ -76,16 +83,16 @@
<asp:ListItem Text="Infonavit" Value="3"></asp:ListItem> <asp:ListItem Text="Infonavit" Value="3"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 compoonenlabel" style="max-width: 65px;">Saldo: </label> <label class="col-md-1 compoonenlabel" style="max-width: 65px; display:none;">Saldo: </label>
<div class="col-md-1"> <div class="col-md-1" style=" display:none;">
<asp:DropDownList ID="DDLSaldo" runat="server" Style="width: 100% !important;" CssClass="select2me"> <asp:DropDownList ID="DDLSaldo" runat="server" Style="width: 100% !important;" CssClass="select2me">
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem> <asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Pendiente" Value="1"></asp:ListItem> <asp:ListItem Text="Pendiente" Value="1"></asp:ListItem>
<asp:ListItem Text="Pagado" Value="2"></asp:ListItem> <asp:ListItem Text="Pagado" Value="2"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 compoonenlabel" style="max-width: 65px;">Estatus: </label> <label class="col-md-1 compoonenlabel" style="max-width: 65px; display:none;">Estatus: </label>
<div class="col-md-1"> <div class="col-md-1" style=" display:none;">
<asp:DropDownList ID="DDLEstatus" runat="server" Style="width: 100% !important;" CssClass="select2me"> <asp:DropDownList ID="DDLEstatus" runat="server" Style="width: 100% !important;" CssClass="select2me">
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem> <asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Activo" Value="1"></asp:ListItem> <asp:ListItem Text="Activo" Value="1"></asp:ListItem>
@@ -107,6 +114,35 @@
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 mediocol">del:</label>
<div class="col-md-1">
<%--<asp:TextBox ID="TxtPeriodoInicio" Text="0" CssClass="form-control" runat="server"></asp:TextBox>--%>
<div 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 ">
<asp:LinkButton ID="LnkRpdFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</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 ">
<asp:LinkButton ID="LnkFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</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>
<div class="col-md-1"> <div class="col-md-1">
<asp:LinkButton ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" /> <asp:LinkButton ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
@@ -132,27 +168,43 @@
AutoGenerateColumns="False" OnRowDataBound="GVGetMovtoPermanenteRep_RowDataBound" AutoGenerateColumns="False" OnRowDataBound="GVGetMovtoPermanenteRep_RowDataBound"
DataKeyNames="CvePersonal,Codigo,NombreCompleto,CveTipo,Tipo,CveMovtoPermanente,CveFonacot,CveConcepto,Concepto,NumeroCredito,FechaInicio,TipoAplicacion,EsAcumulado,Estatus,Valor,VecesAplicar,MontoLimite,Saldo"> DataKeyNames="CvePersonal,Codigo,NombreCompleto,CveTipo,Tipo,CveMovtoPermanente,CveFonacot,CveConcepto,Concepto,NumeroCredito,FechaInicio,TipoAplicacion,EsAcumulado,Estatus,Valor,VecesAplicar,MontoLimite,Saldo">
<Columns> <Columns>
<%--<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>--%>
<asp:TemplateField HeaderText=""> <asp:TemplateField HeaderText="">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblcodigo" CssClass="lblcodigo" runat="server" Text='<%# Eval("Codigo")%>'> </asp:Label> <asp:Label ID="lblcodigo" runat="server" Text='<%# Eval("Codigo")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Nombre Completo"> <asp:TemplateField HeaderText="Nombre Completo">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblnombreCompleto" runat="server" Text='<%# Eval("NombreCompleto")%>'> </asp:Label> <asp:Label ID="lblnombreCompleto" CssClass="lblcodigo" runat="server" Text='<%# Eval("NombreCompleto")%>'> </asp:Label>
<asp:Label ID="lblconcepto" CssClass="lblconcepto" runat="server" Text='<%# Eval("Concepto")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Tipo">
<asp:TemplateField HeaderText="Descuento Acordado">
<ItemTemplate>
<asp:Label ID="lblAcordado" runat="server" Text='<%# Eval("Valor","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Descuento Aplicado">
<ItemTemplate>
<asp:Label ID="lblAplicado" runat="server" Text='<%# Eval("MontoAplicado","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Acumulado">
<ItemTemplate>
<asp:Label ID="lblsaldo" runat="server" Text='<%# Eval("Acumulado","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:TemplateField HeaderText="Tipo">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lbltipo" runat="server" Text='<%# Eval("Tipo")%>'> </asp:Label> <asp:Label ID="lbltipo" runat="server" Text='<%# Eval("Tipo")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>--%>
<asp:TemplateField HeaderText="Concepto"> <%-- <asp:TemplateField HeaderText="# Credito">
<ItemTemplate>
<asp:Label ID="lblconcepto" runat="server" Text='<%# Eval("Concepto")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="# Credito">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblnumeroCredito" runat="server" Text='<%# Eval("NumeroCredito")%>'> </asp:Label> <asp:Label ID="lblnumeroCredito" runat="server" Text='<%# Eval("NumeroCredito")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -212,7 +264,7 @@
CssClass="btn btn-circle btn-xs green" Text="<i class='fa fa-money-bill'></i>" OnClick="LnkPagar_Click" /> CssClass="btn btn-circle btn-xs green" Text="<i class='fa fa-money-bill'></i>" OnClick="LnkPagar_Click" />
<asp:LinkButton ID="LnkremoveMovtoPermanente" Visible='<%# (Eval("CveMovtoPermanente").ToString()!="" )%>' runat="server" OnClick="LnkremoveMovtoPermanente_Click" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el NomFonacot?" data-btn-ok-label="si" /> <asp:LinkButton ID="LnkremoveMovtoPermanente" Visible='<%# (Eval("CveMovtoPermanente").ToString()!="" )%>' runat="server" OnClick="LnkremoveMovtoPermanente_Click" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el NomFonacot?" data-btn-ok-label="si" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>--%>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>
@@ -242,7 +294,7 @@
`; `;
// Insertar la nueva fila antes de la fila con la clase "headerHide" // Insertar la nueva fila antes de la fila con la clase "headerHide"
$headerHideRow.before(newRow); //$headerHideRow.before(newRow);
} }
// Limpiar el intervalo después de agregar la fila // Limpiar el intervalo después de agregar la fila
clearInterval(checkInterval); clearInterval(checkInterval);

View File

@@ -39,6 +39,16 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas
get { return ViewState["RcveConcepto"] != null ? (int)ViewState["RcveConcepto"] : 0; } get { return ViewState["RcveConcepto"] != null ? (int)ViewState["RcveConcepto"] : 0; }
set { ViewState["RcveConcepto"] = value; } set { ViewState["RcveConcepto"] = value; }
} }
private string fechaInicio
{
get { return TxtRpdFechaInicio.Text; }
set { TxtRpdFechaInicio.Text = value; }
}
private string fechaFin
{
get { return TxtRpdFechaFin.Text; }
set { TxtRpdFechaFin.Text = value; }
}
#endregion #endregion
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
@@ -49,7 +59,8 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas
RcveSaldo = Request["cveSaldo"] != null ? Convert.ToInt32(Request["cveSaldo"]) : -1; RcveSaldo = Request["cveSaldo"] != null ? Convert.ToInt32(Request["cveSaldo"]) : -1;
RcveEstatus = Request["cveEstatus"] != null ? Convert.ToInt32(Request["cveEstatus"]) : -1; RcveEstatus = Request["cveEstatus"] != null ? Convert.ToInt32(Request["cveEstatus"]) : -1;
RcveConcepto = Request["cveConcepto"] != null ? Convert.ToInt32(Request["cveConcepto"]) : -1; RcveConcepto = Request["cveConcepto"] != null ? Convert.ToInt32(Request["cveConcepto"]) : -1;
fechaInicio = DateTime.Now.ToString("01/MM/yyyy");
fechaFin=DateTime.Now.ToString("01/MM/yyyy").ToDateTime().AddMonths(1).AddDays(1).ToString("01/MM/yyyy");
CargaCombos(); CargaCombos();
cargardatos(); cargardatos();
@@ -84,7 +95,9 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas
{ {
using (ClsNominas ObjGetM = new ClsNominas()) using (ClsNominas ObjGetM = new ClsNominas())
{ {
ObjGetM.GetMovtoPermanenteRep(RcvePersonal, UsuarioActual.CveEmpresa, RcveTipo, RcveSaldo, RcveEstatus, RcveConcepto); //string fechaInicio = "";
//string fechaFin = "";
ObjGetM.GetMovtoPermanenteRepFechas(RcvePersonal, UsuarioActual.CveEmpresa, RcveTipo, RcveSaldo, RcveEstatus, RcveConcepto, fechaInicio, fechaFin);
GVGetMovtoPermanenteRep.DataSource = ObjGetM.DtResultados; GVGetMovtoPermanenteRep.DataSource = ObjGetM.DtResultados;
GVGetMovtoPermanenteRep.DataBind(); GVGetMovtoPermanenteRep.DataBind();
@@ -121,7 +134,7 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas
e.Row.Attributes.Add("data-cvepersonal", cvepersonal); e.Row.Attributes.Add("data-cvepersonal", cvepersonal);
if (cvetipoValue == "0") if (cvetipoValue == "0")
{ {
e.Row.Cells[1].Attributes.Add("colspan", "7"); //e.Row.Cells[1].Attributes.Add("colspan", "7");
cssclass = string.Format("{0} cvetipo0", cssclass); cssclass = string.Format("{0} cvetipo0", cssclass);
} }
e.Row.CssClass = cssclass; e.Row.CssClass = cssclass;