This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2021-05-05 06:29:27 -07:00
parent 22fa35bec7
commit 3d842da75c
9 changed files with 525 additions and 30 deletions

View File

@@ -215,6 +215,24 @@ Public Class ClsNominas
End Function
Public Function ReportedePercepcionesDeduccionesGet(cveEmpresa As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveTipoPeriodo As Integer) As Boolean
Dim retorno As Boolean = False
DTSet = New DataSet()
DataAdapter("[PA_RH_ReportedePercepcionesDeducciones]", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@TipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo
End With
Try
SqlAdapter.Fill(DTSet)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el reporte de Percepciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
Public Function ReportedeincidenciasGET(cveEmpresa As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveTipoPeriodo As Integer) As Boolean
Dim retorno As Boolean = False
DTSet = New DataSet()

View File

@@ -76,6 +76,9 @@
<asp:LinkButton ID="LnkFormatoRenuncia" OnClick="LnkFormatoRenuncia_Click" runat="server"><i class="fa fa-bell"></i>Formato Finiquito</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID ="LnkFormatoRenuncia" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
@@ -148,7 +151,8 @@
</div>
<div class="actions">
<div class="btn-group">
<asp:LinkButton ID="LnkCancelar" Visible="false" OnClick="LnkGuardarDatos_Click" ValidationGroup="GrpGuardar" CssClass="btn btn-danger" runat="server">Cancelar</asp:LinkButton>
<asp:LinkButton ID="LnkSimular" OnClick="LnkSimular_Click" ValidationGroup="GrpGuardar" CssClass="btn yellow-gold" runat="server">Simular</asp:LinkButton>
<asp:LinkButton ID="LnkCancelar" Visible="false" OnClick="LnkCancelar_Click" ValidationGroup="GrpGuardarcan" CssClass="btn btn-danger" runat="server">Cancelar</asp:LinkButton>
<asp:LinkButton ID="LnkGuardarDatos" OnClick="LnkGuardarDatos_Click" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>
</div>
</div>
@@ -281,7 +285,7 @@
<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>
@@ -352,7 +356,7 @@
<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>

View File

@@ -210,8 +210,8 @@ public partial class Nomina_Finiquito : ClsPaginas
}
protected void LnkConcepto_Click(object sender, EventArgs e)
{
int SRCveConcepto = ((LinkButton)sender).CommandArgument.ToEntero();
string SRTipoConcepto = ((LinkButton)sender).CommandArgument;
int SRCveConcepto = ((LinkButton)sender).CommandArgument.ToEntero();
string SRTipoConcepto = ((LinkButton)sender).CommandArgument;
#region carga conceptos
DataTable dtCon;
if (SRCveConcepto > 0)
@@ -498,6 +498,217 @@ public partial class Nomina_Finiquito : ClsPaginas
protected void LnkFormatoRenuncia_Click(object sender, EventArgs e)
{
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 AND SoloVisible =0");
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 AND SoloVisible =0");
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), string.Format("CvePersonal = {0}", CvePersonal)) != 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), string.Format("CvePersonal = {0}", CvePersonal)) != 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}", CvePersonal));
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}", CvePersonal));
}
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}", CvePersonal));
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}", CvePersonal));
}
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}", CvePersonal));
///Alert(SubTotales.ImporteP.ToString());
SubTotales.CveConceptoD = 0;
SubTotales.ConceptoD = "Total Deducciones";
SubTotales.EstatusD = -2;
SubTotales.ImporteD = dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", CvePersonal));
NConcepto Totales = new NConcepto();
Totales.CveConceptoD = 0;
Totales.ConceptoD = "Total";
Totales.EstatusD = -3;
Totales.ImporteD = dtempleados.SUM("Total", string.Format("CvePersonal = {0}", CvePersonal));
lconc.Add(SubTotales);
lconc.Add(Totales);
DataTable dtCon = new DataTable();
dtCon.Columns.Add(new DataColumn("NoConceptoP", typeof(string)));
dtCon.Columns.Add(new DataColumn("ConceptoP", typeof(string)));
dtCon.Columns.Add(new DataColumn("LabelValorP", typeof(string)));
dtCon.Columns.Add(new DataColumn("CveConceptoP", typeof(int)));
dtCon.Columns.Add(new DataColumn("ImporteP", typeof(double)));
dtCon.Columns.Add(new DataColumn("ValorP", typeof(double)));
dtCon.Columns.Add(new DataColumn("EstatusP", typeof(int)));
dtCon.Columns.Add(new DataColumn("isEditedP", typeof(int)));
dtCon.Columns.Add(new DataColumn("isOnlyBisibleP", typeof(int)));
dtCon.Columns.Add(new DataColumn("NoConceptoD", typeof(string)));
dtCon.Columns.Add(new DataColumn("ConceptoD", typeof(string)));
dtCon.Columns.Add(new DataColumn("LabelValorD", typeof(string)));
dtCon.Columns.Add(new DataColumn("CveConceptoD", typeof(int)));
dtCon.Columns.Add(new DataColumn("ImporteD", typeof(double)));
dtCon.Columns.Add(new DataColumn("ValorD", typeof(double)));
dtCon.Columns.Add(new DataColumn("EstatusD", typeof(int)));
dtCon.Columns.Add(new DataColumn("isEditedD", typeof(int)));
dtCon.Columns.Add(new DataColumn("isOnlyBisibleD", typeof(int)));
foreach (NConcepto itc in lconc)
{
DataRow dr = dtCon.NewRow();
dr["NoConceptoP"] = itc.NoConceptoP;
dr["ConceptoP"] = itc.ConceptoP;
dr["LabelValorP"] = itc.LabelValorP;
dr["CveConceptoP"] = itc.CveConceptoP;
dr["ImporteP"] = itc.ImporteP;
dr["ValorP"] = itc.ValorP;
dr["EstatusP"] = itc.EstatusP;
dr["isEditedP"] = itc.isEditedP;
dr["isOnlyBisibleP"] = itc.isOnlyBisibleP;
dr["NoConceptoD"] = itc.NoConceptoD;
dr["ConceptoD"] = itc.ConceptoD;
dr["LabelValorD"] = itc.LabelValorD;
dr["CveConceptoD"] = itc.CveConceptoD;
dr["ImporteD"] = itc.ImporteD;
dr["ValorD"] = itc.ValorD;
dr["EstatusD"] = itc.EstatusD;
dr["isEditedD"] = itc.isEditedD;
dr["isOnlyBisibleD"] = itc.isOnlyBisibleD;
dtCon.Rows.Add(dr);
}
dtCon.AcceptChanges();
List<Microsoft.Reporting.WebForms.ReportDataSource> lrds = new List<Microsoft.Reporting.WebForms.ReportDataSource>();
Microsoft.Reporting.WebForms.ReportDataSource rds = new Microsoft.Reporting.WebForms.ReportDataSource();
rds.Name = "DataSet1";
rds.Value = dtCon;// lconc;
lrds.Add(rds);
List<Microsoft.Reporting.WebForms.ReportParameter> parametros = new List<Microsoft.Reporting.WebForms.ReportParameter>();
string CodigoEmpleado = "";
string NombreCompleto = "";
string RFC = "";
string CURP = "";
string TipoPeriodo = "";
string NSS = "";
string DiasLaborados = "";
string DiasFaltados = "";
string DiasVacaciones = "";
string FechaInicio = "";
string FechaFin = "";
string DiasRetardos = "";
string DiasIncapacidad = "";
string SubProyecto = "";
{
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", CvePersonal));
if (drow != null)
{
DiasLaborados = string.Format("{0}", drow["DiasLaborados"].ToString().ToEntero());
DiasFaltados = string.Format("{0}", drow["DiasFaltados"].ToString().ToEntero());
DiasVacaciones = string.Format("{0}", drow["DiasVacaciones"].ToString().ToEntero());
FechaInicio = string.Format("{0:dd/MM/yyyy}", drow["FechaInicio"]);
FechaFin = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]);
DiasRetardos = string.Format("{0}", drow["DiasRetardos"].ToString().ToEntero());
DiasIncapacidad = string.Format("{0}", drow["DiasIncapacidad"].ToString().ToEntero());
}
}
//string Codigo = "";
using (ClsRH objrh = new ClsRH())
{
if (objrh.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) && objrh.DtResultados.Rows.Count > 0)
{
DataRow drow = objrh.DtResultados.Rows[0];
SubProyecto = drow["SubProyecto"].ToString();
CodigoEmpleado = drow["Codigo"].ToString();
NombreCompleto = drow["NombreCompleto"].ToString();
RFC = drow["RFC"].ToString();
CURP = drow["CURP"].ToString();
TipoPeriodo = drow["TipoPeriodo"].ToString();
NSS = drow["NSS"].ToString();
}
}
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasIncapacidad", DiasIncapacidad));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("Codigo", CodigoEmpleado));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("NombreCompleto", NombreCompleto));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("RFC", RFC));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("CURP", ""));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("TipoPeriodo", TipoPeriodo));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("NSS", NSS));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasLaborados", DiasLaborados));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasFaltados", DiasFaltados));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasVacaciones", DiasVacaciones));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaInicio", FechaInicio));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaFin", FechaFin));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasRetardos", DiasRetardos));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("Empresa", UsuarioActual.Empresa.Empresa));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("SubProyecto", SubProyecto));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaPago", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
string urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, string.Format("Empresas/{0}/Formatos/SobreRecibo.rdlc", UsuarioActual.CveEmpresa));
if (!System.IO.File.Exists(urlfile))
{
urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreRecibo.rdlc");
}
ImprimirPDF(urlfile, lrds, parametros, "SobreRecibo", "PDF", null);
}
protected void LnkCambiarEmpleado_Click(object sender, EventArgs e)
@@ -868,4 +1079,152 @@ public partial class Nomina_Finiquito : ClsPaginas
}
}
protected void LnkCancelar_Click(object sender, EventArgs e)
{
using (ClsNominas onom = new ClsNominas())
{
if (onom.RemoveFiniquito(CvePersonal, UsuarioActual.CveEmpresa, CvePersonalAltas))
{
Alert("se ha eliminado el proceso de finiquito");
}
}
}
protected void LnkSimular_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)
{
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa);
}
if (continuar)
{ loadsobrerecibo(onom); }
if (continuar)
{
ObjPersonal.RollBack();
}
else
{
ObjPersonal.RollBack();
}
}
}
UPDatos.Update();
}
protected void DdlmcConceptos_SelectedIndexChanged(object sender, EventArgs e)
{
}
protected void BtnAceptarMC_Click(object sender, EventArgs e)
{
bool continuar = true;
int CveNomina = 0;
double Total = 0;
int CveMoneda = 1;
int CveMetodoPago = 0;
int CveConcepto = DdlmcConceptos.SelectedValue.ToEntero();
if (CveConcepto > 0 && CvePersonal > 0)
{
decimal ImporteConcepto = TxtmcImporte.Text.Replace("$", "").Replace(",", "").ToDecimal();
decimal ImporteGravadoConcepto = TxtmcImporteGrabado.Text.Replace("$", "").Replace(",", "").ToDecimal();
decimal ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
decimal ImporteValor = Txtmcvalor.Text.Replace("$", "").Replace(",", "").ToDecimal();
using (ClsNominas objNomina = new ClsNominas())
{
objNomina.IniciaTransacSQL();
if (continuar)
{
if (objNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodoIndemnizacion, -1, UsuarioActual.CveEmpresa))
{
if (objNomina.DtResultados.Rows.Count > 0)
{
CveNomina = objNomina.CveNomina;
}
else
{
if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoIndemnizacion, Total, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
"", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, false))
{
CveNomina = objNomina.CveNomina;
}
else
{
continuar = false;
}
}
}
}
if (CveNomina == 0)
{
continuar = false;
}
if (continuar)
{
if (continuar)
{
if (!objNomina.AddUPNom_NominasDetalles(CveNomina, CvePeriodoIndemnizacion, CvePersonal, CveConcepto, ImporteConcepto, ImporteGravadoConcepto, ImporteExentoConcepto, ImporteValor, UsuarioActual.CveUsuario, true))
{
continuar = false;
}
}
}
if (continuar)
{ objNomina.Commit(); }
else
{
objNomina.RollBack();
}
}
if (continuar)
{
using (ClsNominas objNomina = new ClsNominas())
{
loadsobrerecibo(objNomina);
}
Alert("El cambio se ha guardado correctamente.");
}
}
else
{
if (CveConcepto > 0)
{
Alert("Debe seleccionar un empleado.", TipoMensaje.MsgAdvertencia);
}
else
{
Alert("Debe seleccionar un concepto.", TipoMensaje.MsgAdvertencia);
}
}
}
}

