diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 7cbae50f4..858a38c2f 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -1497,7 +1497,7 @@ Public Class ClsBancos Return Retorno End Function Public Function UpdateBancos_IE(FechaDocumento As DateTime, FechaAplicado As DateTime?, CveIE As Integer, Optional Folio As String = "-1", Optional CveCuentaDeposito As Integer = -1, Optional CveCuenta As Integer = -1, - Optional Observaciones As String = "-1", Optional CveUsuarioModifico As Integer = -1) As Boolean + Optional Observaciones As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveTipoTransaccion As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Banc_IEUpdate") @@ -1519,6 +1519,7 @@ Public Class ClsBancos .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico + .Add("@CveTipoTransaccion", SqlDbType.Int).Value = CveTipoTransaccion End With diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 43c95d644..9acc9375e 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -2525,7 +2525,7 @@ Public Class ClsGenerales Public Function GetHistorialBitacora(CveAcarreo As Integer, CveOrdenCompra As Integer, CveActivoFijo As Integer, CveOS As Integer, CvePS As Integer, CveCompra As Integer, CveIE As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional CvePersonal As Integer = -1, - Optional IdPoliza As Integer = -1, Optional CvePrePoliza As Integer = -1) As Boolean + Optional IdPoliza As Integer = -1, Optional CvePrePoliza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveConceptoNomina As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_HistorialBitacoraGet") @@ -2542,7 +2542,11 @@ Public Class ClsGenerales .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@IdPoliza", SqlDbType.Int).Value = IdPoliza - + .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo + .Add("@CveConceptoNomina", SqlDbType.Int).Value = CveConceptoNomina + + + End With 'SqlTypes.SqlDateTime.Null Try diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 3fe0eeeb6..5ac824654 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -2251,6 +2251,29 @@ Public Class ClsNominas End Try Return retorno End Function + Public Function GetchecadorAdistencia(FechaInicio As DateTime, FechaFin As DateTime, CveEmpresa As Integer) As Boolean + Dim retorno As Boolean = False + + Try + DTSet = New DataSet() + DataAdapter("PA_RH_PersonalChecadorASistencia", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@FechaInicio", SqlDbType.DateTime).Value = FechaInicio + .Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + SqlAdapter.Fill(DTSet) + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al Realizar el calculo de asistencia.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al Realizar el calculo de asistencia.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function GetNominaAcumulado(Ejercicio As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodoI As Integer, CvePeriodoF As Integer, CveEmpresa As Integer, Optional RegimenContratacion As Integer = 1, Optional CvePersonal As Integer = -1) As Boolean Dim retorno As Boolean = False @@ -2280,6 +2303,48 @@ Public Class ClsNominas Return retorno End Function +#Region "Vacaciones" + Public Function GETPersonalVacResumen(CveEmpresa As Integer, CvePersonal As Integer) As Boolean + Dim retorno As Boolean = False + + Try + DataAdapter("PA_RH_PersonalVacResumenGet", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CvePersonal", SqlDbType.Decimal).Value = CvePersonal + End With + SqlAdapter.Fill(Data) + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al obtener las vacaciones.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al obtener las vacaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function GETPersonalVacaciones(CveEmpresa As Integer, CvePersonal As Integer) As Boolean + Dim retorno As Boolean = False + + Try + DataAdapter("PA_RH_PersonalVacacionesGET", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CvePersonal", SqlDbType.Decimal).Value = CvePersonal + End With + SqlAdapter.Fill(Data) + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al obtener las vacaciones.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al obtener las vacaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function +#End Region Public Function GetCalculoSBC(CveEmpresa As Integer, Tipo As Integer, FechaCalculo As String) As Boolean Dim retorno As Boolean = False Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 6f614ab00..ca3dfd4b8 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -3896,6 +3896,7 @@ Public Class ClsPaginas If Application("GlobalSIGAppPaginas") Is Nothing Then PaginaDict = New System.Collections.Hashtable + PaginaDict.Add("/Nomina/ChecadorAsistencia.aspx".ToUpper(), -1) PaginaDict.Add("/Nomina/ISRCalculoAnual.aspx".ToUpper(), 918) PaginaDict.Add("/Nomina/MovimientosSUA.aspx".ToUpper(), 919) 'PaginaDict.Add("/Nomina/Acumulados.aspx".ToUpper(), 916) diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb index 35304a37d..12a49ab51 100644 --- a/App_Code/LogicNominas.vb +++ b/App_Code/LogicNominas.vb @@ -327,7 +327,7 @@ Public Class LogicNominas Dim ObjOtrosPagos As New List(Of CFDINominaOtrosPagos) If DtPercepciones IsNot Nothing AndAlso DtPercepciones.Rows.Count > 0 Then For Each Row As DataRow In DtPercepciones.Rows - If Row("Importe").ToString().ToDecimal > 0 AndAlso Row("SATCveConcepto").ToString().ToEntero() <> 17 Then + If Row("Importe").ToString().ToDecimal > 0 OrElse (Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 AndAlso Row("ImporteValor").ToString().ToDecimal().Abs() > 0) Then If Row("CveSATConcepto").ToString() = "" Then cfdi.AddMsg(String.Format("Concepto No registrado ({0})", Row("Concepto").ToString())) : Exit For ObjPercepciones.Add(New CFDINominaPercepciones With {.TipoPercepcion = If(Row("SATCveConcepto").ToString() = "999", "038", Row("SATCveConcepto").ToString()), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .ImporteGravado = Row("ImporteGravado").ToString().ToDecimal(), .ImporteExento = Row("ImporteExento").ToString().ToDecimal()}) @@ -352,7 +352,7 @@ Public Class LogicNominas If DtDeducciones IsNot Nothing AndAlso DtDeducciones.Rows.Count > 0 Then For Each Row As DataRow In DtDeducciones.Rows - If Row("Importe").ToString().ToDecimal <> 0 Then + If Row("Importe").ToString().ToDecimal <> 0 OrElse (Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 AndAlso Row("ImporteValor").ToString().ToDecimal().Abs() > 0) Then If Row("CveSATConcepto").ToString() = "" Then cfdi.AddMsg(String.Format("Concepto No registrado ({0})", Row("Concepto").ToString())) : Exit For If Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 Then @@ -383,7 +383,7 @@ Public Class LogicNominas If DtOtrosPagos IsNot Nothing AndAlso DtOtrosPagos.Rows.Count > 0 Then For Each Row As DataRow In DtOtrosPagos.Rows - If (Row("Importe").ToString().ToDecimal() <> 0) OrElse + If (Row("Importe").ToString().ToDecimal() <> 0) OrElse (Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 AndAlso Row("ImporteValor").ToString().ToDecimal().Abs() > 0) OrElse (Row("SATCveConcepto").ToString().ToEntero() = 2 AndAlso (CveRegimenContratacion.ToEntero() = 2 OrElse Row("Importe").ToString().ToDecimal() <> 0)) OrElse (Row("SATCveConcepto").ToString().ToEntero().Contiene(2, 4) AndAlso Row("Importe").ToString().ToDecimal() < 0) Then diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 1ad24c658..6b6664e00 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -4311,7 +4311,7 @@ Partial Class Bancos_IE Dim CveCuentaDepositoUpdate As Integer = If(DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero = 0, -1, DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero) If Not IE.UpdateBancos_IE(TxtFechaDocumento.Text.ToDate, FechaAplicado, CveIE, TxtFolio.Text, CveCuentaDeposito:=CveCuentaDepositoUpdate, CveCuenta:=DdlCuenta.SelectedValue.ToEntero, - Observaciones:=TxtObservaciones.Text, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + Observaciones:=TxtObservaciones.Text, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveTipoTransaccion:=DdlTipoTransaccion.SelectedValue.ToEntero) Then OcurrioError = True End If diff --git a/LogIn.aspx.vb b/LogIn.aspx.vb index 28fdeb150..4259f8660 100644 --- a/LogIn.aspx.vb +++ b/LogIn.aspx.vb @@ -191,7 +191,8 @@ Partial Class LogIn strdomain = strdomain.Replace(String.Format(":{0}", Request.Url.Port), "") End If ReturnUrl = String.Format("{0}:{1}/{2}", strdomain, Request("port"), ReturnUrl) - + ReturnUrl = ReturnUrl.Replace("https", "http") + ReturnUrl = ReturnUrl.Replace("HTTPS", "HTTP") End If If BtnLogIn_Clickenter = 0 Then 'esta variable se recicla con cada postaback BtnLogIn_Clickenter = 1 diff --git a/Nomina/ChecadorAsistencia.aspx b/Nomina/ChecadorAsistencia.aspx new file mode 100644 index 000000000..e9b06823b --- /dev/null +++ b/Nomina/ChecadorAsistencia.aspx @@ -0,0 +1,279 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ChecadorAsistencia.aspx.cs" Inherits="Nomina_ChecadorAsistencia" %> + + + + + + + + + + + + + + + + + + +
+
+
+
+ + +
+ + + +
+ + +
+ <%----%> + +
+ + + + + + + + +
+
+ +
+ <%----%> +
+ + + + + + + + +
+
+
+ +
+
+
+
+ +
+
+ +
+ +
+
+ + + + + + + + + + + + + + +
+ + + + diff --git a/Nomina/ChecadorAsistencia.aspx.cs b/Nomina/ChecadorAsistencia.aspx.cs new file mode 100644 index 000000000..09ee10ce6 --- /dev/null +++ b/Nomina/ChecadorAsistencia.aspx.cs @@ -0,0 +1,255 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using Extensiones; + +public partial class Nomina_ChecadorAsistencia : ClsPaginas +{ + private DataTable dtper + { + get + { + if (ViewState["dtper"] == null) { return null; } + else { return (DataTable)ViewState["dtper"]; } + } + set { ViewState["dtper"] = value; } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + CargaTiposPeriodo(); + TxtRpdFechaInicio.Text = "01/09/2021"; + TxtRpdFechaFin.Text = "15/09/2021"; + DdlTipoAsistencias.DataSource = GlobalDTAsistenciasInasistencias.FiltraParametros(string.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)); + DdlTipoAsistencias.DataBind(); + + + DdlMotivoHoraExtra.DataSource = GlobalDTMotivosHorasExtras.FiltraParametros(string.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)); + DdlMotivoHoraExtra.DataBind(); + + CargarCentrosDeCosto(DdlAsisProyecto, DdlAsisSubProyecto, LblAsisProyecto, LblAsisSubProyecto); + PnlProyecto.Visible = DdlAsisProyecto.Visible; + if (PnlProyecto.Visible) + { + PnlSubProyecto.CssClass = "col-md-6"; + } + } + } + private void CargaTiposPeriodo() + { + DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo.FiltraParametros("Estatus = 'Activo'"); + DdlTipoPeriodo.DataBind(); + DdlTipoPeriodo.Items.Insert(0, new ListItem("Todos", "-1")); + if (DdlTipoPeriodo.Items.Count > 0) + { + DdlTipoPeriodo.SelectedIndex = 0; + } + } + private DataTable generateTable() + { + DateTime FechaI = TxtRpdFechaInicio.Text.ToDateTime(); + DateTime FechaF = TxtRpdFechaFin.Text.ToDateTime(); + DataTable dtCon = new DataTable(); + dtCon.Columns.Add(new DataColumn("Codigo", typeof(string))); + dtCon.Columns.Add(new DataColumn("Empleado", typeof(string))); + DateTime CFecha = FechaI; + while (FechaF > CFecha) + { + string Fecha = string.Format("{0:yyyyMMdd}", CFecha); + string FechaCol = string.Format("{0:dd-MM-yyyy}", CFecha); + dtCon.Columns.Add(new DataColumn(FechaCol, typeof(string)) { }); + CFecha = CFecha.AddDays(1); + } + using (ClsNominas objnom = new ClsNominas()) + { + if (objnom.GetchecadorAdistencia(FechaI, FechaF, UsuarioActual.CveEmpresa)) + { + DataTable dtASis = objnom.DTSetResultados.Tables[0]; + dtper = objnom.DTSetResultados.Tables[1]; + foreach (DataRow item in dtper.Rows) + { + DataRow drow = dtCon.NewRow(); + drow["Codigo"] = item["Codigo"]; + drow["Empleado"] = item["NombreCompleto"]; + CFecha = FechaI; + while (FechaF > CFecha) + { + int Fecha = string.Format("{0:yyyyMMdd}", CFecha).ToEntero(); + string FechaCol = string.Format("{0:dd-MM-yyyy}", CFecha); + string TipoAsis = "(Faltó)"; + DataRow drfec = dtASis.FiltroPrimero(string.Format("CvePersonal={0} AND Agrupador ={1}", item["CvePersonal"], Fecha), "Salida"); + if (drfec != null) + { + DataTable dtx = dtASis.FiltraParametros(string.Format("CvePersonal={0} AND Agrupador ={1}", item["CvePersonal"], Fecha), "Salida"); + + + string asistencia2 = ""; + string Horas2 = ""; + if (dtx.Rows.Count > 1) + { + Horas2 = drfec["Horas"].ToString(); + DataRow drf = dtx.Rows[1]; + asistencia2 = ""; + TipoAsis = drf["TipoAsistencia"].ToString(); + switch (drfec["Tipo"].ToString().ToEntero()) + { + case 1: + asistencia2 = ""; + break; + case 2: + asistencia2 = ""; + break; + case 3: + asistencia2 = ""; + break; + case 4: + asistencia2 = ""; + break; + case 5: + asistencia2 = ""; + break; + + default: + break; + } + } + string asistencia = ""; + TipoAsis = drfec["TipoAsistencia"].ToString(); + switch (drfec["Tipo"].ToString().ToEntero()) + { + case 1: + asistencia = ""; + break; + case 2: + asistencia = ""; + break; + case 3: + asistencia = ""; + break; + case 4: + asistencia = ""; + break; + case 5: + asistencia = ""; + break; + + default: + break; + } + drow[FechaCol] = string.Format("
{0}
{1}
{2}
{3}
", asistencia, drfec["Horas"], asistencia2, Horas2); + //drow[FechaCol] = string.Format("{0}
{1:HH}:{1:mm} - {2:HH}:{2:mm}", asistencia, drfec["Entrada"], drfec["Salida"]); + } + else + { + if (CFecha.DayOfWeek == DayOfWeek.Sunday) + { + drow[FechaCol] = ""; + TipoAsis = "(Descanso)"; + } + else + { + drow[FechaCol] = "
❌
"; + } + } + drow[FechaCol] = string.Format("
{0}
{1}
", drow[FechaCol], TipoAsis, FechaCol, item["CvePersonal"]); + //dtCon.Columns.Add(new DataColumn(FechaCol, typeof(string)));Widthall + CFecha = CFecha.AddDays(1); + } + dtCon.Rows.Add(drow); + } + } + } + //dtCon.Columns.Add(new DataColumn("LabelValorP", typeof(string))); + //dtCon.Columns.Add(new DataColumn("CveConceptoP", typeof(int))); + //dtCon.Columns.Add(new DataColumn("ImporteP", typeof(double))); + return dtCon; + } + protected void LnkConsultar_Click(object sender, EventArgs e) + { + DataTable dtCon = generateTable(); + GvNominas.DataSource = dtCon; + GvNominas.DataBind(); + UpDatos.Update(); + } + + protected void GvNominas_RowDataBound(object sender, GridViewRowEventArgs e) + { + + if (e.Row.RowType == DataControlRowType.DataRow) + { + for (int j = 0; j < e.Row.Cells.Count; j++) + { + string encoded = e.Row.Cells[j].Text; + e.Row.Cells[j].Text = Context.Server.HtmlDecode(encoded); + } + + } + } + + protected void BtnOpenModal_Click(object sender, EventArgs e) + { + DateTime fechai = TxtFecha.Text.ToDateTime(); + DateTime fechaf = fechai.AddDays(1); + int CvePersonal = TxtCvePersonal.Text.ToEntero(); + TxtFechalabel.Text = string.Format("{0:dd/MM/yyyy}", fechai); + using (ClsRH objRH = new ClsRH()) + { + if (objRH.PreAsistenciaRegistrosGet(fechai, fechaf, -1, UsuarioActual.Empresa.CveEmpresa)) + { + GvDetalleDias.DataSource = objRH.DtResultados.FiltraParametros(string.Format("FechaRegistro >='{0:yyyy/MM/dd HH:mm}' AND FechaRegistro <='{1:yyyy/MM/dd HH:mm}' AND CvePersonal = {2}", fechai.AddHours(6), fechaf.AddHours(6), CvePersonal), "FechaRegistro"); + GvDetalleDias.DataBind(); + } + DdlTipoAsistencias.Enabled = GvDetalleDias.Rows.Count > 0; + if (objRH.GetAsistencias(CvePersonal, -1, -1, -1, -1, -1, fechai, fechai, UsuarioActual.CveEmpresa)) + { + if (objRH.DtResultados.Rows.Count > 0) + { + DataRow dr = objRH.DtResultados.Rows[0]; + DdlTipoAsistencias.SelectedValueExist(dr["CveAsistenciasInasistencias"].ToString()); + DdlAsisSubProyecto.SelectedValueExist(dr["CveSubProyecto"].ToString()); + TxtPorPago.Text = dr["PorcentajePago"].ToString(); + TxtHorasDobles.Text = dr["HorasDobles"].ToString(); + TxtHorasTriples.Text = dr["HorasTriples"].ToString(); + DdlMotivoHoraExtra.SelectedValueExist(dr["CveMotivoHoraExtra"].ToString()); + TxtObservaciones.Text = dr["Observacion"].ToString(); + } + } + } + DataRow drow = dtper.FiltroPrimero(string.Format("CvePersonal = {0}", CvePersonal)); + if(drow != null) + { + TxtCodigolabel.Text = drow["Codigo"].ToString(); + TxtEmpleadolabel.Text = drow["NombreCompleto"].ToString(); + } + + UpDetallesDia.Update(); + + RegistraScript("$('#divDetallesDia').modal();"); + } + + protected void BtnEstusAsistenciaModal_Click(object sender, EventArgs e) + { + DateTime fecha = TxtFecha.Text.ToDateTime(); + int CvePersonal = TxtCvePersonal.Text.ToEntero(); + + //int CvePersonal = TxtasiscvePersonal.Text.ToEntero(); + //DateTime fecha = TxtasisFecha.Text.ToDate(); + using (ClsRH objpersonal = new ClsRH()) + { + + if (objpersonal.AddAsistencia(CvePersonal, -1, DdlAsisSubProyecto.SelectedValue.ToEntero(), fecha, DdlTipoAsistencias.SelectedValue.ToEntero(), TxtPorPago.Text.Trim().ToDouble(), TxtHorasDobles.Text.Trim().ToDouble(), + TxtHorasTriples.Text.Trim().ToDouble(), DdlMotivoHoraExtra.SelectedValue.ToEntero(), TxtObservaciones.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) + { + //Alert(string.Format("se ha guardado la asistencia satisfactoriamente
{0}
{1:dd/MM/yyyy}", TxtPersonal.Text, TxtasisFecha.Text.ToDate()), TipoMensaje.ToastInformacion); + Alert("Se ha guardado la asistencia satisfactoriamente"); + RegistraScript("$('#DModalModAsistencia').modal('hide');"); + + } + } + } +} \ No newline at end of file diff --git a/Nomina/Nomina.aspx b/Nomina/Nomina.aspx index edaa3a8d5..97bd06731 100644 --- a/Nomina/Nomina.aspx +++ b/Nomina/Nomina.aspx @@ -9,6 +9,11 @@ content: "\f1c1"; } + pre { + font-size: 11px; + padding: 3px; + } + table.gvasistencia tr:hover { background-color: #dddddd; } @@ -354,7 +359,7 @@
- +
@@ -399,7 +404,7 @@ - + @@ -825,6 +830,25 @@
Imprimir
+
@@ -884,6 +908,36 @@
+ + +
+
+
+ + Bitacora +
+
+ + +
+
+
+ + + + + + + + + + + + + + +
+
@@ -1409,16 +1463,13 @@ - -
- +
¿Prima Vacacional?
-
- +
¿Cobrar IMSS?
@@ -1758,6 +1809,371 @@
+ + + + + + + + + + +
@@ -2552,7 +2666,53 @@ - + + + + + + + - + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+
+
+
+ diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index e6bb0c374..f845f6931 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -847,6 +847,7 @@ Partial Class RH_Personal If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero() > 0 Then ViewState("CvePersonal") = Request("CvePersonal") + DdlFormapagovacaciones_SelectedIndexChanged(Nothing, Nothing) 'CvePersonal = ViewState("CvePersonal").ToString().ToEntero() CargaDatos() CargaDocumentacionFirmaDecontratos() @@ -4503,43 +4504,70 @@ Partial Class RH_Personal Next End Sub - + Dim dtosvac As DataTable Private Sub CargaVacacionesResumenPeriodoActual() - Dim objRH As New ClsRH - - If objRH.VacacionesResumenGet(CvePersonal, UsuarioActual.Empresa.CveEmpresa) Then - If objRH.DtResultados.Rows.Count > 0 Then - - VacInicioPeriodo = objRH.DtResultados(0)("InicioPeriodo").ToString().ToDate - VacFinPeriodo = objRH.DtResultados(0)("FinPeriodo").ToString().ToDate - VacAnios = objRH.DtResultados(0)("Anios").ToString().ToEntero() - VacDias = objRH.DtResultados(0)("Dias").ToString().ToEntero() - VacDiasUsados = objRH.DtResultados(0)("DiasUsados").ToString().ToEntero() - VacDiasCancelados = objRH.DtResultados(0)("DiasCancelados").ToString().ToEntero() - VacDiasDisponibles = objRH.DtResultados(0)("DiasDisponibles").ToString().ToEntero() - GvVacacionesResumen.DataSource = objRH.DtResultados - VacSupervisorNombre = objRH.DtResultados(0)("SupervisorNombre").ToString() - VacSupervisorCorreo = objRH.DtResultados(0)("SupervisorCorreo").ToString() - VacCveSupervisor = objRH.DtResultados(0)("SupervisorCorreo").ToString().ToEntero() - - Else - VacInicioPeriodo = Now - VacFinPeriodo = Now - VacAnios = 0 - VacDias = 0 - VacDiasUsados = 0 - VacDiasCancelados = 0 - VacDiasDisponibles = 0 + Using objnom As New ClsNominas + If objnom.GETPersonalVacResumen(UsuarioActual.Empresa.CveEmpresa, CvePersonal) Then + RPTVacacionesResumen.DataSource = objnom.DtResultados End If - End If + If objnom.GETPersonalVacaciones(UsuarioActual.Empresa.CveEmpresa, CvePersonal) Then + dtosvac = objnom.DtResultados + GvVaczxy.DataSource = dtosvac + GvVaczxy.DataBind() + End If + End Using - objRH.Dispose() + RPTVacacionesResumen.DataBind() + Using objRH As New ClsRH + If objRH.VacacionesResumenGet(CvePersonal, UsuarioActual.Empresa.CveEmpresa) Then + If objRH.DtResultados.Rows.Count > 0 Then + + VacInicioPeriodo = objRH.DtResultados(0)("InicioPeriodo").ToString().ToDate + VacFinPeriodo = objRH.DtResultados(0)("FinPeriodo").ToString().ToDate + VacAnios = objRH.DtResultados(0)("Anios").ToString().ToEntero() + VacDias = objRH.DtResultados(0)("Dias").ToString().ToEntero() + VacDiasUsados = objRH.DtResultados(0)("DiasUsados").ToString().ToEntero() + VacDiasCancelados = objRH.DtResultados(0)("DiasCancelados").ToString().ToEntero() + VacDiasDisponibles = objRH.DtResultados(0)("DiasDisponibles").ToString().ToEntero() + GvVacacionesResumen.DataSource = objRH.DtResultados + VacSupervisorNombre = objRH.DtResultados(0)("SupervisorNombre").ToString() + VacSupervisorCorreo = objRH.DtResultados(0)("SupervisorCorreo").ToString() + VacCveSupervisor = objRH.DtResultados(0)("SupervisorCorreo").ToString().ToEntero() + + Else + VacInicioPeriodo = Now + VacFinPeriodo = Now + VacAnios = 0 + VacDias = 0 + VacDiasUsados = 0 + VacDiasCancelados = 0 + VacDiasDisponibles = 0 + End If + End If + + End Using GvVacacionesResumen.DataBind() UpGvVacacionesResumen.Update() End Sub + Protected Sub RPTVacacionesResumen_ItemDataBound(sender As Object, e As RepeaterItemEventArgs) + + 'Dim item As DataRowView = DirectCast(e.Item.DataItem, DataRowView) + 'If (item IsNot Nothing AndAlso item("CveEmpresa") IsNot Nothing) Then + + ' Dim CveEmpresa As Integer = item("CveEmpresa").ToString().ToEntero() + ' Dim CvePersonal As Integer = item("CvePersonal").ToString().ToEntero() + ' Dim Ejercicio As Integer = item("Ejercicio").ToString().ToEntero() + ' Dim RptTitulo As GridView = DirectCast(e.Item.FindControl("GvVaczx"), GridView) + ' If dtosvac IsNot Nothing Then + ' RptTitulo.DataSource = dtosvac.FiltraParametros(String.Format("Ejercicio={0}", Ejercicio), "FechaIng") + ' RptTitulo.DataBind() + ' End If + 'End If + End Sub + Protected Sub BtnSolicitarVacaciones_Click(sender As Object, e As EventArgs) Handles BtnSolicitarVacaciones.Click Dim fInicio As Date = TxtFechaInicioVac.Text.ToDate() Dim fFin As Date = TxtFechaFinVac.Text.ToDate() @@ -4551,7 +4579,7 @@ Partial Class RH_Personal VacFolioActual = VacFolioActual + 1 Dim objRH As New ClsRH 'Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, motivoVacaciones) - Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, FechaPago:=fechapago, diasinabiles:=diasinhabil, CveTipoPago:=DdlFormapagovacaciones.SelectedValue.ToEntero(), diasExtras:=TxtVacDiasExtra.Text.ToEntero()) + Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, FechaPago:=fechapago, diasinabiles:=diasinhabil, CveTipoPago:=DdlFormapagovacaciones.SelectedValue.ToEntero(), diasExtras:=TxtVacDiasExtra.Text.ToEntero(), Ejercicio:=TxtVacEjercicio.Text.ToEntero(), PrimaVacacional:=If(ChkVacPrimaVacacional.Checked, 1, 0), CobrarImss:=If(ChkVacCobrarIMSS.Checked, 1, 0), diasPago:=TxtVacDiasPago.Text.ToEntero()) If objRH.DtResultados.Rows.Count > 0 Then Dim ShowError As String = objRH.DtResultados.Rows(0)("ShowError").ToString() If ShowError.Length > 0 Then @@ -5088,6 +5116,41 @@ Partial Class RH_Personal Return ListaTags End Function + Protected Sub DdlFormapagovacaciones_SelectedIndexChanged(sender As Object, e As EventArgs) + PnlVacfechas.Visible = False + PnlVacDias.Visible = False + PnlVacFechapago.Visible = False + PnlVacDiasPago.Visible = False + PnlVacChecks.Visible = False + TxtVacDiasPago.Text = "0" + + Select Case DdlFormapagovacaciones.SelectedValue.ToEntero() + Case 1 + PnlVacfechas.Visible = True + PnlVacDias.Visible = True + PnlVacFechapago.Visible = True + PnlVacDiasPago.Visible = True + PnlVacChecks.Visible = True + Case 2 + PnlVacfechas.Visible = True + PnlVacDias.Visible = True + PnlVacChecks.Visible = True + Case 3 + PnlVacfechas.Visible = True + PnlVacDias.Visible = True + PnlVacDiasPago.Visible = False + PnlVacFechapago.Visible = True + Case 4 + PnlVacFechapago.Visible = True + PnlVacDiasPago.Visible = True + PnlVacChecks.Visible = True + Case 5 + PnlVacfechas.Visible = True + Case 6 + PnlVacFechapago.Visible = True + PnlVacDiasPago.Visible = True + End Select + End Sub #End Region #Region "CURSOS" @@ -6601,5 +6664,7 @@ Partial Class RH_Personal End If End Sub + + End Class diff --git a/vwd.webinfo b/vwd.webinfo index 805171ec2..cfe841e39 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -312,6 +312,8 @@ + +