This commit is contained in:
@@ -16,6 +16,9 @@ Public Class CFDITimbre
|
||||
Public Property Nomina As CFDINomina
|
||||
Public Property ComplementoPagos As CFDIComplementoPagos
|
||||
Public Property Complementos As CFDIComplementos
|
||||
Public Property Timbrado As Boolean
|
||||
Public Property IStimbreFiniquito As Boolean
|
||||
|
||||
Public ReadOnly Property TotalImpuestosRetenidos As Decimal
|
||||
Get
|
||||
Return (From c In Conceptos
|
||||
@@ -128,6 +131,8 @@ Public Class CFDINomina
|
||||
Public Property OtrosPagos As List(Of CFDINominaOtrosPagos)
|
||||
Public Property HorasExtras As List(Of CFDINominaHorasExtras)
|
||||
Public Property CveNomina As Integer
|
||||
Public Property Antiguedad As Integer
|
||||
Public Property UltimoSueldoOrdinario As Decimal
|
||||
|
||||
Public ReadOnly Property TotalPercepciones As Double
|
||||
Get
|
||||
|
||||
@@ -215,6 +215,24 @@ Public Class ClsNominas
|
||||
|
||||
End Function
|
||||
|
||||
Public Function ReportedePercepcionesDeduccionesGet(cveEmpresa As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveTipoPeriodo As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DTSet = New DataSet()
|
||||
DataAdapter("[PA_RH_ReportedePercepcionesDeducciones]", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
.Add("@TipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(DTSet)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el reporte de Percepciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function ReportedeincidenciasGET(cveEmpresa As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveTipoPeriodo As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DTSet = New DataSet()
|
||||
@@ -834,7 +852,7 @@ Public Class ClsNominas
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateEstatusNomNominas(Estatus As Integer, CvePAC As Integer, FolioFiscal As String, SelloSAT As String, FechaCancelacion As DateTime, CveNomina As Integer, Optional SubTotal As Double = -1, Optional Descuento As Double = -1, Optional ISR As Double = -1, Optional Total As Double = -1, Optional DiasPagados As Double = -1) As Boolean
|
||||
Public Function UpdateEstatusNomNominas(Estatus As Integer, CvePAC As Integer, FolioFiscal As String, SelloSAT As String, FechaCancelacion As DateTime, CveNomina As Integer, Optional SubTotal As Double = -1, Optional Descuento As Double = -1, Optional ISR As Double = -1, Optional Total As Double = -1, Optional DiasPagados As Double = -1, Optional isFiniquito As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Nom_NominasUpdateEstatus")
|
||||
@@ -852,6 +870,7 @@ Public Class ClsNominas
|
||||
.Add("@Total", SqlDbType.Money).Value = Total
|
||||
.Add("@DiasPagados", SqlDbType.Int).Value = DiasPagados
|
||||
.Add("@CveNomina", SqlDbType.Int).Value = CveNomina
|
||||
.Add("@isFiniquito", SqlDbType.Bit).Value = isFiniquito
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -2164,7 +2183,7 @@ Public Class ClsNominas
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function GetNominaEmpleado(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer, Optional RegimenContratacion As Integer = 1, Optional CvePersonal As Integer = -1) As Boolean
|
||||
Public Function GetNominaEmpleado(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer, Optional RegimenContratacion As Integer = 1, Optional CvePersonal As Integer = -1, Optional SalarioDiario As Decimal = 0) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
Try
|
||||
DTSet = New DataSet()
|
||||
@@ -2178,6 +2197,7 @@ Public Class ClsNominas
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@RegimenContratacion", SqlDbType.Int).Value = RegimenContratacion
|
||||
.Add("@CvePersonal", SqlDbType.Decimal).Value = CvePersonal
|
||||
.Add("@SalarioDiario", SqlDbType.Decimal).Value = SalarioDiario
|
||||
End With
|
||||
|
||||
|
||||
|
||||
@@ -3855,6 +3855,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Nomina/CatConceptos2.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Nomina/Aguinaldo.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Nomina/RepInversiondeNomina.aspx".ToUpper(), 906)
|
||||
PaginaDict.Add("/RH/DiasFestivos.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Nomina/FiniquitoB.aspx".ToUpper(), -1)
|
||||
''CONFIGURACIONES GENERALES
|
||||
PaginaDict.Add("/Sistemas/SistemaSIG.aspx".ToUpper(), 9999)
|
||||
@@ -7836,7 +7837,7 @@ Public Class ClsPaginas
|
||||
|
||||
#Region "PDF NOMINA"
|
||||
|
||||
Public Function GeneraPDFNomina(CvePersonal As Integer, CvePeriodo As Integer, CveEmpresa As Integer, RutaEmpresa As String) As Byte()
|
||||
Public Function GeneraPDFNomina(CvePersonal As Integer, CvePeriodo As Integer, CveEmpresa As Integer, RutaEmpresa As String, Optional indemnizacion As Boolean = False) As Byte()
|
||||
|
||||
Dim ObjNomina As New ClsNominas
|
||||
Dim ObjPersonal As New ClsRH
|
||||
@@ -7856,7 +7857,7 @@ Public Class ClsPaginas
|
||||
Dim DTDeducciones2 As New Data.DataTable
|
||||
|
||||
Dim Ruta As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{CveEmpresa}\"
|
||||
Dim PathXML As String = $"{Ruta}XML\Nomina\{ObjNomina.SerieFolio}.xml"
|
||||
Dim PathXML As String = $"{Ruta}XML\Nomina\{ObjNomina.Serie }{If(indemnizacion, "F", "")}-{ObjNomina.Folio}.xml"
|
||||
Dim FechaEmision, FechaCertificacion As DateTime
|
||||
Dim FolioFiscal, NoSerieCertificado, NoSerieCertificadoContribuyente, SelloCFDi, SelloSAT As String
|
||||
FolioFiscal = ""
|
||||
@@ -7936,7 +7937,32 @@ Public Class ClsPaginas
|
||||
|
||||
'Datos Empresa
|
||||
RptParametro.Add(New ReportParameter("RegistroPatronal", ObjNomina.RegistroPatronal))
|
||||
Dim ajusteindemnizacion As Double = 0
|
||||
'PERCECIONES - DEDUCCIONES
|
||||
If ObjNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then
|
||||
Dim filtrop As String = " AND CveSistema NOT IN(10,11,32)"
|
||||
Dim friltrod As String = " AND CveSistema <>47"
|
||||
If indemnizacion Then
|
||||
filtrop = "AND CveSistema IN(10,11,32)"
|
||||
friltrod = " AND CveSistema =47"
|
||||
End If
|
||||
DTPercepciones = ObjNomina.DtResultados.FiltraParametros($"((Tipo = 'P' OR (Tipo = 'D' AND Importe <0)) AND Importe <>0 AND EsPadre = 1 AND SoloVisible =0) {filtrop}")
|
||||
DTDeducciones = ObjNomina.DtResultados.FiltraParametros($"(Tipo = 'D' AND Importe >0 AND EsPadre = 1 AND SoloVisible =0) {friltrod}")
|
||||
DTDeducciones2 = ObjNomina.DtResultados.FiltraParametros($"((Tipo = 'D' AND Importe >0 AND EsPadre = 1 AND SoloVisible =0) OR CveSistema IN (20,21)){friltrod}")
|
||||
|
||||
ajusteindemnizacion = ObjNomina.DtResultados.FiltraParametros($"((Tipo = 'P' OR (Tipo = 'D' AND Importe <0)) AND Importe <>0 AND EsPadre = 1 AND SoloVisible =0) AND CveSistema IN(10,11,32)").SUM("Importe") -
|
||||
ObjNomina.DtResultados.FiltraParametros($"(Tipo = 'D' AND Importe >0 AND EsPadre = 1 AND SoloVisible =0) AND CveSistema =47").SUM("Importe")
|
||||
For Each row As DataRow In DTPercepciones.Rows
|
||||
If row("Tipo").ToString() = "D" Then
|
||||
row("Codigo") = row("Codigo").ToString().Replace("D", "OP")
|
||||
row("Importe") = row("Importe").ToString().ToDecimal() * -1
|
||||
End If
|
||||
Next
|
||||
|
||||
Else
|
||||
DTPercepciones = Nothing
|
||||
DTDeducciones = Nothing
|
||||
End If
|
||||
'DATOS DEL EMPLEADO
|
||||
If ObjPersonal.GetPersonal(CvePersonal, CveEmpresa) Then
|
||||
|
||||
@@ -7978,7 +8004,7 @@ Public Class ClsPaginas
|
||||
RptParametro.Add(New ReportParameter("Cantidad", "1"))
|
||||
RptParametro.Add(New ReportParameter("Unidad", "ACT"))
|
||||
RptParametro.Add(New ReportParameter("Descripcion", "PAGO DE NÓMINA"))
|
||||
RptParametro.Add(New ReportParameter("Total", ObjNomina.Total.ToString()))
|
||||
RptParametro.Add(New ReportParameter("Total", If(indemnizacion, ajusteindemnizacion, ObjNomina.Total - ajusteindemnizacion).ToString()))
|
||||
|
||||
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||
cQr = CBB.GenerarCBBBytes(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString().ToDecimal(), FolioFiscal)
|
||||
@@ -8000,22 +8026,6 @@ Public Class ClsPaginas
|
||||
End If
|
||||
End If
|
||||
|
||||
'PERCECIONES - DEDUCCIONES
|
||||
If ObjNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then
|
||||
DTPercepciones = ObjNomina.DtResultados.FiltraParametros("(Tipo = 'P' OR (Tipo = 'D' AND Importe <0)) AND Importe <>0 AND EsPadre = 1 AND SoloVisible =0")
|
||||
DTDeducciones = ObjNomina.DtResultados.FiltraParametros("Tipo = 'D' AND Importe >0 AND EsPadre = 1 AND SoloVisible =0")
|
||||
DTDeducciones2 = ObjNomina.DtResultados.FiltraParametros("(Tipo = 'D' AND Importe >0 AND EsPadre = 1 AND SoloVisible =0) OR CveConcepto IN (1471,1491)")
|
||||
For Each row As DataRow In DTPercepciones.Rows
|
||||
If row("Tipo").ToString() = "D" Then
|
||||
row("Codigo") = row("Codigo").ToString().Replace("D", "OP")
|
||||
row("Importe") = row("Importe").ToString().ToDecimal() * -1
|
||||
End If
|
||||
Next
|
||||
|
||||
Else
|
||||
DTPercepciones = Nothing
|
||||
DTDeducciones = Nothing
|
||||
End If
|
||||
|
||||
RptParametro.Add(New ReportParameter("PU", DTPercepciones.SUM("Importe").ToString()))
|
||||
RptParametro.Add(New ReportParameter("Importe", DTPercepciones.SUM("Importe").ToString()))
|
||||
|
||||
@@ -122,9 +122,74 @@ Public Class ClsRH
|
||||
CveConexion = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "DiasFestivos"
|
||||
|
||||
Public Function DiasFestivosGet(CveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RH_DiasFestivosGet", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
|
||||
Me.OnError("Ocurrió un error al obtener los días festivos", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al Guardar el Tipo de A-I", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function DiasFestivosAdd(fecha As DateTime, cveEmpresa As Int32, CveUsuario As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RH_DiasFestivosAdd", CommandType.StoredProcedure)
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||
.Add("@Fecha", SqlDbType.DateTime).Value = fecha
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert($"Ya existe un día festivo con fecha '{fecha:dd/MM/yyyy}'.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al guardar el día festivo.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al Guardar el Tipo de A-I", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function DiasFestivosRemove(fecha As DateTime, cveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RH_DiasFestivosRemove", CommandType.StoredProcedure)
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||
.Add("@Fecha", SqlDbType.DateTime).Value = fecha
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
Me.OnError("Ocurrió un error al eliminar el día festivo.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el día festivo", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "ClsRHAsistenciasInasistencias"
|
||||
Public Function GetAsistenciasInasistencias() As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -2145,7 +2210,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpPersonalAltas(CvePersonal As Integer, fechaInicio As String, fechaFin As String, CvePeriodoFiniquito As Integer, CveMotivoBaja As Integer, esLiquidacion As Boolean) As Boolean
|
||||
Public Function UpPersonalAltas(CvePersonal As Integer, fechaInicio As String, fechaFin As String, CvePeriodoFiniquito As Integer, CveMotivoBaja As Integer, esLiquidacion As Boolean, ValIndemnizacion As Boolean, ValSeparacionunica As Boolean, ValPrimadeantiguedad As Boolean) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
SqlDataAdapter("PA_RH_PersonalAltasUp")
|
||||
|
||||
@@ -2156,6 +2221,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
.Add("@CvePeriodoFiniquito", SqlDbType.Int).Value = CvePeriodoFiniquito
|
||||
.Add("@CveMotivoBaja", SqlDbType.Int).Value = CveMotivoBaja
|
||||
.Add("@esLiquidacion", SqlDbType.Int).Value = If(esLiquidacion, 1, 0)
|
||||
.Add("@ValIndemnizacion", SqlDbType.Bit).Value = If(ValIndemnizacion, 1, 0)
|
||||
.Add("@ValSeparacionunica", SqlDbType.Bit).Value = If(ValSeparacionunica, 1, 0)
|
||||
.Add("@ValPrimadeantiguedad", SqlDbType.Bit).Value = If(ValPrimadeantiguedad, 1, 0)
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -20,20 +20,53 @@ Public Class LogicNominas
|
||||
|
||||
sw.Start()
|
||||
End If
|
||||
Dim cfdi As CFDITimbre = PreTimbrar(CveNomina, UsuarioActual) 'CvePersonal, CvePeriodo,
|
||||
Dim cfdi As CFDITimbre = PreTimbrar(CveNomina, UsuarioActual, False) 'CvePersonal, CvePeriodo,
|
||||
If cfdi IsNot Nothing AndAlso cfdi.Mensaje = "" Then
|
||||
Dim ObjTimbrado As New Timbrado
|
||||
Dim ObjFactura As New Modelos.Factura
|
||||
ObjFactura.TipoDocto = "Nomina"
|
||||
ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero()
|
||||
ObjFactura.Serie = cfdi.Comprobante.Serie
|
||||
ObjFactura.Timbre = cfdi
|
||||
If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC) Then
|
||||
Retorno = ObjTimbrado.MensajeErrorCFDI
|
||||
If Not cfdi.Timbrado Then
|
||||
Dim ObjTimbrado As New Timbrado
|
||||
Dim ObjFactura As New Modelos.Factura
|
||||
ObjFactura.TipoDocto = "Nomina"
|
||||
ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero()
|
||||
ObjFactura.Serie = cfdi.Comprobante.Serie
|
||||
ObjFactura.Timbre = cfdi
|
||||
If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC) Then
|
||||
Retorno = ObjTimbrado.MensajeErrorCFDI
|
||||
End If
|
||||
End If
|
||||
If Retorno <> "" Then
|
||||
Retorno = $"{Retorno} - {cfdi.Receptor.Nombre}"
|
||||
Else
|
||||
If hasfiniquito Then
|
||||
|
||||
cfdi = PreTimbrar(CveNomina, UsuarioActual, True) 'CvePersonal, CvePeriodo,
|
||||
If cfdi IsNot Nothing AndAlso cfdi.Mensaje = "" Then
|
||||
|
||||
If Not cfdi.Timbrado Then
|
||||
Dim ObjTimbrado As New Timbrado
|
||||
Dim ObjFactura As New Modelos.Factura
|
||||
ObjFactura.TipoDocto = "Nomina"
|
||||
ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero()
|
||||
ObjFactura.Serie = cfdi.Comprobante.Serie
|
||||
ObjFactura.Timbre = cfdi
|
||||
If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC) Then
|
||||
Retorno = ObjTimbrado.MensajeErrorCFDI
|
||||
End If
|
||||
If Retorno <> "" Then
|
||||
Retorno = $"{Retorno} - {cfdi.Receptor.Nombre}"
|
||||
Else
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
If cfdi Is Nothing Then
|
||||
Retorno = $"No se pudo generar el pretimbre(GetError): <br/> {GetError}"
|
||||
Else
|
||||
Retorno = $"No se pudo generar el pretimbre: <br/> {cfdi.Mensaje}"
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If cfdi Is Nothing Then
|
||||
@@ -48,10 +81,10 @@ Public Class LogicNominas
|
||||
End If
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Private Function PreTimbrar(CveNomina As Integer, UsuarioActual As Usuario) As CFDITimbre
|
||||
Dim hasfiniquito As Boolean
|
||||
Private Function PreTimbrar(CveNomina As Integer, UsuarioActual As Usuario, TimbreIndemnizacion As Boolean) As CFDITimbre
|
||||
Dim continuar As Boolean = True
|
||||
|
||||
hasfiniquito = False
|
||||
Dim CvePersonal As Integer = -1
|
||||
Dim CvePeriodo As Integer = -1
|
||||
Dim DtPercepciones As Data.DataTable = Nothing
|
||||
@@ -107,13 +140,26 @@ Public Class LogicNominas
|
||||
|
||||
Dim ObjIncapacidades As New List(Of CFDINominaIncapacidades)
|
||||
'Conexiones a la Base de Datos
|
||||
Dim cfdi As New CFDITimbre
|
||||
cfdi.Nomina = New CFDINomina
|
||||
Using objNomina As ClsNominas = New ClsNominas()
|
||||
Using objPersonal As ClsRH = New ClsRH()
|
||||
If objNomina.GetNom_Nominas(CveNomina, -1, -1, -1, UsuarioActual.CveEmpresa) AndAlso objNomina.DtResultados.Rows.Count > 0 Then
|
||||
CvePersonal = objNomina.DtResultados.Rows(0)("CvePersonal").ToString().ToEntero()
|
||||
CvePeriodo = objNomina.DtResultados.Rows(0)("CvePeriodo").ToString().ToEntero()
|
||||
Dim drow As DataRow = objNomina.DtResultados.Rows(0)
|
||||
CvePersonal = drow("CvePersonal").ToString().ToEntero()
|
||||
CvePeriodo = drow("CvePeriodo").ToString().ToEntero()
|
||||
cfdi.Nomina.Antiguedad = drow("Antiguedad").ToString().ToEntero()
|
||||
cfdi.Nomina.UltimoSueldoOrdinario = drow("UltimoSueldoOrdinario").ToString().ToDecimal()
|
||||
Serie = objNomina.Serie
|
||||
Folio = objNomina.Folio.ToString()
|
||||
If TimbreIndemnizacion Then
|
||||
cfdi.Timbrado = drow("SeTimbroFiniquitoVal").ToString().ToEntero() = 1
|
||||
cfdi.IStimbreFiniquito = True
|
||||
Serie = $"{objNomina.Serie}F"
|
||||
Else
|
||||
cfdi.Timbrado = drow("SeTimbroVal").ToString().ToEntero() = 1
|
||||
cfdi.IStimbreFiniquito = False
|
||||
End If
|
||||
Else
|
||||
If continuar Then GetError = "No se pudo obtener la información de la nomina" 'si continuar= true el error se origino en este nodo y se le asigno el error
|
||||
continuar = False
|
||||
@@ -148,18 +194,27 @@ Public Class LogicNominas
|
||||
End If
|
||||
If continuar AndAlso objNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then
|
||||
If objNomina.DtResultados.Rows.Count > 0 Then
|
||||
Dim filtropercepciones As String = "Tipo = 'P' AND EsPadre = 1 AND SoloVisible =0"
|
||||
Dim filtropercepciones As String = "Tipo = 'P' AND EsPadre = 1 AND SoloVisible =0 AND SATCveConcepto NOT IN ('022', '023','025')"
|
||||
If TimbreIndemnizacion Then
|
||||
filtropercepciones = " Tipo = 'P' AND SATCveConcepto IN ('022', '023','025')"
|
||||
End If
|
||||
DtPercepciones = objNomina.DtResultados.FiltraParametros(filtropercepciones)
|
||||
Dim filtrodeduc As String = "Tipo = 'D' AND EsPadre = 1 AND SoloVisible =0 AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL)"
|
||||
Dim filtrodeduc As String = "Tipo = 'D' AND EsPadre = 1 AND SoloVisible =0 AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) AND CveSistema <> 47"
|
||||
If TimbreIndemnizacion Then
|
||||
filtrodeduc = " Tipo = 'D' AND CveSistema =47"
|
||||
End If
|
||||
DtDeducciones = objNomina.DtResultados.FiltraParametros(filtrodeduc)
|
||||
DtOtrosPagos = objNomina.DtResultados.FiltraParametros(" TipoConceptoSAT='O'")
|
||||
If Not TimbreIndemnizacion Then
|
||||
DtOtrosPagos = objNomina.DtResultados.FiltraParametros(" TipoConceptoSAT='O'")
|
||||
|
||||
End If
|
||||
Dim disrcomp As DataRow = DtOtrosPagos.FiltroPrimero("Codigo ='D999'")
|
||||
For Each drow As DataRow In DtDeducciones.Rows
|
||||
If drow("Codigo").ToString() = "D038" Then
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
hasfiniquito = objNomina.DtResultados.COUNT("SATCveConcepto", "(Tipo = 'P' AND SATCveConcepto IN ('022', '023','025')) OR (Tipo = 'D' AND SATCveConcepto = '101')") > 0
|
||||
|
||||
|
||||
TotalPercepciones = DtPercepciones.SUM("Importe").ToString().ToDecimal()
|
||||
@@ -170,53 +225,70 @@ Public Class LogicNominas
|
||||
If continuar Then GetError = "No se pudo obtener el detalle de la nomina" 'si continuar= true el error se origino en este nodo y le asigno el error
|
||||
continuar = False
|
||||
End If
|
||||
If continuar AndAlso objNomina.GetHorasExtras(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa) Then
|
||||
DtHorasExtras = objNomina.DtResultados
|
||||
If Not TimbreIndemnizacion Then
|
||||
If continuar AndAlso objNomina.GetHorasExtras(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa) Then
|
||||
DtHorasExtras = objNomina.DtResultados
|
||||
Else
|
||||
continuar = False
|
||||
End If
|
||||
Else
|
||||
continuar = False
|
||||
DtHorasExtras = New DataTable()
|
||||
End If
|
||||
If continuar AndAlso objNomina.GetPeriodos(-1, UsuarioActual.CveEmpresa, -1, -1, CvePeriodo) AndAlso objNomina.DtResultados.Rows().Count > 0 Then
|
||||
Dim DrPeriodo As DataRow = objNomina.DtResultados.Rows(0)
|
||||
|
||||
FechaInicio = DrPeriodo("FechaInicio").ToString().ToDate
|
||||
FechaFin = DrPeriodo("FechaFin").ToString().ToDate
|
||||
FechaPago = DrPeriodo("FechaPago").ToString().ToDate
|
||||
TipoNomina = If(objNomina.CveTipoPeriodo = 6, "E", "O")
|
||||
FechaFin = DrPeriodo("FechaFin").ToString().ToDate()
|
||||
FechaPago = DrPeriodo("FechaPago").ToString().ToDate()
|
||||
|
||||
If Not TimbreIndemnizacion Then
|
||||
FechaInicio = DrPeriodo("FechaInicio").ToString().ToDate()
|
||||
TipoNomina = If(objNomina.CveTipoPeriodo = 6, "E", "O")
|
||||
Else
|
||||
FechaInicio = FechaFin
|
||||
TipoNomina = "E"
|
||||
End If
|
||||
Else
|
||||
If continuar Then GetError = "No se pudo obtener la información del periodo" 'si continuar= true el error se origino en este nodo y le asigno el error
|
||||
continuar = False
|
||||
End If
|
||||
If continuar AndAlso objPersonal.GetAsistencias(CvePersonal, -1, -1, -1, -1, -1, FechaInicio, FechaFin, UsuarioActual.CveEmpresa) Then
|
||||
If Not TimbreIndemnizacion Then
|
||||
If continuar AndAlso objPersonal.GetAsistencias(CvePersonal, -1, -1, -1, -1, -1, FechaInicio, FechaFin, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim Asistencias As Integer = objPersonal.DtResultados.SUM("AplicaAsistencia").ToEntero()
|
||||
'If Asistencias > 15 Then
|
||||
' Asistencias = 15
|
||||
'End If
|
||||
Dim Vacaciones As Integer = objPersonal.DtResultados.SUM("AplicaVacacion").ToEntero()
|
||||
DiasIncapacitados = objPersonal.DtResultados.SUM("AplicaIncapacidad").ToEntero()
|
||||
DiasPagados = Asistencias - Vacaciones
|
||||
If DiasPagados < 0 Then DiasPagados = 0
|
||||
Else
|
||||
continuar = False
|
||||
End If
|
||||
If DiasIncapacitados > 0 Then
|
||||
If objNomina.GetIncapacidades(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa) Then
|
||||
If objNomina.DtResultados IsNot Nothing AndAlso objNomina.DtResultados.Rows.Count > 0 Then
|
||||
For Each dr As DataRow In objNomina.DtResultados.Rows
|
||||
ObjIncapacidades.Add(New CFDINominaIncapacidades With {.DiasIncapacidad = dr("Dias").ToString().ToEntero().ToString(), .TipoIncapacidad = dr("ClaveTipoIncapacidad").ToString(), .Importe = dr("Descuento").ToString().ToDecimal})
|
||||
Next
|
||||
End If
|
||||
|
||||
Dim Asistencias As Integer = objPersonal.DtResultados.SUM("AplicaAsistencia").ToEntero()
|
||||
'If Asistencias > 15 Then
|
||||
' Asistencias = 15
|
||||
'End If
|
||||
Dim Vacaciones As Integer = objPersonal.DtResultados.SUM("AplicaVacacion").ToEntero()
|
||||
DiasIncapacitados = objPersonal.DtResultados.SUM("AplicaIncapacidad").ToEntero()
|
||||
DiasPagados = Asistencias - Vacaciones
|
||||
If DiasPagados < 0 Then DiasPagados = 0
|
||||
Else
|
||||
If continuar Then GetError = "No se pudo obtener las incapacidades del periodo" 'si continuar= true el error se origino en este nodo y le asigno el error
|
||||
continuar = False
|
||||
End If
|
||||
Else
|
||||
DiasPagados = 1
|
||||
DiasIncapacitados = 0
|
||||
End If
|
||||
If continuar AndAlso DiasIncapacitados > 0 Then
|
||||
If Not TimbreIndemnizacion Then
|
||||
|
||||
If objNomina.GetIncapacidades(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa) Then
|
||||
If objNomina.DtResultados IsNot Nothing AndAlso objNomina.DtResultados.Rows.Count > 0 Then
|
||||
For Each dr As DataRow In objNomina.DtResultados.Rows
|
||||
ObjIncapacidades.Add(New CFDINominaIncapacidades With {.DiasIncapacidad = dr("Dias").ToString().ToEntero().ToString(), .TipoIncapacidad = dr("ClaveTipoIncapacidad").ToString(), .Importe = dr("Descuento").ToString().ToDecimal})
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
If continuar Then GetError = "No se pudo obtener las incapacidades del periodo" 'si continuar= true el error se origino en este nodo y le asigno el error
|
||||
continuar = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End Using
|
||||
|
||||
'Lnado del CFDITimbre
|
||||
Dim cfdi As New CFDITimbre
|
||||
cfdi.Nomina = New CFDINomina
|
||||
'Lnado del CFDITimbre
|
||||
cfdi.Nomina.Version = "1.2"
|
||||
cfdi.Nomina.TipoNomina = TipoNomina
|
||||
cfdi.Nomina.FechaPago = FechaPago
|
||||
@@ -326,7 +398,7 @@ Public Class LogicNominas
|
||||
|
||||
Next
|
||||
End If
|
||||
If CveRegimenContratacion.ToEntero() = 2 AndAlso ((ObjOtrosPagos.FirstOrDefault(Function(m) m.TipoOtroPago.ToEntero().Contiene(2, 7, 8))) Is Nothing) Then
|
||||
If Not TimbreIndemnizacion AndAlso CveRegimenContratacion.ToEntero() = 2 AndAlso ((ObjOtrosPagos.FirstOrDefault(Function(m) m.TipoOtroPago.ToEntero().Contiene(2, 7, 8))) Is Nothing) Then
|
||||
|
||||
ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "002", ' codigo fijo, por ser referente a subsidio al empleo
|
||||
.Clave = "D051", .Concepto = "Subs al Empleo acreditado", .Importe = 0D, .Subsidiocausado = 0D})
|
||||
@@ -361,9 +433,9 @@ Public Class LogicNominas
|
||||
cfdi.Nomina.Receptor.NSS = NumeroSS
|
||||
cfdi.Nomina.Receptor.FechaInicioContrato = FechaInicioContrato
|
||||
cfdi.Nomina.Receptor.Antiguedad = $"P{AntiguedadSemanas}W"
|
||||
cfdi.Nomina.Receptor.TipoContrato = CodigoTipoContrato
|
||||
cfdi.Nomina.Receptor.TipoContrato = If(TimbreIndemnizacion, "99", CodigoTipoContrato)
|
||||
cfdi.Nomina.Receptor.CodigoTipoJornada = ClaveTipoJornada
|
||||
cfdi.Nomina.Receptor.CodigoRegimenContratacion = CveRegimenContratacion
|
||||
cfdi.Nomina.Receptor.CodigoRegimenContratacion = If(TimbreIndemnizacion, "13", CveRegimenContratacion)
|
||||
cfdi.Nomina.Receptor.CodigoEmpleado = Codigo
|
||||
cfdi.Nomina.Receptor.Departamento = Departamento
|
||||
cfdi.Nomina.Receptor.Puesto = Puesto
|
||||
|
||||
@@ -2021,57 +2021,66 @@ Public Class Timbrado
|
||||
End If
|
||||
#End Region
|
||||
If ObjCFDITimbre.Nomina IsNot Nothing Then
|
||||
|
||||
'If cfdi.Nomina12SeparacionIndemnizacion Then
|
||||
If ObjCFDITimbre.Nomina.Percepciones IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Percepciones.Count > 0 Then
|
||||
cfdi.Nomina12Percepciones(ObjCFDITimbre.Nomina.TotalSueldos, ObjCFDITimbre.Nomina.TotalIndemnizacion, ObjCFDITimbre.Nomina.TotalJubilacion, ObjCFDITimbre.Nomina.TotalPercepcionesGravado, ObjCFDITimbre.Nomina.TotalPercepcionesExento)
|
||||
For Each percep As CFDINominaPercepciones In ObjCFDITimbre.Nomina.Percepciones
|
||||
cfdi.Nomina12Percepcion(percep.TipoPercepcion, percep.Clave, percep.Concepto, Math.Round(percep.ImporteGravado, 2), Math.Round(percep.ImporteExento, 2))
|
||||
If percep.TipoPercepcion.ToEntero() = 19 Then
|
||||
cfdi.Nomina12Percepciones(ObjCFDITimbre.Nomina.TotalSueldos, ObjCFDITimbre.Nomina.TotalIndemnizacion, ObjCFDITimbre.Nomina.TotalJubilacion, ObjCFDITimbre.Nomina.TotalPercepcionesGravado, ObjCFDITimbre.Nomina.TotalPercepcionesExento)
|
||||
For Each percep As CFDINominaPercepciones In ObjCFDITimbre.Nomina.Percepciones
|
||||
cfdi.Nomina12Percepcion(percep.TipoPercepcion, percep.Clave, percep.Concepto, Math.Round(percep.ImporteGravado, 2), Math.Round(percep.ImporteExento, 2))
|
||||
If percep.TipoPercepcion.ToEntero() = 19 Then
|
||||
|
||||
If ObjCFDITimbre.Nomina.HorasExtras IsNot Nothing AndAlso ObjCFDITimbre.Nomina.HorasExtras.Count > 0 Then
|
||||
For Each HoraExtra As CFDINominaHorasExtras In ObjCFDITimbre.Nomina.HorasExtras
|
||||
cfdi.Nomina12HorasExtra(HoraExtra.Dias.ToEntero, HoraExtra.TipoHoras, HoraExtra.HorasExtra, HoraExtra.ImportePagado)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'deducciones al final
|
||||
If ObjCFDITimbre.Nomina.Deducciones IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Deducciones.Count > 0 Then
|
||||
cfdi.Nomina12Deducciones(ObjCFDITimbre.Nomina.TotalDeduccionesOtras, Math.Round(ObjCFDITimbre.Nomina.TotalDeduccionesImpuestosRetenidos, 2))
|
||||
For Each deduc As CFDINominaDeducciones In ObjCFDITimbre.Nomina.Deducciones
|
||||
cfdi.Nomina12Deduccion(deduc.TipoDeduccion, deduc.Clave, deduc.Concepto, Math.Round(deduc.Importe, 2))
|
||||
Next
|
||||
End If
|
||||
If ObjCFDITimbre.Nomina.OtrosPagos IsNot Nothing Then
|
||||
' cfdi.agregarNominaOtrosPagosOtroPago12("002", "002", "Subsidio", "10.00");
|
||||
' cfdi.agregarNominaOtrosPagosOtroPagoSubsidioAlEmpleo12("10.00");
|
||||
If ObjCFDITimbre.Nomina.OtrosPagos IsNot Nothing AndAlso ObjCFDITimbre.Nomina.OtrosPagos.Count > 0 Then
|
||||
For Each otpag As CFDINominaOtrosPagos In ObjCFDITimbre.Nomina.OtrosPagos
|
||||
cfdi.Nomina12OtroPago(otpag.TipoOtroPago, otpag.Clave, otpag.Concepto, otpag.Importe)
|
||||
If otpag.TipoOtroPago = "002" Then
|
||||
cfdi.Nomina12SubsidioAlEmpleo(otpag.Subsidiocausado)
|
||||
End If
|
||||
|
||||
If otpag.TipoOtroPago = "004" AndAlso otpag.Importe > 0 Then
|
||||
If otpag.ejercicio > 0 Then
|
||||
cfdi.CompensacionSaldosAFavor(otpag.SaldoAFavor, otpag.ejercicio, otpag.RemanenteSalFav) 'otpag.SaldoAFavor
|
||||
If ObjCFDITimbre.Nomina.HorasExtras IsNot Nothing AndAlso ObjCFDITimbre.Nomina.HorasExtras.Count > 0 Then
|
||||
For Each HoraExtra As CFDINominaHorasExtras In ObjCFDITimbre.Nomina.HorasExtras
|
||||
cfdi.Nomina12HorasExtra(HoraExtra.Dias.ToEntero, HoraExtra.TipoHoras, HoraExtra.HorasExtra, HoraExtra.ImportePagado)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If ObjCFDITimbre.IStimbreFiniquito Then
|
||||
'ObjCFDITimbre.Nomina.
|
||||
Dim UltimoSueldoOrdinario As Double = ObjCFDITimbre.Nomina.UltimoSueldoOrdinario.ToString().ToDouble()
|
||||
Dim TotalIndemnizacion As Double = ObjCFDITimbre.Nomina.TotalIndemnizacion
|
||||
Dim t1 As Double = If(UltimoSueldoOrdinario < TotalIndemnizacion, UltimoSueldoOrdinario, TotalIndemnizacion)
|
||||
Dim t2 As Double = If(UltimoSueldoOrdinario < TotalIndemnizacion, TotalIndemnizacion, UltimoSueldoOrdinario)
|
||||
cfdi.Nomina12SeparacionIndemnizacion(TotalIndemnizacion, ObjCFDITimbre.Nomina.Antiguedad, UltimoSueldoOrdinario, t1, t2 - t1)
|
||||
|
||||
End If
|
||||
'deducciones al final
|
||||
If ObjCFDITimbre.Nomina.Deducciones IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Deducciones.Count > 0 Then
|
||||
cfdi.Nomina12Deducciones(ObjCFDITimbre.Nomina.TotalDeduccionesOtras, Math.Round(ObjCFDITimbre.Nomina.TotalDeduccionesImpuestosRetenidos, 2))
|
||||
For Each deduc As CFDINominaDeducciones In ObjCFDITimbre.Nomina.Deducciones
|
||||
cfdi.Nomina12Deduccion(deduc.TipoDeduccion, deduc.Clave, deduc.Concepto, Math.Round(deduc.Importe, 2))
|
||||
Next
|
||||
End If
|
||||
If ObjCFDITimbre.Nomina.OtrosPagos IsNot Nothing Then
|
||||
' cfdi.agregarNominaOtrosPagosOtroPago12("002", "002", "Subsidio", "10.00");
|
||||
' cfdi.agregarNominaOtrosPagosOtroPagoSubsidioAlEmpleo12("10.00");
|
||||
If ObjCFDITimbre.Nomina.OtrosPagos IsNot Nothing AndAlso ObjCFDITimbre.Nomina.OtrosPagos.Count > 0 Then
|
||||
For Each otpag As CFDINominaOtrosPagos In ObjCFDITimbre.Nomina.OtrosPagos
|
||||
cfdi.Nomina12OtroPago(otpag.TipoOtroPago, otpag.Clave, otpag.Concepto, otpag.Importe)
|
||||
If otpag.TipoOtroPago = "002" Then
|
||||
cfdi.Nomina12SubsidioAlEmpleo(otpag.Subsidiocausado)
|
||||
End If
|
||||
|
||||
If otpag.TipoOtroPago = "004" AndAlso otpag.Importe > 0 Then
|
||||
If otpag.ejercicio > 0 Then
|
||||
cfdi.CompensacionSaldosAFavor(otpag.SaldoAFavor, otpag.ejercicio, otpag.RemanenteSalFav) 'otpag.SaldoAFavor
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
If ObjCFDITimbre.Nomina.Incapacidades IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Incapacidades.Count > 0 Then
|
||||
For Each Incap As CFDINominaIncapacidades In ObjCFDITimbre.Nomina.Incapacidades
|
||||
cfdi.Nomina12Incapacidad(Incap.DiasIncapacidad.ToEntero, Incap.TipoIncapacidad, Incap.Importe)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
If ObjCFDITimbre.Nomina.Incapacidades IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Incapacidades.Count > 0 Then
|
||||
For Each Incap As CFDINominaIncapacidades In ObjCFDITimbre.Nomina.Incapacidades
|
||||
cfdi.Nomina12Incapacidad(Incap.DiasIncapacidad.ToEntero, Incap.TipoIncapacidad, Incap.Importe)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
#End Region
|
||||
|
||||
sw.Stop()
|
||||
sw.Stop()
|
||||
swTiempo.AppendFormat("Armado: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
||||
swmili = sw.ElapsedMilliseconds
|
||||
sw.Start()
|
||||
@@ -2150,7 +2159,7 @@ Public Class Timbrado
|
||||
If ObjCFDITimbre.Comprobante.TipoComprobante = "N" Then
|
||||
Using ObjNomina2 As New ClsNominas()
|
||||
|
||||
If ObjNomina2.UpdateEstatusNomNominas(3, CvePACEspecial, FolioFiscal, "", ("01/01/2000").ToDate, ObjCFDITimbre.Nomina.CveNomina, 0, 0, 0, 0, 0) Then
|
||||
If ObjNomina2.UpdateEstatusNomNominas(3, CvePACEspecial, FolioFiscal, "", ("01/01/2000").ToDate, ObjCFDITimbre.Nomina.CveNomina, 0, 0, 0, 0, 0, isFiniquito:=Ventas.Timbre.IStimbreFiniquito) Then
|
||||
Retorno = ""
|
||||
Else
|
||||
Retorno = "Error"
|
||||
|
||||
Binary file not shown.
@@ -1 +0,0 @@
|
||||
C:\Users\Caudillo\source\repos\localhost_85\packages\Microsoft.IdentityModel.Logging.6.11.0\lib\net461\Microsoft.IdentityModel.Logging.dll
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
C:\Users\Caudillo\source\repos\localhost_85\packages\Microsoft.AspNet.WebApi.WebHost.5.2.4\lib\net45\System.Web.Http.WebHost.dll
|
||||
Binary file not shown.
@@ -67,16 +67,22 @@
|
||||
<asp:Label ID="LblEncabezado" runat="server" Text=" Registro de Póliza"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="far fa-file-excel" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkComplementoPago" runat="server" Visible="false" OnClick="LnkComplementoPago_Click" Style="color: #686868;"><i class="fa fa-money" style="color:#686868;"></i> Crear Complemento de Pago</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirPDF" runat="server" Visible="false" OnClick="LnkImprimirPDF_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Paquete Egresos</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkComprobante" runat="server" Visible="false" data-toggle="modal" data-target="#ModalUpload" Style="color: #686868;"><i class="fa fa-upload" style="color:#686868;"></i> Cargar Comprobante</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
@@ -136,7 +142,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="100" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Movimiento:</label>
|
||||
@@ -151,7 +157,7 @@
|
||||
<div class="row" id="trNotificar" runat="server" visible="False">
|
||||
<label class="col-md-2">Notificar:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtNotificarA" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtNotificarA" CssClass="form-control input-sm" runat="server" MaxLength="100" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -401,7 +407,7 @@
|
||||
<asp:UpdatePanel ID="UpPrePoliza" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
||||
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra,CveOC" Width="100%" CssClass="table table-striped table-advance table-hover" GridLines="None">
|
||||
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra,CveOC,Concepto,TipoMovto,ImporteMN" Width="100%" CssClass="table table-striped table-advance table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Movimiento</HeaderTemplate>
|
||||
@@ -613,7 +619,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="500" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -783,7 +789,50 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ModalUpload" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Subir Archivo</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpCargarArchivo" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
<label style="color: red;">Nota: Si ya tiene un comprobante este sera reemplazado</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:TextBox ID="TxtCargarArchivo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<%--<div>
|
||||
|
||||
</div>--%>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGuardarArchivo" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -656,7 +656,7 @@
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DsOC</DataSetName>
|
||||
<Top>7.70215cm</Top>
|
||||
<Top>7.96673cm</Top>
|
||||
<Left>0.15979cm</Left>
|
||||
<Height>2.05138cm</Height>
|
||||
<Width>10.0953cm</Width>
|
||||
@@ -1234,7 +1234,7 @@
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Top>7.70435cm</Top>
|
||||
<Top>7.96893cm</Top>
|
||||
<Left>10.2551cm</Left>
|
||||
<Height>2.05606cm</Height>
|
||||
<Width>9.79494cm</Width>
|
||||
@@ -1333,7 +1333,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>0.12976cm</Top>
|
||||
<Left>4.80311cm</Left>
|
||||
<Height>2.24428cm</Height>
|
||||
<Height>2.1513cm</Height>
|
||||
<Width>8.10317cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
@@ -1964,9 +1964,9 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DsOC</DataSetName>
|
||||
<Top>9.86624cm</Top>
|
||||
<Top>10.13082cm</Top>
|
||||
<Left>0.15979cm</Left>
|
||||
<Height>1.71208cm</Height>
|
||||
<Height>1.71209cm</Height>
|
||||
<Width>19.89025cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
@@ -1979,7 +1979,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
<Source>Embedded</Source>
|
||||
<Value>Logo</Value>
|
||||
<Sizing>FitProportional</Sizing>
|
||||
<Top>0.12976cm</Top>
|
||||
<Top>0.03816cm</Top>
|
||||
<Left>0.29576cm</Left>
|
||||
<Height>2.1513cm</Height>
|
||||
<Width>3.93798cm</Width>
|
||||
@@ -2525,7 +2525,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DsOC</DataSetName>
|
||||
<Top>17.07534cm</Top>
|
||||
<Top>17.23409cm</Top>
|
||||
<Left>0.15979cm</Left>
|
||||
<Height>1.12062cm</Height>
|
||||
<Width>19.89024cm</Width>
|
||||
@@ -2541,7 +2541,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
<Value>=First(Fields!ImagenByte.Value, "dsImagenes")</Value>
|
||||
<MIMEType>image/png</MIMEType>
|
||||
<Sizing>FitProportional</Sizing>
|
||||
<Top>4.64173in</Top>
|
||||
<Top>4.70423in</Top>
|
||||
<Left>0.068in</Left>
|
||||
<Height>1.30194in</Height>
|
||||
<Width>1.48366in</Width>
|
||||
@@ -2979,7 +2979,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>dsImagenes</DataSetName>
|
||||
<Top>11.78999cm</Top>
|
||||
<Top>11.94874cm</Top>
|
||||
<Left>4.13053cm</Left>
|
||||
<Height>5.21479cm</Height>
|
||||
<Width>15.94535cm</Width>
|
||||
@@ -3743,6 +3743,236 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.41479cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox5">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Centro de costos</Value>
|
||||
<Style>
|
||||
<FontFamily>arial</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox7">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!SubProyecto.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox7</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<ColSpan>2</ColSpan>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell />
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox16">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontFamily>arial</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox16</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox19">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox21">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox21</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox22">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontFamily>arial</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox22</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox23">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox23</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.49417cm</Height>
|
||||
<TablixCells>
|
||||
@@ -5279,13 +5509,14 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DsOC</DataSetName>
|
||||
<Top>2.51578cm</Top>
|
||||
<Top>2.33057cm</Top>
|
||||
<Left>0.15979cm</Left>
|
||||
<Height>5.0304cm</Height>
|
||||
<Width>19.84967cm</Width>
|
||||
<Height>5.44519cm</Height>
|
||||
<Width>19.84968cm</Width>
|
||||
<ZIndex>9</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -5294,7 +5525,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
</Style>
|
||||
</Tablix>
|
||||
</ReportItems>
|
||||
<Height>18.41425cm</Height>
|
||||
<Height>18.46717cm</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>20.51495cm</Width>
|
||||
@@ -5628,6 +5859,12 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="SubProyecto">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<EmbeddedImages>
|
||||
<EmbeddedImage Name="logo">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -10,12 +10,14 @@
|
||||
input[disabled="disabled"] ~ .CodeMirror.cm-s-material {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
input[disabled="disabled"] ~ .CodeMirror.cm-s-material input {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
input[disabled="disabled"] ~ .CodeMirror.cm-s-material pre {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
input[disabled="disabled"] ~ .CodeMirror.cm-s-material input {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
input[disabled="disabled"] ~ .CodeMirror.cm-s-material pre {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.CodeMirror-hints {
|
||||
z-index: 700;
|
||||
@@ -218,23 +220,23 @@
|
||||
|
||||
<div class="col-md-5">
|
||||
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption uppercase " style="position: relative;">
|
||||
<i class="fa fa-info-circle font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Fórmulas </span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton ID="LnkActualizarFormula" OnClick="LnkActualizarFormula_Click" CssClass="btn btn-success" runat="server">Actualizar</asp:LinkButton>
|
||||
<asp:UpdatePanel ID="UpFormulas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet smmallpadding light bordered" id="Divformula" runat="server">
|
||||
<div class="portlet-title">
|
||||
<div class="caption uppercase " style="position: relative;">
|
||||
<i class="fa fa-info-circle font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Fórmulas </span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton ID="LnkActualizarFormula" OnClick="LnkActualizarFormula_Click" CssClass="btn btn-success" runat="server">Actualizar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpFormulas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer ID="TabsFormulas" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0" AutoPostBack="true">
|
||||
|
||||
<ajax:TabPanel ID="tabFormulaImporte" runat="server" HeaderText="Valor">
|
||||
@@ -254,9 +256,8 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<%--<div class="row">
|
||||
|
||||
<%--<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
|
||||
<asp:Label runat="server" Text="Formula" AssociatedControlID="TxtFormula"></asp:Label>
|
||||
@@ -265,10 +266,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption uppercase " style="position: relative;">
|
||||
@@ -343,6 +344,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate ">Movimiento Permanente:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:CheckBox ID="ChkMovtoPermanente" AutoPostBack="true" OnCheckedChanged ="ChkMovtoPermanente_CheckedChanged" CssClass="chksino" Text=" " runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -323,6 +323,22 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
{
|
||||
TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto,UsuarioActual.CveEmpresa);
|
||||
|
||||
if(!TieneError)
|
||||
{
|
||||
if (ChkMovtoPermanente.Checked)
|
||||
{
|
||||
ObjNomina.UpdateConceptoFormula(CveConcepto, "FNC.[MovimientosPermanentes]", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(TxtFormulaTotal.Text == "FNC.[MovimientosPermanentes]")
|
||||
{
|
||||
// ObjNomina.UpdateConceptoFormula(CveConcepto, "FNC.[MovimientosPermanentes] ", 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (TieneError)
|
||||
{
|
||||
ObjNomina.RollBack();
|
||||
@@ -337,6 +353,22 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
{
|
||||
CveConcepto = ObjNomina.AddConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto);
|
||||
|
||||
|
||||
|
||||
if (CveConcepto>0)
|
||||
{
|
||||
if (ChkMovtoPermanente.Checked)
|
||||
{
|
||||
ObjNomina.UpdateConceptoFormula(CveConcepto, "FNC.[MovimientosPermanentes]", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (TxtFormulaTotal.Text == "FNC.[MovimientosPermanentes]")
|
||||
{
|
||||
// ObjNomina.UpdateConceptoFormula(CveConcepto, "FNC.[MovimientosPermanentes] ", 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CveConcepto == -1)
|
||||
{
|
||||
ObjNomina.RollBack();
|
||||
@@ -403,6 +435,9 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
DdlTipo.SelectedValueExist(drow["Tipo"]);
|
||||
TxtFormulaImporte.Text = drow["Formula"].ToString();
|
||||
TxtFormulaTotal.Text = drow["FormulaTotal"].ToString();
|
||||
|
||||
ChkMovtoPermanente.Checked=(TxtFormulaTotal.Text == "FNC.[MovimientosPermanentes]");
|
||||
ChkMovtoPermanente_CheckedChanged(null, null);
|
||||
TxtFormulaGravada.Text = drow["FormulaGravada"].ToString();
|
||||
if (drow["EsRetencion"].Equals("1")) ChkRetencion.Checked = true;
|
||||
if (drow["TipoCalculo"].Equals("True")) ChkTipoCalculo.Checked = true;
|
||||
@@ -529,4 +564,18 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void ChkMovtoPermanente_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Divformula.Visible = !ChkMovtoPermanente.Checked;
|
||||
//if (Divformula.Visible)
|
||||
//{
|
||||
//TxtFormulaTotal.Text = "";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// TxtFormulaTotal.Text = "FNC.[MovimientosPermanentes]";
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,16 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.tconceptos {
|
||||
background-color: #E87E04;
|
||||
color: #fff;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.gconceptos {
|
||||
border: 1px solid #E87E04;
|
||||
}
|
||||
|
||||
.dtosEmpleado .row {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
@@ -76,6 +86,9 @@
|
||||
<asp:LinkButton ID="LnkFormatoRenuncia" OnClick="LnkFormatoRenuncia_Click" runat="server"><i class="fa fa-bell"></i>Formato Finiquito</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkFormatoRenuncia" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
@@ -105,11 +118,17 @@
|
||||
<br />
|
||||
<asp:HyperLink ID="HypCodigo" CssClass="LinkEmpleado TextLink" Text="--" runat="server"></asp:HyperLink>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<div class="col-sm-6">
|
||||
<span class="bold">Empleado:</span>
|
||||
<br />
|
||||
<asp:HyperLink ID="HypEmpleado" CssClass="LinkEmpleado TextLink" Text="--" runat="server"></asp:HyperLink>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<span class="bold">Area geografica:</span>
|
||||
<br />
|
||||
<asp:Literal ID="LtlAreaGeografica" runat="server">--</asp:Literal>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ">
|
||||
<div class="col-sm-3 ">
|
||||
@@ -117,12 +136,12 @@
|
||||
<br />
|
||||
<asp:Label ID="LblFechaAlta" runat="server" Text="--"></asp:Label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<div class="col-sm-6">
|
||||
<span class="bold">Puesto:</span>
|
||||
<br />
|
||||
<asp:Label ID="LblPuesto" runat="server" Text="--"></asp:Label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="col-sm-3">
|
||||
<span class="bold">Salario:</span>
|
||||
<br />
|
||||
<asp:Label ID="LblSalario" runat="server" Text="--"></asp:Label>
|
||||
@@ -148,7 +167,8 @@
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton ID="LnkCancelar" Visible="false" OnClick="LnkGuardarDatos_Click" ValidationGroup="GrpGuardar" CssClass="btn btn-danger" runat="server">Cancelar</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkSimular" OnClick="LnkSimular_Click" ValidationGroup="GrpGuardar" CssClass="btn yellow-gold" runat="server">Simular</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkCancelar" Visible="false" OnClick="LnkCancelar_Click" ValidationGroup="GrpGuardarcan" CssClass="btn btn-danger" runat="server">Cancelar</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkGuardarDatos" OnClick="LnkGuardarDatos_Click" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
@@ -156,63 +176,87 @@
|
||||
<div class="portlet-body dtosEmpleado">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMotivoBaja" runat="server" AppendDataBoundItems="True" DataTextField="MotivoBaja" DataValueField="CveMotivoBaja" Width="100%"
|
||||
CssClass="form-control select2me" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin asignar Motivo de baja" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvMotivoBaja" runat="server" ControlToValidate="DdlMotivoBaja" CssClass=" dnone" InitialValue="-1"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Seleccione el <b>''motivo''</b>."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Motivo de Baja: " AssociatedControlID="DdlMotivoBaja"></asp:Label>
|
||||
<asp:UpdatePanel ID="upddtosEmpleado" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMotivoBaja" runat="server" AppendDataBoundItems="True" DataTextField="MotivoBaja" DataValueField="CveMotivoBaja" Width="100%"
|
||||
CssClass="form-control select2me" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin asignar Motivo de baja" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvMotivoBaja" runat="server" ControlToValidate="DdlMotivoBaja" CssClass=" dnone" InitialValue="-1"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Seleccione el <b>''motivo''</b>."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Motivo de Baja: " AssociatedControlID="DdlMotivoBaja"></asp:Label>
|
||||
</div>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoMotivoBaja" runat="server" HighlightCssClass="vco" TargetControlID="RfvMotivoBaja" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 120px; display: inline-block">
|
||||
<asp:TextBox ID="TxtFechaBaja" runat="server" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" CssClass="dnone"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> es necesario "
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Fecha de Baja: " AssociatedControlID="TxtFechaBaja"></asp:Label>
|
||||
<ajax:MaskedEditExtender ID="MKEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" BehaviorID="_content_MKEFechaBaja" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" PopupButtonID="ImgFechaBaja" PopupPosition="BottomRight" BehaviorID="_content_CEFechaBaja"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar" Visible="False"></asp:CompareValidator>
|
||||
</div>
|
||||
<span class="input-group-btn " style="display: inline-block">
|
||||
<asp:LinkButton ID="ImgFechaBaja" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoTxtFechaBaja" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaBaja" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
¿es liquidación?<br />
|
||||
<asp:CheckBox ID="ChkesLiquidacion" AutoPostBack="true" OnCheckedChanged="ChkesLiquidacion_CheckedChanged" CssClass="chksino" Text=" " runat="server" />
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
</div>
|
||||
</div>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoMotivoBaja" runat="server" HighlightCssClass="vco" TargetControlID="RfvMotivoBaja" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 120px; display: inline-block">
|
||||
<asp:TextBox ID="TxtFechaBaja" runat="server" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" CssClass="dnone"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> es necesario "
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Fecha de Baja: " AssociatedControlID="TxtFechaBaja"></asp:Label>
|
||||
<ajax:MaskedEditExtender ID="MKEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" BehaviorID="_content_MKEFechaBaja" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" PopupButtonID="ImgFechaBaja" PopupPosition="BottomRight" BehaviorID="_content_CEFechaBaja"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar" Visible="False"></asp:CompareValidator>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtAntiguedad" runat="server" Enabled="false" Text="--" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Antiguedad: " AssociatedControlID="TxtAntiguedad"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDiasTransAnio" runat="server" Enabled="false" Text="--" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Dias trans. en el año: " AssociatedControlID="TxtDiasTransAnio"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtSalarioMinimo" runat="server" Enabled="false" Text="--" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Salario minimo: " AssociatedControlID="TxtSalarioMinimo"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="input-group-btn " style="display: inline-block">
|
||||
<asp:LinkButton ID="ImgFechaBaja" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoTxtFechaBaja" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaBaja" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
¿es liquidación?<br />
|
||||
<asp:CheckBox ID="ChkesLiquidacion" CssClass="chksino" Text=" " runat="server" />
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtAntiguedad" runat="server" Enabled="false" Text="--" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Antiguedad: " AssociatedControlID="TxtAntiguedad"></asp:Label>
|
||||
<div class="gconceptos" runat="server" id="gconceptos">
|
||||
<div class="text-center tconceptos">Conceptos a incluir</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 text-center">
|
||||
Indemnización
|
||||
<br />
|
||||
<asp:CheckBox ID="chkIndemnizacion" CssClass="chksino" Text=" " runat="server" />
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
Separación unica
|
||||
<br />
|
||||
<asp:CheckBox ID="chkSeparacionUnica" CssClass="chksino" Text=" " runat="server" />
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
Prima de antiguedad
|
||||
<br />
|
||||
<asp:CheckBox ID="chkPrimaantiguedad" CssClass="chksino" Text=" " runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDiasTransAnio" runat="server" Enabled="false" Text="--" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Dias trans. en el año: " AssociatedControlID="TxtDiasTransAnio"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtSalarioMinimo" runat="server" Enabled="false" Text="--" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Salario minimo: " AssociatedControlID="TxtSalarioMinimo"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<%--<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="form-control select2me" AutoPostBack="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" OnSelectedIndexChanged="DdlTipoPeriodo_SelectedIndexChanged">
|
||||
<asp:ListItem Selected="True" Text="Ordinario" Value="-1"></asp:ListItem>
|
||||
@@ -229,7 +273,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@@ -274,14 +317,16 @@
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkImportexCalculo" OnClick="LnkImportexCalculo_Click" runat="server" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el importe fijo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
<div style="display: inline-block; width: 29px;">
|
||||
<asp:LinkButton ID="LnkImportexCalculo" OnClick="LnkImportexCalculo_Click" runat="server" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el importe fijo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="37%" />
|
||||
</asp:TemplateField>
|
||||
@@ -295,7 +340,9 @@
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkImporteDxCalculo" OnClick="LnkImportexCalculo_Click" runat="server" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el importe fijo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
<div style="display: inline-block; width: 29px;">
|
||||
<asp:LinkButton ID="LnkImporteDxCalculo" OnClick="LnkImportexCalculo_Click" runat="server" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el importe fijo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
@@ -345,14 +392,16 @@
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkImportexCalculo" OnClick="LnkImportexCalculo_Click" runat="server" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el importe fijo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
<div style="display: inline-block; width: 29px;">
|
||||
<asp:LinkButton ID="LnkImportexCalculo" OnClick="LnkImportexCalculo_Click" runat="server" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el importe fijo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="37%" />
|
||||
</asp:TemplateField>
|
||||
@@ -366,7 +415,9 @@
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkImporteDxCalculo" OnClick="LnkImportexCalculo_Click" runat="server" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el importe fijo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
<div style="display: inline-block; width: 29px;">
|
||||
<asp:LinkButton ID="LnkImporteDxCalculo" OnClick="LnkImportexCalculo_Click" runat="server" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el importe fijo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
@@ -377,48 +428,48 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="ModalUpConcepto" class="modal ADS fade" role="dialog">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog " runat="server" ID="UPpanelModalUpConcepto" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">Modificar o agregar concepto :
|
||||
<div id="ModalUpConcepto" class="modal ADS fade" role="dialog">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog " runat="server" ID="UPpanelModalUpConcepto" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">Modificar o agregar concepto :
|
||||
<asp:Label ID="LblConceptoMod" runat="server" Text=""></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" AssociatedControlID="DdlmcConceptos" Enabled="false" Text="Concepto"></asp:Label>
|
||||
<asp:DropDownList ID="DdlmcConceptos" CssClass="select2me form-control" Width="100%" DataValueField="CveConcepto" DataTextField="CodigoConcepto" OnSelectedIndexChanged="DdlmcConceptos_SelectedIndexChanged" AutoPostBack=" true" runat="server">
|
||||
<asp:ListItem Value="-1" Text="Seleccione"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtmcImporte" runat="server" MaxLength="10"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtmcImporte" Enabled="false" Text="Importe"></asp:Label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtmcImporteGrabado" runat="server" MaxLength="10"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtmcImporteGrabado" Enabled="false" Text="Gravado"></asp:Label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="Txtmcvalor" runat="server" MaxLength="10"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="Txtmcvalor" Enabled="false" Text="Valor"></asp:Label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
<asp:Button ID="BtnAceptarMC" CssClass="btn btn-primary" OnClick="BtnAceptarMC_Click" runat="server" Text="Aceptar" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" AssociatedControlID="DdlmcConceptos" Enabled="false" Text="Concepto"></asp:Label>
|
||||
<asp:DropDownList ID="DdlmcConceptos" CssClass="select2me form-control" Width="100%" DataValueField="CveConcepto" DataTextField="CodigoConcepto" OnSelectedIndexChanged="DdlmcConceptos_SelectedIndexChanged" AutoPostBack=" true" runat="server">
|
||||
<asp:ListItem Value="-1" Text="Seleccione"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtmcImporte" runat="server" MaxLength="10"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtmcImporte" Enabled="false" Text="Importe"></asp:Label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtmcImporteGrabado" runat="server" MaxLength="10"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtmcImporteGrabado" Enabled="false" Text="Gravado"></asp:Label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="Txtmcvalor" runat="server" MaxLength="10"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="Txtmcvalor" Enabled="false" Text="Valor"></asp:Label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
<asp:Button ID="BtnAceptarMC" CssClass="btn btn-primary" OnClick="BtnAceptarMC_Click" runat="server" Text="Aceptar" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div id="ModalEmpleados" class="modal ADS fade " role="dialog" data-backdrop="static" data-keyboard="false">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalEmpleados" UpdateMode="Conditional">
|
||||
@@ -430,7 +481,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPersonal" DataTextField="Nombre" DataValueField="CvePersonal" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control select2me">
|
||||
<asp:DropDownList ID="DdlPersonal" DataTextField="CodigoNombreCompleto" DataValueField="CvePersonal" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Empleado: " AssociatedControlID="DdlPersonal"></asp:Label>
|
||||
|
||||
@@ -87,8 +87,10 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
if (Request["CvePersonal"] != null && Request["CvePersonal"].ToString().ToEntero() > 0)
|
||||
{
|
||||
ViewState["CvePersonal"] = Request["CvePersonal"].ToString().ToEntero();
|
||||
CargaPersonal();
|
||||
HypCodigo.NavigateUrl = $"/RH/Personal.aspx?CvePersonal={CvePersonal}";
|
||||
HypEmpleado.NavigateUrl = $"/RH/Personal.aspx?CvePersonal={CvePersonal}";
|
||||
CargaMotivoBaja();
|
||||
CargaPersonal();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -97,9 +99,14 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
LtlEmpleadoCancelar.Visible = false;
|
||||
RegistraScript("$('#ModalEmpleados').modal();");
|
||||
}
|
||||
gconceptos.Visible = ChkesLiquidacion.Checked;
|
||||
}
|
||||
}
|
||||
|
||||
protected void ChkesLiquidacion_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
gconceptos.Visible = ChkesLiquidacion.Checked;
|
||||
}
|
||||
private void CargaMotivoBaja()
|
||||
{
|
||||
DdlMotivoBaja.DataSource = GlobalDTMotivoBaja.FiltraParametros("CveEmpresa = " + UsuarioActual.CveEmpresa);
|
||||
@@ -126,8 +133,11 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
DataRow drow = ObjPersonal.DtResultados.Rows[0];
|
||||
HypCodigo.Text = drow["Codigo"].ToString();
|
||||
HypEmpleado.Text = drow["NombreCompleto"].ToString();
|
||||
|
||||
HypCodigo.NavigateUrl =$"/RH/Personal.aspx?CvePersonal={drow["CvePersonal"]}";
|
||||
LblPuesto.Text = drow["Puesto"].ToString();
|
||||
LblSalario.Text = drow["SalarioDiario"].ToString();
|
||||
LtlAreaGeografica.Text = drow["AreaGeografica"].ToString();
|
||||
if (ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DtAltas = ObjPersonal.DtResultados.FiltraParametros("", "FechaInicio");
|
||||
@@ -136,7 +146,24 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
LblFechaAlta.Text = string.Format("{0:dd/MM/yyyy}", da["FechaInicio"]);
|
||||
FechaInicio = LblFechaAlta.Text.ToDateTime();
|
||||
TxtFechaBaja.Text = string.Format("{0:dd/MM/yyyy}", da["FechaFin"]);
|
||||
{
|
||||
if(da["CveMotivoBaja"].ToString() == "")
|
||||
{
|
||||
chkIndemnizacion.Checked = true;
|
||||
chkSeparacionUnica.Checked = true;
|
||||
chkPrimaantiguedad.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
chkIndemnizacion.Checked = da["ValIndemnizacion"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
chkSeparacionUnica.Checked = da["ValSeparacionunica"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
chkPrimaantiguedad.Checked = da["ValPrimadeantiguedad"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DdlMotivoBaja.SelectedValueExist(da["CveMotivoBaja"]);
|
||||
TxtSalarioMinimo.Text = $"{da["SalarioMinimo"]:N2}" ;
|
||||
ChkesLiquidacion.Checked = (da["esLiquidacion"].ToString() == "1" || da["esLiquidacion"].ToString().ToUpper() == "TRUE");
|
||||
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
|
||||
CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero();
|
||||
@@ -161,7 +188,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
|
||||
private void CamposCalculados()
|
||||
{
|
||||
TxtSalarioMinimo.Text = "123.22";
|
||||
//TxtSalarioMinimo.Text = "123.22";
|
||||
if (TxtFechaBaja.Text.Length > 9)
|
||||
{
|
||||
DateTime fechafin = TxtFechaBaja.Text.ToDateTime();
|
||||
@@ -179,15 +206,19 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
|
||||
private decimal getyearsresult(DateTime fechafin, DateTime fechainicio)
|
||||
{
|
||||
|
||||
decimal retorno = 0;
|
||||
DateTime zeroTime = new DateTime(1, 1, 1);
|
||||
decimal mes =12;
|
||||
retorno =(fechafin.Year -fechainicio.Year ) - (fechafin.Month > fechainicio.Month ? 0 : (fechafin.Month == fechainicio.Month && fechafin.Day > fechainicio.Day ? 0 : 1));
|
||||
retorno +=(((fechafin.Month == fechainicio.Month && fechafin.Day > fechainicio.Day ? fechainicio.Month : fechafin.Month + (fechafin.Month > fechainicio.Month ? 0 : 12)) - fechainicio.Month) / mes);
|
||||
/* DateTime zeroTime = new DateTime(1, 1, 1);
|
||||
TimeSpan span;
|
||||
if (fechainicio < fechafin)
|
||||
{
|
||||
span = fechafin - fechainicio;
|
||||
decimal years = (zeroTime + span).Year - 1;
|
||||
retorno = Math.Round(years + (span.TotalDays.ToString().ToDecimal() / 365), 4);
|
||||
}
|
||||
}*/
|
||||
return retorno;
|
||||
}
|
||||
|
||||
@@ -210,8 +241,8 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
}
|
||||
protected void LnkConcepto_Click(object sender, EventArgs e)
|
||||
{
|
||||
int SRCveConcepto = ((LinkButton)sender).CommandArgument.ToEntero();
|
||||
string SRTipoConcepto = ((LinkButton)sender).CommandArgument;
|
||||
int SRCveConcepto = ((LinkButton)sender).CommandArgument.ToEntero();
|
||||
string SRTipoConcepto = ((LinkButton)sender).CommandArgument;
|
||||
#region carga conceptos
|
||||
DataTable dtCon;
|
||||
if (SRCveConcepto > 0)
|
||||
@@ -257,11 +288,36 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
}
|
||||
|
||||
//PnlConceptoPersonal.Visible = false;
|
||||
//DdlmcConceptos_SelectedIndexChanged(DdlmcConceptos, null);
|
||||
DdlmcConceptos_SelectedIndexChanged(DdlmcConceptos, null);
|
||||
RegistraScript(string.Format("$('#ModalUpConcepto').on('shown.bs.modal', function () {{$('#{0}').trigger('focus')}});$('#ModalUpConcepto').modal();", TxtmcImporte.ClientID));
|
||||
UPpanelModalUpConcepto.Update();
|
||||
}
|
||||
|
||||
protected void DdlmcConceptos_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
int CveConcepto = DdlmcConceptos.SelectedValue.ToEntero();
|
||||
TxtmcImporte.Text = "";
|
||||
TxtmcImporteGrabado.Text = "";
|
||||
Txtmcvalor.Text = "";
|
||||
if (CveConcepto > 0)
|
||||
{
|
||||
DataRow drow = dtempleadosConceptos.FiltroPrimero(string.Format("CveConcepto={0} AND CvePersonal ={1}", CveConcepto, CvePersonal));
|
||||
if (drow != null)
|
||||
{
|
||||
TxtmcImporte.Text = string.Format("{0:N2}", drow["Importe"]);
|
||||
TxtmcImporteGrabado.Text = string.Format("{0:N2}", drow["ImporteGravado"]);
|
||||
Txtmcvalor.Text = string.Format("{0:N2}", drow["Valor"]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (e != null)
|
||||
{
|
||||
Alert("Seleccione un concepto.", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
UPpanelModalUpConcepto.Update();
|
||||
}
|
||||
int CveConceptoPolgvc, CveConceptoDolgvc;
|
||||
protected void GvConceptos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
@@ -498,6 +554,217 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
protected void LnkFormatoRenuncia_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 AND SoloVisible =0");
|
||||
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 AND SoloVisible =0");
|
||||
dtper.Columns.Add("BorradoLogico", typeof(int));
|
||||
dtded.Columns.Add("BorradoLogico", typeof(int));
|
||||
|
||||
foreach (DataRow row in dtper.Rows)
|
||||
{
|
||||
int BorradoLogico = 0;
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal)) != 0))
|
||||
{
|
||||
BorradoLogico = 1;
|
||||
}
|
||||
row["BorradoLogico"] = BorradoLogico;
|
||||
}
|
||||
dtper.AcceptChanges();
|
||||
foreach (DataRow row in dtded.Rows)
|
||||
{
|
||||
int BorradoLogico = 0;
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal)) != 0))
|
||||
{
|
||||
BorradoLogico = 1;
|
||||
}
|
||||
row["BorradoLogico"] = BorradoLogico;
|
||||
}
|
||||
dtded.AcceptChanges();
|
||||
dtper = dtper.FiltraParametros("BorradoLogico=0");
|
||||
dtded = dtded.FiltraParametros("BorradoLogico=0");
|
||||
int maxper = dtper.Rows.Count;
|
||||
int maxded = dtded.Rows.Count;
|
||||
int i = 0;
|
||||
List<NConcepto> lconc = new List<NConcepto>();
|
||||
for (i = 0; i < maxper || i < maxded; i++)
|
||||
{
|
||||
NConcepto nConcepto = new NConcepto();
|
||||
DataRow row;
|
||||
if (maxper > i)
|
||||
{
|
||||
row = dtper.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}", CvePersonal));
|
||||
nConcepto.CveConceptoP = CveConcepto;
|
||||
nConcepto.ConceptoP = Concepto;
|
||||
nConcepto.NoConceptoP = Codigo;
|
||||
nConcepto.ImporteP = Importe;
|
||||
nConcepto.ValorP = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal));
|
||||
}
|
||||
if (maxded > i)
|
||||
{
|
||||
row = dtded.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}", CvePersonal));
|
||||
nConcepto.CveConceptoD = CveConcepto;
|
||||
nConcepto.ConceptoD = Concepto;
|
||||
nConcepto.NoConceptoD = Codigo;
|
||||
nConcepto.ImporteD = Importe;
|
||||
nConcepto.ValorD = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal));
|
||||
}
|
||||
lconc.Add(nConcepto);
|
||||
}
|
||||
|
||||
lconc.Add(new NConcepto());
|
||||
|
||||
NConcepto SubTotales = new NConcepto();
|
||||
SubTotales.CveConceptoP = 0;
|
||||
SubTotales.ConceptoP = "Total Percepciones";
|
||||
SubTotales.EstatusP = -2;
|
||||
SubTotales.ImporteP = dtempleados.SUM("SumaPercepciones", string.Format("CvePersonal = {0}", CvePersonal));
|
||||
///Alert(SubTotales.ImporteP.ToString());
|
||||
|
||||
SubTotales.CveConceptoD = 0;
|
||||
SubTotales.ConceptoD = "Total Deducciones";
|
||||
SubTotales.EstatusD = -2;
|
||||
SubTotales.ImporteD = dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", CvePersonal));
|
||||
|
||||
NConcepto Totales = new NConcepto();
|
||||
Totales.CveConceptoD = 0;
|
||||
Totales.ConceptoD = "Total";
|
||||
Totales.EstatusD = -3;
|
||||
Totales.ImporteD = dtempleados.SUM("Total", string.Format("CvePersonal = {0}", CvePersonal));
|
||||
|
||||
lconc.Add(SubTotales);
|
||||
lconc.Add(Totales);
|
||||
|
||||
DataTable dtCon = new DataTable();
|
||||
dtCon.Columns.Add(new DataColumn("NoConceptoP", typeof(string)));
|
||||
dtCon.Columns.Add(new DataColumn("ConceptoP", typeof(string)));
|
||||
dtCon.Columns.Add(new DataColumn("LabelValorP", typeof(string)));
|
||||
dtCon.Columns.Add(new DataColumn("CveConceptoP", typeof(int)));
|
||||
dtCon.Columns.Add(new DataColumn("ImporteP", typeof(double)));
|
||||
dtCon.Columns.Add(new DataColumn("ValorP", typeof(double)));
|
||||
dtCon.Columns.Add(new DataColumn("EstatusP", typeof(int)));
|
||||
dtCon.Columns.Add(new DataColumn("isEditedP", typeof(int)));
|
||||
dtCon.Columns.Add(new DataColumn("isOnlyBisibleP", typeof(int)));
|
||||
dtCon.Columns.Add(new DataColumn("NoConceptoD", typeof(string)));
|
||||
dtCon.Columns.Add(new DataColumn("ConceptoD", typeof(string)));
|
||||
dtCon.Columns.Add(new DataColumn("LabelValorD", typeof(string)));
|
||||
dtCon.Columns.Add(new DataColumn("CveConceptoD", typeof(int)));
|
||||
dtCon.Columns.Add(new DataColumn("ImporteD", typeof(double)));
|
||||
dtCon.Columns.Add(new DataColumn("ValorD", typeof(double)));
|
||||
dtCon.Columns.Add(new DataColumn("EstatusD", typeof(int)));
|
||||
dtCon.Columns.Add(new DataColumn("isEditedD", typeof(int)));
|
||||
dtCon.Columns.Add(new DataColumn("isOnlyBisibleD", typeof(int)));
|
||||
foreach (NConcepto itc in lconc)
|
||||
{
|
||||
DataRow dr = dtCon.NewRow();
|
||||
dr["NoConceptoP"] = itc.NoConceptoP;
|
||||
dr["ConceptoP"] = itc.ConceptoP;
|
||||
dr["LabelValorP"] = itc.LabelValorP;
|
||||
dr["CveConceptoP"] = itc.CveConceptoP;
|
||||
dr["ImporteP"] = itc.ImporteP;
|
||||
dr["ValorP"] = itc.ValorP;
|
||||
dr["EstatusP"] = itc.EstatusP;
|
||||
dr["isEditedP"] = itc.isEditedP;
|
||||
dr["isOnlyBisibleP"] = itc.isOnlyBisibleP;
|
||||
dr["NoConceptoD"] = itc.NoConceptoD;
|
||||
dr["ConceptoD"] = itc.ConceptoD;
|
||||
dr["LabelValorD"] = itc.LabelValorD;
|
||||
dr["CveConceptoD"] = itc.CveConceptoD;
|
||||
dr["ImporteD"] = itc.ImporteD;
|
||||
dr["ValorD"] = itc.ValorD;
|
||||
dr["EstatusD"] = itc.EstatusD;
|
||||
dr["isEditedD"] = itc.isEditedD;
|
||||
dr["isOnlyBisibleD"] = itc.isOnlyBisibleD;
|
||||
dtCon.Rows.Add(dr);
|
||||
}
|
||||
dtCon.AcceptChanges();
|
||||
List<Microsoft.Reporting.WebForms.ReportDataSource> lrds = new List<Microsoft.Reporting.WebForms.ReportDataSource>();
|
||||
Microsoft.Reporting.WebForms.ReportDataSource rds = new Microsoft.Reporting.WebForms.ReportDataSource();
|
||||
rds.Name = "DataSet1";
|
||||
rds.Value = dtCon;// lconc;
|
||||
lrds.Add(rds);
|
||||
List<Microsoft.Reporting.WebForms.ReportParameter> parametros = new List<Microsoft.Reporting.WebForms.ReportParameter>();
|
||||
|
||||
string CodigoEmpleado = "";
|
||||
string NombreCompleto = "";
|
||||
string RFC = "";
|
||||
string CURP = "";
|
||||
string TipoPeriodo = "";
|
||||
string NSS = "";
|
||||
string DiasLaborados = "";
|
||||
string DiasFaltados = "";
|
||||
string DiasVacaciones = "";
|
||||
string FechaInicio = "";
|
||||
string FechaFin = "";
|
||||
string DiasRetardos = "";
|
||||
string DiasIncapacidad = "";
|
||||
string SubProyecto = "";
|
||||
{
|
||||
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", CvePersonal));
|
||||
if (drow != null)
|
||||
{
|
||||
DiasLaborados = string.Format("{0}", drow["DiasLaborados"].ToString().ToEntero());
|
||||
DiasFaltados = string.Format("{0}", drow["DiasFaltados"].ToString().ToEntero());
|
||||
DiasVacaciones = string.Format("{0}", drow["DiasVacaciones"].ToString().ToEntero());
|
||||
FechaInicio = string.Format("{0:dd/MM/yyyy}", drow["FechaInicio"]);
|
||||
FechaFin = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]);
|
||||
DiasRetardos = string.Format("{0}", drow["DiasRetardos"].ToString().ToEntero());
|
||||
DiasIncapacidad = string.Format("{0}", drow["DiasIncapacidad"].ToString().ToEntero());
|
||||
}
|
||||
}
|
||||
//string Codigo = "";
|
||||
using (ClsRH objrh = new ClsRH())
|
||||
{
|
||||
if (objrh.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) && objrh.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow drow = objrh.DtResultados.Rows[0];
|
||||
SubProyecto = drow["SubProyecto"].ToString();
|
||||
CodigoEmpleado = drow["Codigo"].ToString();
|
||||
NombreCompleto = drow["NombreCompleto"].ToString();
|
||||
RFC = drow["RFC"].ToString();
|
||||
CURP = drow["CURP"].ToString();
|
||||
TipoPeriodo = drow["TipoPeriodo"].ToString();
|
||||
NSS = drow["NSS"].ToString();
|
||||
}
|
||||
}
|
||||
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasIncapacidad", DiasIncapacidad));
|
||||
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("Codigo", CodigoEmpleado));
|
||||
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("NombreCompleto", NombreCompleto));
|
||||
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("RFC", RFC));
|
||||
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("CURP", ""));
|
||||
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("TipoPeriodo", TipoPeriodo));
|
||||
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("NSS", NSS));
|
||||
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasLaborados", DiasLaborados));
|
||||
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasFaltados", DiasFaltados));
|
||||
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasVacaciones", DiasVacaciones));
|
||||
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaInicio", FechaInicio));
|
||||
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaFin", FechaFin));
|
||||
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasRetardos", DiasRetardos));
|
||||
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("Empresa", UsuarioActual.Empresa.Empresa));
|
||||
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("SubProyecto", SubProyecto));
|
||||
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaPago", ""));
|
||||
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
|
||||
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
|
||||
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
|
||||
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
|
||||
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
|
||||
string urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, string.Format("Empresas/{0}/Formatos/SobreRecibo.rdlc", UsuarioActual.CveEmpresa));
|
||||
if (!System.IO.File.Exists(urlfile))
|
||||
{
|
||||
urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreRecibo.rdlc");
|
||||
}
|
||||
|
||||
ImprimirPDF(urlfile, lrds, parametros, "SobreRecibo", "PDF", null);
|
||||
}
|
||||
|
||||
protected void LnkCambiarEmpleado_Click(object sender, EventArgs e)
|
||||
@@ -534,8 +801,30 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
private List<NConcepto> cargasobrericiboconceptos(DataTable dtConceptos, DataTable dtempleadosConceptos, DataTable dtempleados)
|
||||
{
|
||||
int SRCvePersonal = this.CvePersonal;
|
||||
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ");
|
||||
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 ");
|
||||
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 And CveSistema NOT IN(10,11,32) ");
|
||||
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 AND CveSistema <> 47");
|
||||
double percepcionesindem = 0;
|
||||
double deduccionesindem = 0;
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 And CveSistema IN(10,11,32) ").Rows)
|
||||
{
|
||||
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}", SRCvePersonal));
|
||||
percepcionesindem += Importe;
|
||||
}
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 AND CveSistema =47").Rows)
|
||||
{
|
||||
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}", SRCvePersonal));
|
||||
deduccionesindem += Importe;
|
||||
}
|
||||
|
||||
|
||||
dtper.Columns.Add("BorradoLogico", typeof(int));
|
||||
dtded.Columns.Add("BorradoLogico", typeof(int));
|
||||
|
||||
@@ -613,19 +902,145 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
SubTotales.CveConceptoP = 0;
|
||||
SubTotales.ConceptoP = "Total Percepciones";
|
||||
SubTotales.EstatusP = -2;
|
||||
SubTotales.ImporteP = dtempleados.SUM("SumaPercepciones", string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
SubTotales.ImporteP = dtempleados.SUM("SumaPercepciones", string.Format("CvePersonal = {0}", SRCvePersonal))- percepcionesindem;
|
||||
///Alert(SubTotales.ImporteP.ToString());
|
||||
|
||||
|
||||
SubTotales.CveConceptoD = 0;
|
||||
SubTotales.ConceptoD = "Total Deducciones";
|
||||
SubTotales.EstatusD = -2;
|
||||
SubTotales.ImporteD = dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
|
||||
SubTotales.ImporteD = dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", SRCvePersonal))- deduccionesindem;
|
||||
|
||||
double neto = SubTotales.ImporteP - SubTotales.ImporteD;
|
||||
NConcepto Totales = new NConcepto();
|
||||
Totales.CveConceptoD = 0;
|
||||
Totales.ConceptoD = "Total";
|
||||
Totales.EstatusD = -3;
|
||||
Totales.ImporteD = dtempleados.SUM("Total", string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
Totales.ImporteD = neto;
|
||||
|
||||
lconc.Add(SubTotales);
|
||||
lconc.Add(Totales);
|
||||
return lconc;
|
||||
|
||||
}
|
||||
|
||||
private List<NConcepto> cargasobrericiboconceptosIndemnizacion(DataTable dtConceptos, DataTable dtempleadosConceptos, DataTable dtempleados)
|
||||
{
|
||||
int SRCvePersonal = this.CvePersonal;
|
||||
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 AND CveSistema IN(10,11,32) ");
|
||||
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 AND CveSistema = 47");
|
||||
double percepcionesindem = 0;
|
||||
double deduccionesindem = 0;
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 And CveSistema IN(10,11,32) ").Rows)
|
||||
{
|
||||
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}", SRCvePersonal));
|
||||
percepcionesindem += Importe;
|
||||
}
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 AND CveSistema =47").Rows)
|
||||
{
|
||||
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}", SRCvePersonal));
|
||||
deduccionesindem += Importe;
|
||||
}
|
||||
dtper.Columns.Add("BorradoLogico", typeof(int));
|
||||
dtded.Columns.Add("BorradoLogico", typeof(int));
|
||||
|
||||
foreach (DataRow row in dtper.Rows)
|
||||
{
|
||||
int BorradoLogico = 0;
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) != 0))
|
||||
{
|
||||
BorradoLogico = 1;
|
||||
}
|
||||
row["BorradoLogico"] = BorradoLogico;
|
||||
}
|
||||
dtper.AcceptChanges();
|
||||
foreach (DataRow row in dtded.Rows)
|
||||
{
|
||||
int BorradoLogico = 0;
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) != 0))
|
||||
{
|
||||
BorradoLogico = 1;
|
||||
}
|
||||
row["BorradoLogico"] = BorradoLogico;
|
||||
}
|
||||
dtded.AcceptChanges();
|
||||
dtper = dtper.FiltraParametros("BorradoLogico=0");
|
||||
dtded = dtded.FiltraParametros("BorradoLogico=0");
|
||||
int maxper = dtper.Rows.Count;
|
||||
int maxded = dtded.Rows.Count;
|
||||
int i = 0;
|
||||
List<NConcepto> lconc = new List<NConcepto>();
|
||||
for (i = 0; i < maxper || i < maxded; i++)
|
||||
{
|
||||
NConcepto nConcepto = new NConcepto();
|
||||
DataRow row;
|
||||
if (maxper > i)
|
||||
{
|
||||
row = dtper.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}", SRCvePersonal));
|
||||
nConcepto.CveConceptoP = CveConcepto;
|
||||
nConcepto.ConceptoP = Concepto;
|
||||
nConcepto.NoConceptoP = Codigo;
|
||||
nConcepto.ImporteP = Importe;
|
||||
nConcepto.ValorP = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
nConcepto.isOnlyBisibleP = row["SoloVisible"].ToString().ToEntero();
|
||||
|
||||
nConcepto.isEditedP = dtempleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal));
|
||||
}
|
||||
if (maxded > i)
|
||||
{
|
||||
row = dtded.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}", SRCvePersonal));
|
||||
nConcepto.CveConceptoD = CveConcepto;
|
||||
nConcepto.ConceptoD = Concepto;
|
||||
nConcepto.NoConceptoD = Codigo;
|
||||
nConcepto.ImporteD = Importe;
|
||||
nConcepto.ValorD = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
nConcepto.isOnlyBisibleD = row["SoloVisible"].ToString().ToEntero();
|
||||
nConcepto.isEditedD = dtempleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal));
|
||||
}
|
||||
lconc.Add(nConcepto);
|
||||
}
|
||||
|
||||
lconc.Add(new NConcepto());
|
||||
|
||||
NConcepto SubTotales = new NConcepto();
|
||||
SubTotales.CveConceptoP = 0;
|
||||
SubTotales.ConceptoP = "Total Percepciones";
|
||||
SubTotales.EstatusP = -2;
|
||||
SubTotales.ImporteP = percepcionesindem;
|
||||
///Alert(SubTotales.ImporteP.ToString());
|
||||
|
||||
|
||||
SubTotales.CveConceptoD = 0;
|
||||
SubTotales.ConceptoD = "Total Deducciones";
|
||||
SubTotales.EstatusD = -2;
|
||||
SubTotales.ImporteD = deduccionesindem;
|
||||
|
||||
double neto = SubTotales.ImporteP - SubTotales.ImporteD;
|
||||
NConcepto Totales = new NConcepto();
|
||||
Totales.CveConceptoD = 0;
|
||||
Totales.ConceptoD = "Total";
|
||||
Totales.EstatusD = -3;
|
||||
Totales.ImporteD = neto;
|
||||
|
||||
lconc.Add(SubTotales);
|
||||
lconc.Add(Totales);
|
||||
@@ -647,7 +1062,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL()))
|
||||
{
|
||||
if (ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), -1, DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
if (ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), -1, DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked,chkIndemnizacion.Checked ,chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow da = ObjPersonal.DtResultados.Rows[0];
|
||||
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
|
||||
@@ -683,6 +1098,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
DataTable dtempleados = null;
|
||||
|
||||
*/
|
||||
/*
|
||||
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoIndemnizacion, UsuarioActual.CveEmpresa, 1, 3, CvePersonal) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
{
|
||||
dtempleados = objnom.DTSetResultados.Tables[3];
|
||||
@@ -692,7 +1108,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
if (dtConceptos != null && dtempleadosConceptos != null && dtempleados != null)
|
||||
{
|
||||
finindem = cargasobrericiboconceptos(dtConceptos, dtempleadosConceptos, dtempleados);
|
||||
}
|
||||
}*/
|
||||
dtempleadosConceptos = null;
|
||||
dtempleados = null;
|
||||
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoFiniquito, UsuarioActual.CveEmpresa, 1, 3, CvePersonal) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
@@ -708,6 +1124,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
if (dtConceptos != null && dtempleadosConceptos != null && dtempleados != null)
|
||||
{
|
||||
finordin = cargasobrericiboconceptos(dtConceptos, dtempleadosConceptos, dtempleados);
|
||||
finindem = cargasobrericiboconceptosIndemnizacion(dtConceptos, dtempleadosConceptos, dtempleados);
|
||||
}
|
||||
|
||||
GvFinOrdinario.DataSource = finordin;
|
||||
@@ -868,4 +1285,148 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkCancelar_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
if (onom.RemoveFiniquito(CvePersonal, UsuarioActual.CveEmpresa, CvePersonalAltas))
|
||||
{
|
||||
Alert("se ha eliminado el proceso de finiquito");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkSimular_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (LblFechaAlta.Text.ToDate() > TxtFechaBaja.Text.ToDate())
|
||||
{
|
||||
Alert("la fecha de baja no puede ser menor a la fecha alta", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
else
|
||||
{
|
||||
bool continuar = false;
|
||||
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL()))
|
||||
{
|
||||
if (ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), -1, DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow da = ObjPersonal.DtResultados.Rows[0];
|
||||
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
|
||||
CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero();
|
||||
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa);
|
||||
}
|
||||
if (continuar)
|
||||
{
|
||||
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa);
|
||||
}
|
||||
if (continuar)
|
||||
{ loadsobrerecibo(onom); }
|
||||
if (continuar)
|
||||
{
|
||||
ObjPersonal.RollBack();
|
||||
}
|
||||
else
|
||||
{
|
||||
ObjPersonal.RollBack();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
UPDatos.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void BtnAceptarMC_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool continuar = true;
|
||||
int CveNomina = 0;
|
||||
double Total = 0;
|
||||
int CveMoneda = 1;
|
||||
int CveMetodoPago = 0;
|
||||
int CveConcepto = DdlmcConceptos.SelectedValue.ToEntero();
|
||||
if (CveConcepto > 0 && CvePersonal > 0)
|
||||
{
|
||||
decimal ImporteConcepto = TxtmcImporte.Text.Replace("$", "").Replace(",", "").ToDecimal();
|
||||
decimal ImporteGravadoConcepto = TxtmcImporteGrabado.Text.Replace("$", "").Replace(",", "").ToDecimal();
|
||||
decimal ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
|
||||
decimal ImporteValor = Txtmcvalor.Text.Replace("$", "").Replace(",", "").ToDecimal();
|
||||
using (ClsNominas objNomina = new ClsNominas())
|
||||
{
|
||||
objNomina.IniciaTransacSQL();
|
||||
if (continuar)
|
||||
{
|
||||
if (objNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodoIndemnizacion, -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
if (objNomina.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
CveNomina = objNomina.CveNomina;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoIndemnizacion, Total, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
|
||||
"", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, false))
|
||||
{
|
||||
CveNomina = objNomina.CveNomina;
|
||||
}
|
||||
else
|
||||
{
|
||||
continuar = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CveNomina == 0)
|
||||
{
|
||||
continuar = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
|
||||
if (!objNomina.AddUPNom_NominasDetalles(CveNomina, CvePeriodoIndemnizacion, CvePersonal, CveConcepto, ImporteConcepto, ImporteGravadoConcepto, ImporteExentoConcepto, ImporteValor, UsuarioActual.CveUsuario, true))
|
||||
{
|
||||
continuar = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (continuar)
|
||||
{ objNomina.Commit(); }
|
||||
else
|
||||
{
|
||||
objNomina.RollBack();
|
||||
}
|
||||
}
|
||||
if (continuar)
|
||||
{
|
||||
using (ClsNominas objNomina = new ClsNominas())
|
||||
{
|
||||
loadsobrerecibo(objNomina);
|
||||
}
|
||||
Alert("El cambio se ha guardado correctamente.");
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CveConcepto > 0)
|
||||
{
|
||||
Alert("Debe seleccionar un empleado.", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("Debe seleccionar un concepto.", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,6 +4,11 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.fa-ad-pdf.fa::before {
|
||||
background: #999;
|
||||
content: "\f1c1";
|
||||
}
|
||||
|
||||
.lblforchk {
|
||||
font-size: 13px;
|
||||
color: #888888;
|
||||
@@ -173,6 +178,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAsistenciaIncidencias" Visible="true" OnClick="LnkAsistenciaIncidencias_Click" runat="server"><i class="fa fa-check-square"></i>Incidencias asistencia </asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LinkButton2" Visible="true" OnClick="lnkreportepercepciones_Click" runat="server"><i class="fa fa-check-square"></i>Reporte percepciones y deducciones </asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkReporteAcumulados" Visible="true" OnClick="LnkReporteAcumulados_Click" runat="server"><i class="fa fa-line-chart"></i>Reporte acumulados </asp:LinkButton>
|
||||
</li>
|
||||
@@ -191,6 +199,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkVerTablas" OnClick="LnkVerTablas_Click" runat="server"><i class="fa fa-columns" aria-hidden="true"></i>Tablas de cálculo</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkVerCalculoISR" OnClick="LnkVerCalculoISR_Click" runat="server"><i class="fa fa-columns" aria-hidden="true"></i>Cálculo ISR</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="HypAsistencia" NavigateUrl="/RH/Asistencias.aspx" runat="server"><i class="fa fa-list" aria-hidden="true"></i>Ir a asistencia</asp:HyperLink>
|
||||
</li>
|
||||
@@ -251,10 +262,10 @@
|
||||
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" Text="Calcular" Visible="False" class="btn btn-primary" />
|
||||
<%--<asp:Label AssociatedControlID="chkesListaderaya" runat="server" Text="¿es lista de raya?"></asp:Label>--%>
|
||||
<%--<asp:CheckBox ID="chkesListaderaya" Text=" " data-checkbox=" icheckbox_minimal-blue blue " Checked="false" CssClass="icheck chekVal " runat="server" />--%>
|
||||
<asp:Button ID="BtnAutorizar" runat="server" Text="Autorizar" Visible="False" class="btn btn-primary" />
|
||||
<asp:Button ID="BtnGeneraPDF" runat="server" Text="PDF" Visible="False" class="btn btn-primary" />
|
||||
<asp:Button ID="BtnEmitir" runat="server" Text="Timbrar" Visible="False" class="btn btn-primary" />
|
||||
<asp:Button ID="BtnActualizaNomina" runat="server" Text="Act Nomina" Visible="False" class="btn btn-primary" />
|
||||
<asp:Button ID="BtnAutorizar" UseSubmitBehavior="false" runat="server" Text="Autorizar" Visible="False" class="btn btn-primary" />
|
||||
<asp:Button ID="BtnGeneraPDF" UseSubmitBehavior="false" runat="server" Text="PDF" Visible="False" class="btn btn-primary" />
|
||||
<asp:Button ID="BtnEmitir" UseSubmitBehavior="false" runat="server" Text="Timbrar" Visible="False" class="btn btn-primary" />
|
||||
<asp:Button ID="BtnActualizaNomina" UseSubmitBehavior="false" runat="server" Text="Act Nomina" Visible="False" class="btn btn-primary" />
|
||||
<a style="display: none;" href="/Coolings.docx">Recibos</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -337,7 +348,7 @@
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Nomina</span>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Nomina <asp:Literal ID="LtlPeriodoseleccionado" runat="server"></asp:Literal></span>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
@@ -354,7 +365,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
<asp:GridView ID="GvNominas" runat="server" DataKeyNames="CvePeriodo,CvePersonal,CveNomina,SeTimbro,SerieFolio,Nombre,Correo,Codigo,Turno,Departamento,SubProyecto,NomAutorizado" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound"
|
||||
<asp:GridView ID="GvNominas" runat="server" DataKeyNames="CvePeriodo,CvePersonal,CveNomina,SeTimbro,SeTimbroFiniquito,EsRenuncia,SerieFolio,Nombre,Correo,Codigo,Turno,Departamento,SubProyecto,NomAutorizado" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound"
|
||||
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvNominas" Style="text-align: center;" GridLines="None" data-cols="2" data-rows="2" data-heighterror="360">
|
||||
<Columns>
|
||||
|
||||
@@ -492,9 +503,9 @@
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<div style="width: 100px; text-align: right; white-space: nowrap; padding-right: 10px;">
|
||||
<asp:HyperLink ID="HypXml" Visible="false" NavigateUrl="#" runat="server">XML</asp:HyperLink>
|
||||
<asp:HyperLink ID="HypPDF" CssClass="btn btn-circle btn-sm blue mysmallbtn" Visible="false" NavigateUrl="#" runat="server"><i class="fa fa-ad-pdf"></i></asp:HyperLink>
|
||||
<div style="min-width: 100px; text-align: right; white-space: nowrap; padding-right: 10px;">
|
||||
<asp:HyperLink ID="HypXml" ToolTip="Formato xml" Visible="false" CssClass="btn btn-circle btn-sm blue mysmallbtn" NavigateUrl="#" runat="server"><i class="fa fa-file-o"></i></asp:HyperLink>
|
||||
<asp:HyperLink ID="HypPDF" ToolTip="Formato Timbre" CssClass="btn btn-circle btn-sm red mysmallbtn" Visible="false" NavigateUrl="#" runat="server"><i class="fa fa-file-pdf-o"></i></asp:HyperLink>
|
||||
<asp:LinkButton runat="server" ID="LnkTimbrar" CssClass="btn btn-circle btn-sm blue mysmallbtn" Text="<i class='fa fa-bell'></i>" OnClick="LnkTimbrar_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea Timbrar?" data-btn-ok-label="si" />
|
||||
<asp:LinkButton runat="server" ID="ImgDelete" CssClass="btn btn-circle btn-sm red mysmallbtn" Text="<i class='icon-trash'></i>" OnClick="ImgDelete_Click" CommandArgument='<%# Eval("CveNomina") %>' Visible='<%# (Eval("CveNomina").ToString() != "" && Eval("SeTimbro").ToString() == "False"? true :false)%>' data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar la nómina?" data-btn-ok-label="si" />
|
||||
<asp:LinkButton runat="server" ID="LnkCancelar" CssClass="btn btn-circle btn-sm red mysmallbtn" Text="<i class='fa fa-ban'></i>" OnClick="LnkCancelar_Click" CommandArgument='<%# Eval("CveNomina") %>' Visible='<%# (Eval("CveNomina").ToString() != "" && PermisoCancelarEmitido && Eval("SeTimbro").ToString() == "True"? true :false)%>' data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar la nómina?" data-btn-ok-label="si" />
|
||||
@@ -610,7 +621,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<asp:Button ID="BtnImprimirsobrerecibo" OnClick="BtnImprimirsobrerecibo_Click" runat="server" Text="Imprimir" CssClass="btn btn-primary hidden" />
|
||||
<asp:Button ID="BtnImprimirsobrerecibo" OnClick="BtnImprimirsobrerecibo_Click" UseSubmitBehavior="false" runat="server" Text="Imprimir" CssClass="btn btn-primary hidden" />
|
||||
<div id="ModalConceptos" class="modal ADS fade" role="dialog">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpModalConceptos" UpdateMode="Conditional">
|
||||
@@ -764,7 +775,9 @@
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkImportexCalculo" OnClick="LnkImportexCalculo_Click" runat="server" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el importe fijo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
<div style="display: inline-block; width: 29px;">
|
||||
<asp:LinkButton ID="LnkImportexCalculo" OnClick="LnkImportexCalculo_Click" runat="server" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el importe fijo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
@@ -785,7 +798,9 @@
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkImporteDxCalculo" OnClick="LnkImportexCalculo_Click" runat="server" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el importe fijo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
<div style="display: inline-block; width: 29px;">
|
||||
<asp:LinkButton ID="LnkImporteDxCalculo" OnClick="LnkImportexCalculo_Click" runat="server" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el importe fijo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
@@ -874,7 +889,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<asp:Button ID="BtnGuardarInfornavit" OnClick="BtnGuardarInfornavit_Click" runat="server" Text="Guardar" class="btn btn-primary" />
|
||||
<asp:Button ID="BtnGuardarInfornavit" UseSubmitBehavior="false" OnClick="BtnGuardarInfornavit_Click" runat="server" Text="Guardar" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1141,6 +1156,11 @@
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton ID="LnkShowAddVacaciones" OnClick="LnkShowAddVacaciones_Click" CssClass="btn yellow-gold" runat="server">Agregar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
@@ -1294,7 +1314,16 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Dias autorizados">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" Text='<%# Eval("DiasAutorizados")%>' OnClick="LnkPersonalIncapacidad_Click" data-toggle="tooltip" title="Editar" Width="100%"> </asp:LinkButton>
|
||||
<asp:LinkButton runat="server" OnClick="LnkPersonalIncapacidad_Click" data-toggle="tooltip" title="Editar" Width="100%">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<%# Eval("DiasAutorizados")%>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<label class="btn btn-circle btn-sm green mysmallbtn"><i class="fa fa-pencil"></i></label>
|
||||
</div>
|
||||
</div>
|
||||
</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
@@ -1475,7 +1504,7 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
<asp:Button ID="BtnAceptarMC" CssClass="btn btn-primary" OnClick="BtnAceptarMC_Click" runat="server" Text="Aceptar" />
|
||||
<asp:Button ID="BtnAceptarMC" UseSubmitBehavior="false" CssClass="btn btn-primary" OnClick="BtnAceptarMC_Click" runat="server" Text="Aceptar" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -1600,9 +1629,71 @@
|
||||
<asp:GridView ID="GVVigISRAnual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TTVigISRMensual" runat="server" HeaderText="ISR Mensual">
|
||||
<ajax:TabPanel ID="TTVigISRMensual" runat="server" HeaderText="ISR ">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVVigISRMensual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject bold uppercase font-yellow-gold">Mensual</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<asp:GridView ID="GVVigISRMensual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject bold uppercase font-yellow-gold">Semana</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<asp:GridView ID="GVVigISRSemanal" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject bold uppercase font-yellow-gold">Decenal</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<asp:GridView ID="GVVigISRDecenal" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject bold uppercase font-yellow-gold">Quincenal</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<asp:GridView ID="GVVigISRQuincenal" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TTVigSubEmpAnual" runat="server" HeaderText="Subsidio Anual" Visible="false">
|
||||
@@ -1671,6 +1762,80 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div id="ModalCalculoISR" class="modal ADS fade" role="dialog">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpCalculoISR" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Label runat="server" Text="CálculoISR"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<asp:GridView ID="GVCalculoISR" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall ScrollAD" GridLines="None" AutoGenerateColumns="false"
|
||||
ShowHeaderWhenEmpty ="true">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Empleado">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Nombre")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Base gravable">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("SumaPercepcionesG","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Limite inferior">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("LimiteInferior","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Excedente L.I.">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("ExedenteLI","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Porcentaje sobre excedente">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("PorcentajeSE","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Impuesto marginal">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("ImpuestoMarginal","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cuota fija">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("cuotafija","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Impuesto antes de subsidio">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Impuestoantessubs","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Subsidio">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("subsidio","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Impuesto a cargo o a favor">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Impuesto","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="DModalNominas" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpCargarNomina" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
@@ -1862,7 +2027,7 @@
|
||||
</table>--%>
|
||||
<asp:GridView ID="GvConceptossimulador" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptossimulador"
|
||||
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound" ShowHeaderWhenEmpty="true"
|
||||
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,ValorP,EstatusP,ConceptoD,CveConceptoD,ImporteD,EstatusD,ValorD,isOnlyBisibleD,isOnlyBisibleP,isEditedD,isEditedP">
|
||||
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,ValorP,EstatusP,ConceptoD,CveConceptoD,ImporteD,EstatusD,ValorD,isOnlyBisibleD,isOnlyBisibleP,isEditedD,isEditedP,isOnlyBisibleO">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
@@ -2020,7 +2185,7 @@
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" runat="server" style="text-align: left">Reporte de incidencias</h4>
|
||||
<h4 class="modal-title" runat="server" style="text-align: left">Reporte de acumulados</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
@@ -2045,6 +2210,48 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="DmodalReportePercepcionesdeducciones" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" tabindex="-1">
|
||||
<div class="modal-content rowpadding">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" runat="server" style="text-align: left">Reporte de percepciones y deducciones</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtRpdFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtRIFechaInicio">Fecha Inicio</asp:Label>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TxtRpdFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender3" TargetControlID="TxtRpdFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvRpdFechaInicio" runat="server" ControlToValidate="TxtRpdFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaInicio"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtRpdFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtRIFechaFin">Fecha Fin</asp:Label>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender5" runat="server" TargetControlID="TxtRpdFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender4" TargetControlID="TxtRpdFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvRpdFechaFin" runat="server" ControlToValidate="TxtRpdFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaFin"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkrRepPercpDed" OnClick="LnkrRepPercpDed_Click" ValidationGroup="VGReporterepperde" CssClass="btn btn-primary" runat="server">Descargar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="DmodalReporteInicidencia" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" tabindex="-1">
|
||||
<div class="modal-content rowpadding">
|
||||
@@ -2135,7 +2342,161 @@
|
||||
</div>
|
||||
<div class="portlet-body rowpadding " style="display: none;">
|
||||
<div style="width: 1200px; min-height: 340px;">
|
||||
|
||||
<table id="headerProcesaSUA" style="display: none">
|
||||
<tr>
|
||||
<th colspan="5"></th>
|
||||
<th colspan="10">Obrera</th>
|
||||
<th colspan="10">Patronal</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th colspan="2">Salario</th>
|
||||
<th colspan="2">Días</th>
|
||||
<th colspan="2">Cuota Excedente</th>
|
||||
<th colspan="2">Prestaciones en Dinero</th>
|
||||
<th colspan="2">Gastos Medicos</th>
|
||||
<th colspan="2">Invalidez y Vida</th>
|
||||
<th colspan="2">Cesantia y Vejez</th>
|
||||
<th colspan="2">Cuota Fija</th>
|
||||
<th colspan="2">Riesgos de Trabajo</th>
|
||||
<th colspan="2">Guarderia</th>
|
||||
<th colspan="2">Retiro</th>
|
||||
<th colspan="2">Cesantia y Vejez</th>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:GridView ID="GVProcesarSUA" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD" AutoGenerateColumns="False"
|
||||
OnRowDataBound="GVProcesarSUA_RowDataBound" data-height="300" data-tableheader="#headerProcesaSUA"
|
||||
DataKeyNames="CvePersonal,CodigoNombreCompleto,CuotaFijaSUA,CuotaFijaSIG,CuotaExcedenteSUA,CuotaExcedenteSIG,PrestacionesDineroSUA,PrestacionesSIG,GastosMedPenSUA,GastosMedicosSIG,RiesgosdeTrabajoSUA,RiesgoTrabajoSIG,InvalidezyVidaSUA,InvalidezyVidaSIG,GuarderiaSUA,GuarderiaSIG,RetiroSUA,RetiroSIG,SalarioSUA,SalarioSIG,CesantiayVejezObreraSUA,CesantiayVejezObreraSIG,CesantiayVejezPatronalSUA,CesantiayVejezPatronalSIG">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Nombre">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblcodigoNombreCompleto" runat="server" Text='<%# Eval("CodigoNombreCompleto")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SUA">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("SalarioSUA","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("SalarioSIG","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SUA">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("DiasMes","{0:N0}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("DiasAsistio","{0:N0}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SUA">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CuotaExcedenteSUA","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CuotaExcedenteSIG","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SUA">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("PrestacionesDineroSUA","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("PrestacionesSIG","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SUA">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("GastosMedPenSUA","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("GastosMedicosSIG","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SUA">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("InvalidezyVidaSUA","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("InvalidezyVidaSIG","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SUA">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CesantiayVejezObreraSUA","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CesantiayVejezObreraSIG","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SUA">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CuotaFijaSUA","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CuotaFijaSIG","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SUA">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("RiesgosdeTrabajoSUA","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("RiesgoTrabajoSIG","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SUA">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("GuarderiaSUA","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("GuarderiaSIG","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SUA">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("RetiroSUA","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("RetiroSIG","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SUA">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CesantiayVejezPatronalSUA","{0:N2}")%>'> </asp:Label></td>,
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CesantiayVejezPatronalSIG","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<%--<table id="headerProcesaSUA" style="display: none">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th colspan="2">Salario</th>
|
||||
@@ -2260,8 +2621,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</asp:GridView>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2335,11 +2695,11 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:Label CssClass="lblforchk" runat="server" Text="Altas:"></asp:Label>
|
||||
<asp:Label CssClass="lblforchk" runat="server" Text="Altas:"></asp:Label>
|
||||
<asp:CheckBox ID="ChkSuaAltas" Text=" " CssClass="chksino" runat="server" />
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:Label CssClass="lblforchk" runat="server" Text="Bajas:"></asp:Label>
|
||||
<asp:Label CssClass="lblforchk" runat="server" Text="Bajas:"></asp:Label>
|
||||
<asp:CheckBox ID="ChkSuaBajas" Text=" " CssClass="chksino" runat="server" />
|
||||
</div>
|
||||
<%--<div class="form-group form-md-line-input">
|
||||
@@ -2366,7 +2726,16 @@
|
||||
<asp:TextBox ID="TxtCvePeriodo" CssClass="TxtCvePeriodo hidden" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCvePersonal" CssClass="TxtCvePersonal hidden" runat="server"></asp:TextBox>
|
||||
<asp:Button ID="BtnGeneratepdf" CssClass="BtnGeneratepdf hidden" OnClick="BtnGeneratepdf_Click" UseSubmitBehavior="false" runat="server" Text="Button" />
|
||||
<asp:Button ID="BtnGenerateXml" CssClass="BtnGenerateXml hidden" OnClick="BtnGenerateXml_Click" UseSubmitBehavior="false" runat="server" Text="Button" />
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGenerateXml" CssClass="BtnGenerateXml hidden" OnClick="BtnGenerateXml_Click" UseSubmitBehavior="false" runat="server" Text="Button" />
|
||||
<span class="ltlxml">
|
||||
<asp:Literal ID="LtlXml" runat="server"></asp:Literal></span>
|
||||
<span class="ltlxmlfin">
|
||||
<asp:Literal ID="LtlXmlfin" runat="server"></asp:Literal></span>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
@@ -2418,6 +2787,27 @@
|
||||
setTimeout(function () { loadadscroll(); }, 50);
|
||||
}, 400);
|
||||
}
|
||||
function bin2String(array) {
|
||||
var result = "";
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
result += String.fromCharCode(parseInt(array[i], 2));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function Savexml(filename, data) {
|
||||
var blob = new Blob([data], { type: 'text/xml' });
|
||||
if (window.navigator.msSaveOrOpenBlob) {
|
||||
window.navigator.msSaveBlob(blob, filename);
|
||||
}
|
||||
else {
|
||||
var elem = window.document.createElement('a');
|
||||
elem.href = window.URL.createObjectURL(blob);
|
||||
elem.download = filename;
|
||||
document.body.appendChild(elem);
|
||||
elem.click();
|
||||
document.body.removeChild(elem);
|
||||
}
|
||||
}
|
||||
function SaveCsv(filename, data) {
|
||||
var blob = new Blob([data], { type: 'text/csv' });
|
||||
if (window.navigator.msSaveOrOpenBlob) {
|
||||
|
||||
@@ -181,11 +181,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
LnkVerCalculoISR.Visible = (UsuarioActual.CveUsuario == 100);
|
||||
TxtPeriodo.Text = $"{DateTime.Now:yyyyMM}";
|
||||
CargarCentrosDeCosto(DdlProyecto, null, LblProyecto, LblSubProyeccto);
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyeccto);
|
||||
cargaEjercicios();
|
||||
CargaTiposPeriodo();
|
||||
cargaPeriodos();
|
||||
DdlTurno.DataSource = GlobalDTTurno.FiltraParametros($"CveEmpresa = { UsuarioActual.CveEmpresa}");
|
||||
DdlTurno.DataBind();
|
||||
//Permisos
|
||||
if (UsuarioActual.TienePermisoProceso(82))
|
||||
{
|
||||
@@ -348,6 +351,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
FiltCveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero();
|
||||
FiltCveTurno = DdlTurno.SelectedValue.ToEntero();
|
||||
FiltCvePeriodo = DdlPeriodo.SelectedValue.ToEntero();
|
||||
LtlPeriodoseleccionado.Text = DdlPeriodo.SelectedItem.Text;
|
||||
FiltAgrupador = 1;
|
||||
HypPDFSTimbrados.Attributes.Add("onclick", string.Format("GETPDF({0},{1})", -1, FiltCvePeriodo));
|
||||
cargaDatos();
|
||||
@@ -904,6 +908,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
int CvePeriodo = e.Row.DataKey("CvePeriodo").ToEntero();
|
||||
int CveNomina = e.Row.DataKey("CveNomina").ToEntero();
|
||||
string SeTimbro = e.Row.DataKey("SeTimbro").ToString();
|
||||
string SeTimbroFiniquito = e.Row.DataKey("SeTimbroFiniquito").ToString();
|
||||
string EsRenuncia = e.Row.DataKey("EsRenuncia").ToString();
|
||||
string NomAutorizado = e.Row.DataKey("NomAutorizado").ToString();
|
||||
string Nombre = e.Row.DataKey("Nombre").ToString();
|
||||
string Codigo = e.Row.DataKey("Codigo").ToString();
|
||||
@@ -923,7 +929,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SeTimbro == "False")
|
||||
if (!SeTimbro.ToUpper().Contiene("TRUE", "1"))
|
||||
{
|
||||
LnkTimbrar.Visible = true;
|
||||
e.Row.CssClass = "info";
|
||||
@@ -937,6 +943,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
e.Row.FindControl("HypPDF").Visible = true;
|
||||
e.Row.FindControl("HypXml").Visible = true;
|
||||
e.Row.CssClass = "success";
|
||||
if (EsRenuncia.ToUpper().Contiene("TRUE", "1") && !SeTimbroFiniquito.ToUpper().Contiene("TRUE", "1"))
|
||||
{
|
||||
LnkTimbrar.Visible = true;
|
||||
e.Row.CssClass = "danger";
|
||||
e.Row.ToolTip = "sin timbrar conceptos de indemnización";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1487,6 +1499,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
protected void LnkSobreRecibo_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
LnkSRVacacionesADD.Visible = false;
|
||||
if (DdlCtaContable.Items.Count == 0)
|
||||
{
|
||||
|
||||
@@ -1541,15 +1554,15 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
//SRCvePersonal
|
||||
if (SRCveConcepto > 0)
|
||||
{
|
||||
using (ClsNominas onom =new ClsNominas())
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
if(onom.DeleteNom_NominasDetalles(SRCveConcepto, SRCvePersonal, CvePeriodoSeleccionado))
|
||||
if (onom.DeleteNom_NominasDetalles(SRCveConcepto, SRCvePersonal, CvePeriodoSeleccionado))
|
||||
{
|
||||
Alert("el importe sera tomado del calculo y no del valor fijo");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
protected void LnkConcepto_Click(object sender, EventArgs e)
|
||||
{
|
||||
SRCveConcepto = ((LinkButton)sender).CommandArgument.ToEntero();
|
||||
@@ -2343,10 +2356,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
LnkImporte.CommandArgument = (CveConcepto > 0 ? CveConcepto.ToString() : "P");
|
||||
LnkImporteD.CommandArgument = (CveConceptoD > 0 ? CveConceptoD.ToString() : "D");
|
||||
LnkImportexCalculo.CommandArgument = LnkImporte.CommandArgument;
|
||||
LnkImporteDxCalculo.CommandArgument = LnkImporteD.CommandArgument;
|
||||
LnkImportexCalculo.Visible = isEditedP;
|
||||
LnkImporteDxCalculo.Visible =isEditedD;
|
||||
if (LnkImportexCalculo != null)
|
||||
{
|
||||
LnkImportexCalculo.CommandArgument = LnkImporte.CommandArgument;
|
||||
LnkImporteDxCalculo.CommandArgument = LnkImporteD.CommandArgument;
|
||||
LnkImportexCalculo.Visible = isEditedP;
|
||||
LnkImporteDxCalculo.Visible = isEditedD;
|
||||
|
||||
}
|
||||
|
||||
LnkImporte.Text = (CveConcepto > 0 ? string.Format("${0:N2}", e.Row.DataKey("ImporteP").ToDecimal()) : (CveConceptoPolgvc > 0 ? "<i class=\"fa fa-plus\"></i>" : ""));
|
||||
LnkImporteD.Text = (CveConceptoD > 0 ? string.Format("${0:N2}", e.Row.DataKey("ImporteD").ToDecimal()) : (CveConceptoDolgvc > 0 ? "<i class=\"fa fa-plus\"></i>" : ""));
|
||||
@@ -2651,6 +2668,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
GVInfonavitSegViv.DataSource = objnom.DTSetResultados.Tables[3];
|
||||
GVVigISRMensual.DataSource = objnom.DTSetResultados.Tables[4];
|
||||
GVVigSubEmpMensual.DataSource = objnom.DTSetResultados.Tables[5];
|
||||
GVVigISRSemanal.DataSource = objnom.DTSetResultados.Tables[7];
|
||||
GVVigISRDecenal.DataSource = objnom.DTSetResultados.Tables[8];
|
||||
GVVigISRQuincenal.DataSource = objnom.DTSetResultados.Tables[9];
|
||||
|
||||
|
||||
|
||||
}
|
||||
if (objnom.RH_TablasValoresGet(UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
@@ -2664,7 +2687,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
GVInfonavitSegViv.DataBind();
|
||||
GVVigISRMensual.DataBind();
|
||||
GVVigSubEmpMensual.DataBind();
|
||||
GVVigSubEmpMensual.DataBind();
|
||||
GVVigISRSemanal.DataBind();
|
||||
GVVigISRDecenal.DataBind();
|
||||
GVVigISRQuincenal.DataBind();
|
||||
GVUma.DataBind();
|
||||
UpModalTablas.Update();
|
||||
}
|
||||
@@ -2710,6 +2735,91 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
loadtablas();
|
||||
RegistraScript("$('#ModalTablas').modal();");
|
||||
}
|
||||
protected void LnkVerCalculoISR_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataTable dt = dtempleados.FiltraParametros("CvePersonal >0", "", new string[] { "CvePersonal", "Nombre", "Codigo", "SumaPercepcionesG" });
|
||||
|
||||
//dt.Columns.Add("SumaPercepcionesG");
|
||||
dt.Columns.Add("LimiteInferior");
|
||||
dt.Columns.Add("ExedenteLI");
|
||||
dt.Columns.Add("PorcentajeSE");
|
||||
dt.Columns.Add("ImpuestoMarginal");
|
||||
dt.Columns.Add("cuotafija");
|
||||
|
||||
dt.Columns.Add("Impuestoantessubs");
|
||||
dt.Columns.Add("subsidio");
|
||||
dt.Columns.Add("Impuesto");
|
||||
|
||||
DataTable dtquin = null;
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetTablasNomina(UsuarioActual.CveEmpresa) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
{
|
||||
//GVFactorDesctInfonavit.DataSource = objnom.DTSetResultados.Tables[0];
|
||||
//GVSalariosMinimos.DataSource = objnom.DTSetResultados.Tables[1];
|
||||
//GVIMMSRiesgot.DataSource = objnom.DTSetResultados.Tables[2];
|
||||
//GVInfonavitSegViv.DataSource = objnom.DTSetResultados.Tables[3];
|
||||
//GVVigISRMensual.DataSource = objnom.DTSetResultados.Tables[4];
|
||||
//GVVigSubEmpMensual.DataSource = objnom.DTSetResultados.Tables[5];
|
||||
//GVVigISRSemanal.DataSource = objnom.DTSetResultados.Tables[7];
|
||||
//GVVigISRDecenal.DataSource = objnom.DTSetResultados.Tables[8];
|
||||
//GVVigISRQuincenal.DataSource = objnom.DTSetResultados.Tables[9];
|
||||
dtquin = objnom.DTSetResultados.Tables[9];
|
||||
|
||||
|
||||
}
|
||||
//if (objnom.RH_TablasValoresGet(UsuarioActual.CveEmpresa, 1))
|
||||
//{
|
||||
// GVUma.DataSource = objnom.DtResultados;
|
||||
//}
|
||||
|
||||
}
|
||||
if (dtquin != null)
|
||||
{
|
||||
|
||||
foreach (DataRow item in dt.Rows)
|
||||
{
|
||||
decimal SumaPercepcionesG = item["SumaPercepcionesG"].ToString().ToDecimal();
|
||||
|
||||
decimal Limiteinferior = 0;
|
||||
decimal CuotaFija = 0;
|
||||
decimal Porcentaje = 0;
|
||||
foreach (DataRow drow in dtquin.Rows)
|
||||
{
|
||||
decimal limite = drow["Limite inferior"].ToString().ToDecimal();
|
||||
if (limite > SumaPercepcionesG) {
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
Limiteinferior = drow["Limite inferior"].ToString().ToDecimal();
|
||||
CuotaFija = drow["Cuota fija"].ToString().ToDecimal();
|
||||
Porcentaje = drow["Porcentaje"].ToString().ToDecimal();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
decimal Impuestomarginal = (SumaPercepcionesG - Limiteinferior) * (Porcentaje / 100);
|
||||
decimal Impuestoantessubs= Impuestomarginal+ CuotaFija;
|
||||
item["LimiteInferior"] = Limiteinferior;
|
||||
item["ExedenteLI"] = SumaPercepcionesG - Limiteinferior;
|
||||
item["PorcentajeSE"] = Porcentaje;
|
||||
item["ImpuestoMarginal"] = Impuestomarginal;
|
||||
item["cuotafija"] = CuotaFija;
|
||||
item["Impuestoantessubs"] = Impuestoantessubs;
|
||||
item["subsidio"] =0;
|
||||
item["Impuesto"] = Impuestoantessubs;
|
||||
//[Limite inferior],FORMAT(CuotaFija,'###,####,###0.00') [Cuota fija],FORMAT(Porcentaje,'###,####,###0.00') Porcentaje
|
||||
}
|
||||
dt.AcceptChanges();
|
||||
}
|
||||
|
||||
UpCalculoISR.Update();
|
||||
GVCalculoISR.DataSource = dt;
|
||||
GVCalculoISR.DataBind();
|
||||
|
||||
RegistraScript("$('#ModalCalculoISR').modal();");
|
||||
}
|
||||
|
||||
private void ImprimirReporte()
|
||||
{
|
||||
@@ -4093,13 +4203,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
protected void CargaConcepto()
|
||||
{
|
||||
DdlConcepto.Items.Clear();
|
||||
if (DdlTipo.SelectedValue == "-1")
|
||||
if (DdlTipo.SelectedValue.Contiene("P", "D", "O"))
|
||||
{
|
||||
DdlConcepto.DataSource = get_GlobalDTNomConceptos(UsuarioActual.CveEmpresa);
|
||||
DdlConcepto.DataSource = get_GlobalDTNomConceptos(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("Tipo ='{0}' AND FormulaTotal = 'FNC.[MovimientosPermanentes]'", DdlTipo.SelectedValue));
|
||||
}
|
||||
else
|
||||
{
|
||||
DdlConcepto.DataSource = get_GlobalDTNomConceptos(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("Tipo ='{0}'", DdlTipo.SelectedValue));
|
||||
DdlConcepto.DataSource = get_GlobalDTNomConceptos(UsuarioActual.CveEmpresa).FiltraParametros(" FormulaTotal = 'FNC.[MovimientosPermanentes]'");
|
||||
}
|
||||
DdlConcepto.DataBind();
|
||||
DdlConcepto.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
@@ -4220,6 +4330,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
DdlTipo.SelectedValueExist(tipo);
|
||||
DdlTipo_SelectedIndexChanged(null, null);
|
||||
}
|
||||
CargaConcepto();
|
||||
DdlConcepto.SelectedValueExist(cveConcepto);
|
||||
TxtDescripcion.Text = descripcion.ToString();
|
||||
DdlTipoDescto.SelectedValueExist(tipoDescuento.ToString());
|
||||
@@ -4534,6 +4645,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
GvConceptossimulador.DataSource = new DataTable();
|
||||
GvConceptossimulador.DataBind();
|
||||
DdlTipoPeriodoSim.SelectedValue = "1";
|
||||
RegistraScript("$('#DSimulador').modal()");
|
||||
UpSimulador.Update();
|
||||
}
|
||||
@@ -4544,12 +4656,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
int CveProyecto = -1;
|
||||
int CveSubProyecto = 1;
|
||||
int CveTurno = -1;
|
||||
int CvePeriodo = 12551;
|
||||
int CvePeriodo = (DdlTipoPeriodoSim.SelectedValue == "1") ? 12706 : 12551;
|
||||
int CveEmpresa = UsuarioActual.CveEmpresa;
|
||||
int Agrupador = -1;
|
||||
decimal Neto = TxtNetoaPagar.Text.ToDecimal();
|
||||
decimal NetoSimulado = 0;
|
||||
decimal SDI = (Neto * 1.25M) / 15;
|
||||
decimal SDI = (Neto * 1.25M) / (DdlTipoPeriodoSim.SelectedValue == "1" ? 7 : 15);
|
||||
decimal SDIOLD = 0;
|
||||
decimal sumador = 100;
|
||||
decimal multiplicador = 1;
|
||||
@@ -4567,7 +4679,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
while (Neto != NetoSimulado && continuarV)
|
||||
{
|
||||
|
||||
if (objnom.GetNominaEmpleadoSimulador(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, CveEmpresa, Agrupador, SDI) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
if (objnom.GetNominaEmpleado(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, CveEmpresa, Agrupador, -1, 1, SDI)
|
||||
&& objnom.DTSetResultados.Tables.Count > 1)
|
||||
{
|
||||
dtempleados = objnom.DTSetResultados.Tables[3];
|
||||
dtempleadosConceptos = objnom.DTSetResultados.Tables[4];
|
||||
@@ -4620,12 +4733,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (continuar)
|
||||
{
|
||||
{
|
||||
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));
|
||||
DataTable dtx = dtConceptos.Copy();
|
||||
dtx.Columns.Add("BorradoLogico", typeof(int));
|
||||
DataTable dtper = dtx.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ");
|
||||
DataTable dtded = dtx.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 ");
|
||||
DataTable dtObl = dtx.FiltraParametros("Tipo IN ('O') AND EsPadre = 1 ");
|
||||
////dtded.Columns.Add("BorradoLogico", typeof(int));
|
||||
////dtObl.Columns.Add("BorradoLogico", typeof(int));
|
||||
|
||||
foreach (DataRow row in dtper.Rows)
|
||||
{
|
||||
@@ -4803,7 +4917,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
string script = "";// string.Format("SaveCsv(\"MovtosAfil.txt\", '{0}');SaveCsv(\"MovtosmodSalario.txt\", '{1}');SaveCsv(\"movtosBajas.txt\", '{2}');", MovtosAfil.Replace("'", "\\'"), MovtosmodSalario.Replace("'", "\\'"), movtosBajas.Replace("'", "\\'"));
|
||||
if (ChkSuaAltas.Checked)
|
||||
{
|
||||
script= string.Format("{1}SaveCsv(\"MovtosAfil.txt\", '{0}');", MovtosAfil.Replace("'", "\\'"), script);
|
||||
script = string.Format("{1}SaveCsv(\"MovtosAfil.txt\", '{0}');", MovtosAfil.Replace("'", "\\'"), script);
|
||||
}
|
||||
if (ChkSuaBajas.Checked)
|
||||
{
|
||||
@@ -4862,6 +4976,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (e.Row.RowIndex == 0)
|
||||
{
|
||||
e.Row.CssClass = "Totales";
|
||||
}
|
||||
string SalarioSUA = string.Format("{0:N2}", e.Row.DataKey("SalarioSUA").ToDecimal());
|
||||
string SalarioSIG = string.Format("{0:N2}", e.Row.DataKey("SalarioSIG").ToDecimal());
|
||||
int celda = 1;
|
||||
@@ -4871,14 +4989,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
e.Row.Cells[celda + 1].CssClass = "cellFail";
|
||||
}
|
||||
celda = celda + 4;
|
||||
string CuotaFijaSUA = string.Format("{0:N2}", e.Row.DataKey("CuotaFijaSUA").ToDecimal());
|
||||
string CuotaFijaSIG = string.Format("{0:N2}", e.Row.DataKey("CuotaFijaSIG").ToDecimal());
|
||||
if (CuotaFijaSUA != CuotaFijaSIG)
|
||||
{
|
||||
e.Row.Cells[celda].CssClass = "cellFail";
|
||||
e.Row.Cells[celda + 1].CssClass = "cellFail";
|
||||
}
|
||||
celda = celda + 2;
|
||||
string CuotaExcedenteSUA = string.Format("{0:N2}", e.Row.DataKey("CuotaExcedenteSUA").ToDecimal());
|
||||
string CuotaExcedenteSIG = string.Format("{0:N2}", e.Row.DataKey("CuotaExcedenteSIG").ToDecimal());
|
||||
if (CuotaExcedenteSUA != CuotaExcedenteSIG)
|
||||
@@ -4903,17 +5013,33 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
e.Row.Cells[celda + 1].CssClass = "cellFail";
|
||||
}
|
||||
celda = celda + 2;
|
||||
string RiesgosdeTrabajoSUA = string.Format("{0:N2}", e.Row.DataKey("RiesgosdeTrabajoSUA").ToDecimal());
|
||||
string RiesgoTrabajoSIG = string.Format("{0:N2}", e.Row.DataKey("RiesgoTrabajoSIG").ToDecimal());
|
||||
if (RiesgosdeTrabajoSUA != RiesgoTrabajoSIG)
|
||||
string InvalidezyVidaSUA = string.Format("{0:N2}", e.Row.DataKey("InvalidezyVidaSUA").ToDecimal());
|
||||
string InvalidezyVidaSIG = string.Format("{0:N2}", e.Row.DataKey("InvalidezyVidaSIG").ToDecimal());
|
||||
if (InvalidezyVidaSUA != InvalidezyVidaSIG)
|
||||
{
|
||||
e.Row.Cells[celda].CssClass = "cellFail";
|
||||
e.Row.Cells[celda + 1].CssClass = "cellFail";
|
||||
}
|
||||
celda = celda + 2;
|
||||
string InvalidezyVidaSUA = string.Format("{0:N2}", e.Row.DataKey("InvalidezyVidaSUA").ToDecimal());
|
||||
string InvalidezyVidaSIG = string.Format("{0:N2}", e.Row.DataKey("InvalidezyVidaSIG").ToDecimal());
|
||||
if (InvalidezyVidaSUA != InvalidezyVidaSIG)
|
||||
string CesantiayVejezObreraSUA = string.Format("{0:N2}", e.Row.DataKey("CesantiayVejezObreraSUA").ToDecimal());
|
||||
string CesantiayVejezObreraSIG = string.Format("{0:N2}", e.Row.DataKey("CesantiayVejezObreraSIG").ToDecimal());
|
||||
if (CesantiayVejezObreraSUA != CesantiayVejezObreraSIG)
|
||||
{
|
||||
e.Row.Cells[celda].CssClass = "cellFail";
|
||||
e.Row.Cells[celda + 1].CssClass = "cellFail";
|
||||
}
|
||||
celda = celda + 2;
|
||||
string CuotaFijaSUA = string.Format("{0:N2}", e.Row.DataKey("CuotaFijaSUA").ToDecimal());
|
||||
string CuotaFijaSIG = string.Format("{0:N2}", e.Row.DataKey("CuotaFijaSIG").ToDecimal());
|
||||
if (CuotaFijaSUA != CuotaFijaSIG)
|
||||
{
|
||||
e.Row.Cells[celda].CssClass = "cellFail";
|
||||
e.Row.Cells[celda + 1].CssClass = "cellFail";
|
||||
}
|
||||
celda = celda + 2;
|
||||
string RiesgosdeTrabajoSUA = string.Format("{0:N2}", e.Row.DataKey("RiesgosdeTrabajoSUA").ToDecimal());
|
||||
string RiesgoTrabajoSIG = string.Format("{0:N2}", e.Row.DataKey("RiesgoTrabajoSIG").ToDecimal());
|
||||
if (RiesgosdeTrabajoSUA != RiesgoTrabajoSIG)
|
||||
{
|
||||
e.Row.Cells[celda].CssClass = "cellFail";
|
||||
e.Row.Cells[celda + 1].CssClass = "cellFail";
|
||||
@@ -4934,6 +5060,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
e.Row.Cells[celda].CssClass = "cellFail";
|
||||
e.Row.Cells[celda + 1].CssClass = "cellFail";
|
||||
}
|
||||
celda = celda + 2;
|
||||
string CesantiayVejezPatronalSUA = string.Format("{0:N2}", e.Row.DataKey("CesantiayVejezPatronalSUA").ToDecimal());
|
||||
string CesantiayVejezPatronalSIG = string.Format("{0:N2}", e.Row.DataKey("CesantiayVejezPatronalSIG").ToDecimal());
|
||||
if (CesantiayVejezPatronalSUA != CesantiayVejezPatronalSIG)
|
||||
{
|
||||
e.Row.Cells[celda].CssClass = "cellFail";
|
||||
e.Row.Cells[celda + 1].CssClass = "cellFail";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -5113,7 +5247,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
int cveControlIncapacidad = gvRow.DataKey("CveControlIncapacidad").ToEntero();
|
||||
string descripcion = gvRow.DataKey("Descripcion");
|
||||
#endregion
|
||||
|
||||
TxtSRINCfolio.Text = folio.ToString();
|
||||
TxtSRINCfechaInicio.Text = $"{fechaInicio:dd/MM/yyyy}";
|
||||
TxtSRINCdiasAutorizados.Text = diasAutorizados.ToString();
|
||||
@@ -5459,6 +5592,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
byte[] pdf = new byte[1];
|
||||
string nombre = "recibo";
|
||||
bool confiniquito = false;
|
||||
int CvePersonal = TxtCvePersonal.Text.ToEntero(); int CvePeriodo = TxtCvePeriodo.Text.ToEntero();
|
||||
if (CvePersonal > 0)
|
||||
{
|
||||
@@ -5469,8 +5603,20 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
nombre = ObjNomina.SerieFolio;
|
||||
|
||||
}
|
||||
if (ObjNomina.GetNom_NominasDetalles(-1, CvePersonal, CvePeriodo, "-1"))
|
||||
{
|
||||
confiniquito = ObjNomina.DtResultados.COUNT("CveConcepto", " CveSistema IN(10,11,32,47) AND Importe <>0") > 0;
|
||||
}
|
||||
}
|
||||
pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta);
|
||||
if (confiniquito)
|
||||
{
|
||||
List<byte[]> pdfs = new List<byte[]>();
|
||||
pdfs.Add(pdf);
|
||||
pdfs.Add(GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta, true));
|
||||
pdf = MergeFiles(pdfs);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5581,41 +5727,66 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
string Ruta = "";
|
||||
string PathXML = "";
|
||||
string PathXMLF = "";
|
||||
string Xmlname = "";
|
||||
string XmlnameF = "";
|
||||
string empleado = "";
|
||||
DataRow dr = dtempleados.FiltroPrimero(string.Format("CvePersonal ={0}", TxtCvePersonal.Text.ToEntero()));
|
||||
if (dr != null)
|
||||
{
|
||||
empleado = string.Format("{0} - {1}", dr["Codigo"], dr["Nombre"]);
|
||||
}
|
||||
using (ClsNominas ObjNomina = new ClsNominas())
|
||||
{
|
||||
if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
Ruta = $@"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{UsuarioActual.CveEmpresa}\";
|
||||
PathXML = $@"{Ruta}XML\Nomina\{ObjNomina.SerieFolio}.xml";
|
||||
|
||||
Ruta = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\\{UsuarioActual.CveEmpresa}\\";
|
||||
PathXML = $"{Ruta}XML\\Nomina\\{ObjNomina.SerieFolio}.xml";
|
||||
PathXMLF = $"{Ruta}XML\\Nomina\\{ObjNomina.Serie}F-{ObjNomina.Folio}.xml";
|
||||
Xmlname = ObjNomina.SerieFolio;
|
||||
XmlnameF = $"{ObjNomina.Serie}F-{ObjNomina.Folio}";
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
string script = "";
|
||||
if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML))
|
||||
{
|
||||
System.IO.FileInfo file = new System.IO.FileInfo(PathXML);
|
||||
string mimeType = "text/plain";
|
||||
try
|
||||
{
|
||||
mimeType = MimeMapping.GetMimeMapping(PathXML);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
// Response.Write(path)
|
||||
Response.Clear();
|
||||
Response.ClearHeaders();
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(file.Name)}");
|
||||
Response.AddHeader("Content-Length", file.Length.ToString());
|
||||
Response.ContentType = mimeType;
|
||||
Response.Flush();
|
||||
Response.TransmitFile(file.FullName);
|
||||
Response.End();
|
||||
|
||||
LtlXml.Text = System.IO.File.ReadAllText(PathXML);
|
||||
script = string.Format("Savexml(\"{0} {1}.xml\", $('.ltlxml').html());", Xmlname, empleado);
|
||||
//System.IO.FileInfo file = new System.IO.FileInfo(PathXML);
|
||||
//string mimeType = "text/plain";
|
||||
//try
|
||||
//{
|
||||
// mimeType = MimeMapping.GetMimeMapping(PathXML);
|
||||
//}
|
||||
//catch (Exception)
|
||||
//{
|
||||
|
||||
//}
|
||||
//// Response.Write(path)
|
||||
//Response.Clear();
|
||||
//Response.ClearHeaders();
|
||||
//Response.ClearContent();
|
||||
//Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(file.Name)}");
|
||||
//Response.AddHeader("Content-Length", file.Length.ToString());
|
||||
//Response.ContentType = mimeType;
|
||||
//Response.Flush();
|
||||
//Response.TransmitFile(file.FullName);
|
||||
//Response.End();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXMLF))
|
||||
{
|
||||
LtlXmlfin.Text = System.IO.File.ReadAllText(PathXMLF);
|
||||
script = string.Format("{1}Savexml(\"{0}(Indemnización) {2}.xml\", $('.ltlxmlfin').html());", Xmlname, script, empleado);
|
||||
}
|
||||
if (script.Trim().Length > 0)
|
||||
{
|
||||
RegistraScript(script);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("No se encontro el archivo");
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
@@ -5628,14 +5799,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
int CvePrePolizaProvision = 0; int CvePrePolizaasmilidos = 0;
|
||||
if (objnom.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
CvePrePolizaProvision = objnom.DtResultados.Rows[0]["CvePrePoliza"].ToString().ToEntero();
|
||||
CvePrePolizaasmilidos = objnom.DtResultados.Rows[0]["CvePrePolizaAsimilables"].ToString().ToEntero();
|
||||
}
|
||||
if (objnom.Autorizaperiodoconta(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
int CvePrePolizaProvision = 0; int CvePrePolizaasmilidos = 0;
|
||||
if (objnom.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
CvePrePolizaProvision = objnom.DtResultados.Rows[0]["CvePrePoliza"].ToString().ToEntero();
|
||||
CvePrePolizaasmilidos = objnom.DtResultados.Rows[0]["CvePrePolizaAsimilables"].ToString().ToEntero();
|
||||
}
|
||||
string mensaje = string.Format("La provision a sido autorizada.<br/><a href=\"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}&Tipo=NOMPROV\">Provision </a><br/><a href=\"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}&Tipo=NOMPROV\"> Asimilados</a>", CvePrePolizaProvision, CvePrePolizaasmilidos);
|
||||
Alert(mensaje);
|
||||
}
|
||||
@@ -5764,6 +5935,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
RegistraScript("$('#DmodalReporteInicidencia').modal()");
|
||||
}
|
||||
|
||||
protected void lnkreportepercepciones_Click(object sender, EventArgs e)
|
||||
{
|
||||
RegistraScript("$('#DmodalReportePercepcionesdeducciones').modal()");
|
||||
}
|
||||
protected void LnkProcesarReporteIncidencia_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -5821,12 +5996,54 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
if (nom.ReportedeAcumuladosGET(UsuarioActual.CveEmpresa, TxtPeriodo.Text.ToEntero(), 4))
|
||||
{
|
||||
DateTime datei = new DateTime();
|
||||
DateTime datef = datei;
|
||||
try
|
||||
{
|
||||
datei = $"{TxtPeriodo.Text}01".ToDateTime();
|
||||
datef = datei.AddMonths(1).AddDays(-1);
|
||||
}
|
||||
catch (Exception) { }
|
||||
DataTable dt = nom.DTSetResultados.Tables[0];
|
||||
var libro = wb.AddWorksheet(dt, "Acumulados");
|
||||
libro.Tables.FirstOrDefault().Theme = ClosedXML.Excel.XLTableTheme.None;
|
||||
int crow = 1;
|
||||
foreach (DataRow item in dt.Rows)
|
||||
{
|
||||
crow++;
|
||||
//220,230,241
|
||||
//79,129,189
|
||||
switch (item["Grupoid"].ToString())
|
||||
{
|
||||
case "1":
|
||||
libro.Range(crow, 1, crow, 11).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
||||
libro.Range(crow, 1, crow, 11).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
break;
|
||||
case "2":
|
||||
libro.Range(crow, 1, crow, 11).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(220, 230, 241));
|
||||
//libro.Range(crow, 1, crow, 10).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
break;
|
||||
case "3":
|
||||
break;
|
||||
case "4":
|
||||
libro.Range(crow, 1, crow, 11).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
||||
libro.Range(crow, 1, crow, 11).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
break;
|
||||
case "5":
|
||||
|
||||
var libro = wb.AddWorksheet(nom.DTSetResultados.Tables[0], "Acumulados");
|
||||
libro.Range(crow, 1, crow, 11).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
||||
libro.Range(crow, 1, crow, 11).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
libro.Range(2, 3, crow, 11).Style.NumberFormat.Format = "$##,###,###,0.00";
|
||||
libro.Range(2, 3, crow, 11).DataType = ClosedXML.Excel.XLDataType.Number;
|
||||
libro.Column(1).Delete();
|
||||
libro.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 Acumulados";
|
||||
libro.Range(2, 2, 2, 6).Merge().Value = $"Reporte de Acumulados del {datei:dd/MM/yyyy} al {datef:dd/MM/yyyy}";
|
||||
//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}";
|
||||
@@ -5864,4 +6081,105 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void LnkrRepPercpDed_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
DateTime fechai = TxtRpdFechaInicio.Text.ToDateTime();
|
||||
DateTime fechaf = TxtRpdFechaFin.Text.ToDateTime();
|
||||
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
|
||||
using (ClsNominas nom = new ClsNominas())
|
||||
{
|
||||
if (nom.ReportedePercepcionesDeduccionesGet(UsuarioActual.CveEmpresa, fechai, fechaf, 4))
|
||||
{
|
||||
DataTable dt = nom.DTSetResultados.Tables[0];
|
||||
var libro = wb.AddWorksheet(nom.DTSetResultados.Tables[0], "Percepciones y deducciones");
|
||||
libro.Tables.FirstOrDefault().Theme = ClosedXML.Excel.XLTableTheme.None;
|
||||
|
||||
int crow = 1;
|
||||
foreach (DataRow item in dt.Rows)
|
||||
{
|
||||
crow++;
|
||||
//220,230,241
|
||||
//79,129,189
|
||||
switch (item["Grupoid"].ToString())
|
||||
{
|
||||
case "10":
|
||||
libro.Range(crow, 1, crow, 9).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(184, 204, 228));
|
||||
break;
|
||||
case "8":
|
||||
case "11":
|
||||
libro.Range(crow, 1, crow, 9).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
||||
libro.Range(crow, 1, crow, 11).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
break;
|
||||
|
||||
|
||||
case "6":
|
||||
libro.Range(crow, 1, crow, 9).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(216, 228, 188));
|
||||
break;
|
||||
case "5":
|
||||
case "7":
|
||||
libro.Range(crow, 1, crow, 9).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(155, 187, 89));
|
||||
libro.Range(crow, 1, crow, 9).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case "2":
|
||||
//libro.Range(crow, 1, crow, 11).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(216, 228, 188));
|
||||
break;
|
||||
case "1":
|
||||
case "3":
|
||||
libro.Range(crow, 1, crow, 9).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(75, 172, 198));
|
||||
libro.Range(crow, 1, crow, 9).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
libro.Range(2, 4, crow, 9).Style.NumberFormat.Format = "$##,###,###,0.00";
|
||||
libro.Range(2, 4, crow, 9).DataType = ClosedXML.Excel.XLDataType.Number;
|
||||
libro.Column(1).Delete();
|
||||
libro.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 percepciones y deducciones del {fechai:dd/MM/yyyy} al {fechaf:dd/MM/yyyy}";
|
||||
libro.Range(1, 2, 2, 6).Style.Font.SetBold(true);
|
||||
libro.Range(1, 2, 2, 6).Style.Font.SetFontSize(16);
|
||||
libro.Range(2, 2, 2, 6).Style.Font.SetFontSize(14);
|
||||
libro.Range(1, 2, 2, 6).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
|
||||
//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=percepciones .xlsx", ""));
|
||||
Response.BinaryWrite(memoryStream.ToArray());
|
||||
Response.End();
|
||||
}
|
||||
|
||||
protected void LnkShowAddVacaciones_Click(object sender, EventArgs e)
|
||||
{
|
||||
LnkSRVacacionesADD.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
@@ -27,12 +28,12 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
{
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetCalculoSBC(UsuarioActual.CveEmpresa,DdlTipo.SelectedValue.ToEntero(), TxtFechaPago.Text))
|
||||
if (objnom.GetCalculoSBC(UsuarioActual.CveEmpresa, DdlTipo.SelectedValue.ToEntero(), TxtFechaPago.Text))
|
||||
{
|
||||
GVCalculosSBC.DataSource = objnom.DTSetResultados.Tables[0];
|
||||
GVCFija.DataSource = objnom.DTSetResultados.Tables[0];
|
||||
GVPV.DataSource = objnom.DTSetResultados.Tables[0];
|
||||
if(objnom.DTSetResultados.Tables.Count > 0)
|
||||
if (objnom.DTSetResultados.Tables.Count >1)
|
||||
{
|
||||
GVDetalleParteVariable.DataSource = objnom.DTSetResultados.Tables[1];
|
||||
GVDetalleParteVariable.DataBind();
|
||||
@@ -75,8 +76,8 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
//}
|
||||
foreach (GridViewRow item in GVCalculosSBC.Rows)
|
||||
{
|
||||
double SalarioDiarioSSNuevo =Math.Round( item.DataKey("SalarioDiarioSSNuevo").ToDouble(),2);
|
||||
double SalarioDiarioSS = Math.Round(item.DataKey("SalarioDiarioSS").ToDouble(),2);
|
||||
double SalarioDiarioSSNuevo = Math.Round(item.DataKey("SalarioDiarioSSNuevo").ToDouble(), 2);
|
||||
double SalarioDiarioSS = Math.Round(item.DataKey("SalarioDiarioSS").ToDouble(), 2);
|
||||
if (SalarioDiarioSSNuevo != SalarioDiarioSS)
|
||||
{
|
||||
MovtosmodSalario = string.Format("{0}{1}{2}", MovtosmodSalario, concater, item.DataKey("Movtotxt"));
|
||||
@@ -113,9 +114,9 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
int CvePersonal = item.DataKey("CvePersonal").ToEntero();//,,,
|
||||
double SalarioDiario = item.DataKey("SalarioDiario").ToDouble();
|
||||
double SDINuevo = item.DataKey("SDINuevo").ToDouble();
|
||||
double SalarioDiarioSSNuevo = Math.Round(item.DataKey("SalarioDiarioSSNuevo").ToDouble(),2);
|
||||
double SalarioDiarioSSNuevo = Math.Round(item.DataKey("SalarioDiarioSSNuevo").ToDouble(), 2);
|
||||
double SalarioVariableNuevo = item.DataKey("SalarioVariableNuevo").ToDouble();
|
||||
double SalarioDiarioSS = Math.Round(item.DataKey("SalarioDiarioSS").ToDouble(),2);
|
||||
double SalarioDiarioSS = Math.Round(item.DataKey("SalarioDiarioSS").ToDouble(), 2);
|
||||
if (continuar && SalarioDiarioSSNuevo != SalarioDiarioSS && (continuar = objrh.UpdateSalarios(CvePersonal, fecha, UsuarioActual.CveEmpresa, SalarioDiario, SDINuevo, SalarioDiarioSSNuevo, SalarioDiario)))
|
||||
{
|
||||
|
||||
@@ -141,18 +142,118 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
|
||||
protected void LnkDescargar_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Tab.ActiveTab == TabSBC)
|
||||
DataTable dt = GVToDT(GVCalculosSBC,"Salario");
|
||||
DataTable dtPF = GVToDT(GVCFija, "Parte fija");
|
||||
DataTable dtPV = GVToDT(GVPV, "Parte variable");
|
||||
DataTable dtPVD = GVToDT(GVDetalleParteVariable, "Detalle parte variable");
|
||||
|
||||
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
|
||||
var libro = wb.AddWorksheet(dt);
|
||||
var libroPF = wb.AddWorksheet(dtPF);
|
||||
var libroPV = wb.AddWorksheet(dtPV);
|
||||
var libroPVD = wb.AddWorksheet(dtPVD);
|
||||
libro.ColumnsUsed().AdjustToContents();
|
||||
libroPF.ColumnsUsed().AdjustToContents();
|
||||
libroPV.ColumnsUsed().AdjustToContents();
|
||||
libroPVD.ColumnsUsed().AdjustToContents();
|
||||
|
||||
|
||||
libro.ColumnsUsed().AdjustToContents();
|
||||
libro.Row(1).InsertRowsAbove(5);
|
||||
libro.Range(1, 2, 1, 6).Merge().Value = UsuarioActual.Empresa.Empresa;
|
||||
libro.Range(2, 2, 2, 6).Merge().Value = $"Reporte de calculo de sbc {TxtFechaPago.Text}.";
|
||||
libro.Range(1, 2, 2, 6).Style.Font.SetBold(true);
|
||||
libro.Range(1, 2, 2, 6).Style.Font.SetFontSize(16);
|
||||
libro.Range(2, 2, 2, 6).Style.Font.SetFontSize(14);
|
||||
libro.Range(1, 2, 2, 6).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
|
||||
//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, 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(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";
|
||||
|
||||
|
||||
|
||||
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)
|
||||
|
||||
{
|
||||
GVCalculosSBC.ExportToExcel("Salario");
|
||||
}
|
||||
if (Tab.ActiveTab == TabSBC)
|
||||
{
|
||||
GVCFija.ExportToExcel("Salario");
|
||||
}
|
||||
if (Tab.ActiveTab == TabSBC)
|
||||
{
|
||||
GVPV.ExportToExcel("Salario");
|
||||
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={0}.xlsx", "Salario"));
|
||||
Response.BinaryWrite(memoryStream.ToArray());
|
||||
Response.End();
|
||||
|
||||
|
||||
}
|
||||
public string limpiarcelda( string celdatext)
|
||||
{
|
||||
celdatext = celdatext.Replace("<br />", "\r\n").Replace(" ", " ");
|
||||
while (celdatext.Contains(" ")){
|
||||
celdatext = celdatext.Replace(" ", " ");
|
||||
}
|
||||
celdatext = celdatext.Replace("\n ", " ");
|
||||
celdatext = celdatext.Replace("\r ", " ");
|
||||
|
||||
return celdatext;
|
||||
}
|
||||
public DataTable GVToDT(GridView GridView, string NombreArchivoXLSX)
|
||||
{
|
||||
DataTable dt = new DataTable(NombreArchivoXLSX);
|
||||
if (GridView != null && GridView.Rows.Count > 0)
|
||||
{
|
||||
int i = 0;
|
||||
List<int> ArrColumnasVisibles = new List<int>(); // solo recorro las columnas visibles
|
||||
|
||||
foreach (TableCell cell in GridView.HeaderRow.Cells)
|
||||
{
|
||||
string titulo = HttpUtility.HtmlDecode(Extensiones.ModExtensiones.TextoCelda(cell)).Trim();
|
||||
titulo = limpiarcelda( titulo);
|
||||
if (GridView.Columns[i].Visible && titulo.Length > 0)
|
||||
{
|
||||
if (dt.Columns.Contains(titulo))
|
||||
titulo = titulo + i;
|
||||
dt.Columns.Add(titulo);
|
||||
ArrColumnasVisibles.Add(i);
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
i = 0;
|
||||
|
||||
foreach (GridViewRow row in GridView.Rows)
|
||||
{
|
||||
dt.Rows.Add();
|
||||
i = 0;
|
||||
foreach (int j in ArrColumnasVisibles)
|
||||
{
|
||||
dt.Rows[dt.Rows.Count - 1][i] = limpiarcelda(Extensiones.ModExtensiones.TextoCelda(row.Cells[j]).Replace("<br />", "\r\n"));
|
||||
i = i + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return dt;
|
||||
}
|
||||
}
|
||||
@@ -62,6 +62,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="margin-right:5px;font-weight:bold"></i>Descargar Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCargaMasiva" OnClick="LnkCargaMasiva_Click" runat="server"><i class="fa fa-file-excel-o" style="margin-right:5px;font-weight:bold"></i>Formato saldos iniciales</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="HyperLink1" runat="server" Style="color: #686868;"><i class="fa fa-pencil" style="color:#686868;margin-left:3px;margin-right:2px"></i>Personalizar</asp:HyperLink>
|
||||
</li>
|
||||
@@ -77,6 +80,7 @@
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkDescarPersonalizados" />
|
||||
<asp:PostBackTrigger ControlID="LnkCargaMasiva" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
<li>
|
||||
|
||||
@@ -680,4 +680,366 @@ Partial Class RH_CatPersonal
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub LnkCargaMasiva_Click(sender As Object, e As EventArgs)
|
||||
Dim wb As ClosedXML.Excel.XLWorkbook = New ClosedXML.Excel.XLWorkbook()
|
||||
Dim libro = wb.AddWorksheet("Personal")
|
||||
Dim crow As Integer = 1
|
||||
Dim ccol As Integer = 1
|
||||
|
||||
Dim colLugarNacimiento As Integer = 1
|
||||
Dim rowLugarNacimiento As Integer = 1
|
||||
|
||||
#Region "Regimen de contratación"
|
||||
Dim Catalogos = wb.AddWorksheet("Catalogos")
|
||||
crow = 1
|
||||
ccol = 1
|
||||
Dim colRegimenContratacion As Integer = 1
|
||||
Dim rowRegimenContratacion As Integer = 1
|
||||
Catalogos.Cell(crow, ccol).Value = "Regimen de contratación"
|
||||
For Each row As DataRow In GlobalDTNomSatRegimenContratacion.Rows
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CveSATRegimenContratacion"), row("RegimenContratacion"))
|
||||
Next
|
||||
colRegimenContratacion = ccol
|
||||
rowRegimenContratacion = crow
|
||||
#End Region
|
||||
#Region "Estado civil"
|
||||
Dim colEstadoCivil As Integer = 1
|
||||
Dim rowEstadoCivil As Integer = 1
|
||||
crow = 1
|
||||
ccol = ccol + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "Estado civil"
|
||||
For Each row As DataRow In GlobalDTEstadoCivil.Rows
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CveEstadoCivil"), row("EstadoCivil"))
|
||||
Next
|
||||
colEstadoCivil = ccol
|
||||
rowEstadoCivil = crow
|
||||
#End Region
|
||||
#Region "Escolaridad"
|
||||
Dim colEscolaridad As Integer = 1
|
||||
Dim rowEscolaridad As Integer = 1
|
||||
crow = 1
|
||||
ccol = ccol + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "Escolaridad"
|
||||
For Each row As DataRow In GlobalDTEscolaridad.Rows
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CveEscolaridad"), row("Escolaridad"))
|
||||
Next
|
||||
colEscolaridad = ccol
|
||||
rowEscolaridad = crow
|
||||
|
||||
#End Region
|
||||
#Region "Tipo Periodo"
|
||||
Dim colTipoPeriodo As Integer = 1
|
||||
Dim rowTipoPeriodo As Integer = 1
|
||||
crow = 1
|
||||
ccol = ccol + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "Tipo Periodo"
|
||||
For Each row As DataRow In GlobalDTTipoPeriodo.Rows
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CveTipoPeriodo"), row("TipoPeriodo"))
|
||||
Next
|
||||
colTipoPeriodo = ccol
|
||||
rowTipoPeriodo = crow
|
||||
|
||||
#End Region
|
||||
#Region "Estatus"
|
||||
Dim colEstatusPersonal As Integer = 1
|
||||
Dim rowEstatusPersonal As Integer = 1
|
||||
crow = 1
|
||||
ccol = ccol + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "Estatus"
|
||||
For Each row As DataRow In GlobalDTEstatusPersonal.Rows
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CveEstatusPersonal"), row("EstatusPersonal"))
|
||||
Next
|
||||
colEstatusPersonal = ccol
|
||||
rowEstatusPersonal = crow
|
||||
|
||||
#End Region
|
||||
#Region "Tipo Contratro"
|
||||
Dim colTipoContrato As Integer = 1
|
||||
Dim rowTipoContrato As Integer = 1
|
||||
crow = 1
|
||||
ccol = ccol + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "Tipo Contratro"
|
||||
For Each row As DataRow In GlobalDTTiposContrato.Rows
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = String.Format("{0}", row("TipoContrato"))
|
||||
Next
|
||||
colTipoContrato = ccol
|
||||
rowTipoContrato = crow
|
||||
|
||||
#End Region
|
||||
#Region "Departamento"
|
||||
Dim colDepartamento As Integer = 1
|
||||
Dim rowDepartamento As Integer = 1
|
||||
crow = 1
|
||||
ccol = ccol + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "Departamento"
|
||||
For Each row As DataRow In GlobalDTDepartamentos.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa).Rows
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CveDepartamento"), row("Departamento"))
|
||||
Next
|
||||
colDepartamento = ccol
|
||||
rowDepartamento = crow
|
||||
|
||||
#End Region
|
||||
#Region "Turno"
|
||||
Dim colTurno As Integer = 1
|
||||
Dim rowTurno As Integer = 1
|
||||
crow = 1
|
||||
ccol = ccol + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "Turno"
|
||||
For Each row As DataRow In GlobalDTTurno.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa).Rows
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CveTurno"), row("Turno"))
|
||||
Next
|
||||
colTurno = ccol
|
||||
rowTurno = crow
|
||||
|
||||
#End Region
|
||||
#Region "Puesto"
|
||||
Dim colPuesto As Integer = 1
|
||||
Dim rowPuesto As Integer = 1
|
||||
crow = 1
|
||||
ccol = ccol + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "Puesto"
|
||||
For Each row As DataRow In GlobalDTRHPuestos(UsuarioActual.CveEmpresa).Rows
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CvePuesto"), row("Puesto"))
|
||||
Next
|
||||
colPuesto = ccol
|
||||
rowPuesto = crow
|
||||
|
||||
#End Region
|
||||
#Region "Estado"
|
||||
Dim colEstado As Integer = 1
|
||||
Dim rowEstado As Integer = 1
|
||||
crow = 1
|
||||
ccol = ccol + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "Estado"
|
||||
For Each row As DataRow In GlobalDTGralEstados(1).Rows
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CveEstado"), row("Estado"))
|
||||
Next
|
||||
colEstado = ccol
|
||||
rowEstado = crow
|
||||
|
||||
#End Region
|
||||
#Region "Tipo salario"
|
||||
|
||||
Dim colTipoSalario As Integer = 1
|
||||
Dim rowTipoSalario As Integer = 1
|
||||
|
||||
crow = 1
|
||||
ccol = ccol + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "Tipo salario"
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "1: Salario fijo"
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "2: Salario variable"
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "3: Salario mixto"
|
||||
colTipoSalario = ccol
|
||||
rowTipoSalario = crow
|
||||
|
||||
#End Region
|
||||
#Region "Genero"
|
||||
Dim colSexo As Integer = 1
|
||||
Dim rowSexo As Integer = 1
|
||||
crow = 1
|
||||
ccol = ccol + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "Genero"
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "1: Masculino"
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "2: Femenino"
|
||||
colSexo = ccol
|
||||
rowSexo = crow
|
||||
|
||||
#End Region
|
||||
#Region "Sindicalizado"
|
||||
Dim colsindicalizado As Integer = 1
|
||||
Dim rowsindicalizado As Integer = 1
|
||||
crow = 1
|
||||
ccol = ccol + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "Sindicalizado"
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "1: Sí"
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "0: No"
|
||||
colsindicalizado = ccol
|
||||
rowsindicalizado = crow
|
||||
|
||||
#End Region
|
||||
#Region "Area geografica"
|
||||
Dim colAreaGeografica As Integer = 1
|
||||
Dim rowAreaGeografica As Integer = 1
|
||||
crow = 1
|
||||
ccol = ccol + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "Area geografica"
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "A"
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "B"
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "C"
|
||||
colAreaGeografica = ccol
|
||||
rowAreaGeografica = crow
|
||||
|
||||
#End Region
|
||||
#Region "Metodo pago"
|
||||
Dim colmetodopago = 0
|
||||
Dim rowmetodopago = 0
|
||||
crow = 1
|
||||
ccol = ccol + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "Metodo pago"
|
||||
For Each row As DataRow In GlobalDTMetodosPago.Rows
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CveMetodoPago"), row("MetodoPago"))
|
||||
Next
|
||||
colmetodopago = ccol
|
||||
rowmetodopago = crow
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "subproyecto"
|
||||
Dim colsubproyecto = 0
|
||||
Dim rowsubproyecto = 0
|
||||
crow = 1
|
||||
ccol = ccol + 1
|
||||
Catalogos.Cell(crow, ccol).Value = "subproyecto"
|
||||
Dim dtsubproyecto = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
|
||||
For Each row As DataRow In dtsubproyecto.Rows
|
||||
crow = crow + 1
|
||||
Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CveSubProyecto"), row("SubProyecto"))
|
||||
Next
|
||||
colsubproyecto = ccol
|
||||
rowsubproyecto = crow
|
||||
|
||||
#End Region
|
||||
Catalogos.Range(1, 1, 1, ccol).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189))
|
||||
Catalogos.Range(1, 1, 1, ccol).Style.Font.FontColor = ClosedXML.Excel.XLColor.White
|
||||
|
||||
crow = 1
|
||||
ccol = 1
|
||||
|
||||
libro.Cell(crow, ccol).Value = "Código" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Apellido Paterno" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Apellido Materno" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Nombre" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Correo Electronico" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Fecha Nacimiento" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Sexo" : libro.Range(crow + 1, ccol, 50000, ccol).SetDataValidation().List(Catalogos.Range(2, colSexo, rowSexo, colSexo), True) : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Lugar Nacimiento" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Dirección" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Ciudad" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Estado Civil" : libro.Range(crow + 1, ccol, 50000, ccol).SetDataValidation().List(Catalogos.Range(2, colEstadoCivil, rowEstadoCivil, colEstadoCivil), True) : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Teléfono" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Celular" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "RFC" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "CURP" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Numero SS" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "CLABE" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Fecha Ingreso" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Fecha Baja" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Alta IMSS" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Código Postal" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Estatus Personal" : libro.Range(crow + 1, ccol, 50000, ccol).SetDataValidation().List(Catalogos.Range(2, colEstatusPersonal, rowEstatusPersonal, colEstatusPersonal), True) : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Estado" : libro.Range(crow + 1, ccol, 50000, ccol).SetDataValidation().List(Catalogos.Range(2, colEstado, rowEstado, colEstado), True) : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Nombre Padre" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Nombre Madre" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Puesto" : libro.Range(crow + 1, ccol, 50000, ccol).SetDataValidation().List(Catalogos.Range(2, colPuesto, rowPuesto, colPuesto), True) : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Turno" : libro.Range(crow + 1, ccol, 50000, ccol).SetDataValidation().List(Catalogos.Range(2, colTurno, rowTurno, colTurno), True) : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Tipo Contrato" : libro.Range(crow + 1, ccol, 50000, ccol).SetDataValidation().List(Catalogos.Range(2, colTipoContrato, rowTipoContrato, colTipoContrato), True) : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Departamento" : libro.Range(crow + 1, ccol, 50000, ccol).SetDataValidation().List(Catalogos.Range(2, colDepartamento, rowDepartamento, colDepartamento), True) : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Tipo Periodo" : libro.Range(crow + 1, ccol, 50000, ccol).SetDataValidation().List(Catalogos.Range(2, colTipoPeriodo, rowTipoPeriodo, colTipoPeriodo), True) : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Escolaridad" : libro.Range(crow + 1, ccol, 50000, ccol).SetDataValidation().List(Catalogos.Range(2, colEscolaridad, rowEscolaridad, colEscolaridad), True) : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Salario Diario" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Tipo Salario" : libro.Range(crow + 1, ccol, 50000, ccol).SetDataValidation().List(Catalogos.Range(2, colTipoSalario, rowTipoSalario, colTipoSalario), True) : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Salario variable" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Sindicalizado" : libro.Range(crow + 1, ccol, 50000, ccol).SetDataValidation().List(Catalogos.Range(2, colsindicalizado, rowsindicalizado, colsindicalizado), True) : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "SubProyecto " : libro.Range(crow + 1, ccol, 50000, ccol).SetDataValidation().List(Catalogos.Range(2, colsubproyecto, rowsubproyecto, colsubproyecto), True) : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "RegimenContratacion" : libro.Range(crow + 1, ccol, 50000, ccol).SetDataValidation().List(Catalogos.Range(2, colRegimenContratacion, rowRegimenContratacion, colRegimenContratacion), True) : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Area Geografica" : libro.Range(crow + 1, ccol, 50000, ccol).SetDataValidation().List(Catalogos.Range(2, colAreaGeografica, rowAreaGeografica, colAreaGeografica), True) : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Prima vacacional" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Dias aguinaldo" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Metodo Pago" : libro.Range(crow + 1, ccol, 50000, ccol).SetDataValidation().List(Catalogos.Range(2, colmetodopago, rowmetodopago, colmetodopago), True) : ccol = ccol + 1
|
||||
|
||||
|
||||
|
||||
|
||||
libro.Range(crow, 1, crow, ccol - 1).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189))
|
||||
libro.Range(crow, 1, crow, ccol - 1).Style.Font.FontColor = ClosedXML.Excel.XLColor.White
|
||||
|
||||
Catalogos.ColumnsUsed().AdjustToContents()
|
||||
libro.ColumnsUsed().AdjustToContents()
|
||||
'AreaGeografica ABC
|
||||
'GlobalDTMetodosPago MetodoPago" DataValueField="CveMetodoPago
|
||||
|
||||
|
||||
Dim fs As System.IO.Stream = New System.IO.MemoryStream()
|
||||
wb.SaveAs(fs)
|
||||
fs.Position = 0
|
||||
Dim memoryStream As System.IO.MemoryStream = New System.IO.MemoryStream()
|
||||
|
||||
Using input As System.IO.Stream = fs
|
||||
input.CopyTo(memoryStream)
|
||||
End Using
|
||||
|
||||
memoryStream.Position = 0
|
||||
Response.Clear()
|
||||
Response.Buffer = True
|
||||
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
Response.AddHeader("content-disposition", String.Format("attachment;filename=SaldosInicialesRH.xlsx", ""))
|
||||
Response.BinaryWrite(memoryStream.ToArray())
|
||||
Response.[End]()
|
||||
'Using nom As ClsNominas = New ClsNominas()
|
||||
|
||||
' If nom.ReportedePercepcionesDeduccionesGet(UsuarioActual.CveEmpresa, fechai, fechaf, 4) Then
|
||||
' Dim dt As DataTable = nom.DTSetResultados.Tables(0)
|
||||
' Dim libro = wb.AddWorksheet(nom.DTSetResultados.Tables(0), "Percepciones y deducciones")
|
||||
' libro.Tables.FirstOrDefault().Theme = ClosedXML.Excel.XLTableTheme.None
|
||||
' Dim crow As Integer = 1
|
||||
|
||||
' For Each item As DataRow In dt.Rows
|
||||
' crow += 1
|
||||
|
||||
' Select Case item("Grupoid").ToString()
|
||||
' Case "10"
|
||||
' libro.Range(crow, 1, crow, 9).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(184, 204, 228))
|
||||
' Case "8", "11"
|
||||
' libro.Range(crow, 1, crow, 9).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189))
|
||||
' libro.Range(crow, 1, crow, 11).Style.Font.FontColor = ClosedXML.Excel.XLColor.White
|
||||
' Case "6"
|
||||
' libro.Range(crow, 1, crow, 9).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(216, 228, 188))
|
||||
' Case "5", "7"
|
||||
' libro.Range(crow, 1, crow, 9).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(155, 187, 89))
|
||||
' libro.Range(crow, 1, crow, 9).Style.Font.FontColor = ClosedXML.Excel.XLColor.White
|
||||
' Case "2"
|
||||
' Case "1", "3"
|
||||
' libro.Range(crow, 1, crow, 9).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(75, 172, 198))
|
||||
' libro.Range(crow, 1, crow, 9).Style.Font.FontColor = ClosedXML.Excel.XLColor.White
|
||||
' End Select
|
||||
' Next
|
||||
|
||||
' libro.Range(2, 4, crow, 9).Style.NumberFormat.Format = "$##,###,###,0.00"
|
||||
' libro.Range(2, 4, crow, 9).DataType = ClosedXML.Excel.XLDataType.Number
|
||||
' libro.Column(1).Delete()
|
||||
' libro.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 percepciones y deducciones del {fechai} al {fechaf}"
|
||||
' libro.Range(1, 2, 2, 6).Style.Font.SetBold(True)
|
||||
' libro.Range(1, 2, 2, 6).Style.Font.SetFontSize(16)
|
||||
' libro.Range(2, 2, 2, 6).Style.Font.SetFontSize(14)
|
||||
' libro.Range(1, 2, 2, 6).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center
|
||||
' libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{DateTime.Now}"
|
||||
' libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{DateTime.Now}"
|
||||
' End If
|
||||
'End Using
|
||||
End Sub
|
||||
End Class
|
||||
S
|
||||
79
RH/DiasFestivos.aspx
Normal file
79
RH/DiasFestivos.aspx
Normal file
@@ -0,0 +1,79 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="DiasFestivos.aspx.cs" Inherits="RH_DiasFestivos" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
Catalogo de días festivos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
<li ><asp:LinkButton ID = "LnkAgregarDiasFestivos" OnClick ="LnkAgregarDias_Click" runat = "server" ><i class="fa fa-plus"></i>días festivos</asp:LinkButton></li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
<asp:UpdatePanel ID="upDatosDias" runat ="server" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVDiasFestivos" runat="server" GridLines="None" CssClass ="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
|
||||
datakeynames="CveDiainabil,Fecha,CveEmpresa">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblfecha" runat="server" Text='<%# Eval("Fecha","{0:dd/MM/yyyy}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:TemplateField ItemStyle-Width="25">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton data-toggle="tooltip" title="Editar" ID="LnkEditar" OnClick="LnkEditarDias_Click" CssClass="btn btn-circle btn-sm green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField ItemStyle-Width="25">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" OnClick="LnkEliminarDias_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el DiasFestivos?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="DModalDiasFestivos" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UPModalDias" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content" >
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title"><asp:Literal ID="ltlDiastitulo" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4 truncate ">Fecha</div>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; ">
|
||||
<asp:TextBox ID="TxtDiasfecha" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn "> <asp:LinkButton ID="LnkDiasfecha" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> </span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEDiasfecha" runat="server" TargetControlID="TxtDiasfecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEEDiasfecha" TargetControlID="TxtDiasfecha" PopupButtonID="LnkDiasfecha" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvDiasfecha" runat="server" ControlToValidate="TxtDiasfecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="VGMDias"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoDiasfecha" runat="server" HighlightCssClass="vco" TargetControlID="RfvDiasfecha"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer ">
|
||||
<div class="modal-btn">
|
||||
<asp:Button ID="BtnDiasADD" OnClick="BtnDiasADD_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGMDias" />
|
||||
<%--<asp:Button ID="BtnDiasEdit" OnClick="BtnDiasEdit_Click" runat="server" Text="Actualizar" CssClass="btn btn-primary" ValidationGroup="VGMDias" ></asp:Button>--%>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
74
RH/DiasFestivos.aspx.cs
Normal file
74
RH/DiasFestivos.aspx.cs
Normal file
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
|
||||
public partial class RH_DiasFestivos : ClsPaginas
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDiasFestivos();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void CargaDiasFestivos()
|
||||
{
|
||||
ClsRH ObjDias = new ClsRH();
|
||||
ObjDias.DiasFestivosGet(UsuarioActual.CveEmpresa );
|
||||
GVDiasFestivos.DataSource = ObjDias.DtResultados;
|
||||
ObjDias.Dispose();
|
||||
GVDiasFestivos.DataBind();
|
||||
upDatosDias.Update();
|
||||
}
|
||||
protected void LimpiaDiasFestivos()
|
||||
{
|
||||
TxtDiasfecha.Text = "";
|
||||
UPModalDias.Update();
|
||||
}
|
||||
protected void LnkAgregarDias_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.RegistraScript("$('#DModalDiasFestivos').modal();");
|
||||
LimpiaDiasFestivos();
|
||||
BtnDiasADD.Visible = true;
|
||||
UPModalDias.Update();
|
||||
}
|
||||
protected void BtnDiasADD_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
DateTime fecha = TxtDiasfecha.Text.ToDate();
|
||||
ClsRH ObjDias = new ClsRH();
|
||||
bool Continuar = ObjDias.DiasFestivosAdd(fecha, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario);
|
||||
ObjDias.Dispose();
|
||||
if (Continuar)
|
||||
{
|
||||
this.RegistraScript("$('#DModalDiasFestivos').modal('hide');");
|
||||
LimpiaDiasFestivos();
|
||||
CargaDiasFestivos();
|
||||
UPModalDias.Update();
|
||||
this.Alert("El dìa festivos se ha agregado");
|
||||
}
|
||||
}
|
||||
protected void LnkEliminarDias_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
DateTime fecha = gvRow.DataKey("CveDiainabil").ToDateTime();
|
||||
ClsRH ObjDias = new ClsRH();
|
||||
bool Continuar = ObjDias.DiasFestivosRemove(fecha, UsuarioActual.CveEmpresa);
|
||||
ObjDias.Dispose();
|
||||
if (Continuar)
|
||||
{
|
||||
CargaDiasFestivos();
|
||||
this.Alert("El dìa festivos se ha Eliminado");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
12
vwd.webinfo
12
vwd.webinfo
@@ -228,6 +228,18 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user