diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index fa2e30bf1..30e7962cc 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -514,6 +514,23 @@ Public Class ClsNominas Return Retorno End Function + Public Function DeleteNom_NominasDetalles(CveConcepto As Integer, CvePersonal As Integer, CvePeriodo As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Nom_NominasDetallesDelete") + SqlAdapter.SelectCommand.Parameters.Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto + SqlAdapter.SelectCommand.Parameters.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + SqlAdapter.SelectCommand.Parameters.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function Public Function RemoveNom_NominasDetalles(CveNominaDetalle As Integer) As Boolean Dim Retorno As Boolean = False @@ -2514,6 +2531,97 @@ Public Class ClsNominas End Function #End Region + +#Region "CRUD_RH_TablasValores" + Public Function RH_TablasValoresGet(cveEmpresa As Int32, tipo As Int32) As Boolean + Dim retorno As Boolean = False + Try + DataAdapter("PA_RH_TablasValoresGet", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@Tipo", SqlDbType.Int).Value = tipo + End With + SqlAdapter.Fill(Data) + + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function RH_TablasValoresAdd(cveEmpresa As Int32, fecha As DateTime, tipo As Int32, valor As Decimal) As Boolean + Dim retorno As Boolean = False + + Try + DataAdapter("PA_RH_TablasValoresAdd", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@Tipo", SqlDbType.Int).Value = tipo + .Add("@fecha", SqlDbType.DateTime).Value = fecha + .Add("@valor", SqlDbType.Money).Value = valor + End With + SqlAdapter.Fill(Data) + + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function RH_TablasValoresUp(cveEmpresa As Int32, fecha As DateTime, tipo As Int32, valor As Decimal) As Boolean + Dim retorno As Boolean = False + + Try + DataAdapter("PA_RH_TablasValoresUp", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@Tipo", SqlDbType.Int).Value = tipo + .Add("@fecha", SqlDbType.DateTime).Value = fecha + .Add("@valor", SqlDbType.Money).Value = valor + End With + SqlAdapter.Fill(Data) + + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function RH_TablasValoresRemove(cveEmpresa As Int32, fecha As DateTime, tipo As Int32) As Boolean + Dim retorno As Boolean = False + Try + DataAdapter("PA_RH_TablasValoresRemove", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@Tipo", SqlDbType.Int).Value = tipo + .Add("@fecha", SqlDbType.DateTime).Value = fecha + End With + SqlAdapter.Fill(Data) + + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al obtener las tablas de nomina.", 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/Nomina/ConceptoNomina.aspx.cs b/Nomina/ConceptoNomina.aspx.cs index 6b4412482..ff61ea299 100644 --- a/Nomina/ConceptoNomina.aspx.cs +++ b/Nomina/ConceptoNomina.aspx.cs @@ -321,7 +321,7 @@ public partial class Nomina_CatConcepto : ClsPaginas if (EsEditar) { - TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto); + 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) { diff --git a/Nomina/Nomina2.aspx b/Nomina/Nomina2.aspx index 881dcec31..46221f24b 100644 --- a/Nomina/Nomina2.aspx +++ b/Nomina/Nomina2.aspx @@ -4,7 +4,10 @@ @@ -726,7 +730,7 @@
@@ -753,6 +757,7 @@ + @@ -773,6 +778,7 @@ + @@ -797,7 +803,6 @@
-
@@ -861,6 +866,9 @@ +
+ +
@@ -879,7 +887,6 @@
-
@@ -941,6 +948,9 @@ +
+ +
@@ -998,7 +1008,6 @@
-
-
@@ -1096,9 +1104,8 @@
-
- Agregar + Guardar Actualizar
@@ -1227,12 +1234,13 @@
+
+ Actualizar + Guardar +
+ -
- Actualizar - Agregar -
@@ -1257,6 +1265,11 @@
+
+
+ Agregar +
+
-
-
- Agregar -
-
@@ -1395,12 +1403,13 @@ Descripción
+
+ Actualizar + Guardar +
+
-
- Actualizar - Agregar -
@@ -1429,7 +1438,7 @@