This commit is contained in:
@@ -1924,6 +1924,20 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
public int EstatusD { get; set; }
|
||||
public int isEditedD { get; set; }
|
||||
public int isOnlyBisibleD { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public string NoConceptoO { get; set; }
|
||||
public string ConceptoO { get; set; }
|
||||
public string LabelValorO { get; set; }
|
||||
public int CveConceptoO { get; set; }
|
||||
public double ImporteO { get; set; }
|
||||
public double ValorO { get; set; }
|
||||
public int EstatusO { get; set; }
|
||||
public int isEditedO { get; set; }
|
||||
public int isOnlyBisibleO { get; set; }
|
||||
}
|
||||
|
||||
int CveConceptoPolgvc, CveConceptoDolgvc;
|
||||
@@ -1958,6 +1972,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
LinkButton LnkImporte = e.Row.FCLinkButton("LnkImporte");
|
||||
Label LtlImporteD = e.Row.FCLabel("LtlImporteD");
|
||||
LinkButton LnkImporteD = e.Row.FCLinkButton("LnkImporteD");
|
||||
|
||||
//isEditedD
|
||||
if (isOnlyBisibleP == 1)
|
||||
{
|
||||
@@ -2009,6 +2024,22 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
LnkImporte.Visible = !LtlImporte.Visible;
|
||||
LnkImporteD.Visible = !LtlImporteD.Visible;
|
||||
|
||||
LinkButton LnkConceptoO = e.Row.FCLinkButton("LnkConceptoO");
|
||||
LinkButton LnkImporteO = e.Row.FCLinkButton("LnkImporteO");
|
||||
if (LnkConceptoO != null)
|
||||
{
|
||||
LnkConceptoO.Visible = false;
|
||||
LnkImporteO.Visible = false;
|
||||
if (e.Row.DBCampo("ImporteO").ToDecimal() == 0)
|
||||
{
|
||||
e.Row.FCLabel("LtlConceptoO").Visible = false;
|
||||
e.Row.FCLabel("LtlImporteO").Visible = false;
|
||||
if (e.Row.DataKey("isOnlyBisibleO").ToEntero() == 1)
|
||||
{
|
||||
e.Row.CssClass = string.Format("{0} isOnlyBisibleO", e.Row.CssClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CveConceptoPolgvc = CveConcepto;
|
||||
CveConceptoDolgvc = CveConceptoD;
|
||||
@@ -3772,6 +3803,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
int CvePersonal = 0;
|
||||
int CveNomina = 0;
|
||||
int CveMetodoPago = 0;
|
||||
double SubTotal = 0;
|
||||
double Total = 0;
|
||||
int CveMoneda = 1;
|
||||
#endregion
|
||||
@@ -3789,7 +3821,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
CveNomina = 0;
|
||||
CvePersonal = rtemp["CvePersonal"].ToString().ToEntero();
|
||||
CveMetodoPago = rtemp["CveMetodoPago"].ToString().ToEntero();
|
||||
SubTotal = 0;//cambiar reparar
|
||||
Total = 0;//cambiar reparar
|
||||
SubTotal = rtemp["SumaPercepciones"].ToString().ToDouble();
|
||||
Total = rtemp["Total"].ToString().ToDouble();
|
||||
if (CvePersonal > 0)
|
||||
{
|
||||
|
||||
@@ -3797,13 +3832,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
if (objNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodoSeleccionado, -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
|
||||
if (objNomina.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
CveNomina = objNomina.CveNomina;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoSeleccionado, Total, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
|
||||
if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoSeleccionado, SubTotal, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
|
||||
"", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CveNomina = objNomina.CveNomina;
|
||||
@@ -4094,8 +4130,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ");
|
||||
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 ");
|
||||
DataTable dtObl = dtConceptos.FiltraParametros("Tipo IN ('O') AND EsPadre = 1 ");
|
||||
dtper.Columns.Add("BorradoLogico", typeof(int));
|
||||
dtded.Columns.Add("BorradoLogico", typeof(int));
|
||||
dtObl.Columns.Add("BorradoLogico", typeof(int));
|
||||
|
||||
foreach (DataRow row in dtper.Rows)
|
||||
{
|
||||
@@ -4119,13 +4157,26 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
row["BorradoLogico"] = BorradoLogico;
|
||||
}
|
||||
dtded.AcceptChanges();
|
||||
foreach (DataRow row in dtObl.Rows)
|
||||
{
|
||||
int BorradoLogico = 0;
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0))
|
||||
{
|
||||
BorradoLogico = 1;
|
||||
}
|
||||
row["BorradoLogico"] = BorradoLogico;
|
||||
}
|
||||
dtObl.AcceptChanges();
|
||||
dtper = dtper.FiltraParametros("BorradoLogico=0");
|
||||
dtded = dtded.FiltraParametros("BorradoLogico=0");
|
||||
dtObl = dtObl.FiltraParametros("BorradoLogico=0");
|
||||
int maxper = dtper.Rows.Count;
|
||||
int maxded = dtded.Rows.Count;
|
||||
int maxObl = dtObl.Rows.Count;
|
||||
int i = 0;
|
||||
List<NConcepto> lconc = new List<NConcepto>();
|
||||
for (i = 0; i < maxper || i < maxded; i++)
|
||||
for (i = 0; i < maxper || i < maxded || i < maxObl; i++)
|
||||
{
|
||||
NConcepto nConcepto = new NConcepto();
|
||||
DataRow row;
|
||||
@@ -4157,6 +4208,20 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
nConcepto.ImporteD = Importe;
|
||||
nConcepto.ValorD = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", 1));
|
||||
}
|
||||
if (maxObl > i)
|
||||
{
|
||||
row = dtObl.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}", 1));
|
||||
nConcepto.CveConceptoO = CveConcepto;
|
||||
nConcepto.ConceptoO = Concepto;
|
||||
nConcepto.NoConceptoO = Codigo;
|
||||
nConcepto.ImporteO = Importe;
|
||||
nConcepto.ValorO = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", 1));
|
||||
}
|
||||
lconc.Add(nConcepto);
|
||||
}
|
||||
|
||||
@@ -4173,6 +4238,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
SubTotales.ConceptoD = "Total Deducciones";
|
||||
SubTotales.EstatusD = -2;
|
||||
SubTotales.ImporteD = dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", 1));
|
||||
SubTotales.CveConceptoD = 0;
|
||||
|
||||
SubTotales.ConceptoO = "Total Obligaciones";
|
||||
SubTotales.EstatusO = -2;
|
||||
SubTotales.ImporteO = dtempleados.SUM("SumaObligaciones", string.Format("CvePersonal = {0}", 1));
|
||||
|
||||
//NConcepto Totales = new NConcepto();
|
||||
//Totales.CveConceptoD = 0;
|
||||
|
||||
Reference in New Issue
Block a user