This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2023-09-08 05:57:46 -07:00
parent 4555f2edf6
commit 35b1982454
3 changed files with 119 additions and 96 deletions

View File

@@ -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
{

View File

@@ -920,7 +920,8 @@
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">Nomina del <asp:Label ID="LblFecha" runat="server"></asp:Label></span>
<span class="caption-subject font-yellow-gold bold uppercase">Nomina del
<asp:Label ID="LblFecha" runat="server"></asp:Label></span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
@@ -3333,20 +3334,20 @@
</div>
</div>
<div class="portlet-body rowpadding ">
<asp:TextBox ID="TextBox5" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
<asp:TextBox ID="TxtArchivoPDFSUAEBA" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
</div>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="LnkProcesaPDFSUAEBA" OnClick="LnkProcesaPDFSUAEBA_Click" CssClass="btn btn-primary" runat="server">Procesar</asp:LinkButton>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkProcesaPDFSUAEBA" />
</Triggers>
</asp:UpdatePanel>
</div>
@@ -3475,8 +3476,6 @@
-si desea agregar un empleado que no se encuentre en la lista solo debe de ingresar fila y el codigo del empleado.<br />
-si no desea insertar un concepto puede borrar la columna.<br />
-no se debe borrar la columna código.<br />--%>
</div>

View File

@@ -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();
@@ -10683,7 +10691,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
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; }