From 8a31b35fbcbd072208281e442643bc236d20ea0a Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Mon, 9 Dec 2019 17:14:51 -0700 Subject: [PATCH 1/9] Indice de rotacion de personal, colorear agrupaciones --- RH/CatPersonalRequerido.aspx.vb | 1 + RH/RepIndiceRotacionPersonal.aspx | 3 ++- RH/RepIndiceRotacionPersonal.aspx.vb | 18 +++++++++++------- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/RH/CatPersonalRequerido.aspx.vb b/RH/CatPersonalRequerido.aspx.vb index a4caefa1a..f7c42d6bf 100644 --- a/RH/CatPersonalRequerido.aspx.vb +++ b/RH/CatPersonalRequerido.aspx.vb @@ -99,6 +99,7 @@ Partial Class RH_CatPersonalRequerido End Sub Private Sub CargaDepartamento() + DdlDepartamento.Items.Clear() DdlDepartamento.DataSource = GlobalDTDepartamentos.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) DdlDepartamento.DataBind() End Sub diff --git a/RH/RepIndiceRotacionPersonal.aspx b/RH/RepIndiceRotacionPersonal.aspx index 8a5eb11c5..7427349f3 100644 --- a/RH/RepIndiceRotacionPersonal.aspx +++ b/RH/RepIndiceRotacionPersonal.aspx @@ -105,7 +105,8 @@ - + diff --git a/RH/RepIndiceRotacionPersonal.aspx.vb b/RH/RepIndiceRotacionPersonal.aspx.vb index 569465a6a..080918e61 100644 --- a/RH/RepIndiceRotacionPersonal.aspx.vb +++ b/RH/RepIndiceRotacionPersonal.aspx.vb @@ -108,7 +108,8 @@ Partial Class Ventas_RepIndiceRotacionPersonal Protected Sub GVRegDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVRegDatos.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then + If e.Row.RowType = DataControlRowType.DataRow Then + If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then Dim sPorcentaje As String = e.Row.DBCampo("IRP").Trim @@ -124,12 +125,15 @@ Partial Class Ventas_RepIndiceRotacionPersonal e.Row.FCLabel("LblIrp").CssClass = "label label-success" ElseIf (porcentaje > 15.0 And porcentaje <= 30.0) Then e.Row.FCLabel("LblIrp").CssClass = "label label-warning" - End If - - - - - End If + End If + + End If + + If e.Row.DataKey("SubProyecto").ToString.Trim = "" Then + e.Row.CssClass = "SubTotales" + ' e.Row.Attributes.Add("class", "SubTotales") + End If + End If From d5b50b5f786eb0251430b4ccdb9a46c2785fb46e Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Wed, 11 Dec 2019 06:32:06 -0700 Subject: [PATCH 2/9] --- App_Code/ClsNominas.vb | 115 +++++++++++++++ App_Code/ClsRH.vb | 18 ++- Nomina/Finiquito.aspx | 2 +- Nomina/Nomina2.aspx | 176 +++++++++++++++++++++-- Nomina/Nomina2.aspx.cs | 189 +++++++++++++++++++++++-- Nomina/ReportePTU.aspx.vb | 10 +- RH/CatAsistenciasInasistencias.aspx | 92 +++++++++--- RH/CatAsistenciasInasistencias.aspx.vb | 44 +++++- 8 files changed, 592 insertions(+), 54 deletions(-) diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index a98a423b0..5dbc2169f 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -172,6 +172,25 @@ Public Class ClsNominas #Region "ClsNominas_Nominas" + Public Function GetCalculoAguinaldo(ejercicio As Int32, cveEmpresa As Int32, importe As Double, CveTipoPeriodo As Integer, CvePeriodo As Integer) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_NomCalcularAguinaldo", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@Ejercicio", SqlDbType.Int).Value = ejercicio + .Add("@Importe", SqlDbType.Float).Value = importe + .Add("@CveTipoPeriodo", SqlDbType.Float).Value = CveTipoPeriodo + .Add("@CvePeriodo", SqlDbType.Float).Value = CvePeriodo + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al Realizar el calculo del Aguinaldo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function GetCalculoUtilidades(ejercicio As Int32, cveEmpresa As Int32, importe As Double, importeA As Double) As Boolean Dim retorno As Boolean = False DataAdapter("PA_NomCalcularUtilidades", CommandType.StoredProcedure) @@ -1890,6 +1909,102 @@ Public Class ClsNominas End Try Return retorno End Function +#Region "MovtosPermanentes" + + Public Function GetMovtoPermanente(CveEmpresa As Int32, CvePersonal As Integer) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_GetMovtoPermanente", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al obtener los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al obtener los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_AddMovtoPermanente", CommandType.StoredProcedure) + + With SqlAdapter.SelectCommand.Parameters + .Add("@cveConcepto", SqlDbType.Int).Value = (cveConcepto) + .Add("@cvePersonal", SqlDbType.Int).Value = (cvePersonal) + .Add("@descripcion", SqlDbType.VarChar).Value = (descripcion) + .Add("@tipoDescuento", SqlDbType.Int).Value = (tipoDescuento) + .Add("@valor", SqlDbType.Float).Value = (valor) + .Add("@vecesAplicar", SqlDbType.Int).Value = (vecesAplicar) + .Add("@montoLimite", SqlDbType.Decimal).Value = (montoLimite) + .Add("@fechaInicioAplicacion", SqlDbType.VarChar).Value = (fechaInicioAplicacion) + .Add("@estatus", SqlDbType.Bit).Value = (estatus) + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al agregar los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al agregar los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function UpMovtoPermanente(cveMovtoPermanente As Int32, cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_UpMovtoPermanente", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@cveMovtoPermanente", SqlDbType.Int).Value = (cveMovtoPermanente) + .Add("@cveConcepto", SqlDbType.Int).Value = (cveConcepto) + .Add("@cvePersonal", SqlDbType.Int).Value = (cvePersonal) + .Add("@descripcion", SqlDbType.VarChar).Value = (descripcion) + .Add("@tipoDescuento", SqlDbType.Int).Value = (tipoDescuento) + .Add("@valor", SqlDbType.Float).Value = (valor) + .Add("@vecesAplicar", SqlDbType.Int).Value = (vecesAplicar) + .Add("@montoLimite", SqlDbType.Decimal).Value = (montoLimite) + .Add("@fechaInicioAplicacion", SqlDbType.VarChar).Value = (fechaInicioAplicacion) + .Add("@estatus", SqlDbType.Bit).Value = (estatus) + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al agregar los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al agregar los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function RemoveMovtoPermanente(cveMovtoPermanente As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_RemoveMovtoPermanente", CommandType.StoredProcedure) + + With SqlAdapter.SelectCommand.Parameters + .Add("@cveMovtoPermanente", SqlDbType.Int).Value = (cveMovtoPermanente) + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al agregar los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al agregar los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function +#End Region + #Region "IDisposable Support" ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 022ef5ff0..b072d702b 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -131,7 +131,8 @@ Public Class ClsRH Return Retorno End Function - Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer, + chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_RH_AsistenciasInasistenciasAdd") @@ -143,6 +144,12 @@ Public Class ClsRH .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@AplicaVacacion", SqlDbType.Bit).Value = chkAplicaVacacion + .Add("@AplicaIncapacidad", SqlDbType.Bit).Value = chkAplicaIncapacidad + .Add("@AplicaRetardo", SqlDbType.Bit).Value = chkAplicaRetardo + .Add("@AplicaAguinaldo", SqlDbType.Bit).Value = chkAplicaAguinaldo + .Add("@AplicaUtilidades", SqlDbType.Bit).Value = chkAplicaUtilidades + End With Try @@ -161,7 +168,8 @@ Public Class ClsRH Return Retorno End Function - Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer) As Boolean + Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer, +chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_RH_AsistenciasInasistenciasUpdate") @@ -172,6 +180,12 @@ Public Class ClsRH .Add("@AplicaAsistencia", SqlDbType.Bit).Value = AplicaAsistencia .Add("@Estatus", SqlDbType.Bit).Value = Estatus .Add("@CveAsistenciasInasistencias", SqlDbType.Int).Value = CveAI + + .Add("@AplicaVacacion", SqlDbType.Bit).Value = chkAplicaVacacion + .Add("@AplicaIncapacidad", SqlDbType.Bit).Value = chkAplicaIncapacidad + .Add("@AplicaRetardo", SqlDbType.Bit).Value = chkAplicaRetardo + .Add("@AplicaAguinaldo", SqlDbType.Bit).Value = chkAplicaAguinaldo + .Add("@AplicaUtilidades", SqlDbType.Bit).Value = chkAplicaUtilidades End With Try diff --git a/Nomina/Finiquito.aspx b/Nomina/Finiquito.aspx index 44af81510..1391076fe 100644 --- a/Nomina/Finiquito.aspx +++ b/Nomina/Finiquito.aspx @@ -190,7 +190,7 @@
- +