This commit is contained in:
@@ -158,13 +158,13 @@ Public Class LogicNominas
|
||||
Dim drow As DataRow = objNomina.DtResultados.Rows(0)
|
||||
CvePersonal = drow("CvePersonal").ToString().ToEntero()
|
||||
CvePeriodo = drow("CvePeriodo").ToString().ToEntero()
|
||||
If TimbreIndemnizacion Then
|
||||
totalDb = drow("TotalFin").ToString().ToDecimal()
|
||||
subTotalDb = drow("SubTotalFin").ToString().ToDecimal()
|
||||
Else
|
||||
totalDb = drow("Total").ToString().ToDecimal()
|
||||
'If TimbreIndemnizacion Then
|
||||
' totalDb = drow("TotalFin").ToString().ToDecimal()
|
||||
' subTotalDb = drow("SubTotalFin").ToString().ToDecimal()
|
||||
'Else
|
||||
totalDb = drow("Total").ToString().ToDecimal()
|
||||
subTotalDb = drow("SubTotal").ToString().ToDecimal()
|
||||
End If
|
||||
'End If
|
||||
cfdi.Nomina.Antiguedad = drow("Antiguedad").ToString().ToEntero()
|
||||
cfdi.Nomina.UltimoSueldoOrdinario = drow("UltimoSueldoOrdinario").ToString().ToDecimal()
|
||||
Serie = objNomina.Serie
|
||||
@@ -176,15 +176,15 @@ Public Class LogicNominas
|
||||
ClaveBanco = drow("ClaveBanco").ToString()
|
||||
BancoNumCuenta = drow("BancoNumCuenta").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
|
||||
'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
|
||||
'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
|
||||
End If
|
||||
@@ -222,19 +222,19 @@ Public Class LogicNominas
|
||||
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 AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) " ' AND SATCveConcepto NOT IN ('022', '023','025')
|
||||
If TimbreIndemnizacion Then
|
||||
filtropercepciones = " Tipo = 'P' AND SATCveConcepto IN ('022', '023','025') AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) "
|
||||
End If
|
||||
'If TimbreIndemnizacion Then
|
||||
' filtropercepciones = " Tipo = 'P' AND SATCveConcepto IN ('022', '023','025') AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) "
|
||||
'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) " 'AND CveSistema <> 47
|
||||
If TimbreIndemnizacion Then
|
||||
filtrodeduc = " Tipo = 'D' AND CveSistema =47"
|
||||
End If
|
||||
'If TimbreIndemnizacion Then
|
||||
' filtrodeduc = " Tipo = 'D' AND CveSistema =47"
|
||||
'End If
|
||||
DtDeducciones = objNomina.DtResultados.FiltraParametros(filtrodeduc)
|
||||
If Not TimbreIndemnizacion Then
|
||||
DtOtrosPagos = objNomina.DtResultados.FiltraParametros(" TipoConceptoSAT='O'")
|
||||
DtOtrosPagos = objNomina.DtResultados.FiltraParametros(" TipoConceptoSAT='O'")
|
||||
'If Not TimbreIndemnizacion Then
|
||||
|
||||
End If
|
||||
'End If
|
||||
Dim disrcomp As DataRow = DtOtrosPagos.FiltroPrimero("Codigo ='D999'")
|
||||
For Each drow As DataRow In DtDeducciones.Rows
|
||||
If drow("Codigo").ToString() = "D038" Then
|
||||
@@ -269,19 +269,19 @@ Public Class LogicNominas
|
||||
PeriodicidadPago = DrPeriodo("ClavePerioricidadPago").ToString()
|
||||
'AntiguedadSemanas = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, FechaFin).ToEntero()
|
||||
|
||||
If Not TimbreIndemnizacion Then
|
||||
FechaInicio = DrPeriodo("FechaInicio").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
|
||||
' 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 Not TimbreIndemnizacion Then
|
||||
If continuar AndAlso objPersonal.GetAsistencias(CvePersonal, -1, -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, -1, FechaInicio, FechaFin, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim Asistencias As Integer = objPersonal.DtResultados.SUM("AplicaAsistencia").ToEntero()
|
||||
'If Asistencias > 15 Then
|
||||
@@ -297,14 +297,14 @@ Public Class LogicNominas
|
||||
Else
|
||||
continuar = False
|
||||
End If
|
||||
Else
|
||||
DiasPagados = 1
|
||||
DiasIncapacitados = 0
|
||||
End If
|
||||
If continuar AndAlso DiasIncapacitados > 0 Then
|
||||
If Not TimbreIndemnizacion Then
|
||||
'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.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})
|
||||
@@ -314,8 +314,8 @@ Public Class LogicNominas
|
||||
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 If
|
||||
End Using
|
||||
End Using
|
||||
|
||||
@@ -447,7 +447,7 @@ Public Class LogicNominas
|
||||
|
||||
Next
|
||||
End If
|
||||
If Not TimbreIndemnizacion AndAlso CveRegimenContratacion.ToEntero() = 2 AndAlso ((ObjOtrosPagos.FirstOrDefault(Function(m) m.TipoOtroPago.ToEntero().Contiene(2, 7, 8))) Is Nothing) Then
|
||||
If 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})
|
||||
|
||||
@@ -714,6 +714,33 @@ Partial Class RH_Personal
|
||||
#End Region
|
||||
|
||||
|
||||
Public Property GlobalDTSubProyectosUsuariosB(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTSubProyectosUsuarios-{CveEmpresa}"
|
||||
HttpContext.Current.Application(AppNombre) = Nothing
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing OrElse DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0 Then
|
||||
Dim ObjSubProyectos As New ClsSubProyectos()
|
||||
If ObjSubProyectos.GetSubProyectosUsuarios(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjSubProyectos.DtResultados
|
||||
ObjSubProyectos.Dispose()
|
||||
End If
|
||||
Dim filtros As New List(Of String)
|
||||
If CveProyecto <> -1 Then filtros.Add($"CveProyecto = {CveProyecto}")
|
||||
If CveSubProyecto <> -1 Then filtros.Add($"CveSubProyecto = {CveSubProyecto}")
|
||||
If CveUsuario <> -1 Then filtros.Add($"CveUsuario = {CveUsuario}")
|
||||
If CveEstatus <> -1 Then filtros.Add($"CveEstatus = {CveEstatus}")
|
||||
If filtros.Count > 0 Then
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTSubProyectosUsuariosB = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTSubProyectosUsuariosB = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTSubProyectosUsuarios-{CveEmpresa}"
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Private Shared Function sendURL(ByVal URL As String, Optional Methodo As String = "POST", Optional Cookie As String = "", Optional maxTimeMilliseconds As Integer = 120000) As String
|
||||
Dim resultado As String = ""
|
||||
|
||||
@@ -856,6 +883,7 @@ Partial Class RH_Personal
|
||||
'Configuración
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
Dim dt = GlobalDTSubProyectosUsuariosB(1360, -1, 172, -1, -1)
|
||||
If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
|
||||
pnlSalarioIMSS.Visible = False
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user