diff --git a/Nomina/Finiquito.aspx.cs b/Nomina/Finiquito.aspx.cs index 387ac14dd..78776b08e 100644 --- a/Nomina/Finiquito.aspx.cs +++ b/Nomina/Finiquito.aspx.cs @@ -235,9 +235,17 @@ public partial class Nomina_Finiquito : ClsPaginas if (TxtFechaBaja.Text.Length > 9) { DateTime fechafin = TxtFechaBaja.Text.ToDateTime(); + DateTime fechaalta = LblFechaAlta.Text.ToDateTime(); + int diasanio = fechafin.DayOfYear; + if (fechafin.Year == fechaalta.Year) + { + diasanio = diasanio - fechaalta.DayOfYear; + + } + decimal antiguedad = getyearsresult(fechafin, FechaInicio); TxtAntiguedad.Text = string.Format("{0:##0.00###}", antiguedad); - TxtDiasTransAnio.Text = string.Format("{0}", fechafin.DayOfYear); + TxtDiasTransAnio.Text = string.Format("{0}", diasanio); } else { diff --git a/Nomina/Nomina.aspx b/Nomina/Nomina.aspx index 2e9214876..f9155577e 100644 --- a/Nomina/Nomina.aspx +++ b/Nomina/Nomina.aspx @@ -838,9 +838,9 @@
Salario
-
+
- +
Afi IMSS
@@ -855,7 +855,7 @@
SDI
-
+
CURP
@@ -873,7 +873,7 @@
R.F.C.
-
+
Días Incapacidad
@@ -893,10 +893,10 @@
Faltas
-
- -
- + +
+ - +
@@ -920,7 +920,8 @@
- Nomina del + Nomina del +
@@ -1016,7 +1017,7 @@ - +
@@ -3308,7 +3309,7 @@
- +
- +
+ + + @@ -3406,77 +3407,75 @@
-
-
- - Paso 1: Descargar plantilla Conceptos -
-
- -
-
+
+
+ + Paso 1: Descargar plantilla Conceptos +
+
+ +
+
-
- " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm font-bold yellow-gold"> -
-
-
-
- - - - - - - - -
- -
-
-
-
-
-
- - +
+
+ + + + + + + + +
+ +
+
+
+
+
+
+
-
-
-
-
- - Paso 2: cargar plantilla -
-
- -
+ +
+
+
+
+
+ + Paso 2: cargar plantilla
-
- +
+
-
- +
+
-
+
+
+ +
+
- + <%-- -recuerda Solo editar de las tercer fila en adelante.
-No se debe editar el nombre de la hoja 'Nómina'.
-la columna para referenciar al emplado es la primer columna 'Codigo', la columna empleado es solo es informativa.
-si desea agregar un empleado que no se encuentre en la lista solo debe de ingresar fila y el codigo del empleado.
-si no desea insertar un concepto puede borrar la columna.
-no se debe borrar la columna código.
--%> - -
diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 15a085477..a950ca010 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -10161,7 +10161,7 @@ public partial class Nomina_Nomina2 : ClsPaginas } protected void LnkProcesaPDFSUAEBA_Click(object sender, EventArgs e) { - List Filesgral = TxtAsistenciaTabular.getfiles().Archivos; + List Filesgral = TxtArchivoPDFSUAEBA.getfiles().Archivos; if (Filesgral.Count > 0) { @@ -10289,18 +10289,18 @@ public partial class Nomina_Nomina2 : ClsPaginas libro.Cell(row, column++).Value = string.Format("{0}", data.ORIGEN); libro.Cell(row, column++).Value = string.Format("'{0}", data.CLAVE); libro.Cell(row, column++).Value = string.Format("'{0}", data.FECHA); - libro.Cell(row, column++).Value = string.Format("{0}", data.DIAS.Trim().Replace(",", "").Replace("$", "").ToDecimal()); - libro.Cell(row, column++).Value = string.Format("{0}", data.SALARIO.Trim().Replace(",", "").Replace("$", "").ToDecimal()); - libro.Cell(row, column++).Value = string.Format("{0}", data.RETIRO.Trim().Replace(",", "").Replace("$", "").ToDecimal()); - libro.Cell(row, column++).Value = string.Format("{0}", data.CESANTIAPAT.Trim().Replace(",", "").Replace("$", "").ToDecimal()); - libro.Cell(row, column++).Value = string.Format("{0}", data.CESANTIAOBR.Trim().Replace(",", "").Replace("$", "").ToDecimal()); - libro.Cell(row, column++).Value = string.Format("{0}", data.SUMARCV.Trim().Replace(",", "").Replace("$", "").ToDecimal()); - libro.Cell(row, column++).Value = string.Format("{0}", data.APORTACION.Trim().Replace(",", "").Replace("$", "").ToDecimal()); - libro.Cell(row, column++).Value = string.Format("{0}", data.CUOTAFIJAOFDSTR.Trim().Replace(",", "").Replace("$", "").ToDecimal()); - libro.Cell(row, column++).Value = string.Format("{0}", data.CUOTAFIJAOFD.Trim().Replace(",", "").Replace("$", "").ToDecimal()); - libro.Cell(row, column++).Value = string.Format("{0}", data.AMORTIZA.Trim().Replace(",", "").Replace("$", "").ToDecimal()); - libro.Cell(row, column++).Value = string.Format("{0}", data.SUMAINFONAVIT.Trim().Replace(",", "").Replace("$", "").ToDecimal()); - libro.Cell(row, column++).Value = string.Format("{0}", data.SUMA.Trim().Replace(",", "").Replace("$", "").ToDecimal()); + libro.Cell(row, column++).Value = string.Format("{0}", data.DIAS);//.Trim().Replace(",", "").Replace("$", "").ToDecimal()); + libro.Cell(row, column++).Value = string.Format("{0}", data.SALARIO);//.Trim().Replace(",", "").Replace("$", "").ToDecimal()); + libro.Cell(row, column++).Value = string.Format("{0}", data.RETIRO);//.Trim().Replace(",", "").Replace("$", "").ToDecimal()); + libro.Cell(row, column++).Value = string.Format("{0}", data.CESANTIAPAT);//.Trim().Replace(",", "").Replace("$", "").ToDecimal()); + libro.Cell(row, column++).Value = string.Format("{0}", data.CESANTIAOBR);//.Trim().Replace(",", "").Replace("$", "").ToDecimal()); + libro.Cell(row, column++).Value = string.Format("{0}", data.SUMARCV);//.Trim().Replace(",", "").Replace("$", "").ToDecimal()); + libro.Cell(row, column++).Value = string.Format("{0}", data.APORTACION);//.Trim().Replace(",", "").Replace("$", "").ToDecimal()); + libro.Cell(row, column++).Value = string.Format("{0}", data.CUOTAFIJAOFDSTR);//.Trim().Replace(",", "").Replace("$", "").ToDecimal()); + libro.Cell(row, column++).Value = string.Format("{0}", data.CUOTAFIJAOFD);//.Trim().Replace(",", "").Replace("$", "").ToDecimal()); + libro.Cell(row, column++).Value = string.Format("{0}", data.AMORTIZA);//.Trim().Replace(",", "").Replace("$", "").ToDecimal()); + libro.Cell(row, column++).Value = string.Format("{0}", data.SUMAINFONAVIT);//.Trim().Replace(",", "").Replace("$", "").ToDecimal()); + libro.Cell(row, column++).Value = string.Format("{0}", data.SUMA);//.Trim().Replace(",", "").Replace("$", "").ToDecimal()); } row++; } @@ -10583,6 +10583,10 @@ public partial class Nomina_Nomina2 : ClsPaginas libro.Cell(row, column++).Value = "DIAS"; libro.Cell(row, column++).Value = "SALARIO"; + if (dataEBAPDF.ContieneLic) + { + libro.Cell(row, column++).Value = "LIC"; + } libro.Cell(row, column++).Value = "INCAPACIDAD"; libro.Cell(row, column++).Value = "AUSENTISMO"; libro.Cell(row, column++).Value = "RETIRO"; @@ -10626,6 +10630,10 @@ public partial class Nomina_Nomina2 : ClsPaginas libro.Cell(row, column++).Value = string.Format("'{0}", data.Fecha); libro.Cell(row, column++).Value = string.Format("{0}", data.Dias); libro.Cell(row, column++).Value = string.Format("{0}", data.SDI); + if (dataEBAPDF.ContieneLic) + { + libro.Cell(row, column++).Value = string.Format("{0}", data.Lic); + } libro.Cell(row, column++).Value = string.Format("{0}", data.Inc); libro.Cell(row, column++).Value = string.Format("{0}", data.Aus); libro.Cell(row, column++).Value = string.Format("{0}", data.Retiro); @@ -10656,8 +10664,8 @@ public partial class Nomina_Nomina2 : ClsPaginas } } - libro.Range(2, 7, row, 15).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Right; - libro.Range(2, 17, row, 20).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Right; + libro.Range(2, 7, row, dataEBAPDF.ContieneLic ?15:16).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Right; + libro.Range(2, dataEBAPDF.ContieneLic ? 17:18, row, dataEBAPDF.ContieneLic ? 20:21).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Right; //libro.Range(2, 7, row, 15).Style.NumberFormat.Format = "$ #,##0.00"; //libro.Range(2, 17, row, 20).Style.NumberFormat.Format = "$ #,##0.00"; libro.Columns().AdjustToContents(); @@ -10682,8 +10690,7 @@ public partial class Nomina_Nomina2 : ClsPaginas if (!isTitulo) { text = text.Replace(strtitulo.ToString(), ""); - } - + } cedulaSUAEmpleados cempleado = null; string[] lines = text.Split('\n'); int pasoCaptura = 0; @@ -10694,14 +10701,14 @@ public partial class Nomina_Nomina2 : ClsPaginas if (!espaso1 && pasoCaptura == 4) { - procesapaso4(line, cempleado); + procesapaso4(line, cempleado, objSUA.ContieneLic); } if (!espaso1 && pasoCaptura == 3) { if (Regex.IsMatch(line, ValidateFechaptt) || Regex.IsMatch(line, Validatedigitptt)) { - procesapaso4(line, cempleado); + procesapaso4(line, cempleado, objSUA.ContieneLic); pasoCaptura = 4; } else @@ -10716,7 +10723,7 @@ public partial class Nomina_Nomina2 : ClsPaginas { if (Regex.IsMatch(line, ValidateFechaptt) || Regex.IsMatch(line, Validatedigitptt)) { - procesapaso4(line, cempleado); + procesapaso4(line, cempleado, objSUA.ContieneLic); pasoCaptura = 4; } else @@ -10774,7 +10781,11 @@ public partial class Nomina_Nomina2 : ClsPaginas } if (isTitulo) { - strtitulo.AppendLine(); + if (line.Contains("Clave Fecha Días SDI ") && line.Contains(" Lic. ")) + { + objSUA.ContieneLic = true; + } + strtitulo.AppendLine(line); } //Console.WriteLine(line); } @@ -10787,10 +10798,11 @@ public partial class Nomina_Nomina2 : ClsPaginas strb.AppendLine("/*NEWPAGE*/"); } } + objSUA.txtTodo = strb.ToString(); return objSUA; } - public cedulaSUAEmpleados procesapaso4(string line, cedulaSUAEmpleados empleado) + public cedulaSUAEmpleados procesapaso4(string line, cedulaSUAEmpleados empleado,bool ContieneLic) { if (line.ToUpper().Contains("Página".ToUpper())) { @@ -10852,6 +10864,8 @@ public partial class Nomina_Nomina2 : ClsPaginas } if (col < l && !ismsfsd) { dtos.SDI = splitedline[col++]; } if (col < l && splitedline[col] == "") { col++; } + if(ContieneLic && col < l && !ismsfsd) { dtos.Lic = splitedline[col++]; } + if (col < l && splitedline[col] == "") { col++; } if (col < l && !ismsfsd) { dtos.Inc = splitedline[col++]; } if (col < l && splitedline[col] == "") { col++; } if (col < l && !ismsfsd) { dtos.Aus = splitedline[col++]; } @@ -10893,6 +10907,7 @@ public partial class Nomina_Nomina2 : ClsPaginas } public string txtTitulo { get; set; } public string txtTodo { get; set; } + public bool ContieneLic { get; set; } public List empleados { get; set; } } public class cedulaSUAEmpleados @@ -10915,6 +10930,7 @@ public partial class Nomina_Nomina2 : ClsPaginas public string Fecha { get; set; } public string Dias { get; set; } public string SDI { get; set; } + public string Lic { get; set; } public string Inc { get; set; } public string Aus { get; set; } public string Retiro { get; set; }