//ART.187 INDEMNIZACION POR GARANTIA PARA MUJER EMBARAZADA private Boolean ObtenerIndemnizacionXDespidoMujerEmbarazada() { try { double totalRubroAcumulado = 0; //VERIFICA SI ES MUJER EMBARAZADA if (Convert.ToBoolean(_Info.EsMujerEmbarazada)) { totalRubroAcumulado = _Info.UltimaRemuneracion * 12;//EQUIVALE A 1 AÑO DE REMUNERACION if (totalRubroAcumulado > 0) { ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Observacion = "Indemnización por despido y declaratoria de ineficaz de la trabajadora embarazada"; item.Valor = Math.Round(totalRubroAcumulado, 2); item.IdRubro = info_parametro.IdRubro_acta_finiquito; lst_valores_x_indegnizacion.Add(item); } } return(true); } catch (Exception) { throw; } }
public Boolean GetExiste(ro_Acta_Finiquito_Detalle_Info info, ref string msg) { try { Boolean valorRetornar = false; using (EntitiesRoles db = new EntitiesRoles()) { int cont = (from a in db.ro_Acta_Finiquito_Detalle where a.IdEmpresa == info.IdEmpresa && a.IdActaFiniquito == info.IdActaFiniquito && a.IdSecuencia == info.IdSecuencia select a).Count(); if (cont > 0) { valorRetornar = true; } else { valorRetornar = false; } } return(valorRetornar); } catch (Exception ex) { string arreglo = ToString(); tb_sis_Log_Error_Vzen_Data oDataLog = new tb_sis_Log_Error_Vzen_Data(); tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now); mensaje = ex.InnerException + " " + ex.Message; oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje); throw new Exception(ex.InnerException.ToString()); } }
//ART.51 INDEMNIZACION POR ESTABILIDAD LABORAL - LEY DE DISCAPACIDAD private Boolean ObtenerIndemnizacionXDespidoDiscapacitado() { try { double totalRubroAcumulado = 0; //VERIFICA SI ES DISCAPACITADO if (Convert.ToBoolean(_Info.EsPorDiscapacidad)) { totalRubroAcumulado = _Info.UltimaRemuneracion * 18;//EQUIVALE A 18 MESES DE REMUNERACION DEL MEJOR SUELDO if (totalRubroAcumulado > 0) { ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Observacion = "Indemnización por Estabilidad Laboral Art.51 - Ley de Discapacidad"; item.Valor = Math.Round(totalRubroAcumulado, 2); item.IdRubro = info_parametro.IdRubro_acta_finiquito; lst_valores_x_indegnizacion.Add(item); } } return(true); } catch (Exception) { throw; } }
private Boolean Get_prestamos_Pendientes() { try { double totalPrestamo = 0; ro_prestamo_detalle_Bus oRo_prestamo_detalle_Bus = new ro_prestamo_detalle_Bus(); totalPrestamo = (from a in oRo_prestamo_detalle_Bus.GetListConsultaPorEmpleado(_Info.IdEmpresa, _Info.IdEmpleado) select a.TotalCuota).Sum(); if (totalPrestamo > 0) { ro_Acta_Finiquito_Detalle_Info item3 = new ro_Acta_Finiquito_Detalle_Info(); item3.IdEmpresa = _Info.IdEmpresa; item3.IdEmpleado = _Info.IdEmpleado; item3.IdActaFiniquito = _Info.IdActaFiniquito; item3.Observacion = "Otros Descuentos por Préstamos "; item3.Valor = totalPrestamo; item3.IdRubro = info_parametro.IdRubro_acta_finiquito; lst_acta_finiquito_detalle.Add(item3); } return(true); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "pu_ObtenerPrestamosPendientes", ex.Message), ex) { EntityType = typeof(ro_Acta_Finiquito_Bus) }; } }
public Boolean GrabarBD(ro_Acta_Finiquito_Detalle_Info item, ref string msg) { try { using (EntitiesRoles db = new EntitiesRoles()) { ro_Acta_Finiquito_Detalle info = new ro_Acta_Finiquito_Detalle(); info.IdEmpresa = item.IdEmpresa; info.IdActaFiniquito = item.IdActaFiniquito; info.IdSecuencia = GetId(item.IdEmpresa, item.IdEmpleado, item.IdActaFiniquito); info.Observacion = item.Observacion; info.Valor = item.Valor; info.IdRubro = item.IdRubro; db.ro_Acta_Finiquito_Detalle.Add(info); db.SaveChanges(); } return(true); } catch (Exception ex) { string arreglo = ToString(); tb_sis_Log_Error_Vzen_Data oDataLog = new tb_sis_Log_Error_Vzen_Data(); tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now); mensaje = ex.InnerException + " " + ex.Message; oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje); throw new Exception(ex.InnerException.ToString()); } }
public Boolean ModificarBD(ro_Acta_Finiquito_Detalle_Info item, ref string msg) { try { using (EntitiesRoles db = new EntitiesRoles()) { var info = db.ro_Acta_Finiquito_Detalle.First(v => v.IdEmpresa == item.IdEmpresa && v.IdActaFiniquito == item.IdActaFiniquito && v.IdSecuencia == item.IdSecuencia); info.Valor = item.Valor; db.SaveChanges(); } return(true); } catch (Exception ex) { string arreglo = ToString(); tb_sis_Log_Error_Vzen_Data oDataLog = new tb_sis_Log_Error_Vzen_Data(); tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now); mensaje = ex.InnerException + " " + ex.Message; oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje); throw new Exception(ex.InnerException.ToString()); } }
//OBTNER NOVEDADES PENDIENTES DE DESCUENTO O PAGO private Boolean ObtenerNovedadesPendientes() { try { var novedades = bus_novedad.get_list_nov_liq_empleado(_Info.IdEmpresa, _Info.IdEmpleado); foreach (var item_nov in novedades) { ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Observacion = item_nov.Observacion; if (item_nov.rub_tipo == "E") { item.Valor = Math.Round(item_nov.Valor * -1, 2); } else { item.Valor = Math.Round(item_nov.Valor, 2); } item.IdRubro = item_nov.IdRubro; lst_valores_x_indegnizacion.Add(item); } return(true); } catch (Exception) { throw; } }
//ART.187 INDEMNIZACION POR GARANTIA PARA DIRIGENTES SINDICALES private Boolean ObtenerIndemnizacionXDespidoDirigenteSindical() { try { double totalRubroAcumulado = 0; //VERIFICA SI ES DIRIGENTE SINDICAL if (Convert.ToBoolean(_Info.EsDirigenteSindical)) { totalRubroAcumulado = _Info.UltimaRemuneracion * 12;//EQUIVALE A 1 AÑO DE REMUNERACION if (totalRubroAcumulado > 0) { ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Observacion = "Indemnización por Garantía Dirigentes Sindicales según Art.187"; item.Valor = Math.Round(totalRubroAcumulado, 2); item.IdRubro = info_parametro.IdRubro_acta_finiquito; lst_valores_x_indegnizacion.Add(item); } } return(true); } catch (Exception) { throw; } }
public void AddRow(ro_Acta_Finiquito_Detalle_Info info_det) { List <ro_Acta_Finiquito_Detalle_Info> list = get_list(); info_det.IdSecuencia = list.Count == 0 ? 1 : list.Max(q => q.IdSecuencia) + 1; list.Add(info_det); }
public ro_Acta_Finiquito_Detalle_Info get_info(int IdEmpresa, decimal IdEmpleado, decimal IdActaFiniquito, int Secuencia) { try { ro_Acta_Finiquito_Detalle_Info info = new ro_Acta_Finiquito_Detalle_Info(); using (Entities_rrhh Context = new Entities_rrhh()) { ro_Acta_Finiquito_Detalle Entity = Context.ro_Acta_Finiquito_Detalle.FirstOrDefault(q => q.IdEmpresa == IdEmpresa && q.IdActaFiniquito == IdActaFiniquito && q.IdSecuencia == Secuencia); if (Entity == null) { return(null); } info = new ro_Acta_Finiquito_Detalle_Info { IdEmpresa = Entity.IdEmpresa, IdActaFiniquito = Entity.IdActaFiniquito, Valor = Entity.Valor, Observacion = Entity.Observacion, }; } return(info); } catch (Exception) { throw; } }
public List <ro_Acta_Finiquito_Detalle_Info> GetListConsultaPorId(int idEmpresa, decimal idEmpleado, decimal idActaFiniquito) { List <ro_Acta_Finiquito_Detalle_Info> listado = new List <ro_Acta_Finiquito_Detalle_Info>(); try { EntitiesRoles db = new EntitiesRoles(); var datos = (from a in db.ro_Acta_Finiquito_Detalle where a.IdEmpresa == idEmpresa && a.IdActaFiniquito == idActaFiniquito select a); foreach (var item in datos) { ro_Acta_Finiquito_Detalle_Info info = new ro_Acta_Finiquito_Detalle_Info(); info.IdEmpresa = item.IdEmpresa; info.IdActaFiniquito = item.IdActaFiniquito; info.IdSecuencia = item.IdSecuencia; info.Observacion = item.Observacion; info.Valor = item.Valor; listado.Add(info); } return(listado); } catch (Exception ex) { string arreglo = ToString(); tb_sis_Log_Error_Vzen_Data oDataLog = new tb_sis_Log_Error_Vzen_Data(); tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now); mensaje = ex.InnerException + " " + ex.Message; oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje); throw new Exception(ex.InnerException.ToString()); } }
private Boolean Obtenersueldo_no_pagados() { try { DateTime fecha_inicio; fecha_inicio = new DateTime(_Info.FechaSalida.Year, _Info.FechaSalida.Month, 1); dias_trabajados = (int)(Convert.ToDateTime(_Info.FechaSalida) - fecha_inicio).TotalDays; dias_trabajados = dias_trabajados + 1; sueldo = (double)bus_contrato.get_sueldo_actual(_Info.IdEmpresa, _Info.IdEmpleado); sueldo_base = Math.Round((sueldo / 30) * dias_trabajados, 2); ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Observacion = "Sueldo no pagado"; item.Valor = sueldo_base; item.IdRubro = info_rubros_calculados.IdRubro_sueldo; lst_valores_x_indegnizacion.Add(item); return(true); } catch (Exception) { throw; } }
public ActionResult EditingUpdate([ModelBinder(typeof(DevExpressEditorsBinder))] ro_Acta_Finiquito_Detalle_Info info_det) { info.IdEmpresa = Convert.ToInt32(SessionFixed.IdEmpresa); if (info_det != null) { if (info_det.IdRubro != "") { ro_rubro_tipo_Info info_rubro = bus_rubro.get_info(info.IdEmpresa, info_det.IdRubro); if (info_rubro != null) { if (info_rubro.ru_tipo == "E") { info_det.Valor = info_det.Valor * -1; } } } } if (ModelState.IsValid) { lst_detalle.UpdateRow(info_det, Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual)); } ro_Acta_Finiquito_Info model = new ro_Acta_Finiquito_Info(); model.lst_detalle = lst_detalle.get_list(Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual)); cargar_combos_detalle(); return(PartialView("_GridViewPartial_liquidacion_empleado_det", model.lst_detalle)); }
public void AddRow(ro_Acta_Finiquito_Detalle_Info info_det, decimal IdTransaccionSession) { List <ro_Acta_Finiquito_Detalle_Info> list = get_list(IdTransaccionSession); info_det.IdSecuencia = list.Count == 0 ? 1 : list.Max(q => q.IdSecuencia) + 1; list.Add(info_det); }
//OBTNER PRESTAMOS private Boolean ObtenerCuotasPrestamosPendientes() { try { double prestamo = 0; prestamo = bus_prestamo.get_valor_cuotas_pendientes(_Info.IdEmpresa, _Info.IdEmpleado); if (prestamo > 0) { ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Observacion = "Cuotas de prestamos pendientes de cobors "; item.Valor = prestamo * -1; item.IdRubro = "277"; lst_valores_x_indegnizacion.Add(item); } return(true); } catch (Exception) { throw; } }
//ART.179 INDEMNIZACION POR NO RECIBIR AL TRABAJADOR EN CASO DE ENFERMEDAD NO PROFESIONAL private Boolean ObtenerIndemnizacionXDespidoEnfermedadNoProfesional() { try { double totalRubroAcumulado = 0; //VERIFICA SI ES CASO DE ENFERMEDAD NO PROFESIONAL if (Convert.ToBoolean(_Info.EsPorEnfermedadNoProfesional)) { totalRubroAcumulado = _Info.UltimaRemuneracion * 6;//EQUIVALE A 6 MESES DE REMUNERACION if (totalRubroAcumulado > 0) { ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Observacion = "Indemnización por NO recibir al trabajador en caso de enfermedad no Profesional según Art.175 y 179"; item.Valor = Math.Round(totalRubroAcumulado, 2); item.IdRubro = info_parametro.IdRubro_acta_finiquito; lst_valores_x_indegnizacion.Add(item); } } return(true); } catch (Exception) { throw; } }
private Boolean Get_Decimos_Pendientes() { try { double totalRubroAcumulado = 0; if (_Info != null) { //PROVISION DECIMO TERCER totalRubroAcumulado = (from a in oRo_rol_detalle_x_rubro_acumulado_Bus.GetListConsultaPorEmpleado(_Info.IdEmpresa, _Info.IdEmpleado, "199") select a.Valor).Sum(); if (totalRubroAcumulado > 0) { ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Signo = "+"; item.Observacion = "Décima Tercera Remuneración "; item.Valor = totalRubroAcumulado; oRo_Acta_Finiquito_Detalle_Bus.GrabarBD(item, ref mensaje); } //PROVISION DECIMO CUARTO totalRubroAcumulado = (from a in oRo_rol_detalle_x_rubro_acumulado_Bus.GetListConsultaPorEmpleado(_Info.IdEmpresa, _Info.IdEmpleado, "200") select a.Valor).Sum(); if (totalRubroAcumulado > 0) { ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Signo = "+"; item.Observacion = "Décima cuarta Remuneración "; item.Valor = totalRubroAcumulado; oRo_Acta_Finiquito_Detalle_Bus.GrabarBD(item, ref mensaje); } } return(true); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "pu_ObtenerDecimoTercerSueldoPendiente", ex.Message), ex) { EntityType = typeof(ro_Acta_Finiquito_Bus) }; } }
public void UpdateRow(ro_Acta_Finiquito_Detalle_Info info_det, decimal IdTransaccionSession) { ro_Acta_Finiquito_Detalle_Info edited_info = get_list(IdTransaccionSession).Where(m => m.IdSecuencia == info_det.IdSecuencia).First(); edited_info.IdActaFiniquito = info_det.IdActaFiniquito; edited_info.IdRubro = info_det.IdRubro; edited_info.Valor = info_det.Valor; edited_info.Observacion = info_det.Observacion; }
public ActionResult EditingDelete([ModelBinder(typeof(DevExpressEditorsBinder))] ro_Acta_Finiquito_Detalle_Info info_det) { lst_detalle.DeleteRow(info_det.IdSecuencia, Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual)); ro_Acta_Finiquito_Info model = new ro_Acta_Finiquito_Info(); model.lst_detalle = lst_detalle.get_list(Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual)); cargar_combos_detalle(); return(PartialView("_GridViewPartial_liquidacion_empleado_det", model)); }
private Boolean pu_ObtenerFondoReserva() { try { //198 double totalRubroAcumulado = 0; double diasTrabajados = 0; int cont = 0; if (_Info != null) { ro_rol_detalle_x_rubro_acumulado_Bus oRo_rol_detalle_x_rubro_acumulado_Bus = new ro_rol_detalle_x_rubro_acumulado_Bus(); //OBTENER DIAS TRABAJADOS DEL EMPLEADO diasTrabajados = CalcularDiasDeDiferencia(_Info.FechaIngreso, _Info.FechaSalida); //AQUI VERIFICAR SI EL EMPLEADO ACUMULA EL FONDO DE RESERVA ro_empleado_x_rubro_acumulado_Bus oRo_empleado_x_rubro_acumulado_Bus = new ro_empleado_x_rubro_acumulado_Bus(); cont = (from a in oRo_empleado_x_rubro_acumulado_Bus.Get_List_empleado_x_rubro_acumulado(_Info.IdEmpresa, _Info.IdEmpleado) where a.IdRubro == "296" select a.IdRubro).Count(); //Calcular Fondo de Reserva if (diasTrabajados >= 360) { totalRubroAcumulado = totalRubroAcumulado + (_sueldoProporcional * 0.0833); } //EN CASO QUE EL EMPLEADO MENSUALICE EL FONDO DE RESERVA if (totalRubroAcumulado > 0 && cont == 0) { ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Signo = "+"; item.Observacion = "Fondo de Reserva"; item.Valor = totalRubroAcumulado; //GRABA EL REGISTRO oRo_Acta_Finiquito_Detalle_Bus.GrabarBD(item, ref mensaje); } } return(true); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "pu_ObtenerFondoReserva", ex.Message), ex) { EntityType = typeof(ro_Acta_Finiquito_Bus) }; } }
//ART.185 DESAHUCIO private Boolean pu_ObtenerIndemnizacionXDesahucio() { try { int anioTrabajados = 0; double totalRubroAcumulado = 0; TimeSpan dias; dias = _Info.FechaSalida - _Info.FechaIngreso; if (dias.TotalDays < 360) { return(false); } anioTrabajados = Convert.ToInt32(Math.Floor(dias.TotalDays / 360)); if (anioTrabajados < 1) { return(false); } //CORRESPONDE EL 25% X CADA AÑO/FRACCION DE AÑO DE TRABAJO totalRubroAcumulado = _Info.UltimaRemuneracion * 0.25 * anioTrabajados; if (totalRubroAcumulado > 0) { ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Signo = "+"; item.Observacion = "Bonificación por Desahucio según Art.185"; item.Valor = totalRubroAcumulado; //GRABA EL REGISTRO oRo_Acta_Finiquito_Detalle_Bus.GrabarBD(item, ref mensaje); } return(true); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "CalcularAniosDeDiferencia", ex.Message), ex) { EntityType = typeof(ro_Acta_Finiquito_Bus) }; } }
//ART.188 INDEMNIZACION POR DESPIDO INTEMPESTIVO private Boolean pu_ObtenerIndemnizacionXDespidoIntempestivo() { try { int anioTrabajados = 0; double totalRubroAcumulado = 0; anioTrabajados = CalcularAniosDeDiferencia(_Info.FechaSalida, _Info.FechaIngreso); if (anioTrabajados <= 3) { totalRubroAcumulado = _Info.UltimaRemuneracion * 3; //HASTA 3 AÑOS DE TRABAJO RECIBE 3 MESES DE REMUNERACION } else { if (anioTrabajados <= 25) {//PUEDE ACUMULAR UNICAMENTE HASTA 25 MESES DE REMUNERACION X CADA AÑO DE TRABAJO totalRubroAcumulado = _Info.UltimaRemuneracion * anioTrabajados; } } if (totalRubroAcumulado > 0) { ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Signo = "+"; item.Observacion = "Indemnización por Despido Intempestivo según Art.188"; item.Valor = totalRubroAcumulado; //GRABA EL REGISTRO oRo_Acta_Finiquito_Detalle_Bus.GrabarBD(item, ref mensaje); } return(true); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "pu_ObtenerIndemnizacionXDespidoIntempestivo", ex.Message), ex) { EntityType = typeof(ro_Acta_Finiquito_Bus) }; } }
private Boolean pu_ObtenerVacacionesPendiente() { try { double valor_x_anio = 0; if (_Info != null) { ro_rol_detalle_x_rubro_acumulado_Bus oRo_rol_detalle_x_rubro_acumulado_Bus = new ro_rol_detalle_x_rubro_acumulado_Bus(); //ACUMULAR LAS VACACIONES PROVISIONADAS List <ro_rol_detalle_x_rubro_acumulado_Info> lista = new List <ro_rol_detalle_x_rubro_acumulado_Info>(); lista = oRo_rol_detalle_x_rubro_acumulado_Bus.GetListConsultaPorEmpleado(_Info.IdEmpresa, _Info.IdNomina_Tipo, _Info.IdEmpleado); if (lista.Count() > 0) { foreach (var item in lista) { ro_Acta_Finiquito_Detalle_Info info_va = new ro_Acta_Finiquito_Detalle_Info(); info_va.IdEmpresa = item.IdEmpresa; info_va.IdEmpleado = item.IdEmpleado; info_va.IdActaFiniquito = _Info.IdActaFiniquito; info_va.Observacion = "Vacaciones no gozadas del último período " + item.pe_anio; if (item.Valor >= valor_x_anio) { info_va.Valor = item.Valor - valor_x_anio; } else { info_va.Valor = item.Valor; } item.IdRubro = info_parametro.IdRubro_acta_finiquito; lst_acta_finiquito_detalle.Add(info_va); } } } return(true); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "pu_ObtenerVacacionesPendiente", ex.Message), ex) { EntityType = typeof(ro_Acta_Finiquito_Bus) }; } }
private Boolean Get_sueldo_no_Pagados( ) { try { if (_Info != null) { ro_Rol_Detalle_Bus oRo_Rol_Detalle_Bus = new ro_Rol_Detalle_Bus(); List <ro_Rol_Detalle_Info> oListTo_Rol_Detalle_Info = new List <ro_Rol_Detalle_Info>(); oListTo_Rol_Detalle_Info = oRo_Rol_Detalle_Bus.GetListConsultaPorRubroPendiente(_Info.IdEmpresa, _Info.IdEmpleado, "950", _Info.FechaIngreso, _Info.FechaSalida, ref mensaje); //TOTAL A PAGAR DEL DETALLE DE LOS ROLES NO PAGADOS(PERIODO CERRADO) if (oListTo_Rol_Detalle_Info.Count > 0) { foreach (ro_Rol_Detalle_Info oRo_Rol_Detalle_Info in oListTo_Rol_Detalle_Info) { ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Signo = "+"; item.Observacion = "Remuneración no cobrada desde el " + oRo_Rol_Detalle_Info.FechaIni.ToShortDateString() + " hasta " + oRo_Rol_Detalle_Info.FechaFin.ToShortDateString(); item.Valor = Convert.ToDouble(oRo_Rol_Detalle_Info.PendientePago); //GRABA EL REGISTRO oRo_Acta_Finiquito_Detalle_Bus.GrabarBD(item, ref mensaje); //OBTIENE LA ULTIMA FECHA DEL PERIODO DEL ROL PROCESADO _fechaInicial = oRo_Rol_Detalle_Info.FechaFin.AddDays(1); } } } return(true); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "pu_ObtenerSueldoPendiente", ex.Message), ex) { EntityType = typeof(ro_Acta_Finiquito_Bus) }; } }
private Boolean Get_novedades_Pendientes() { try { //OBTENER TODAS LAS NOVEDADES PENDIENTES ro_Empleado_Novedad_Det_Bus oRo_Empleado_Novedad_Det_Bus = new ro_Empleado_Novedad_Det_Bus(); List <ro_Empleado_Novedad_Det_Info> List_Empleado_Novedad_Det = new List <ro_Empleado_Novedad_Det_Info>(); List_Empleado_Novedad_Det = oRo_Empleado_Novedad_Det_Bus.Get_List_Empleado_Novedad_Det_x_RubroPendiente(_Info.IdEmpresa, _Info.IdEmpleado, _fechaInicial, ref mensaje); foreach (ro_Empleado_Novedad_Det_Info item in List_Empleado_Novedad_Det) { ro_Acta_Finiquito_Detalle_Info ifo_det = new ro_Acta_Finiquito_Detalle_Info(); ifo_det.IdEmpresa = _Info.IdEmpresa; ifo_det.IdEmpleado = _Info.IdEmpleado; ifo_det.IdActaFiniquito = _Info.IdActaFiniquito; if (item.ru_tipo == "I") { ifo_det.Signo = "+"; ifo_det.Observacion = item.ru_descripcion;; ifo_det.Valor = item.Valor; oRo_Acta_Finiquito_Detalle_Bus.GrabarBD(ifo_det, ref mensaje); } else { ifo_det.Signo = "-"; ifo_det.Observacion = item.ru_descripcion; ifo_det.Valor = item.Valor; oRo_Acta_Finiquito_Detalle_Bus.GrabarBD(ifo_det, ref mensaje); } } return(true); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "pu_ObtenerNovedadesPendientes", ex.Message), ex) { EntityType = typeof(ro_Acta_Finiquito_Bus) }; } }
//ART.188 INDEMNIZACION POR DESPIDO INTEMPESTIVO private bool ObtenerIndemnizacionXDespidoIntempestivo() { try { int anioTrabajados = 0; double totalRubroAcumulado = 0; anioTrabajados = Math.Abs(_Info.FechaSalida.Year - _Info.FechaIngreso.Year); if (anioTrabajados <= 3) { totalRubroAcumulado = _Info.UltimaRemuneracion * 3; //HASTA 3 AÑOS DE TRABAJO RECIBE 3 MESES DE REMUNERACION } else { if (anioTrabajados <= 25) {//PUEDE ACUMULAR UNICAMENTE HASTA 25 MESES DE REMUNERACION X CADA AÑO DE TRABAJO totalRubroAcumulado = _Info.UltimaRemuneracion * anioTrabajados; } } if (totalRubroAcumulado > 0) { ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Observacion = "Indemnización por Despido Intempestivo según Art.188"; item.Valor = Math.Round(totalRubroAcumulado, 2); item.IdRubro = info_parametro.IdRubro_acta_finiquito; lst_valores_x_indegnizacion.Add(item); } return(true); } catch (Exception) { throw; } }
//ART.185 DESAHUCIO private Boolean ObtenerIndemnizacionXDesahucio() { try { int anioTrabajados = 0; double totalRubroAcumulado = 0; TimeSpan dias; dias = _Info.FechaSalida - _Info.FechaIngreso; if (dias.TotalDays < 360) { return(false); } anioTrabajados = Convert.ToInt32(Math.Floor(dias.TotalDays / 360)); if (anioTrabajados < 1) { return(false); } //CORRESPONDE EL 25% X CADA AÑO/FRACCION DE AÑO DE TRABAJO totalRubroAcumulado = _Info.UltimaRemuneracion * 0.25 * anioTrabajados; if (totalRubroAcumulado > 0) { ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Observacion = "Bonificación por Desahucio según Art.185"; item.Valor = Math.Round(totalRubroAcumulado, 2); item.IdRubro = info_parametro.IdRubro_acta_finiquito; item.IdRubro = info_parametro.IdRubro_acta_finiquito; lst_valores_x_indegnizacion.Add(item); } return(true); } catch (Exception) { throw; } }
private Boolean ObtenerAportePersonal() { try { ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Observacion = "Aporte personal"; item.Valor = Math.Round((sueldo_base * info_parametro.Porcentaje_aporte_pers) * -1, 2); item.IdRubro = info_rubros_calculados.IdRubro_iess_perso; lst_valores_x_indegnizacion.Add(item); return(true); } catch (Exception) { throw; } }
private Boolean ObtenerProvisionFondoReserva() { try { ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Observacion = "Provision de fondo de reserva"; item.Valor = Math.Round((sueldo_base * 0.0833), 2); item.IdRubro = info_rubros_calculados.IdRubro_fondo_reserva; lst_valores_x_indegnizacion.Add(item); return(true); } catch (Exception) { throw; } }
private Boolean ObtenerProvisionDecimoIV() { try { var vacaciones = bus_rubros_acumulados.get_valor_x_rubro_acumulado(_Info.IdEmpresa, _Info.IdEmpleado, info_rubros_calculados.IdRubro_prov_DIV); ro_Acta_Finiquito_Detalle_Info item = new ro_Acta_Finiquito_Detalle_Info(); item.IdEmpresa = _Info.IdEmpresa; item.IdEmpleado = _Info.IdEmpleado; item.IdActaFiniquito = _Info.IdActaFiniquito; item.Observacion = "Decima cuarta remuneracón"; item.Valor = Math.Round(vacaciones + ((info_parametro.Sueldo_basico / 360) * dias_trabajados), 2); item.IdRubro = info_rubros_calculados.IdRubro_prov_DIV; lst_valores_x_indegnizacion.Add(item); return(true); } catch (Exception) { throw; } }