Exemple #1
0
        private double DescuentoInasistencia(string codigoEmpleado)
        {
            try
            {
                double descuentoInasistencia = 0.0;

                double sueldoMinimo = 0.0;
                int    diasMes      = 0;
                int    horasDia     = 0;
                using (var beParametros = new BE.Parametros())
                {
                    sueldoMinimo = beParametros.SueldoMinimo;
                    diasMes      = beParametros.BaseDias;
                    horasDia     = beParametros.BaseHoras;
                }

                double costoMinuto      = ((sueldoMinimo / diasMes) / horasDia) / 60;
                double penalidadNormal  = costoMinuto * 3;
                double penalidadFeriado = costoMinuto * 5;

                var lnPlanilla = new LN.Planilla(this.Anho, this.Mes);

                var uiAsistenciaResumen = lnPlanilla.ObtenerResumenAsistenciaEmpleado(codigoEmpleado);
                if (uiAsistenciaResumen != null)
                {
                    double descuentoInasistenciaNormal  = uiAsistenciaResumen.CantidadInasistenciasNormales * penalidadNormal;
                    double descuentoInasistenciaFeriado = uiAsistenciaResumen.CantidadInasistenciasFeriados * penalidadFeriado;

                    double descuentoInasistenciaPlanilla = 0.0;
                    var    uiPlanillDetalle = lnPlanilla.ObtenerPlantillaDetalle(codigoEmpleado);
                    if (uiPlanillDetalle != null)
                    {
                        descuentoInasistenciaPlanilla = uiPlanillDetalle.DescuentoInasistenciaTotal;
                    }

                    descuentoInasistencia = descuentoInasistenciaNormal
                                            + descuentoInasistenciaFeriado
                                            - descuentoInasistenciaPlanilla;
                }
                //else
                //{
                //    DateTime fechaPeriodo = new DateTime(this.Anho, this.Mes, 1);
                //    string mensajeError = $"No encuentra calculo de planilla para el periodo {fechaPeriodo.ToString("yyyy/MM")}";
                //    throw new Exception(mensajeError);
                //}
                uiAsistenciaResumen = null;

                return(descuentoInasistencia);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #2
0
        private void CalcularPlanillaResumen()
        {
            try
            {
                var lnPlanilla = new LN.Planilla(this.anho, this.mes);

                BE.Planilla objPlanilla = lnPlanilla.Obtener();
                if (objPlanilla == null)
                {
                    return;
                }

                this.idPlanilla   = objPlanilla.ID;
                this.txtAnho.Text = objPlanilla.Anho.ToString();
                string nombreMes = Util.GetNameOfMonth(objPlanilla.Mes);
                this.txtMes.Text                    = nombreMes;
                this.txtDias.Text                   = objPlanilla.Dias.ToString();
                this.txtSueldoMinimo.Text           = objPlanilla.SueldoMinimo.ToString("N2");
                this.txtAsignacionFamiliar.Text     = objPlanilla.AsignacionFamiliar.ToString("N2") + "%";
                this.txtEsSalud.Text                = objPlanilla.EsSalud.ToString("N2") + "%";
                this.txtPrimerasHorasExtras.Text    = objPlanilla.PrimerasDosHorasExtras.ToString("N2") + "%";
                this.txtPosterioresHorasExtras.Text = objPlanilla.PosterioresDosHorasExtras.ToString("N2") + "%";
                this.txtHorarioNocturno.Text        = objPlanilla.Nocturno.ToString("N2") + "%";


                int    cantidadEmpleados = 0;
                double totalSueldos      = 0.0;
                double totalPagos        = 0.0;
                double totalEssalud      = 0.0;
                double totalSnp          = 0.0;
                double totalAfp          = 0.0;

                lnPlanilla.Resumen(out cantidadEmpleados,
                                   out totalSueldos,
                                   out totalPagos,
                                   out totalEssalud,
                                   out totalSnp,
                                   out totalAfp);

                this.txtCantidadEmpleados.Text = cantidadEmpleados.ToString();
                this.txtTotalSueldos.Text      = totalSueldos.ToString("N2");
                this.txtTotalPagos.Text        = totalPagos.ToString("N2");
                this.txtTotalEssalud.Text      = totalEssalud.ToString("N2");
                this.txtTotalOnp.Text          = totalSnp.ToString("N2");
                this.txtTotalAfp.Text          = totalAfp.ToString("N2");
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        /// <summary>
        /// Bono que se da si cumple 3 condiciones :
        /// 1. Tener maximo de 3 tardanzas por mes
        /// 2. Tener máximo de 1 falta por mes
        /// 3. Tener máximo de 5 observaciones por mes
        /// </summary>
        /// <param name="codigoEmpleado">Codigo de Empleado o Candidato</param>
        private double BonoDisciplina(string codigoEmpleado)
        {
            try
            {
                bool cumpleDisciplina = false;

                double bonoDisciplina   = 150.0;
                int    maxTardanzas     = 3;
                int    maxFaltas        = 1;
                int    maxObservaciones = 5;

                var uiAsistenciaResumen = new LN.Planilla(this.Anho, this.Mes).ObtenerResumenAsistenciaEmpleado(codigoEmpleado);

                if (uiAsistenciaResumen != null)
                {
                    // 1. Tener maximo de 3 tardanzas por mes
                    if (uiAsistenciaResumen.CantidadTardanzas <= maxTardanzas)
                    {
                        cumpleDisciplina = true;
                    }

                    // 2. Tener máximo de 1 falta por mes
                    if (uiAsistenciaResumen.CantidadInasistencias <= maxFaltas)
                    {
                        cumpleDisciplina = true;
                    }
                }

                uiAsistenciaResumen = null;

                // 3. Tener máximo de 5 observaciones por mes
                int cntObservaciones = new LN.ObservacionEmpleado().CantidadObservacionesEmpleado(this.Anho, this.Mes, codigoEmpleado);
                if (cntObservaciones <= maxObservaciones)
                {
                    cumpleDisciplina = true;
                }

                if (cumpleDisciplina == false)
                {
                    bonoDisciplina = 0.0;
                }

                return(bonoDisciplina);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #4
0
        private void btnEliminar_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.idPlanilla == 0)
                {
                    throw new Exception("Elija una planilla");
                }

                string anho = this.txtAnho.Text.Trim();
                string mes  = this.txtMes.Text.Trim();

                if (Util.ConfirmationMessage($"¿Desea eliminar la planilla de {mes} del {anho}?") == false)
                {
                    return;
                }

                Util.PointerLoad(this);

                bool rpta = new LN.Planilla(this.anho, this.mes).Eliminar();

                Util.PointerReady(this);

                if (rpta == true)
                {
                    Util.InformationMessage($"Se eliminó la planilla de {mes} del {anho}");
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                Util.ErrorMessage(ex.Message);
            }
            finally
            {
                Util.PointerReady(this);
            }
        }
        public void CargarAsistencias(bool refrescar = false)
        {
            try
            {
                if (refrescar == true)
                {
                    var lnPlanilla = new LN.Planilla(this.anho, this.mes);

                    string horario = this.cboHorario.SelectedValue.ToString();
                    switch (horario)
                    {
                    case "1":     //Horario Nocturno
                        this.lstUiPlanillaAsistencia = lnPlanilla.ListarAsistenciaHorarioNocturno(this.idPlanilla, this.codigoEmpleado);
                        break;

                    case "2":     //Horas Extras
                        this.lstUiPlanillaAsistencia = lnPlanilla.ListarAsistenciaHorasExtras(this.idPlanilla, this.codigoEmpleado);
                        break;

                    case "3":     //Feriado
                        this.lstUiPlanillaAsistencia = lnPlanilla.ListarAsistenciaFeriado(this.idPlanilla, this.codigoEmpleado);
                        break;

                    case "4":     //Tardanzas
                        this.lstUiPlanillaAsistencia = lnPlanilla.ListarAsistenciaTardanzas(this.idPlanilla, this.codigoEmpleado);
                        break;

                    case "5":     //Inasistencias
                        this.lstUiPlanillaAsistencia = lnPlanilla.ListarAsistenciaFaltas(this.idPlanilla, this.codigoEmpleado);
                        break;

                    default:     //Todos
                        this.lstUiPlanillaAsistencia = lnPlanilla.ListarAsistencia(this.idPlanilla, this.codigoEmpleado);
                        break;
                    }
                }

                int nroRegistros = this.lstUiPlanillaAsistencia.Count;

                #region Conversion de tiempo

                //Costo por Minuto
                var lstUiPlanillaAsistenciaConvertido = this.lstUiPlanillaAsistencia.Select(uiPlanillaAsistencia => (BE.UI.PlanillaAsistencia)uiPlanillaAsistencia.Clone()).ToList();

                string calcular = this.cboCalculoPor.SelectedValue.ToString();

                for (int i = 0; i < lstUiPlanillaAsistenciaConvertido.Count; i++)
                {
                    lstUiPlanillaAsistenciaConvertido[i].FormateadoCalculo = calcular;
                }

                #endregion

                var source = new BindingSource();
                source.DataSource = lstUiPlanillaAsistenciaConvertido;

                this.dgvAsistencias.DataSource = source;

                this.txtNroRegistros.Text = nroRegistros.ToString();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #6
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            try
            {
                #region Validar
                if (this.cboPeriodoFiltro.SelectedIndex == 0)
                {
                    this.cboPeriodoFiltro.Focus();
                    throw new Exception("Seleccione un periodo");
                }

                if (this.cboEmpleadoFiltro.SelectedIndex == 0)
                {
                    this.cboEmpleadoFiltro.Focus();
                    throw new Exception("Seleccione un empleado");
                }
                #endregion

                #region Cargar en memoria
                var beRecord = (BE.Record) this.cboEmpleadoFiltro.SelectedItem;
                this.uiGratificacion.EmpleadoCodigo  = beRecord.Codigo;
                this.uiGratificacion.EmpleadoNombres = beRecord.Nombre;

                var beEmpleado = new LN.Empleado().Obtener(beRecord.Codigo);
                this.uiGratificacion.SueldoBase = beEmpleado.Recurso.Sueldo;
                this.uiGratificacion.DescuentoRetencioJudicial = 0.0;

                var beSueldoMinimo = new LN.SueldoMinimo().Actual(DateTime.Now);
                var beParametros   = new BE.Parametros(beSueldoMinimo.Monto);
                this.uiGratificacion.AsignacionFamiliar = beParametros.AsignacionFamiliar;
                #endregion

                #region Resumen y Detalle

                this.txtPeriodo.Text         = this.uiGratificacion.Periodo;
                this.txtDias.Text            = this.uiGratificacion.Dias.ToString();
                this.txtFechaInicial.Text    = this.uiGratificacion.FechaInicial.ToString("dd/MM/yyyy");
                this.txtFechaFinal.Text      = this.uiGratificacion.FechaFinal.ToString("dd/MM/yyyy");
                this.txtEmpleadoCodigo.Text  = this.uiGratificacion.EmpleadoCodigo;
                this.txtEmpleadoNombres.Text = this.uiGratificacion.EmpleadoNombres;
                this.txtSueldoBase.Text      = this.uiGratificacion.SueldoBase.ToString("N2");
                this.txtSueldoAsigFam.Text   = this.uiGratificacion.AsignacionFamiliar.ToString("N2");

                int    anho                 = this.uiGratificacion.Anho;
                int    mesIni               = this.uiGratificacion.FechaInicial.Month;
                int    mesFin               = this.uiGratificacion.FechaFinal.Month;
                string codEmpleado          = this.uiGratificacion.EmpleadoCodigo;
                double bonoNocturnoTotal    = 0;
                double bonoHorasExtrasTotal = 0;
                int    diasCalculo          = 0;

                this.uiGratificacion.Detalle = new List <BE.UI.GratificacionDetalle>();
                for (int mes = mesIni; mes <= mesFin; mes++)
                {
                    double bonoNocturno      = 0;
                    double bonoHorasExtras   = 0;
                    int    diasMes           = DateTime.DaysInMonth(anho, mes);
                    int    diasInasistencias = 0;

                    var uiPlantillaDetalle = new LN.Planilla(anho, mes).ObtenerPlantillaDetalle(codEmpleado);
                    if (uiPlantillaDetalle != null)
                    {
                        bonoNocturno    = uiPlantillaDetalle.BonoNocturnoTotal;
                        bonoHorasExtras = uiPlantillaDetalle.BonoHorasExtrasTotal;

                        double inasistencias = uiPlantillaDetalle.DescuentoInasistenciaCantidad;
                        switch (uiPlantillaDetalle.CalcularPor)
                        {
                        case "M":
                            diasInasistencias = (int)inasistencias / 360;
                            break;

                        case "H":
                            diasInasistencias = (int)inasistencias / 60;
                            break;

                        default:
                            diasInasistencias = (int)inasistencias;
                            break;
                        }
                    }

                    bonoNocturnoTotal    += bonoNocturno;
                    bonoHorasExtrasTotal += bonoHorasExtras;
                    diasCalculo          += diasMes - diasInasistencias;

                    var uiGratificacionDetalle = new BE.UI.GratificacionDetalle();
                    uiGratificacionDetalle.Anho              = anho;
                    uiGratificacionDetalle.MesId             = mes;
                    uiGratificacionDetalle.MesNombre         = Util.GetNameOfMonth(mes);
                    uiGratificacionDetalle.EmpleadoCodigo    = codEmpleado;
                    uiGratificacionDetalle.BonoNocturno      = bonoNocturno;
                    uiGratificacionDetalle.BonoHorasExtras   = bonoHorasExtras;
                    uiGratificacionDetalle.DiasMes           = DateTime.DaysInMonth(anho, mes);
                    uiGratificacionDetalle.DiasInasistencias = diasInasistencias;
                    uiGratificacionDetalle.DiasCalculo       = uiGratificacionDetalle.DiasMes - uiGratificacionDetalle.DiasInasistencias;

                    this.uiGratificacion.Detalle.Add(uiGratificacionDetalle);
                }

                var source = new BindingSource();
                source.DataSource = this.uiGratificacion.Detalle;
                this.dgvDetalleGratificaciones.DataSource = source;

                this.FormatoDetalleGratificacion();

                this.txtDetalleBonoNocturno.Text    = bonoNocturnoTotal.ToString("N2");
                this.txtDetalleBonoHorasExtras.Text = bonoHorasExtrasTotal.ToString("N2");
                this.txtDetalleDiasCalculo.Text     = diasCalculo.ToString();

                this.uiGratificacion.BonoNocturno    = bonoNocturnoTotal / 6;
                this.uiGratificacion.BonoHorasExtras = bonoHorasExtrasTotal / 6;
                this.uiGratificacion.DiasCalculo     = diasCalculo;

                this.txtBonoNocturno.Text = this.uiGratificacion.BonoNocturno.ToString("N2");
                this.txtBonoExtra.Text    = this.uiGratificacion.BonoHorasExtras.ToString("N2");

                this.txtDescuentoRJ.Text       = this.uiGratificacion.DescuentoRetencioJudicial.ToString("N2");
                this.txtDescuentoImpuesto.Text = this.uiGratificacion.DescuentoImpuestos.ToString("N2");

                double gratificacionBruta = this.uiGratificacion.BonoNocturno
                                            + this.uiGratificacion.BonoHorasExtras
                                            + this.uiGratificacion.SueldoBase
                                            + this.uiGratificacion.AsignacionFamiliar;
                this.uiGratificacion.GratificacionBruta = (gratificacionBruta / this.uiGratificacion.Dias) * this.uiGratificacion.DiasCalculo;

                this.txtGratificacionBruta.Text = this.uiGratificacion.GratificacionBruta.ToString("N2");

                this.uiGratificacion.GratificacionBono = gratificacionBruta * beParametros.EsSaludFactor;
                this.txtGratificacionBonificacion.Text = this.uiGratificacion.GratificacionBono.ToString("N2");

                this.uiGratificacion.GratificacionNeta = this.uiGratificacion.GratificacionBruta + this.uiGratificacion.GratificacionBono;
                this.txtGratificacionNeta.Text         = this.uiGratificacion.GratificacionNeta.ToString("N2");

                this.uiGratificacion.GratificacionPago = this.uiGratificacion.GratificacionNeta
                                                         - this.uiGratificacion.DescuentoRetencioJudicial
                                                         - this.uiGratificacion.DescuentoImpuestos;

                this.txtGratificacionPago.Text = this.uiGratificacion.GratificacionPago.ToString("N2");

                #endregion

                this.txtDescuentoImpuesto.ReadOnly = false;
            }
            catch (Exception ex)
            {
                Util.ErrorMessage(ex.Message);
            }
        }
        private BE.UI.PlanillaBoleta CalcularBoleta(int anho, int mes, string codigoEmpleado)
        {
            try
            {
                var uiDetalle = new LN.Planilla(anho, mes).ObtenerPlantillaDetalle(codigoEmpleado);
                if (uiDetalle != null)
                {
                    this.uiPlanillaBoleta = new BE.UI.PlanillaBoleta();

                    this.uiPlanillaBoleta.Id = 0;

                    var uiPlanilla = new LN.Planilla(anho, mes).Obtener();
                    if (this.uiPlanillaBoleta != null)
                    {
                        this.uiPlanillaBoleta.IdPlanilla = uiPlanilla.ID;
                    }
                    uiPlanilla = null;

                    this.uiPlanillaBoleta.Anho      = anho;
                    this.uiPlanillaBoleta.Mes       = mes;
                    this.uiPlanillaBoleta.MesNombre = Util.GetNameOfMonth(mes);
                    this.uiPlanillaBoleta.MesDias   = DateTime.DaysInMonth(anho, mes);

                    #region Asignar datos de Empresa

                    var beEmpresa = new LN.Empresa().Obtener();
                    this.uiPlanillaBoleta.EmpresaNombre    = beEmpresa.NombreComercial;
                    this.uiPlanillaBoleta.EmpresaRuc       = beEmpresa.RUC;
                    this.uiPlanillaBoleta.EmpresaDistrito  = beEmpresa.Ubigeo.Nombre;
                    this.uiPlanillaBoleta.EmpresaDireccion = beEmpresa.DomicilioFiscal;
                    beEmpresa = null;

                    #endregion

                    #region Asignar datos de Empleado

                    var beEmpleado = new LN.Empleado().Obtener(uiDetalle.EmpleadoCodigo);
                    this.uiPlanillaBoleta.EmpleadoCodigo       = beEmpleado.Codigo;
                    this.uiPlanillaBoleta.EmpleadoNombres      = beEmpleado.Nombres;
                    this.uiPlanillaBoleta.EmpleadoApellidos    = $"{beEmpleado.ApellidoPaterno} {beEmpleado.ApellidoMaterno}";
                    this.uiPlanillaBoleta.EmpleadoNroDocumento = beEmpleado.NumeroDocumento;
                    beEmpleado = null;

                    var beEmpleadoRecurso = new LN.Empleado().ObtenerRecurso(uiDetalle.EmpleadoCodigo);
                    this.uiPlanillaBoleta.EmpleadoCargo         = beEmpleadoRecurso.Cargo.Nombre;
                    this.uiPlanillaBoleta.EmpleadoFechaIngreso  = beEmpleadoRecurso.FechaInicio;
                    this.uiPlanillaBoleta.EmpleadoFechaCese     = beEmpleadoRecurso.FechaCese;
                    this.uiPlanillaBoleta.EmpleadoEsSaludCodigo = beEmpleadoRecurso.Autogenerado;
                    if (beEmpleadoRecurso.ONP == true)
                    {
                        this.uiPlanillaBoleta.EmpleadoSppCodigo  = "";
                        this.uiPlanillaBoleta.EmpleadoSppEntidad = uiDetalle.SnpNombre;
                    }
                    else
                    {
                        this.uiPlanillaBoleta.EmpleadoSppCodigo  = beEmpleadoRecurso.CUSPP;
                        this.uiPlanillaBoleta.EmpleadoSppEntidad = uiDetalle.AfpNombre;
                    }
                    beEmpleadoRecurso = null;

                    var uiVacacion = new LN.Vacacion().ObtenerUltimo(codigoEmpleado);
                    if (uiVacacion != null)
                    {
                        this.uiPlanillaBoleta.EmpleadoVacacionSalida  = uiVacacion.VacacionFechaInicial;
                        this.uiPlanillaBoleta.EmpleadoVacacionRetorno = uiVacacion.VacacionFechaFinal;
                    }
                    uiVacacion = null;

                    #endregion

                    #region Asignar datos del Resumen

                    this.uiPlanillaBoleta.DiasLaborados    = 0;
                    this.uiPlanillaBoleta.DiasNoLaborados  = 0;
                    this.uiPlanillaBoleta.DiasSinGoceHaber = 0;
                    this.uiPlanillaBoleta.DiasSubsidiado   = 0;
                    this.uiPlanillaBoleta.HorasNormales    = 0;

                    #endregion

                    #region Asignar datos del Sueldo

                    this.uiPlanillaBoleta.Sueldo               = uiDetalle.Base;
                    this.uiPlanillaBoleta.AsignacionFamiliar   = uiDetalle.AsignacionFamiliar;
                    this.uiPlanillaBoleta.BonificacionNocturna = uiDetalle.BonoNocturnoTotal;
                    this.uiPlanillaBoleta.MovilidadTranslado   = new LN.Movilidad().ObtenerTotal(anho, mes, codigoEmpleado);

                    this.uiPlanillaBoleta.SubsidioDescansoMedico  = 0.0; //FALTA
                    this.uiPlanillaBoleta.BonificacionHorasExtras = uiDetalle.BonoHorasExtrasTotal;
                    this.uiPlanillaBoleta.CantidadHorasExtras     = uiDetalle.BonoHorasExtrasCantidad;

                    this.uiPlanillaBoleta.Cts                       = 0.0; //FALTA
                    this.uiPlanillaBoleta.Vacaciones                = 0.0; //FALTA
                    this.uiPlanillaBoleta.FeriadoDominical          = 0.0; //FALTA
                    this.uiPlanillaBoleta.Gratificacion             = 0.0; //FALTA
                    this.uiPlanillaBoleta.BonificacionGratificacion = 0.0; //FALTA

                    #endregion

                    #region Asignar datos de Aportes y Deducciones

                    this.uiPlanillaBoleta.AfpFondoMonto             = uiDetalle.AfpAporteObligatorio;
                    this.uiPlanillaBoleta.AfpSeguroMonto            = uiDetalle.AfpSeguro;
                    this.uiPlanillaBoleta.AfpComisionMonto          = uiDetalle.AfpComision;
                    this.uiPlanillaBoleta.IpssVidaMonto             = 0.0; //FALTA
                    this.uiPlanillaBoleta.OnpMonto                  = uiDetalle.SnpTotal;
                    this.uiPlanillaBoleta.RentaQuintaMonto          = 0.0; //FALTA
                    this.uiPlanillaBoleta.InasistenciasDias         = uiDetalle.DescuentoInasistenciaCantidad;
                    this.uiPlanillaBoleta.InasistenciasMonto        = uiDetalle.DescuentoInasistenciaTotal;
                    this.uiPlanillaBoleta.AdelantoMonto             = uiDetalle.AdelantoTotal;
                    this.uiPlanillaBoleta.TardanzaMinutos           = uiDetalle.DescuentoTardanzaCantidad;
                    this.uiPlanillaBoleta.TardanzaMonto             = uiDetalle.DescuentoTardanzaTotal;
                    this.uiPlanillaBoleta.GratificacionMonto        = 0.0; //FALTA
                    this.uiPlanillaBoleta.RetencionJudicialMonto    = uiDetalle.RetencionJudicialTotal;
                    this.uiPlanillaBoleta.SeguroVidaTrabajadorMonto = 0.0; //FALTA
                    this.uiPlanillaBoleta.IpssSaludTrabajadorMonto  = 0.0; //FALTA
                    this.uiPlanillaBoleta.SeguroVidaEmpleadoMonto   = 0.0; //FALTA
                    this.uiPlanillaBoleta.IpssSaludEmpleadoMonto    = 0.0; //FALTA

                    #endregion

                    //var propertyInfos = uiBoleta.GetType().GetProperties()
                    //    .Where(x => x.PropertyType == typeof(double) && x.CanWrite == true)
                    //    .ToList();
                    //foreach (var prop in propertyInfos)
                    //{
                    //    prop.SetValue(uiBoleta, Math.Round((double)prop.GetValue(uiBoleta), 2));
                    //}

                    uiPlanillaBoleta.GetType().GetProperties()
                    .Where(x => x.PropertyType == typeof(double) && x.CanWrite == true)
                    .ToList()
                    .ForEach(x => x.SetValue(
                                 uiPlanillaBoleta,
                                 Math.Round((double)x.GetValue(uiPlanillaBoleta), 2)
                                 )
                             );
                }

                return(uiPlanillaBoleta);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }