diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb
index 8f2cafafa..6fee37f4c 100644
--- a/App_Code/LogicNominas.vb
+++ b/App_Code/LogicNominas.vb
@@ -19,7 +19,7 @@ Public Class LogicNominas
sw.Start()
End If
- Dim cfdi As CFDITimbre = PreTimbrar(CveNomina, UsuarioActual, False) 'CvePersonal, CvePeriodo,
+ Dim cfdi As CFDITimbre = PreTimbrar(CveNomina, UsuarioActual, False, CvePAC) 'CvePersonal, CvePeriodo,
If cfdi IsNot Nothing AndAlso cfdi.Mensaje = "" Then
If Not cfdi.Timbrado Then
Dim ObjTimbrado As New Timbrado
@@ -81,7 +81,7 @@ Public Class LogicNominas
Return Retorno
End Function
Dim hasfiniquito As Boolean
- Public Function PreTimbrar(CveNomina As Integer, UsuarioActual As Usuario, TimbreIndemnizacion As Boolean) As CFDITimbre
+ Public Function PreTimbrar(CveNomina As Integer, UsuarioActual As Usuario, TimbreIndemnizacion As Boolean, Optional CvePAC As Integer = 4) As CFDITimbre
Dim continuar As Boolean = True
hasfiniquito = False
Dim CvePersonal As Integer = -1
@@ -439,7 +439,7 @@ Public Class LogicNominas
cfdi.Comprobante.TipoComprobante = "N"
cfdi.Comprobante.TipoDocto = "Egs"
cfdi.Comprobante.MetodoPago = "PUE"
- cfdi.Comprobante.CondicionesdePago = "" '"CONTADO"
+ cfdi.Comprobante.CondicionesdePago = If(CvePAC < 4, "CONTADO", "") '"" '""
cfdi.Comprobante.FormadePago = If(UsuarioActual.Empresa.Funcionalidad(350).Contiene("1"), "", "99")
cfdi.Comprobante.LugarExpedicion = UsuarioActual.Empresa.CP.ToString() ' AHORITA SOLO SE REQUIERE ESPECIFICAR EL CODIGO POSTAL
cfdi.Comprobante.NumCuentaPago = "" 'objPersonal.BancoNumCuenta
diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb
index ee58149a8..38687b3e8 100644
--- a/App_Code/modExtensiones.vb
+++ b/App_Code/modExtensiones.vb
@@ -59,14 +59,14 @@ Namespace Extensiones
#End Region
- Public Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
+ Public Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean, Optional curRow As Integer = 0) As DataTable
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
Dim excelFile As GemBox.Spreadsheet.ExcelFile = GemBox.Spreadsheet.ExcelFile.Load(flatFilePath)
Dim unnamed As Integer = 0
Dim cols As Integer
Dim columns As String()
- Dim curRow As Integer = 0
+ 'Dim curRow As Integer = 0
Dim curCol As Integer = 0
Dim dataTable As DataTable = New DataTable()
Dim worksheet As GemBox.Spreadsheet.ExcelWorksheet = excelFile.Worksheets(0)
@@ -75,8 +75,8 @@ Namespace Extensiones
If firstRowHasHeaders Then
- If worksheet.Rows(0).Cells(cols).Value IsNot Nothing Then
- dataTable.Columns.Add(worksheet.Rows(0).Cells(cols).Value.ToString())
+ If worksheet.Rows(curRow).Cells(cols).Value IsNot Nothing Then
+ dataTable.Columns.Add(worksheet.Rows(curRow).Cells(cols).Value.ToString())
Else
dataTable.Columns.Add("Unnamed Column " & (System.Threading.Interlocked.Increment(unnamed)))
End If
diff --git a/Nomina/Nomina.aspx b/Nomina/Nomina.aspx
index 796e7f71e..acdab6bfe 100644
--- a/Nomina/Nomina.aspx
+++ b/Nomina/Nomina.aspx
@@ -615,19 +615,49 @@
-
+
+ <%--
Descargar
+
Cargar--%>
+
+
+
+ Asistencia
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -3195,6 +3225,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cargar Asistencia Tabular
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs
index babb607b7..60f978911 100644
--- a/Nomina/Nomina.aspx.cs
+++ b/Nomina/Nomina.aspx.cs
@@ -8062,6 +8062,146 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
RegistraScript("$('#DmodalReportePercepcionesdeducciones').modal()");
}
+ protected void LnkProcesarReporteIncidenciaTabular_Click(object sender, EventArgs e)
+ {
+
+ DateTime fechai = TxtRIFechaInicio.Text.ToDateTime();
+ DateTime fechaf = TxtRIFechaFin.Text.ToDateTime();
+ ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
+ using (ClsNominas nom = new ClsNominas())
+ {
+ if (nom.GetPeriodos(-1,UsuarioActual.CveEmpresa,-1,-1, DdlPeriodo.SelectedValue.ToEntero(),-1) && (nom.DtResultados.Rows.Count>0))
+ {
+ fechai = nom.DtResultados.Rows[0]["FechaInicio"].ToString().ToDateTime();
+ fechaf = nom.DtResultados.Rows[0]["FechaFin"].ToString().ToDateTime();
+ }
+
+ if (nom.ReportedeincidenciasGET(UsuarioActual.CveEmpresa, fechai, fechaf, -4))
+ {
+
+ var libro = wb.AddWorksheet(nom.DTSetResultados.Tables[2], "Incidencias");
+ libro.ColumnsUsed().AdjustToContents();
+ var libroin = wb.AddWorksheet(nom.DTSetResultados.Tables[1], "Descripción incidencias");
+ libroin.ColumnsUsed().AdjustToContents();
+ libro.Row(1).InsertRowsAbove(4);
+ libro.Range(1, 2, 1, 6).Merge().Value = UsuarioActual.Empresa.Empresa;
+ libro.Range(2, 2, 2, 6).Merge().Value = "Reporte de incidencias";
+ libro.Range(3, 2, 3, 6).Merge().Value = $"del {fechai:dd/MM/yyyy} al {fechaf:dd/MM/yyyy}";
+ libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{DateTime.Now:dd/MM/yyyy}";
+ libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{DateTime.Now:HH:mm}";
+
+ //ws.Row(1).InsertRowsAbove(1);
+ }
+ }
+
+
+ System.IO.Stream fs = new System.IO.MemoryStream();
+ wb.SaveAs(fs);
+ fs.Position = 0;
+ System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
+ using (System.IO.Stream input = fs)
+
+ {
+ input.CopyTo(memoryStream);
+ }
+ memoryStream.Position = 0;
+
+ Response.Clear();
+ Response.Buffer = true;
+
+ Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
+ Response.AddHeader("content-disposition", string.Format("attachment;filename=incidencias del {0:dd-MM-yyyy} al {1:dd-MM-yyyy}.xlsx", fechai, fechaf));
+ Response.BinaryWrite(memoryStream.ToArray());
+ Response.End();
+ }
+
+ //
+ protected void LnkshowProsesarASistencia_Click(object sender, EventArgs e)
+ {
+ RegistraScript("$('#DModalAsistenciaTabular').modal()");
+ }
+ protected void LnkProcesarAsistenciaTabular_Click(object sender, EventArgs e)
+ {
+
+
+ int chkImporteValor = 1;
+ int chkImporte = 1;
+ int chkImporteGravado = 0;
+ List Filesgral = TxtArchivoNomina.getfiles().Archivos;
+ bool continuar = Filesgral.Count > 0;
+ string stringError = "";
+ Archivo fileItem = continuar ? Filesgral[0] : null;
+ if (continuar)
+ {
+ string FileExtension = fileItem.Extension.ToUpper();
+ if (FileExtension == "XLS" | FileExtension == "XLSX" | FileExtension == "CSV")
+ {
+ }
+ else
+ {
+ continuar = false;
+ stringError = "No se inserto un archivo de tipo Excel";
+ }
+
+ }
+ if (!(CvePeriodoSeleccionado >= 0))
+ {
+ continuar = false;
+ stringError = "debe cargar el periodo a actualizar";
+
+ }
+
+ DataTable DTEXcel = new DataTable();
+ if (continuar)
+ {
+ try
+ {
+ DataTable dtxz = Extensiones.ModExtensiones.ReadExcelFile(fileItem.FileUrl, true,4);
+ DTEXcel = dtxz.FiltraParametros(" LEN(Codigo)>0 AND Codigo <> 'Codigo'");
+
+ }
+ catch (Exception ex)
+ {
+
+ continuar = false;
+ stringError = "Ocurrio un Error al procesar el excel ";
+ string.Format("{0} \r\n{0}", stringError, ex.ToString()).GuardaLog();
+ }
+ }
+ if (continuar && DTEXcel.Rows.Count == 0)
+ {
+
+ continuar = false;
+ stringError = "No se encontraron cambios";
+ }
+ if(continuar)
+ {
+
+ for (int j = 2; j < DTEXcel.Rows.Count; j++)
+ {
+ for (int i = 1; i < DTEXcel.Columns.Count; i++)
+ {
+ /*
+ //
+ string conceptocodigo = drowx[i].ToString(); string CveConcepto;
+ DataRow dconr = dtConceptos.FiltroPrimero(string.Format("codigo='{0}'", conceptocodigo));
+ if (dconr != null)
+ {
+ CveConcepto = dconr["CveConcepto"].ToString();
+ dtxz.Columns[i].ColumnName = CveConcepto;
+ }
+ else
+ {
+ continuar = false;
+ stringError = string.Format("Ocurrio un Error al procesar el excel código no valido '{0}'({1}).", conceptocodigo, i);
+ break;
+ }*/
+ //int CveConcepto = dtxz.Columns[i].ColumnName.ToEntero();
+ }
+ }
+ }
+ }
+
protected void LnkProcesarReporteIncidencia_Click(object sender, EventArgs e)
{
@@ -8876,4 +9016,5 @@ public partial class Nomina_Nomina2 : ClsPaginas
UpviewCorreos.Update();
RegistraScript(string.Format("$('#ModalViewCorreo').modal();", TxtmcImporte.ClientID));
}
+
}
\ No newline at end of file
diff --git a/RH/CalculoSBC.aspx.cs b/RH/CalculoSBC.aspx.cs
index 95af6c01e..b5f629625 100644
--- a/RH/CalculoSBC.aspx.cs
+++ b/RH/CalculoSBC.aspx.cs
@@ -249,22 +249,22 @@ public partial class RH_CalculoSBC : ClsPaginas
//libro.Range(3, 2, 3, 6).Merge().Value = $"del {fechai:dd/MM/yyyy} al {fechaf:dd/MM/yyyy}";
libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{DateTime.Now:dd/MM/yyyy}";
libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{DateTime.Now:HH:mm}";
- libro.Range(5, 6, 5, 9).Merge().Value = "Actual";
- libro.Range(5, 10, 5, 12).Merge().Value = "Nuevo";
+ libro.Range(5, 8, 5, 11).Merge().Value = "Actual";
+ libro.Range(5, 12, 5, 14).Merge().Value = "Nuevo";
libro.Range(5, 1, 6, 14).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
libro.Range(5, 1, 6, 13).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
libro.Range(5, 1, 5, 13).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.None;
- libro.Range(5, 6, 6, 9).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(128, 100, 162));
- libro.Range(5, 6, 6, 9).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
- libro.Range(5, 10, 6, 12).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(136, 214, 205));
- libro.Range(5, 10, 6, 12).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
+ libro.Range(5, 8, 6, 11).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(128, 100, 162));
+ libro.Range(5, 8, 6, 11).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
+ libro.Range(5, 12, 6, 14).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(136, 214, 205));
+ libro.Range(5, 12, 6, 14).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
- libro.Range(7, 6, 7 + dt.Rows.Count, 12).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Right;
- libro.Range(7, 6, 7 + dt.Rows.Count, 12).Style.NumberFormat.Format = "$##,###,###,0.00";
+ libro.Range(7, 8, 7 + dt.Rows.Count, 12).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Right;
+ libro.Range(7, 8, 7 + dt.Rows.Count, 12).Style.NumberFormat.Format = "$##,###,###,0.00";
diff --git a/vwd.webinfo b/vwd.webinfo
index fdbdd590d..74e16e7d3 100644
--- a/vwd.webinfo
+++ b/vwd.webinfo
@@ -576,6 +576,8 @@
+
+