Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -448,6 +448,12 @@
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Nómina
|
||||
<asp:Literal ID="LtlPeriodoseleccionado" runat="server"></asp:Literal></span>
|
||||
<asp:UpdatePanel ID="UpPendienteActualizar" runat="server" UpdateMode="Conditional" style="display: inline-block;">
|
||||
<ContentTemplate>
|
||||
<span class="caption-subject bold uppercase" style="color: darkred !important">
|
||||
<asp:Literal ID="ltlPendienteActualizar" runat="server"></asp:Literal></span>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
@@ -923,6 +929,8 @@
|
||||
<ajax:TabPanel ID="TabSobreRecivo" runat="server" HeaderText="Sobre Recibo">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpGvConceptos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light xspadding bordered " id="pnlConceptos">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
@@ -1059,7 +1067,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="portlet light xspadding bordered " id="pnlBitacora">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
@@ -1085,6 +1092,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabInfonavit" runat="server" HeaderText="Infonavit">
|
||||
<ContentTemplate>
|
||||
@@ -1872,12 +1881,12 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText=" " ControlStyle-Width="28" HeaderStyle-Width="28" ItemStyle-Width="28">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" OnClick="LnkPersonalIncapacidad_Click" data-toggle="tooltip" title="Editar" style="width:24px !important" CssClass="btn btn-circle btn-sm btn-xs green mysmallbtn"><i class="fa fa-pencil"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" OnClick="LnkPersonalIncapacidad_Click" data-toggle="tooltip" title="Editar" Style="width: 24px !important" CssClass="btn btn-circle btn-sm btn-xs green mysmallbtn"><i class="fa fa-pencil"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText=" " ControlStyle-Width="28" HeaderStyle-Width="28" ItemStyle-Width="28">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" OnClick="LnkPersonalIncapacidadRemove_Click" style="width:24px !important" 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 la Incapacidad?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" OnClick="LnkPersonalIncapacidadRemove_Click" Style="width: 24px !important" 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 la Incapacidad?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
using AjaxControlToolkit.HtmlEditor.ToolbarButtons;
|
||||
using ClbNegBICFDv3_3;
|
||||
using Extensiones;
|
||||
using iTextSharp.text.pdf;
|
||||
using Profact.TimbraCFDI40;
|
||||
@@ -96,6 +97,54 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
set { ViewState["dtempleados"] = value; }
|
||||
}
|
||||
#region "Empleados Conceptos"
|
||||
|
||||
|
||||
private DataTable dtPerEmpleados
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["dtPerEmpleados"] == null) { return null; }
|
||||
else { return (DataTable)ViewState["dtPerEmpleados"]; }
|
||||
}
|
||||
|
||||
set { ViewState["dtPerEmpleados"] = value; }
|
||||
}
|
||||
private DataTable dtPerEmpleadosConceptos
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["dtPerEmpleadosConceptos"] == null) { return null; }
|
||||
else { return (DataTable)ViewState["dtPerEmpleadosConceptos"]; }
|
||||
}
|
||||
|
||||
set { ViewState["dtPerEmpleadosConceptos"] = value; }
|
||||
}
|
||||
private DataTable dtPerConceptos
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["dtPerConceptos"] == null) { return null; }
|
||||
else { return (DataTable)ViewState["dtPerConceptos"]; }
|
||||
}
|
||||
|
||||
set { ViewState["dtPerConceptos"] = value; }
|
||||
}
|
||||
private DataTable dtPerPeriodo
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["dtPerPeriodo"] == null) { return null; }
|
||||
else { return (DataTable)ViewState["dtPerPeriodo"]; }
|
||||
}
|
||||
|
||||
set { ViewState["dtPerPeriodo"] = value; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
private DataTable DtSuaProcesado
|
||||
{
|
||||
get
|
||||
@@ -158,6 +207,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
set { ViewState["CveTipoTrabajador"] = value; }
|
||||
}
|
||||
|
||||
protected int CvePeriodoSeleccionado
|
||||
{
|
||||
get
|
||||
@@ -516,16 +566,19 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
LtlPeriodoseleccionadoASis.Text = LtlPeriodoseleccionado.Text;
|
||||
|
||||
}
|
||||
public void cargaDatos(bool cargaasistencia = true)
|
||||
public void cargaDatos(bool cargaasistencia = true, int CvePersonal =-1)
|
||||
{
|
||||
int Estatus = 0;
|
||||
int CveEmpresa = UsuarioActual.CveEmpresa;
|
||||
|
||||
bool continuar = false;
|
||||
DataTable dtPeriodo =new DataTable();
|
||||
if (CvePersonal <= 0)
|
||||
{
|
||||
CvePeriodoSeleccionado = 0;
|
||||
dtempleados = null;
|
||||
dtConceptos = null;
|
||||
DataTable dtPeriodo = new DataTable();
|
||||
}
|
||||
LnkAutorizar.Visible = false;
|
||||
Estatus = 5;
|
||||
if (FiltCvePeriodo > 0)
|
||||
@@ -569,12 +622,27 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
LnkFormatoTabular.Visible = true;
|
||||
LnkFormatoFiscal.Visible = (UsuarioActual.CveEmpresa == 141 || UsuarioActual.CveRol == 1);
|
||||
HypPDFSTimbrados.Visible = true;
|
||||
if (objnom.GetNominaEmpleado(FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodo, CveEmpresa, FiltAgrupador, DdlRegimenContratacion.SelectedValue.ToEntero(), CveTipoTrabajador: CveTipoTrabajador, Neto: ddlfiniquito.SelectedValue.ToEntero()) && objnom.DTSetResultados.Tables.Count > 4)
|
||||
if (objnom.GetNominaEmpleado(FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodo, CveEmpresa, FiltAgrupador,
|
||||
DdlRegimenContratacion.SelectedValue.ToEntero(), CveTipoTrabajador: CveTipoTrabajador, Neto: ddlfiniquito.SelectedValue.ToEntero(),
|
||||
CvePersonal: CvePersonal)
|
||||
&& objnom.DTSetResultados.Tables.Count > 4)
|
||||
{
|
||||
if (CvePersonal > 0)
|
||||
{
|
||||
dtPerEmpleados = objnom.DTSetResultados.Tables[3];
|
||||
dtPerEmpleadosConceptos = objnom.DTSetResultados.Tables[4];
|
||||
dtPerConceptos = objnom.DTSetResultados.Tables[0];
|
||||
dtPerPeriodo = objnom.DTSetResultados.Tables[1];
|
||||
ltlPendienteActualizar.Text = "Hay Cambios pendientes por actualizar, Calcular para mostrar.";
|
||||
}
|
||||
else
|
||||
{
|
||||
dtempleados = objnom.DTSetResultados.Tables[3];
|
||||
dtempleadosConceptos = objnom.DTSetResultados.Tables[4];
|
||||
dtConceptos = objnom.DTSetResultados.Tables[0];
|
||||
dtPeriodo = objnom.DTSetResultados.Tables[1];
|
||||
ltlPendienteActualizar.Text = "";
|
||||
}
|
||||
//dtasistencia = objnom.DTSetResultados.Tables[2];
|
||||
CvePeriodoSeleccionado = FiltCvePeriodo;
|
||||
continuar = true;
|
||||
@@ -588,6 +656,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (CvePersonal > 0)
|
||||
{
|
||||
}
|
||||
else {
|
||||
#region CargaGrid
|
||||
if (continuar)
|
||||
{
|
||||
@@ -948,6 +1021,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
UpDatos.Update();
|
||||
}
|
||||
UpPendienteActualizar.Update();
|
||||
}
|
||||
public void cargarasistencia()
|
||||
{
|
||||
|
||||
@@ -2648,10 +2723,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
if (cargadatos)
|
||||
{
|
||||
cargaDatos();
|
||||
cargaDatos(CvePersonal: SRCvePersonal);
|
||||
|
||||
}
|
||||
DataRow dr = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
DataRow dr = dtPerEmpleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
NomAutorizado = dr["NomAutorizado"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
|
||||
LnkCancelarSobreRecibo.Visible = dr["SeTimbro"].ToString().ToUpper().Contiene("TRUE", "1");
|
||||
@@ -2737,9 +2812,18 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
#endregion
|
||||
protected void LnkSobreRecibo_Click(object sender, EventArgs e)
|
||||
{
|
||||
SRCvePersonal = TxtCvePersonal.Text.ToEntero();
|
||||
//GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
TxtVacDiasPago.Text = "0";
|
||||
LnkSRVacacionesADD.Visible = false;
|
||||
|
||||
dtPerEmpleados = dtempleados.FiltraParametros(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
dtPerEmpleadosConceptos = dtempleadosConceptos.FiltraParametros(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
dtPerConceptos = dtConceptos;
|
||||
dtPerPeriodo = dtPeriodos;
|
||||
|
||||
|
||||
|
||||
if (DdlCtaContable.Items.Count == 0)
|
||||
{
|
||||
if (UsuarioActual.Empresa.TipoContabilidad == 1)
|
||||
@@ -2776,12 +2860,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
//SRCvePeriodo = gvrow.DataKey("CvePeriodo").ToEntero();
|
||||
//int CveNomina = gvrow.DataKey("CveNomina").ToEntero();
|
||||
//NomAutorizado = gvrow.DataKey("NomAutorizado").ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
SRCvePersonal = TxtCvePersonal.Text.ToEntero();
|
||||
showhideaccionesSR();
|
||||
HypXmlSobreRecibo.Attributes.Add("onclick", string.Format("GETXML({0},{1})", SRCvePersonal, CvePeriodoSeleccionado));
|
||||
HyppdfSobreRecibo.Attributes.Add("onclick", string.Format("GETPDF({0},{1})", SRCvePersonal, CvePeriodoSeleccionado));
|
||||
|
||||
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
DataRow drow = dtPerEmpleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
string Nombre = "";
|
||||
SRCvePeriodo = 0;
|
||||
int CveNomina = 0;
|
||||
@@ -2809,6 +2892,37 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
TxtCLABE.Text = drownom["CLABE"].ToString();
|
||||
}
|
||||
}
|
||||
|
||||
using (ClsRH objrh = new ClsRH())
|
||||
{
|
||||
string CodigoEmpleado = "";
|
||||
string NombreCompleto = "";
|
||||
string RFC = "";
|
||||
string CURP = "";
|
||||
string TipoPeriodo = "";
|
||||
string NSS = "";
|
||||
string Departamento = "";
|
||||
string Puesto = "";
|
||||
if (objrh.GetPersonal(SRCvePersonal, UsuarioActual.CveEmpresa) && objrh.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow erow = objrh.DtResultados.Rows[0];
|
||||
CodigoEmpleado = erow["Codigo"].ToString();
|
||||
NombreCompleto = erow["NombreCompleto"].ToString();
|
||||
RFC = erow["RFC"].ToString();
|
||||
CURP = erow["CURP"].ToString();
|
||||
TipoPeriodo = erow["TipoPeriodo"].ToString();
|
||||
NSS = erow["NSS"].ToString();
|
||||
Puesto = erow["Puesto"].ToString();
|
||||
Departamento = erow["Departamento"].ToString();
|
||||
}
|
||||
LblCodigoEmpleado.Text = CodigoEmpleado;
|
||||
LblRFC.Text = RFC;
|
||||
LblCURP.Text = CURP;
|
||||
LblTipoPeriodo.Text = TipoPeriodo;
|
||||
LblNSS.Text = NSS;
|
||||
LblSRDepartamento.Text = Departamento;
|
||||
LblSRPuesto.Text = Puesto;
|
||||
}
|
||||
LblEmpleado.Text = Nombre;
|
||||
LblEmpleado.NavigateUrl = string.Format("/RH/Personal.aspx?CvePersonal={0}", SRCvePersonal);
|
||||
TabPersonal.ActiveTabIndex = 0;
|
||||
@@ -2827,7 +2941,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
protected void LnkRecalcular_Click(object sender, EventArgs e)
|
||||
{
|
||||
cargaDatos();
|
||||
cargaDatos(CvePersonal:SRCvePersonal);
|
||||
cargaBitacora();
|
||||
|
||||
cargasobrericiboconceptos(SRMostrarFormulas);
|
||||
@@ -3448,10 +3562,15 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
if (objRH.SolicitudVacacionesAddUpdate(CvePersonalVacaciones, SRCvePersonal, UsuarioActual.CveUsuario, Documento))
|
||||
Alert("Las vacaciones se han autorizado.");
|
||||
UpModalEditarDiaVacacion.Update();
|
||||
|
||||
|
||||
CargaVacaciones();
|
||||
cargaDatos(CvePersonal: SRCvePersonal);
|
||||
cargaBitacora();
|
||||
|
||||
cargasobrericiboconceptos(SRMostrarFormulas);
|
||||
UpModalConceptos.Update();
|
||||
UpModalEditarDiaVacacion.Update();
|
||||
// CargaVacacionesResumenPeriodoActual();
|
||||
RegistraScript("$('#divEditarDiaVacacion').modal('hide');");
|
||||
}
|
||||
@@ -3566,10 +3685,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
cargaDatos();
|
||||
cargaDatos(CvePersonal:SRCvePersonal);
|
||||
|
||||
cargasobrericiboconceptos(SRMostrarFormulas);
|
||||
UpModalConceptos.Update();
|
||||
UpGvConceptos.Update();
|
||||
|
||||
RegistraScript("$('#ModalUpConcepto').modal('hide');");
|
||||
Alert("el importe sera tomado del calculo y no del valor fijo");
|
||||
@@ -3679,7 +3798,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
ChkCalAutomaticoV.Checked = false;
|
||||
if (CveConcepto > 0)
|
||||
{
|
||||
DataRow drow = dtempleadosConceptos.FiltroPrimero(string.Format("CveConcepto={0} AND CvePersonal ={1}", CveConcepto, CvePersonal));
|
||||
DataRow drow = dtPerEmpleadosConceptos.FiltroPrimero(string.Format("CveConcepto={0} AND CvePersonal ={1}", CveConcepto, CvePersonal));
|
||||
if (drow != null)
|
||||
{
|
||||
int TipoCalculo = drow["Estatus"].ToString().ToEntero();
|
||||
@@ -3812,11 +3931,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
cargaDatos();
|
||||
cargaDatos(CvePersonal: SRCvePersonal);
|
||||
cargaBitacora();
|
||||
|
||||
cargasobrericiboconceptos(SRMostrarFormulas);
|
||||
UpModalConceptos.Update();
|
||||
UpGvConceptos.Update();
|
||||
|
||||
RegistraScript("$('#ModalUpConcepto').modal('hide');");
|
||||
Alert("El cambio se ha guardado correctamente.");
|
||||
@@ -3844,12 +3963,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
private void mostrarConceptos()
|
||||
{
|
||||
#region "Llenado de datos empleado"
|
||||
string CodigoEmpleado = "";
|
||||
string NombreCompleto = "";
|
||||
string RFC = "";
|
||||
string CURP = "";
|
||||
string TipoPeriodo = "";
|
||||
string NSS = "";
|
||||
|
||||
string DiasLaborados = "";
|
||||
string DiasFaltados = "";
|
||||
string DiasVacaciones = "";
|
||||
@@ -3857,12 +3971,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
string FechaFin = "";
|
||||
string DiasRetardos = "";
|
||||
string DiasIncapacidad = "";
|
||||
string Puesto = "";
|
||||
string Departamento = "";
|
||||
string SD = "";
|
||||
string SDI = "";
|
||||
string SalarioDiarioIMSS = "";
|
||||
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
DataRow drow = dtPerEmpleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
if (drow != null)
|
||||
{
|
||||
DiasLaborados = string.Format("{0}", drow["DiasLaborados"].ToString().ToEntero());
|
||||
@@ -3877,35 +3989,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
SalarioDiarioIMSS = string.Format("{0:####.####}", drow["SalarioDiarioIMSS"]);
|
||||
}
|
||||
|
||||
using (ClsRH objrh = new ClsRH())
|
||||
{
|
||||
if (objrh.GetPersonal(SRCvePersonal, UsuarioActual.CveEmpresa) && objrh.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow erow = objrh.DtResultados.Rows[0];
|
||||
CodigoEmpleado = erow["Codigo"].ToString();
|
||||
NombreCompleto = erow["NombreCompleto"].ToString();
|
||||
RFC = erow["RFC"].ToString();
|
||||
CURP = erow["CURP"].ToString();
|
||||
TipoPeriodo = erow["TipoPeriodo"].ToString();
|
||||
NSS = erow["NSS"].ToString();
|
||||
Puesto = erow["Puesto"].ToString();
|
||||
Departamento = erow["Departamento"].ToString();
|
||||
}
|
||||
}
|
||||
LblCodigoEmpleado.Text = CodigoEmpleado;
|
||||
//LblNombreCompleto.Text = NombreCompleto;
|
||||
LblRFC.Text = RFC;
|
||||
LblCURP.Text = CURP;
|
||||
LblTipoPeriodo.Text = TipoPeriodo;
|
||||
LblNSS.Text = NSS;
|
||||
LblDiasLaborados.Text = DiasLaborados;
|
||||
LblDiasFaltados.Text = DiasFaltados;
|
||||
LblDiasVacaciones.Text = DiasVacaciones;
|
||||
LblFecha.Text = string.Format("{0} al {1}", FechaInicio, FechaFin);
|
||||
LblDiasRetardos.Text = DiasRetardos;
|
||||
LblDiasIncapacidad.Text = DiasIncapacidad;
|
||||
LblSRPuesto.Text = Puesto;
|
||||
LblSRDepartamento.Text = Departamento;
|
||||
LblSRSalarioDiario.Text = SD;
|
||||
LblSRSalarioDiarioIntegrado.Text = SDI;
|
||||
LblSRSbc.Text = SalarioDiarioIMSS;
|
||||
@@ -4041,6 +4130,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if ((Continuar))
|
||||
{
|
||||
CargaFonacot();
|
||||
|
||||
cargaDatos(CvePersonal: SRCvePersonal);
|
||||
cargaBitacora();
|
||||
|
||||
cargasobrericiboconceptos(SRMostrarFormulas);
|
||||
UpModalConceptos.Update();
|
||||
Alert("El registro fonacot se ha eliminado");
|
||||
}
|
||||
}
|
||||
@@ -4082,6 +4177,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
Alert("Se actualizo el calculo de fonacot");
|
||||
CargaFonacot();
|
||||
cargaDatos(CvePersonal: SRCvePersonal);
|
||||
cargaBitacora();
|
||||
|
||||
cargasobrericiboconceptos(SRMostrarFormulas);
|
||||
UpModalConceptos.Update();
|
||||
RegistraScript("$('#ModalFonacot').modal('hide');");
|
||||
}
|
||||
}
|
||||
@@ -4106,8 +4206,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
SRMostrarFormulas = MostrarFormulas;
|
||||
{
|
||||
DataTable dtper = dtConceptos.FiltraParametros(string.Format("Tipo IN ('P') AND EsPadre = 1 {0}", (MostrarFormulas ? "" : " AND SoloVisible=0")));
|
||||
DataTable dtded = dtConceptos.FiltraParametros(string.Format("Tipo IN ('D') AND EsPadre = 1 AND CveSistema NOT IN(101) {0}", (MostrarFormulas ? "" : " AND SoloVisible=0")));
|
||||
DataTable dtper = dtPerConceptos.FiltraParametros(string.Format("Tipo IN ('P') AND EsPadre = 1 {0}", (MostrarFormulas ? "" : " AND SoloVisible=0")));
|
||||
DataTable dtded = dtPerConceptos.FiltraParametros(string.Format("Tipo IN ('D') AND EsPadre = 1 AND CveSistema NOT IN(101) {0}", (MostrarFormulas ? "" : " AND SoloVisible=0")));
|
||||
dtper.Columns.Add("BorradoLogico", typeof(int));
|
||||
dtded.Columns.Add("BorradoLogico", typeof(int));
|
||||
|
||||
@@ -4115,8 +4215,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
int BorradoLogico = 0;
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal)) != 0)
|
||||
&& (dtempleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal)) == 0)
|
||||
if (!(dtPerEmpleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal)) != 0)
|
||||
&& (dtPerEmpleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal)) == 0)
|
||||
)
|
||||
{
|
||||
BorradoLogico = 1;
|
||||
@@ -4128,8 +4228,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
int BorradoLogico = 0;
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal)) != 0)
|
||||
&& (dtempleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal)) == 0)
|
||||
if (!(dtPerEmpleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal)) != 0)
|
||||
&& (dtPerEmpleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal)) == 0)
|
||||
)
|
||||
{
|
||||
if (!row["CveSistema"].ToString().ToEntero().Contiene(new int[] { 20, 21, 112, 202, 203, 204, 205, 206, 207, 50, 51 }))
|
||||
@@ -4156,18 +4256,18 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
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));
|
||||
//bool visible = (dtPerEmpleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
|
||||
double Importe = dtPerEmpleados.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.ValorP = dtPerEmpleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
nConcepto.isOnlyBisibleP = row["SoloVisible"].ToString().ToEntero();
|
||||
|
||||
|
||||
nConcepto.isSavedP = dtempleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus >0", CveConcepto, SRCvePersonal));
|
||||
nConcepto.isEditedP = dtempleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal));
|
||||
nConcepto.isSavedP = dtPerEmpleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus >0", CveConcepto, SRCvePersonal));
|
||||
nConcepto.isEditedP = dtPerEmpleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal));
|
||||
}
|
||||
if (maxded > i)
|
||||
{
|
||||
@@ -4175,16 +4275,16 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
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));
|
||||
//bool visible = (dtPerEmpleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
|
||||
double Importe = dtPerEmpleados.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.ValorD = dtPerEmpleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
nConcepto.isOnlyBisibleD = row["SoloVisible"].ToString().ToEntero();
|
||||
nConcepto.isSavedD = dtempleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus >0", CveConcepto, SRCvePersonal));
|
||||
nConcepto.isEditedD = dtempleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal));
|
||||
nConcepto.isSavedD = dtPerEmpleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus >0", CveConcepto, SRCvePersonal));
|
||||
nConcepto.isEditedD = dtPerEmpleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal));
|
||||
}
|
||||
lconc.Add(nConcepto);
|
||||
}
|
||||
@@ -4195,19 +4295,19 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
SubTotales.CveConceptoP = 0;
|
||||
SubTotales.ConceptoP = "Total Percepciones";
|
||||
SubTotales.EstatusP = -2;
|
||||
SubTotales.ImporteP = dtempleados.SUM("SumaPercepciones", string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
SubTotales.ImporteP = dtPerEmpleados.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));
|
||||
SubTotales.ImporteD = dtPerEmpleados.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));
|
||||
Totales.ImporteD = dtPerEmpleados.SUM("Total", string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
|
||||
lconc.Add(SubTotales);
|
||||
lconc.Add(Totales);
|
||||
@@ -4237,7 +4337,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
int BorradoLogico = 0;
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal)) != 0))
|
||||
if (!(dtPerEmpleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal)) != 0))
|
||||
{
|
||||
BorradoLogico = 1;
|
||||
}
|
||||
@@ -4248,7 +4348,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
int BorradoLogico = 0;
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal)) != 0))
|
||||
if (!(dtPerEmpleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal)) != 0))
|
||||
{
|
||||
BorradoLogico = 1;
|
||||
}
|
||||
@@ -4271,8 +4371,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
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));
|
||||
//bool visible = (dtPerEmpleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
|
||||
double Importe = dtPerEmpleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
nConcepto.CveConceptoP = CveConcepto;
|
||||
nConcepto.ConceptoP = Concepto;
|
||||
nConcepto.NoConceptoP = Codigo;
|
||||
@@ -4280,7 +4380,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
nConcepto.isOnlyBisibleP = row["SoloVisible"].ToString().ToEntero();
|
||||
nConcepto.CveSistemaP = row["CveSistema"].ToString().ToEntero();
|
||||
|
||||
nConcepto.ValorP = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
nConcepto.ValorP = dtPerEmpleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
}
|
||||
if (maxded > i)
|
||||
{
|
||||
@@ -4288,15 +4388,15 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
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));
|
||||
//bool visible = (dtPerEmpleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
|
||||
double Importe = dtPerEmpleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
nConcepto.CveConceptoD = CveConcepto;
|
||||
nConcepto.ConceptoD = Concepto;
|
||||
nConcepto.NoConceptoD = Codigo;
|
||||
nConcepto.ImporteD = Importe;
|
||||
nConcepto.CveSistemaD = row["CveSistema"].ToString().ToEntero();
|
||||
nConcepto.isOnlyBisibleD = row["SoloVisible"].ToString().ToEntero();
|
||||
nConcepto.ValorD = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
nConcepto.ValorD = dtPerEmpleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
}
|
||||
lconc.Add(nConcepto);
|
||||
}
|
||||
@@ -4307,19 +4407,19 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
SubTotales.CveConceptoP = 0;
|
||||
SubTotales.ConceptoP = "Total Percepciones";
|
||||
SubTotales.EstatusP = -2;
|
||||
SubTotales.ImporteP = dtempleados.SUM("SumaPercepciones", string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
SubTotales.ImporteP = dtPerEmpleados.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));
|
||||
SubTotales.ImporteD = dtPerEmpleados.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));
|
||||
Totales.ImporteD = dtPerEmpleados.SUM("Total", string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
|
||||
lconc.Add(SubTotales);
|
||||
lconc.Add(Totales);
|
||||
@@ -4395,7 +4495,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
string Usuario = UsuarioActual.Nombre;
|
||||
string FolioFiscal = "";
|
||||
{
|
||||
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
DataRow drow = dtPerEmpleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
if (drow != null)
|
||||
{
|
||||
SubProyecto = drow["SubProyecto"].ToString();
|
||||
@@ -4474,8 +4574,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
if (continuar)
|
||||
{
|
||||
LnkConsultar_Click(null, null);
|
||||
mostrarConceptos();
|
||||
cargaDatos(CvePersonal: SRCvePersonal);
|
||||
cargaBitacora();
|
||||
|
||||
cargasobrericiboconceptos(SRMostrarFormulas);
|
||||
UpModalConceptos.Update();
|
||||
Alert("Se actualizo el calculo de infonavit");
|
||||
}
|
||||
}
|
||||
@@ -6943,7 +7046,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
RegistraScript("$('#DModalMovtoPermanente').modal('hide');");
|
||||
CargaMovtoPermanente();
|
||||
|
||||
cargaDatos(CvePersonal: SRCvePersonal);
|
||||
cargaBitacora();
|
||||
|
||||
cargasobrericiboconceptos(SRMostrarFormulas);
|
||||
UpMovtosPermanentes.Update();
|
||||
UpModalConceptos.Update();
|
||||
Alert("Se ha agregado el movimiento permanente");
|
||||
}
|
||||
RegistraScript("$('#ModalMovtoPermanente').modal('hide')");
|
||||
@@ -6971,7 +7080,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
RegistraScript("$('#ModalMovtoPermanente').modal('hide');");
|
||||
CargaMovtoPermanente();
|
||||
|
||||
cargaDatos(CvePersonal: SRCvePersonal);
|
||||
cargaBitacora();
|
||||
|
||||
cargasobrericiboconceptos(SRMostrarFormulas);
|
||||
UpMovtosPermanentes.Update();
|
||||
UpModalConceptos.Update();
|
||||
Alert("Se ha actualizado el movimiento permanente");
|
||||
}
|
||||
|
||||
@@ -6998,6 +7113,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
RegistraScript("$('#ModalMovtoPermanente').modal('hide');");
|
||||
CargaMovtoPermanente();
|
||||
|
||||
cargaDatos(CvePersonal: SRCvePersonal);
|
||||
cargaBitacora();
|
||||
|
||||
cargasobrericiboconceptos(SRMostrarFormulas);
|
||||
UpModalConceptos.Update();
|
||||
UpMovtosPermanentes.Update();
|
||||
Alert("Se ha eliminadó el movimiento permanente");
|
||||
}
|
||||
@@ -8368,6 +8489,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (Continuar)
|
||||
{
|
||||
CargaPersonalIncapacidad();
|
||||
|
||||
cargaDatos(CvePersonal: SRCvePersonal);
|
||||
cargaBitacora();
|
||||
|
||||
cargasobrericiboconceptos(SRMostrarFormulas);
|
||||
UpModalConceptos.Update();
|
||||
UpsrIncapacidadpersonal.Update();
|
||||
Alert("La incapacidad se ha eliminado.", TipoMensaje.ToastInformacion);
|
||||
}
|
||||
@@ -8402,6 +8529,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (Continuar)
|
||||
{
|
||||
CargaPersonalIncapacidad();
|
||||
|
||||
cargaDatos(CvePersonal: SRCvePersonal);
|
||||
cargaBitacora();
|
||||
|
||||
cargasobrericiboconceptos(SRMostrarFormulas);
|
||||
UpModalConceptos.Update();
|
||||
UpsrIncapacidadpersonal.Update();
|
||||
Alert("La incapacidad se ha agregado.", TipoMensaje.ToastInformacion);
|
||||
RegistraScript("$('#ModalSRIncapacidad').modal('hide')");
|
||||
@@ -8430,6 +8563,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (Continuar)
|
||||
{
|
||||
CargaPersonalIncapacidad();
|
||||
|
||||
cargaDatos(CvePersonal: SRCvePersonal);
|
||||
cargaBitacora();
|
||||
|
||||
cargasobrericiboconceptos(SRMostrarFormulas);
|
||||
UpModalConceptos.Update();
|
||||
UpsrIncapacidadpersonal.Update();
|
||||
Alert("La incapacidad se ha actualizado.", TipoMensaje.ToastInformacion);
|
||||
RegistraScript("$('#ModalSRIncapacidad').modal('hide')");
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
<th colspan="5" style="background-color: #a9a9e8 !important;">Actual</th>
|
||||
<th colspan="3" style="background-color: #88d6cd !important;">Nuevo</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<%--<th></th>--%>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -244,6 +245,16 @@
|
||||
<asp:Label ID="lblsalarioDiarioSSf" runat="server" Text='<%# (Eval("SalarioDiarioSSNuevo", "{0:N2}") == Eval("SalarioDiarioSS", "{0:N2}") ? "NO" : "SI") %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<input type="checkbox" class="chkt4u" checked="checked" />
|
||||
<input type="checkbox" id="ChkAllGVDatosA" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<input id="chk" type="checkbox" class="chkt4" runat="server" />
|
||||
<asp:CheckBox ID="chkUpdate" CssClass="chkp4" runat="server"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" Visible="false">
|
||||
<ItemTemplate>
|
||||
@@ -979,6 +990,59 @@
|
||||
setTimeout(function () { loadadscroll(); }, 50);
|
||||
}, 400);*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function checkclicks(tablaclass, inputsclass, inputall, inputrange, OnChecksChange) {
|
||||
|
||||
|
||||
$('table' + tablaclass + ' ' + inputsclass + ' input').change(function () {
|
||||
valor = $(this).is(':checked');
|
||||
OnChecksChange();
|
||||
});
|
||||
|
||||
$(inputall).change(function () {
|
||||
var ischeked = $(this).is(':checked');
|
||||
$('table' + tablaclass + ' ' + inputsclass + ' input').prop("checked", ischeked);
|
||||
OnChecksChange();
|
||||
|
||||
});
|
||||
|
||||
$(inputrange).change(function () {
|
||||
|
||||
if ($(inputrange + ':checked').length == 2) {
|
||||
var check = false;
|
||||
var valor = $(inputrange + 'u').is(':checked');
|
||||
$('table' + tablaclass + ' tr').each(function (index) {
|
||||
|
||||
if ($(this).find(inputrange) && $(this).find(inputrange).is(':checked')) {
|
||||
if (check) {
|
||||
var inputi = $(this).find('' + inputsclass + ' input');
|
||||
if (inputi) {
|
||||
inputi.prop("checked", valor);
|
||||
}
|
||||
check = false;
|
||||
} else {
|
||||
check = true;
|
||||
}
|
||||
}
|
||||
if (check) {
|
||||
var inputi = $(this).find('' + inputsclass + ' input');
|
||||
if (inputi) {
|
||||
inputi.prop("checked", valor);
|
||||
inputi.prop("checked", valor);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(inputrange + ':checked').prop("checked", false);
|
||||
OnChecksChange();
|
||||
}
|
||||
});
|
||||
OnChecksChange();
|
||||
}
|
||||
checkclicks('.GVDatos', '.chkp4', '#ChkAllGVDatosA', '.chkt4', showhide);
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ Partial Class RH_CatPersonal
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 119, 158, 172, 173, 174) Then
|
||||
HplAddVenta.Visible = False
|
||||
End If
|
||||
LnkAddPersonalSimplificado.Visible = Not HplAddVenta.Visible
|
||||
|
||||
@@ -2147,7 +2147,7 @@ Partial Class RH_Personal
|
||||
|
||||
If EnviarCorreoNomina AndAlso DDLUsuarioNomina.SelectedValue.ToEntero > 0 Then
|
||||
'EnviarCorreoNominista()
|
||||
EviarCorreoBajaReingresoNomista(TipoMovimientoRH.Alta)
|
||||
EnviarCorreoBajaReingresoNomista(TipoMovimientoRH.Alta)
|
||||
End If
|
||||
|
||||
|
||||
@@ -7513,7 +7513,7 @@ Partial Class RH_Personal
|
||||
|
||||
If continuar Then
|
||||
|
||||
EviarCorreoBajaReingresoNomista(If(estatus = 1, TipoMovimientoRH.Reingreso, TipoMovimientoRH.Baja))
|
||||
EnviarCorreoBajaReingresoNomista(If(estatus = 1, TipoMovimientoRH.Reingreso, TipoMovimientoRH.Baja))
|
||||
|
||||
End If
|
||||
|
||||
@@ -7669,7 +7669,7 @@ Partial Class RH_Personal
|
||||
Reingreso
|
||||
End Enum
|
||||
|
||||
Private Sub EviarCorreoBajaReingresoNomista(eTipoMovimientoRH As TipoMovimientoRH)
|
||||
Private Sub EnviarCorreoBajaReingresoNomista(eTipoMovimientoRH As TipoMovimientoRH)
|
||||
|
||||
|
||||
Dim CorreoNominista As String = GlobalDTUsuarios(CveUsuario:=DDLUsuarioNomina.SelectedValue.ToEntero).FiltroPrimeroValor("Correo")
|
||||
|
||||
@@ -2326,6 +2326,15 @@ Partial Class Ventas
|
||||
ViewState("HabilitaRemisionPublicoGeneral") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TieneBloqueoPorAutorizacion As Integer
|
||||
Get
|
||||
Return IfNull(ViewState("TieneBloqueoPorAutorizacion"), "0", ViewState("TieneBloqueoPorAutorizacion")).ToString().ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TieneBloqueoPorAutorizacion") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
'#Region "AuxiliarConta"
|
||||
@@ -6320,7 +6329,7 @@ Partial Class Ventas
|
||||
|
||||
UpINV.Update()
|
||||
End Sub
|
||||
Private Sub CargaSubProyecto(Optional CveSubProyecto As Integer = -1)
|
||||
Private Sub CargaSubProyecto(Optional CveSubProyecto As Integer = -1, Optional FiltraPorProyecto As Boolean = False)
|
||||
'DdlSubProyecto.Items.Clear()
|
||||
'DdlSubProyecto.SelectedValue = Nothing
|
||||
'If DdlProyecto.SelectedValue.ToEntero() > 0 Then
|
||||
@@ -6329,6 +6338,20 @@ Partial Class Ventas
|
||||
'End If
|
||||
'DdlSubProyecto.DataBind()
|
||||
'DdlSubProyecto.Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "-1"))
|
||||
|
||||
If FiltraPorProyecto Then
|
||||
DdlSubProyecto.Items.Clear()
|
||||
|
||||
Using ObjSubP As New ClsSubProyectos
|
||||
If ObjSubP.GetSubProyectos(UsuarioActual.CveEmpresa) Then
|
||||
DdlSubProyecto.DataSource = ObjSubP.DtResultados.FiltraParametros(String.Format("CveProyecto = {0}", DdlProyecto.SelectedValue))
|
||||
End If
|
||||
End Using
|
||||
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "-1"))
|
||||
End If
|
||||
|
||||
If CveSubProyecto > 0 Then DdlSubProyecto.SelectedValueExist(CveSubProyecto)
|
||||
End Sub
|
||||
|
||||
@@ -6963,6 +6986,11 @@ Partial Class Ventas
|
||||
HabilitaRemisionPublicoGeneral = 1
|
||||
End If
|
||||
|
||||
'SI TUVO HABILITADO EL BLOQUEO POR AUTORIZACION PERO DESPUES SE CAMBIO MANUAL A REMISION
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem") AndAlso TieneBloqueoPorAutorizacion = 1 Then
|
||||
HabilitaRemisionPublicoGeneral = 1
|
||||
End If
|
||||
|
||||
'SI TIENE LA HABILITACION DE REMISION ACTIVA Y LA SUCURSAL NO LO PERMITE
|
||||
If Not DeshabilitarAutorizacion AndAlso HabilitaRemisionPublicoGeneral = 1 Then
|
||||
HabilitaRemisionPublicoGeneral = 0
|
||||
@@ -6983,7 +7011,7 @@ Partial Class Ventas
|
||||
Private Function ValidaImportePublicoGeneral() As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Rem" AndAlso HabilitaRemisionPublicoGeneral = 1 Then
|
||||
If DdlTipoComprobante.SelectedValue = "Rem" AndAlso HabilitaRemisionPublicoGeneral = 1 AndAlso UsuarioActual.Empresa.Funcionalidad(381).Trim() = CveCliente.ToString() Then
|
||||
Dim Total As Decimal = TxtTotal.Text.ToDecimal()
|
||||
|
||||
If DdlMoneda.SelectedValue = "1" Then
|
||||
@@ -7195,6 +7223,8 @@ Partial Class Ventas
|
||||
Else
|
||||
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
|
||||
DdlTipoComprobante.SelectedValue = "PA"
|
||||
|
||||
TieneBloqueoPorAutorizacion = 1
|
||||
End If
|
||||
|
||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
||||
@@ -7257,6 +7287,8 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) <> "1" Then
|
||||
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
|
||||
DdlTipoComprobante.SelectedValue = "PA"
|
||||
|
||||
TieneBloqueoPorAutorizacion = 1
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -7384,6 +7416,8 @@ Partial Class Ventas
|
||||
UPCondicionesPago.Update()
|
||||
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
|
||||
DdlTipoComprobante.SelectedValue = "PA"
|
||||
TieneBloqueoPorAutorizacion = 1
|
||||
|
||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
||||
'si llegó por la opción de cotización no debe de restringuir
|
||||
If IfNull(Request("Op"), "").ToString() = "Cot" OrElse (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0) Then DdlTipoComprobante.SelectedValue = "Cot"
|
||||
@@ -7536,7 +7570,7 @@ Partial Class Ventas
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2"))
|
||||
End If
|
||||
End If
|
||||
HabilitaRemisionPublicoGeneral = 0
|
||||
|
||||
HabilitarRemisionesPublicoGeneral()
|
||||
End If
|
||||
|
||||
@@ -18089,7 +18123,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargaSubProyecto()
|
||||
CargaSubProyecto(FiltraPorProyecto:=True)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -30131,11 +30165,7 @@ Partial Class Ventas
|
||||
For Each Dr As DataRow In DtImpuestosLocal.Rows
|
||||
FiltroStr = String.Format("ISNULL(PorcentajeIVA,0) = {0} AND ISNULL(PorcentajeRetIVA,0) = {1} AND ISNULL(PorcentajeRetISR,0) = {2} AND ISNULL(PorcentajeIEPS,0) = {3} AND ISNULL(CveSubProyecto,0) = {4} ", Dr("PorcentajeIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("CveSubProyecto"))
|
||||
Dim importePuTemp As Decimal = 0
|
||||
If AplicaDescuentos Then
|
||||
importePuTemp = (Porcentaje * (TmpDT.SUMD("TotalImporte", FiltroStr)))
|
||||
Else
|
||||
importePuTemp = (Porcentaje * (TmpDT.SUMD("TotalImporte", FiltroStr) - TmpDT.SUMD("Descuento", FiltroStr)))
|
||||
End If
|
||||
|
||||
If Not AplicaImpuestosLocales Then
|
||||
importePuTemp = importePuTemp - TotalImpuestosLocalesVentaOriginal
|
||||
@@ -30154,10 +30184,13 @@ Partial Class Ventas
|
||||
|
||||
Dr("ImporteRetIVA") = (importePuTemp * Dr("PorcentajeRetIVA").ToString().ToDecimal())
|
||||
Dr("ImporteRetISR") = (importePuTemp * Dr("PorcentajeRetISR").ToString().ToDecimal())
|
||||
Dr("ImportePU") = importePuTemp
|
||||
|
||||
If AplicaDescuentos Then
|
||||
Dr("ImportePU") = importePuTemp + TmpDT.SUMD("Descuento", FiltroStr)
|
||||
Dr("Descuento") = Porcentaje * TmpDT.SUMD("Descuento", FiltroStr)
|
||||
Dr("ImporteTotal") = Dr("ImportePU").ToString().ToDecimal().RoundSQL(2)
|
||||
Else
|
||||
Dr("ImportePU") = importePuTemp
|
||||
End If
|
||||
|
||||
If AplicaRedondeo Then
|
||||
@@ -30172,11 +30205,14 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
Dim importeNC = (DtImpuestosLocal.SUMD("ImporteTotal") + DtImpuestosLocal.SUMD("ImporteIVA") + DtImpuestosLocal.SUMD("ImporteIEPS") - DtImpuestosLocal.SUMD("ImporteRetIVA") - DtImpuestosLocal.SUMD("ImporteRetISR"))
|
||||
|
||||
If AplicaDescuentos Then
|
||||
importeNC -= DtImpuestosLocal.SUMD("Descuento")
|
||||
End If
|
||||
|
||||
If AplicaImpuestosLocales Then
|
||||
Importe = Importe + TotalImpuestosLocalesRecalculado
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user