This commit is contained in:
@@ -158,13 +158,13 @@ Public Class LogicNominas
|
|||||||
Dim drow As DataRow = objNomina.DtResultados.Rows(0)
|
Dim drow As DataRow = objNomina.DtResultados.Rows(0)
|
||||||
CvePersonal = drow("CvePersonal").ToString().ToEntero()
|
CvePersonal = drow("CvePersonal").ToString().ToEntero()
|
||||||
CvePeriodo = drow("CvePeriodo").ToString().ToEntero()
|
CvePeriodo = drow("CvePeriodo").ToString().ToEntero()
|
||||||
If TimbreIndemnizacion Then
|
'If TimbreIndemnizacion Then
|
||||||
totalDb = drow("TotalFin").ToString().ToDecimal()
|
' totalDb = drow("TotalFin").ToString().ToDecimal()
|
||||||
subTotalDb = drow("SubTotalFin").ToString().ToDecimal()
|
' subTotalDb = drow("SubTotalFin").ToString().ToDecimal()
|
||||||
Else
|
'Else
|
||||||
totalDb = drow("Total").ToString().ToDecimal()
|
totalDb = drow("Total").ToString().ToDecimal()
|
||||||
subTotalDb = drow("SubTotal").ToString().ToDecimal()
|
subTotalDb = drow("SubTotal").ToString().ToDecimal()
|
||||||
End If
|
'End If
|
||||||
cfdi.Nomina.Antiguedad = drow("Antiguedad").ToString().ToEntero()
|
cfdi.Nomina.Antiguedad = drow("Antiguedad").ToString().ToEntero()
|
||||||
cfdi.Nomina.UltimoSueldoOrdinario = drow("UltimoSueldoOrdinario").ToString().ToDecimal()
|
cfdi.Nomina.UltimoSueldoOrdinario = drow("UltimoSueldoOrdinario").ToString().ToDecimal()
|
||||||
Serie = objNomina.Serie
|
Serie = objNomina.Serie
|
||||||
@@ -176,15 +176,15 @@ Public Class LogicNominas
|
|||||||
ClaveBanco = drow("ClaveBanco").ToString()
|
ClaveBanco = drow("ClaveBanco").ToString()
|
||||||
BancoNumCuenta = drow("BancoNumCuenta").ToString()
|
BancoNumCuenta = drow("BancoNumCuenta").ToString()
|
||||||
|
|
||||||
If TimbreIndemnizacion Then
|
'If TimbreIndemnizacion Then
|
||||||
cfdi.Timbrado = drow("SeTimbroFiniquitoVal").ToString().ToEntero() = 1
|
' cfdi.Timbrado = drow("SeTimbroFiniquitoVal").ToString().ToEntero() = 1
|
||||||
cfdi.IStimbreFiniquito = True
|
' cfdi.IStimbreFiniquito = True
|
||||||
Serie = $"{objNomina.Serie}F"
|
' Serie = $"{objNomina.Serie}F"
|
||||||
Else
|
'Else
|
||||||
cfdi.Timbrado = drow("SeTimbroVal").ToString().ToEntero() = 1
|
cfdi.Timbrado = drow("SeTimbroVal").ToString().ToEntero() = 1
|
||||||
cfdi.IStimbreFiniquito = False
|
cfdi.IStimbreFiniquito = False
|
||||||
End If
|
'End If
|
||||||
Else
|
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
|
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
|
continuar = False
|
||||||
End If
|
End If
|
||||||
@@ -222,19 +222,19 @@ Public Class LogicNominas
|
|||||||
If continuar AndAlso objNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then
|
If continuar AndAlso objNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then
|
||||||
If objNomina.DtResultados.Rows.Count > 0 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')
|
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
|
'If TimbreIndemnizacion Then
|
||||||
filtropercepciones = " Tipo = 'P' AND SATCveConcepto IN ('022', '023','025') AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) "
|
' filtropercepciones = " Tipo = 'P' AND SATCveConcepto IN ('022', '023','025') AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) "
|
||||||
End If
|
'End If
|
||||||
DtPercepciones = objNomina.DtResultados.FiltraParametros(filtropercepciones)
|
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
|
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
|
'If TimbreIndemnizacion Then
|
||||||
filtrodeduc = " Tipo = 'D' AND CveSistema =47"
|
' filtrodeduc = " Tipo = 'D' AND CveSistema =47"
|
||||||
End If
|
'End If
|
||||||
DtDeducciones = objNomina.DtResultados.FiltraParametros(filtrodeduc)
|
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'")
|
Dim disrcomp As DataRow = DtOtrosPagos.FiltroPrimero("Codigo ='D999'")
|
||||||
For Each drow As DataRow In DtDeducciones.Rows
|
For Each drow As DataRow In DtDeducciones.Rows
|
||||||
If drow("Codigo").ToString() = "D038" Then
|
If drow("Codigo").ToString() = "D038" Then
|
||||||
@@ -269,19 +269,19 @@ Public Class LogicNominas
|
|||||||
PeriodicidadPago = DrPeriodo("ClavePerioricidadPago").ToString()
|
PeriodicidadPago = DrPeriodo("ClavePerioricidadPago").ToString()
|
||||||
'AntiguedadSemanas = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, FechaFin).ToEntero()
|
'AntiguedadSemanas = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, FechaFin).ToEntero()
|
||||||
|
|
||||||
If Not TimbreIndemnizacion Then
|
'If Not TimbreIndemnizacion Then
|
||||||
FechaInicio = DrPeriodo("FechaInicio").ToString().ToDate()
|
FechaInicio = DrPeriodo("FechaInicio").ToString().ToDate()
|
||||||
TipoNomina = If(objNomina.CveTipoPeriodo = 6, "E", "O")
|
TipoNomina = If(objNomina.CveTipoPeriodo = 6, "E", "O")
|
||||||
Else
|
'Else
|
||||||
FechaInicio = FechaFin
|
' FechaInicio = FechaFin
|
||||||
TipoNomina = "E"
|
' TipoNomina = "E"
|
||||||
End If
|
'End If
|
||||||
Else
|
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
|
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
|
continuar = False
|
||||||
End If
|
End If
|
||||||
If Not TimbreIndemnizacion Then
|
'If Not TimbreIndemnizacion Then
|
||||||
If continuar AndAlso objPersonal.GetAsistencias(CvePersonal, -1, -1, -1, -1, -1, -1, FechaInicio, FechaFin, UsuarioActual.CveEmpresa) 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()
|
Dim Asistencias As Integer = objPersonal.DtResultados.SUM("AplicaAsistencia").ToEntero()
|
||||||
'If Asistencias > 15 Then
|
'If Asistencias > 15 Then
|
||||||
@@ -297,14 +297,14 @@ Public Class LogicNominas
|
|||||||
Else
|
Else
|
||||||
continuar = False
|
continuar = False
|
||||||
End If
|
End If
|
||||||
Else
|
'Else
|
||||||
DiasPagados = 1
|
' DiasPagados = 1
|
||||||
DiasIncapacitados = 0
|
' DiasIncapacitados = 0
|
||||||
End If
|
'End If
|
||||||
If continuar AndAlso DiasIncapacitados > 0 Then
|
If continuar AndAlso DiasIncapacitados > 0 Then
|
||||||
If Not TimbreIndemnizacion 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
|
If objNomina.DtResultados IsNot Nothing AndAlso objNomina.DtResultados.Rows.Count > 0 Then
|
||||||
For Each dr As DataRow In objNomina.DtResultados.Rows
|
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})
|
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
|
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
|
continuar = False
|
||||||
End If
|
End If
|
||||||
|
'End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
End Using
|
End Using
|
||||||
End Using
|
End Using
|
||||||
|
|
||||||
@@ -447,7 +447,7 @@ Public Class LogicNominas
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
End If
|
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
|
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})
|
.Clave = "D051", .Concepto = "Subs al Empleo acreditado", .Importe = 0D, .Subsidiocausado = 0D})
|
||||||
|
|||||||
@@ -714,6 +714,33 @@ Partial Class RH_Personal
|
|||||||
#End Region
|
#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
|
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 = ""
|
Dim resultado As String = ""
|
||||||
|
|
||||||
@@ -856,6 +883,7 @@ Partial Class RH_Personal
|
|||||||
'Configuración
|
'Configuración
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
Dim dt = GlobalDTSubProyectosUsuariosB(1360, -1, 172, -1, -1)
|
||||||
If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
|
If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
|
||||||
pnlSalarioIMSS.Visible = False
|
pnlSalarioIMSS.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user