This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2023-12-28 06:59:26 -07:00
parent f1e46c371d
commit 3cbcc284db
6 changed files with 86 additions and 17 deletions

View File

@@ -4,6 +4,7 @@ Option Explicit On
Imports System.Data Imports System.Data
Imports System.Data.SqlClient Imports System.Data.SqlClient
Imports Extensiones Imports Extensiones
Imports Profact.TimbraCFDI40
Public Class ClsRH Public Class ClsRH
@@ -147,41 +148,45 @@ Public Class ClsRH
Return retorno Return retorno
End Function End Function
#Region "CRUD_VacacionesEmpresas" #Region "CRUD_VacacionesEmpresas"
Public Function VacacionesEmpresasGet(cveEmpresa As Int32, inicio As Int32, fin As Int32) As Boolean Public Function VacacionesEmpresasGet(cveEmpresa As Int32, inicio As Int32, fin As Int32, Ejercicio As Integer) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_RH_VacacionesEmpresasGet", CommandType.StoredProcedure) DataAdapter("PA_RH_VacacionesEmpresasGet", CommandType.StoredProcedure)
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa) addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
addParameters("@Inicio", SqlDbType.Int, inicio) addParameters("@Inicio", SqlDbType.Int, inicio)
addParameters("@Fin", SqlDbType.Int, fin) addParameters("@Fin", SqlDbType.Int, fin)
addParameters("@Ejercicio", SqlDbType.Int, Ejercicio)
retorno = RunQuery("Ocurrió un error al obtener el Vacaciones Empresas.") retorno = RunQuery("Ocurrió un error al obtener el Vacaciones Empresas.")
Return retorno Return retorno
End Function End Function
Public Function VacacionesEmpresasAdd(cveEmpresa As Int32, inicio As Int32, fin As Int32, diasVacaciones As Int32) As Boolean Public Function VacacionesEmpresasAdd(cveEmpresa As Int32, inicio As Int32, fin As Int32, diasVacaciones As Int32, Ejercicio As Integer) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_RH_VacacionesEmpresasAdd", CommandType.StoredProcedure) DataAdapter("PA_RH_VacacionesEmpresasAdd", CommandType.StoredProcedure)
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa) addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
addParameters("@Inicio", SqlDbType.Int, inicio) addParameters("@Inicio", SqlDbType.Int, inicio)
addParameters("@Fin", SqlDbType.Int, fin) addParameters("@Fin", SqlDbType.Int, fin)
addParameters("@DiasVacaciones", SqlDbType.Int, diasVacaciones) addParameters("@DiasVacaciones", SqlDbType.Int, diasVacaciones)
addParameters("@Ejercicio", SqlDbType.Int, Ejercicio)
retorno = RunQuery("Ocurrió un error al agregar el Vacaciones Empresas.") retorno = RunQuery("Ocurrió un error al agregar el Vacaciones Empresas.")
Return retorno Return retorno
End Function End Function
Public Function VacacionesEmpresasUp(cveEmpresa As Int32, inicio As Int32, fin As Int32, diasVacaciones As Int32) As Boolean Public Function VacacionesEmpresasUp(cveEmpresa As Int32, inicio As Int32, fin As Int32, diasVacaciones As Int32, Ejercicio As Integer) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_RH_VacacionesEmpresasUp", CommandType.StoredProcedure) DataAdapter("PA_RH_VacacionesEmpresasUp", CommandType.StoredProcedure)
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa) addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
addParameters("@Inicio", SqlDbType.Int, inicio) addParameters("@Inicio", SqlDbType.Int, inicio)
addParameters("@Fin", SqlDbType.Int, fin) addParameters("@Fin", SqlDbType.Int, fin)
addParameters("@DiasVacaciones", SqlDbType.Int, diasVacaciones) addParameters("@DiasVacaciones", SqlDbType.Int, diasVacaciones)
addParameters("@Ejercicio", SqlDbType.Int, Ejercicio)
retorno = RunQuery("Ocurrió un error al actualizar el Vacaciones Empresas.") retorno = RunQuery("Ocurrió un error al actualizar el Vacaciones Empresas.")
Return retorno Return retorno
End Function End Function
Public Function VacacionesEmpresasRemove(cveEmpresa As Int32, inicio As Int32, fin As Int32) As Boolean Public Function VacacionesEmpresasRemove(cveEmpresa As Int32, inicio As Int32, fin As Int32, Ejercicio As Integer) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_RH_VacacionesEmpresasRemove", CommandType.StoredProcedure) DataAdapter("PA_RH_VacacionesEmpresasRemove", CommandType.StoredProcedure)
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa) addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
addParameters("@Inicio", SqlDbType.Int, inicio) addParameters("@Inicio", SqlDbType.Int, inicio)
addParameters("@Fin", SqlDbType.Int, fin) addParameters("@Fin", SqlDbType.Int, fin)
addParameters("@Ejercicio", SqlDbType.Int, Ejercicio)
retorno = RunQuery("Ocurrió un error al eliminar el Vacaciones Empresas.") retorno = RunQuery("Ocurrió un error al eliminar el Vacaciones Empresas.")
Return retorno Return retorno
End Function End Function