View File

@@ -173,6 +173,9 @@
<li>
<asp:LinkButton ID="LnkAsistenciaIncidencias" Visible="true" OnClick="LnkAsistenciaIncidencias_Click" runat="server"><i class="fa fa-check-square"></i>Incidencias asistencia </asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LinkButton2" Visible="true" OnClick="lnkreportepercepciones_Click" runat="server"><i class="fa fa-check-square"></i>Reporte percepciones y deducciones </asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkReporteAcumulados" Visible="true" OnClick="LnkReporteAcumulados_Click" runat="server"><i class="fa fa-line-chart"></i>Reporte acumulados </asp:LinkButton>
</li>
@@ -2045,6 +2048,48 @@
</div>
</div>
<div id="DmodalReportePercepcionesdeducciones" class="modal ADS fade" role="dialog">
<div class="modal-dialog" tabindex="-1">
<div class="modal-content rowpadding">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" runat="server" style="text-align: left">Reporte de percepciones y deducciones</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRpdFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtRIFechaInicio">Fecha Inicio</asp:Label>
<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" 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="VGReporteInicidencia"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaInicio"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRpdFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtRIFechaFin">Fecha Fin</asp:Label>
<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" 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="VGReporteInicidencia"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaFin"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<asp:LinkButton ID="LnkrRepPercpDed" OnClick="LnkrRepPercpDed_Click" ValidationGroup="VGReporterepperde" CssClass="btn btn-primary" runat="server">Descargar</asp:LinkButton>
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</div>
<div id="DmodalReporteInicidencia" class="modal ADS fade" role="dialog">
<div class="modal-dialog" tabindex="-1">
<div class="modal-content rowpadding">

