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
|
||||
|
||||
@@ -852,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")
|
||||
@@ -870,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
|
||||
@@ -2182,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()
|
||||
@@ -2196,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)
|
||||
@@ -4681,7 +4682,6 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Inventarios/EntregasPorRealizar.aspx".ToUpper(), 728)
|
||||
PaginaDict.Add("/Inventarios/CatAlmacenClasificacionSecciones.aspx".ToUpper(), 764)
|
||||
PaginaDict.Add("/Inventarios/ReconstruirCostos.aspx".ToUpper(), 764)
|
||||
PaginaDict.Add("/Inventarios/RecepcionDevolucion.aspx".ToUpper(), 696)
|
||||
|
||||
|
||||
#End Region
|
||||
@@ -4802,6 +4802,7 @@ Public Class ClsPaginas
|
||||
#End Region
|
||||
#Region "Planeacion"
|
||||
'PLANEACIÓN
|
||||
PaginaDict.Add("/Planeacion/CatSucursales.aspx".ToUpper(), 17)
|
||||
PaginaDict.Add("/Planeacion/Sucursal.aspx".ToUpper(), 17)
|
||||
PaginaDict.Add("/Planeacion/CatProyectos.aspx".ToUpper(), 34)
|
||||
PaginaDict.Add("/Planeacion/CatSubProyectos.aspx".ToUpper(), 35)
|
||||
@@ -5941,19 +5942,6 @@ Public Class ClsPaginas
|
||||
Dim TipoDocumentoRef As String = ""
|
||||
Dim AplicaPagare As String = "1"
|
||||
|
||||
Dim RFCReceptor As String = ""
|
||||
|
||||
If String.IsNullOrEmpty(Vta.RFCReceptor) Then
|
||||
RFCReceptor = Vta.Cliente.RFC
|
||||
If Vta.FacturarSucursal Then
|
||||
If Vta.ClienteSucursal IsNot Nothing Then
|
||||
RFCReceptor = Vta.ClienteSucursal.RFC
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
RFCReceptor = Vta.RFCReceptor
|
||||
End If
|
||||
|
||||
Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
|
||||
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
|
||||
Dim ImgCBB As String '= String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
|
||||
@@ -6083,7 +6071,7 @@ Public Class ClsPaginas
|
||||
'Si no tiene CBB, SE GENERA
|
||||
If Not ImagenCBB.Exists Then
|
||||
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
|
||||
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, Vta.Cliente.RFC, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
|
||||
End If
|
||||
ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
|
||||
|
||||
@@ -6098,7 +6086,7 @@ Public Class ClsPaginas
|
||||
|
||||
'CLIENTE
|
||||
params.Add(New CrystalParametro("ClienteCodigo", Vta.Cliente.Codigo))
|
||||
params.Add(New CrystalParametro("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso RFCReceptor = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
|
||||
params.Add(New CrystalParametro("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
|
||||
params.Add(New CrystalParametro("ClienteDireccion", ClienteDireccion))
|
||||
params.Add(New CrystalParametro("ClienteLugar", ClienteLugar))
|
||||
|
||||
@@ -6130,7 +6118,7 @@ Public Class ClsPaginas
|
||||
params.Add(New CrystalParametro("SelloSAT", Vta.SelloSAT))
|
||||
|
||||
params.Add(New CrystalParametro("QR", ImgCBB))
|
||||
params.Add(New CrystalParametro("ClienteRFC", RFCReceptor))
|
||||
params.Add(New CrystalParametro("ClienteRFC", Vta.Cliente.RFC))
|
||||
params.Add(New CrystalParametro("FormaPago", Vta.FormaPagoText))
|
||||
params.Add(New CrystalParametro("Moneda", Vta.Moneda))
|
||||
params.Add(New CrystalParametro("TipoCambio", Vta.TipoCambio.ToString))
|
||||
@@ -6163,8 +6151,7 @@ Public Class ClsPaginas
|
||||
params.Add(New CrystalParametro("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal))
|
||||
Else
|
||||
params.Add(New CrystalParametro("ClienteContactoMail", Vta.Cliente.MailCotizacion))
|
||||
params.Add(New CrystalParametro("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.Telefono.Length > 6, Vta.Cliente.Telefono, Vta.TelefonoGenerico)))
|
||||
|
||||
params.Add(New CrystalParametro("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", Vta.TelefonoGenerico, Vta.Cliente.Telefono)))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(17) Then
|
||||
@@ -6466,18 +6453,7 @@ Public Class ClsPaginas
|
||||
Dim NombreArchivoDescarga As String = ""
|
||||
Dim TipoDocumento As String = ""
|
||||
Dim TipoDocumentoRef As String = ""
|
||||
Dim RFCReceptor As String = ""
|
||||
|
||||
If String.IsNullOrEmpty(Vta.RFCReceptor) Then
|
||||
RFCReceptor = Vta.Cliente.RFC
|
||||
If Vta.FacturarSucursal Then
|
||||
If Vta.ClienteSucursal IsNot Nothing Then
|
||||
RFCReceptor = Vta.ClienteSucursal.RFC
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
RFCReceptor = Vta.RFCReceptor
|
||||
End If
|
||||
|
||||
Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
|
||||
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
|
||||
@@ -6632,7 +6608,7 @@ Public Class ClsPaginas
|
||||
'Si no tiene CBB, SE GENERA
|
||||
If Not ImagenCBB.Exists AndAlso Vta.CveCliente.ToEntero > 0 Then
|
||||
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
|
||||
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, Vta.Cliente.RFC, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
|
||||
End If
|
||||
ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
|
||||
|
||||
@@ -6650,17 +6626,17 @@ Public Class ClsPaginas
|
||||
'CLIENTE
|
||||
If Vta.CveCliente.ToEntero > 0 Or Vta.CveEmpresaCRM.ToEntero > 0 Then
|
||||
params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo))
|
||||
params.Add(New ReportParameter("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso RFCReceptor = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
|
||||
params.Add(New ReportParameter("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
|
||||
params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion))
|
||||
params.Add(New ReportParameter("ClienteLugar", ClienteLugar))
|
||||
params.Add(New ReportParameter("ClienteRFC", RFCReceptor))
|
||||
params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC))
|
||||
End If
|
||||
If Vta.CveEmpresaCRM.ToEntero > 0 Then
|
||||
params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo))
|
||||
params.Add(New ReportParameter("ClienteNombre", Vta.Cliente.Nombre))
|
||||
params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion))
|
||||
params.Add(New ReportParameter("ClienteLugar", ClienteLugar))
|
||||
params.Add(New ReportParameter("ClienteRFC", RFCReceptor))
|
||||
params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC))
|
||||
End If
|
||||
|
||||
'TOTALES
|
||||
@@ -6743,7 +6719,7 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal))
|
||||
ElseIf Vta.CveCliente.ToEntero > 0 Then
|
||||
params.Add(New ReportParameter("ClienteContactoMail", Vta.Cliente.MailCotizacion))
|
||||
params.Add(New ReportParameter("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.Telefono.Length > 6, Vta.Cliente.Telefono, Vta.TelefonoGenerico)))
|
||||
params.Add(New ReportParameter("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.Telefono.Length > 6, Vta.TelefonoGenerico, Vta.Cliente.Telefono)))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(17) Then
|
||||
@@ -7861,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
|
||||
@@ -7881,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 = ""
|
||||
@@ -7961,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
|
||||
|
||||
@@ -8003,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)
|
||||
@@ -8025,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
|
||||
|
||||
@@ -935,7 +935,7 @@ Public Class Timbrado
|
||||
|
||||
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
If Not ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", ObjCFDITimbre.Comprobante.Fecha, Ventas.CveVenta, CvePAC:=1, RFCReceptor:=ObjCFDITimbre.Receptor.RFC) Then
|
||||
If Not ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", ObjCFDITimbre.Comprobante.Fecha, Ventas.CveVenta, CvePAC:=1) Then
|
||||
Retorno = "No se pudo registrar el folio fiscal"
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
@@ -1520,7 +1520,7 @@ Public Class Timbrado
|
||||
If Ventas.CveVenta > 0 Then
|
||||
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", ObjCFDITimbre.Comprobante.Fecha, Ventas.CveVenta, CvePAC:=UsuarioActual.Empresa.CvePAC, RFCReceptor:=ObjCFDITimbre.Receptor.RFC) Then
|
||||
If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", ObjCFDITimbre.Comprobante.Fecha, Ventas.CveVenta, CvePAC:=UsuarioActual.Empresa.CvePAC) Then
|
||||
Retorno = ""
|
||||
Else
|
||||
Retorno = "Error"
|
||||
@@ -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()
|
||||
@@ -2127,7 +2136,7 @@ Public Class Timbrado
|
||||
|
||||
Using ObjVentas As New ClsVentas()
|
||||
|
||||
If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", ObjCFDITimbre.Comprobante.Fecha, Ventas.CveVenta, CvePAC:=CvePACEspecial, RFCReceptor:=ObjCFDITimbre.Receptor.RFC) Then
|
||||
If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", ObjCFDITimbre.Comprobante.Fecha, Ventas.CveVenta, CvePAC:=CvePACEspecial) Then
|
||||
Retorno = ""
|
||||
Else
|
||||
Retorno = "Error"
|
||||
@@ -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"
|
||||
@@ -3820,7 +3829,7 @@ Public Class Timbrado
|
||||
|
||||
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", Now, Ventas.CveVenta, CvePAC:=UsuarioActual.Empresa.CvePAC, RFCReceptor:=ObjCFDITimbre.Receptor.RFC) Then
|
||||
If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", Now, Ventas.CveVenta, CvePAC:=UsuarioActual.Empresa.CvePAC) Then
|
||||
Retorno = ""
|
||||
Else
|
||||
Retorno = "Error"
|
||||
|
||||
@@ -80,9 +80,6 @@
|
||||
<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>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirPoliza" runat="server" Visible="true" OnClick="LnkImprimirPoliza_Click" Style="color: #686868;"><i class="fa fa-print" style="color:#686868;"></i> Imprimir Poliza</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
@@ -410,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>
|
||||
|
||||
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;
|
||||
@@ -77,7 +87,7 @@
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID ="LnkFormatoRenuncia" />
|
||||
<asp:PostBackTrigger ControlID="LnkFormatoRenuncia" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
@@ -108,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 ">
|
||||
@@ -120,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>
|
||||
@@ -151,8 +167,8 @@
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<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="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>
|
||||
@@ -160,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>
|
||||
@@ -233,7 +273,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@@ -278,7 +317,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>
|
||||
@@ -299,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>
|
||||
@@ -349,7 +392,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>
|
||||
@@ -370,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>
|
||||
@@ -381,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">
|
||||
@@ -434,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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
@@ -745,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));
|
||||
|
||||
@@ -824,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);
|
||||
@@ -858,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();
|
||||
@@ -894,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];
|
||||
@@ -903,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)
|
||||
@@ -919,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;
|
||||
@@ -1105,7 +1311,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();
|
||||
@@ -1131,12 +1337,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
}
|
||||
UPDatos.Update();
|
||||
}
|
||||
|
||||
protected void DdlmcConceptos_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void BtnAceptarMC_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -1211,7 +1412,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
loadsobrerecibo(objNomina);
|
||||
}
|
||||
Alert("El cambio se ha guardado correctamente.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
@@ -1227,4 +1428,5 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
@@ -194,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>
|
||||
@@ -254,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>
|
||||
@@ -340,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">
|
||||
@@ -357,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>
|
||||
|
||||
@@ -495,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" />
|
||||
@@ -613,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">
|
||||
@@ -767,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>
|
||||
@@ -788,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>
|
||||
@@ -877,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>
|
||||
@@ -1144,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">
|
||||
|
||||
@@ -1297,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>
|
||||
@@ -1478,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>
|
||||
@@ -1603,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">
|
||||
@@ -1674,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">
|
||||
@@ -1865,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>
|
||||
@@ -2023,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">
|
||||
|
||||
@@ -2066,7 +2228,7 @@
|
||||
<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="VGReporteInicidencia"></asp:RequiredFieldValidator>
|
||||
<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>
|
||||
@@ -2076,7 +2238,7 @@
|
||||
<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="VGReporteInicidencia"></asp:RequiredFieldValidator>
|
||||
<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>
|
||||
@@ -2180,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>
|
||||
@@ -2305,8 +2621,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</asp:GridView>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2380,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">
|
||||
@@ -2411,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>
|
||||
@@ -2463,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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
@@ -5825,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}";
|
||||
@@ -5869,25 +6082,77 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
|
||||
|
||||
protected void LinkButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void LnkrRepPercpDed_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
DateTime fechai = TxtRIFechaInicio.Text.ToDateTime();
|
||||
DateTime fechaf = TxtRIFechaFin.Text.ToDateTime();
|
||||
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.ColumnsUsed().AdjustToContents();
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -5912,4 +6177,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
Response.BinaryWrite(memoryStream.ToArray());
|
||||
Response.End();
|
||||
}
|
||||
|
||||
protected void LnkShowAddVacaciones_Click(object sender, EventArgs e)
|
||||
{
|
||||
LnkSRVacacionesADD.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.GVCalculosSBC tr th:nth-child(n+9):not(:nth-child(n+13)) {
|
||||
.GVCalculosSBC tr th:nth-child(n+6):not(:nth-child(n+10)) {
|
||||
background-color: #a9a9e8 !important;
|
||||
}
|
||||
|
||||
.GVCalculosSBC tr th:nth-child(n+13):not(:nth-child(n+16)) {
|
||||
.GVCalculosSBC tr th:nth-child(n+10):not(:nth-child(n+13)) {
|
||||
background-color: #88d6cd !important;
|
||||
}
|
||||
</style>
|
||||
@@ -88,7 +88,7 @@
|
||||
<ContentTemplate>
|
||||
<table id="tableheader" style="display: none">
|
||||
<tr>
|
||||
<th colspan="8"></th>
|
||||
<th colspan="5"></th>
|
||||
<th colspan="4" style="background-color: #a9a9e8 !important;">Actual</th>
|
||||
<th colspan="3" style="background-color: #88d6cd !important;">Nuevo</th>
|
||||
<th></th>
|
||||
@@ -117,24 +117,9 @@
|
||||
<asp:Label ID="lblfechaInicio" runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Antiguedad">
|
||||
<asp:TemplateField HeaderText="NSS">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblnumeroSS" runat="server" Text='<%# Eval("Antiguedad")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Días aguinaldo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblDiasAguinaldo" runat="server" Text='<%# Eval("NumDiasAguinaldo")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Días vacaciones">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblDiasVacaciones" runat="server" Text='<%# Eval("diasVacaciones")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Prima vacacional">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPrimaVacacional" runat="server" Text='<%# Eval("PorPrimaVacacional","{0:P2}")%>'> </asp:Label>
|
||||
<asp:Label ID="lblnumeroSS" runat="server" Text='<%# Eval("NumeroSS")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo salario">
|
||||
|
||||
@@ -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,22 +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 == TabParteFija)
|
||||
{
|
||||
GVCFija.ExportToExcel("Salario");
|
||||
}
|
||||
if (Tab.ActiveTab == TabParteVariable)
|
||||
{
|
||||
GVPV.ExportToExcel("Salario");
|
||||
}
|
||||
if (Tab.ActiveTab == TabDetalleParteVariable)
|
||||
{
|
||||
GVDetalleParteVariable.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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user