View File

@@ -101,7 +101,7 @@
<asp:GridView ID="GVCalculoISRAnual" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD GVCalculoISRAnual Widthall" AutoGenerateColumns="False" <asp:GridView ID="GVCalculoISRAnual" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD GVCalculoISRAnual Widthall" AutoGenerateColumns="False"
DataKeyNames="CvePersonal,Codigo,NombreCompleto,TipoIngreso,FechaInicio,FechaFin,IngresosTotales,BaseGravada,Deducciones,ISRRetenido,Art152,SubsCorrespondiente,LimiteInferior,LimiteSuperior,CuotaFija,Porcentaje,ImpuestoAnual,Acargo,Acompensar"> DataKeyNames="CvePersonal,Aplica,Codigo,NombreCompleto,TipoIngreso,FechaInicio,FechaFin,IngresosTotales,BaseGravada,Deducciones,ISRRetenido,Art152,SubsCorrespondiente,LimiteInferior,LimiteSuperior,CuotaFija,Porcentaje,ImpuestoAnual,Acargo,Acompensar">
<Columns> <Columns>
<asp:TemplateField HeaderText="Aplica"> <asp:TemplateField HeaderText="Aplica">
<ItemTemplate> <ItemTemplate>

View File

@@ -379,10 +379,12 @@ Partial Class Nomina_CatPeriodos
Dim cveTipoPeriodo As Integer = DdlTipoPeriodoCM.SelectedValue.ToEntero() Dim cveTipoPeriodo As Integer = DdlTipoPeriodoCM.SelectedValue.ToEntero()
Dim cveSubTipoPeriodo As Integer = TxtCveSubTipoPeriodoCM.Text.ToEntero() Dim cveSubTipoPeriodo As Integer = TxtCveSubTipoPeriodoCM.Text.ToEntero()
Dim numero As Integer = TxtNumeroCM.Text.ToEntero() Dim numero As Integer = TxtNumeroCM.Text.ToEntero()
Dim fechaInicio As String = TxtFechaInicioCM.Text Dim fechaInicio As String = TxtFechaInicioCM.Text.ToDateTime().ToString("yyyy-MM-dd")
Using onom As New ClsNominas Using onom As New ClsNominas
If onom.CargaPeriodosEjercicio(ejercicio, cveTipoPeriodo, cveSubTipoPeriodo, numero, fechaInicio, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then If onom.CargaPeriodosEjercicio(ejercicio, cveTipoPeriodo, cveSubTipoPeriodo, numero, fechaInicio, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
CargaDatos()
RegistraScript("$('#divCargaMasiva').modal('hide');")
Alert("Se cargo satisfactoriamente.") Alert("Se cargo satisfactoriamente.")
End If End If
End Using End Using

View File

@@ -2898,6 +2898,14 @@
<ajax:ValidatorCalloutExtender ID="VcoVacadiasVacaciones" runat="server" HighlightCssClass="vco" TargetControlID="RfvVacadiasVacaciones"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VcoVacadiasVacaciones" runat="server" HighlightCssClass="vco" TargetControlID="RfvVacadiasVacaciones"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-4 truncate ">Ejercicio</div>
<div class="col-md-4">
<asp:TextBox ID="TxtEjercicioVacaciones" CssClass="form-control input-sm " runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvEjercicioVacaciones" runat="server" ControlToValidate="TxtEjercicioVacaciones" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Dias Vacaciones''</b> es necesario, por favor ingréselo." ValidationGroup="VGMVacaEmpresa"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VcoEjercicioVacaciones" runat="server" HighlightCssClass="vco" TargetControlID="RfvEjercicioVacaciones"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="text-right"> <div class="text-right">
<asp:Button ID="BtnVacaADD" OnClick="BtnVacaADD_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGMVacaEmpresa" /> <asp:Button ID="BtnVacaADD" OnClick="BtnVacaADD_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGMVacaEmpresa" />
</div> </div>
@@ -2915,20 +2923,49 @@
</div> </div>
</div> </div>
<div class="portlet-body"> <div class="portlet-body">
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="titlefiltros caption">
<div class="row">
<label class="col-md-1">Ejercicio: </label>
<div class="col-md-1">
<asp:TextBox ID="TxtEjercicioFiltroVacaciones" CssClass="form-control input-sm " runat="server"></asp:TextBox>
</div>
<div class="col-md-1">
<asp:LinkButton ID="LnkConsultartablasVacaciones" OnClick="LnkConsultartablasVacaciones_Click" runat="server" Text="Consultar" class="btn btn-primary" />
</div>
</div>
</div>
<div class="tools">
<%--<a href="javascript:;" class="expand" data-original-title="" title=""></a>--%>
</div>
</div>
<div class="portlet-body" style="display: none">
</div>
</div>
<div style="width:340px">
<asp:GridView ID="GVVacacionesEmpresas" runat="server" GridLines="None" CssClass="table table-hover table-striped Widthall ScrollAD" AutoGenerateColumns="False" <asp:GridView ID="GVVacacionesEmpresas" runat="server" GridLines="None" CssClass="table table-hover table-striped Widthall ScrollAD" AutoGenerateColumns="False"
DataKeyNames="CveEmpresa,Inicio,Fin,DiasVacaciones"> DataKeyNames="CveEmpresa,Inicio,Fin,DiasVacaciones,Ejercicio">
<Columns> <Columns>
<asp:TemplateField HeaderText="Inicio"> <asp:TemplateField HeaderText="Ejercicio" ItemStyle-HorizontalAlign="Center">
<ItemTemplate >
<asp:Label ID="lblEjercicio" runat="server" Text='<%# Eval("Ejercicio")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Inicio" ItemStyle-HorizontalAlign="right">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblinicio" runat="server" Text='<%# Eval("Inicio")%>'> </asp:Label> <asp:Label ID="lblinicio" runat="server" Text='<%# Eval("Inicio")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Fin"> <asp:TemplateField HeaderText="Fin" ItemStyle-HorizontalAlign="right">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblfin" runat="server" Text='<%# Eval("Fin")%>'> </asp:Label> <asp:Label ID="lblfin" runat="server" Text='<%# Eval("Fin")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Dias Vacaciones"> <asp:TemplateField HeaderText="Dias Vacaciones" ItemStyle-HorizontalAlign="right">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# Eval("DiasVacaciones")%>'> </asp:Label> <asp:Label ID="Label5" runat="server" Text='<%# Eval("DiasVacaciones")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -2946,6 +2983,7 @@
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>
</div>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -2953,7 +2991,22 @@
</ajax:TabPanel> </ajax:TabPanel>
<ajax:TabPanel ID="TTFactorDesctInfonavit" runat="server" HeaderText="Factor descuento Infonavit"> <ajax:TabPanel ID="TTFactorDesctInfonavit" runat="server" HeaderText="Factor descuento Infonavit">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GVFactorDesctInfonavit" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView> <div style="width:340px">
<asp:GridView ID="GVFactorDesctInfonavit" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField HeaderText="Fecha Inicio" ItemStyle-HorizontalAlign="Center">
<ItemTemplate >
<asp:Label ID="lblFechaInicio" runat="server" Text='<%# Eval("Fecha Inicio","{0:dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Factor Descuento" ItemStyle-HorizontalAlign="right">
<ItemTemplate>
<asp:Label ID="lblFactorDescuento" runat="server" Text='<%# Eval("Factor Descuento")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>
<ajax:TabPanel ID="TTFactorSDI" runat="server" HeaderText="Factor SD" Visible="false"> <ajax:TabPanel ID="TTFactorSDI" runat="server" HeaderText="Factor SD" Visible="false">

View File

@@ -13,6 +13,7 @@ using static Extensiones.ModExtensiones;
using Modelos; using Modelos;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using iTextSharp.text.pdf.parser; using iTextSharp.text.pdf.parser;
using Profact.TimbraCFDI40;
public partial class Nomina_Nomina2 : ClsPaginas public partial class Nomina_Nomina2 : ClsPaginas
{ {
@@ -9688,11 +9689,16 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
protected void LnkConsultartablasVacaciones_Click(object sender, EventArgs e)
{
CargaVacacionesEmpresas();
}
protected void CargaVacacionesEmpresas() protected void CargaVacacionesEmpresas()
{ {
int ejercicio = TxtEjercicioFiltroVacaciones.Text.Trim() == "" ? -1: TxtEjercicioFiltroVacaciones.Text.Trim().ToEntero();
using (ClsRH ObjVaca = new ClsRH()) using (ClsRH ObjVaca = new ClsRH())
{ {
ObjVaca.VacacionesEmpresasGet(UsuarioActual.CveEmpresa, -1, -1); ObjVaca.VacacionesEmpresasGet(UsuarioActual.CveEmpresa, -1, -1, ejercicio);
GVVacacionesEmpresas.DataSource = ObjVaca.DtResultados; GVVacacionesEmpresas.DataSource = ObjVaca.DtResultados;
ObjVaca.Dispose(); ObjVaca.Dispose();
} }
@@ -9707,18 +9713,19 @@ public partial class Nomina_Nomina2 : ClsPaginas
int diasVacaciones = TxtVacadiasVacaciones.Text.ToEntero(); int diasVacaciones = TxtVacadiasVacaciones.Text.ToEntero();
int Cinicio = TxtVacaInicio.Text.ToEntero(); int Cinicio = TxtVacaInicio.Text.ToEntero();
int Cfin = TxtVacaFin.Text.ToEntero(); int Cfin = TxtVacaFin.Text.ToEntero();
int ejercicio = TxtEjercicioVacaciones.Text.ToEntero();
bool Continuar = false; bool Continuar = false;
using (ClsRH ObjVaca = new ClsRH()) using (ClsRH ObjVaca = new ClsRH())
{ {
Continuar = ObjVaca.VacacionesEmpresasAdd(UsuarioActual.CveEmpresa, Cinicio, Cfin, diasVacaciones); Continuar = ObjVaca.VacacionesEmpresasAdd(UsuarioActual.CveEmpresa, Cinicio, Cfin, diasVacaciones, ejercicio);
} }
if (Continuar) if (Continuar)
{ {
RegistraScript("$('#DModalVacacionesEmpresas').modal('hide');"); RegistraScript("$('#DModalVacacionesEmpresas').modal('hide');");
CargaVacacionesEmpresas(); CargaVacacionesEmpresas();
upDatosVacaEmpre.Update(); upDatosVacaEmpre.Update();
Alert("El Vacaciones_Empresas Se ha agregado"); Alert("Las Vacaciones se han agregado.");
} }
} }
@@ -9728,10 +9735,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
int CcveEmpresa = gvRow.DataKey("CveEmpresa").ToEntero(); int CcveEmpresa = gvRow.DataKey("CveEmpresa").ToEntero();
int Cinicio = gvRow.DataKey("Inicio").ToEntero(); int Cinicio = gvRow.DataKey("Inicio").ToEntero();
int Cfin = gvRow.DataKey("Fin").ToEntero(); int Cfin = gvRow.DataKey("Fin").ToEntero();
int Ejercicio = gvRow.DataKey("Ejercicio").ToEntero();
bool Continuar = false; bool Continuar = false;
using (ClsRH ObjVaca = new ClsRH()) using (ClsRH ObjVaca = new ClsRH())
{ {
Continuar = ObjVaca.VacacionesEmpresasRemove(CcveEmpresa, Cinicio, Cfin); Continuar = ObjVaca.VacacionesEmpresasRemove(CcveEmpresa, Cinicio, Cfin, Ejercicio);
} }
if (Continuar) if (Continuar)
{ {
@@ -10925,7 +10933,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
int cveTipoPeriodo = DdlTipoPeriodoCMB.SelectedValue.ToEntero(); int cveTipoPeriodo = DdlTipoPeriodoCMB.SelectedValue.ToEntero();
int cveSubTipoPeriodo = TxtCveSubTipoPeriodoCM.Text.ToEntero(); int cveSubTipoPeriodo = TxtCveSubTipoPeriodoCM.Text.ToEntero();
int numero = TxtNumeroCM.Text.ToEntero(); int numero = TxtNumeroCM.Text.ToEntero();
string fechaInicio = TxtFechaInicioCM.Text; string fechaInicio = TxtFechaInicioCM.Text.ToDateTime().ToString("yyyy-MM-dd");
using (ClsNominas onom = new ClsNominas()) using (ClsNominas onom = new ClsNominas())
{ {
@@ -10935,4 +10943,5 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
} }
} }
} }

View File

@@ -2682,8 +2682,8 @@ Partial Class Ventas
End If End If
If ObjVentas.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Request("CveManifiesto").ToEntero()) Then If ObjVentas.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Request("CveManifiesto").ToEntero()) Then
GvPS.DataSource = ObjVentas.DtResultados GvPS.DataSource = ObjVentas.DtResultados
TmpDT = ObjVentas.DtResultados
GvPS.DataBind() GvPS.DataBind()
End If End If