View File

@@ -1541,15 +1541,15 @@ public partial class Nomina_Nomina2 : ClsPaginas
//SRCvePersonal
if (SRCveConcepto > 0)
{
using (ClsNominas onom =new ClsNominas())
using (ClsNominas onom = new ClsNominas())
{
if(onom.DeleteNom_NominasDetalles(SRCveConcepto, SRCvePersonal, CvePeriodoSeleccionado))
if (onom.DeleteNom_NominasDetalles(SRCveConcepto, SRCvePersonal, CvePeriodoSeleccionado))
{
Alert("el importe sera tomado del calculo y no del valor fijo");
}
}
}
}
}
protected void LnkConcepto_Click(object sender, EventArgs e)
{
SRCveConcepto = ((LinkButton)sender).CommandArgument.ToEntero();
@@ -2346,7 +2346,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
LnkImportexCalculo.CommandArgument = LnkImporte.CommandArgument;
LnkImporteDxCalculo.CommandArgument = LnkImporteD.CommandArgument;
LnkImportexCalculo.Visible = isEditedP;
LnkImporteDxCalculo.Visible =isEditedD;
LnkImporteDxCalculo.Visible = isEditedD;
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>" : ""));
@@ -4803,7 +4803,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
string script = "";// string.Format("SaveCsv(\"MovtosAfil.txt\", '{0}');SaveCsv(\"MovtosmodSalario.txt\", '{1}');SaveCsv(\"movtosBajas.txt\", '{2}');", MovtosAfil.Replace("'", "\\'"), MovtosmodSalario.Replace("'", "\\'"), movtosBajas.Replace("'", "\\'"));
if (ChkSuaAltas.Checked)
{
script= string.Format("{1}SaveCsv(\"MovtosAfil.txt\", '{0}');", MovtosAfil.Replace("'", "\\'"), script);
script = string.Format("{1}SaveCsv(\"MovtosAfil.txt\", '{0}');", MovtosAfil.Replace("'", "\\'"), script);
}
if (ChkSuaBajas.Checked)
{
@@ -5628,14 +5628,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
using (ClsNominas objnom = new ClsNominas())
{
int CvePrePolizaProvision = 0; int CvePrePolizaasmilidos = 0;
if (objnom.DtResultados.Rows.Count > 0)
{
CvePrePolizaProvision = objnom.DtResultados.Rows[0]["CvePrePoliza"].ToString().ToEntero();
CvePrePolizaasmilidos = objnom.DtResultados.Rows[0]["CvePrePolizaAsimilables"].ToString().ToEntero();
}
if (objnom.Autorizaperiodoconta(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
{
int CvePrePolizaProvision = 0; int CvePrePolizaasmilidos = 0;
if (objnom.DtResultados.Rows.Count > 0)
{
CvePrePolizaProvision = objnom.DtResultados.Rows[0]["CvePrePoliza"].ToString().ToEntero();
CvePrePolizaasmilidos = objnom.DtResultados.Rows[0]["CvePrePolizaAsimilables"].ToString().ToEntero();
}
string mensaje = string.Format("La provision a sido autorizada.<br/><a href=\"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}&Tipo=NOMPROV\">Provision </a><br/><a href=\"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}&Tipo=NOMPROV\"> Asimilados</a>", CvePrePolizaProvision, CvePrePolizaasmilidos);
Alert(mensaje);
}
@@ -5764,6 +5764,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
RegistraScript("$('#DmodalReporteInicidencia').modal()");
}
protected void lnkreportepercepciones_Click(object sender, EventArgs e)
{
RegistraScript("$('#DmodalReportePercepcionesdeducciones').modal()");
}
protected void LnkProcesarReporteIncidencia_Click(object sender, EventArgs e)
{
@@ -5864,4 +5868,48 @@ public partial class Nomina_Nomina2 : ClsPaginas
protected void LinkButton1_Click(object sender, EventArgs e)
{
}
protected void LnkrRepPercpDed_Click(object sender, EventArgs e)
{
DateTime fechai = TxtRIFechaInicio.Text.ToDateTime();
DateTime fechaf = TxtRIFechaFin.Text.ToDateTime();
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
using (ClsNominas nom = new ClsNominas())
{
if (nom.ReportedePercepcionesDeduccionesGet(UsuarioActual.CveEmpresa, fechai, fechaf, 4))
{
var libro = wb.AddWorksheet(nom.DTSetResultados.Tables[0], "Percepciones y deducciones");
libro.ColumnsUsed().AdjustToContents();
//ws.Row(1).InsertRowsAbove(1);
}
}
System.IO.Stream fs = new System.IO.MemoryStream();
wb.SaveAs(fs);
fs.Position = 0;
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
using (System.IO.Stream input = fs)
{
input.CopyTo(memoryStream);
}
memoryStream.Position = 0;
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AddHeader("content-disposition", string.Format("attachment;filename=percepciones .xlsx", ""));
Response.BinaryWrite(memoryStream.ToArray());
Response.End();
}
}

View File

@@ -4,11 +4,11 @@
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.GVCalculosSBC tr th:nth-child(n+6):not(:nth-child(n+10)) {
.GVCalculosSBC tr th:nth-child(n+9):not(:nth-child(n+13)) {
background-color: #a9a9e8 !important;
}
.GVCalculosSBC tr th:nth-child(n+10):not(:nth-child(n+13)) {
.GVCalculosSBC tr th:nth-child(n+13):not(:nth-child(n+16)) {
background-color: #88d6cd !important;
}
</style>
@@ -88,7 +88,7 @@
<ContentTemplate>
<table id="tableheader" style="display: none">
<tr>
<th colspan="5"></th>
<th colspan="8"></th>
<th colspan="4" style="background-color: #a9a9e8 !important;">Actual</th>
<th colspan="3" style="background-color: #88d6cd !important;">Nuevo</th>
<th></th>
@@ -117,9 +117,24 @@
<asp:Label ID="lblfechaInicio" runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="NSS">
<asp:TemplateField HeaderText="Antiguedad">
<ItemTemplate>
<asp:Label ID="lblnumeroSS" runat="server" Text='<%# Eval("NumeroSS")%>'> </asp:Label>
<asp:Label ID="lblnumeroSS" runat="server" Text='<%# Eval("Antiguedad")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Días aguinaldo">
<ItemTemplate>
<asp:Label ID="lblDiasAguinaldo" runat="server" Text='<%# Eval("NumDiasAguinaldo")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Días vacaciones">
<ItemTemplate>
<asp:Label ID="lblDiasVacaciones" runat="server" Text='<%# Eval("diasVacaciones")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Prima vacacional">
<ItemTemplate>
<asp:Label ID="LblPrimaVacacional" runat="server" Text='<%# Eval("PorPrimaVacacional","{0:P2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tipo salario">

View File

@@ -145,14 +145,18 @@ public partial class RH_CalculoSBC : ClsPaginas
{
GVCalculosSBC.ExportToExcel("Salario");
}
if (Tab.ActiveTab == TabSBC)
if (Tab.ActiveTab == TabParteFija)
{
GVCFija.ExportToExcel("Salario");
}
if (Tab.ActiveTab == TabSBC)
if (Tab.ActiveTab == TabParteVariable)
{
GVPV.ExportToExcel("Salario");
}
if (Tab.ActiveTab == TabDetalleParteVariable)
{
GVDetalleParteVariable.ExportToExcel("Salario");
}
}
}

View File

@@ -2936,12 +2936,19 @@ Partial Class RH_Personal
' Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' Exit Sub
'End If
If ChkEstatusPagoE.Checked Then
'CLABE SIEMPRE OBLIGATORIA SI NO ES BANCOMER
If TxtCLABECB.Text.Trim.Length <> 18 And TxtCLABECB.Text.Trim.Length = 0 And Not EsBancomer Then
'CLABE SIEMPRE OBLIGATORIA SI NO ES BANCOMER
If TxtCLABECB.Text.Trim.Length <> 18 AndAlso TxtCLABECB.Text.Trim.Length = 0 AndAlso Not EsBancomer Then
Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'SI CLABE TIENE ALGO DEBE TENER UNA LOGITUD EXACTA DE 18
If TxtCLABECB.Text.Trim.Length <> 0 AndAlso TxtCLABECB.Text.Trim.Length <> 18 Then
Alert("La CLABE debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
'SI CUENTA TIENE ALGO Y BANCO BANCOMER DEBE TENER UNA LOGITUD EXACTA DE 10
If TxtNumeroCuenta.Text.Trim.Length <> 0 AndAlso TxtNumeroCuenta.Text.Trim.Length <> 10 AndAlso EsBancomer Then
@@ -2949,11 +2956,6 @@ Partial Class RH_Personal
Exit Sub
End If
'SI CLABE TIENE ALGO DEBE TENER UNA LOGITUD EXACTA DE 18
If TxtCLABECB.Text.Trim.Length <> 0 AndAlso TxtCLABECB.Text.Trim.Length <> 18 Then
Alert("La CLABE debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
''CUANDO SEA "BBVA" O "BANCOMER" DEBE TENER "CIE" O "CUENTA"