This commit is contained in:
@@ -10161,7 +10161,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
protected void LnkProcesaPDFSUAEBA_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<Archivo> Filesgral = TxtAsistenciaTabular.getfiles().Archivos;
|
||||
List<Archivo> 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<cedulaSUAEmpleados> 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; }
|
||||
|
||||
Reference in New Issue
Block a user