public async Task <FormatoCausacionyLiquidacionPagos> ObtenerFormatoSolicitudPago(int planPagoId, int pciId, decimal valorBaseCotizacion, int?actividadEconomicaId) { FormatoCausacionyLiquidacionPagos formato = new FormatoCausacionyLiquidacionPagos(); try { var planPagoDto = await _planPagoRepository.ObtenerDetallePlanPagoParaSolicitudPago(planPagoId); if (planPagoDto != null) { IEnumerable <ParametroGeneral> parametroGenerales = await _repoLista.ObtenerParametrosGenerales(); var parametros = parametroGenerales.ToList(); ParametroLiquidacionTercero parametroLiquidacion = await _terceroRepository.ObtenerParametroLiquidacionXTercero(planPagoDto.TerceroId, pciId); if (parametroGenerales != null && parametroLiquidacion != null) { if (parametroLiquidacion.ModalidadContrato == (int)ModalidadContrato.ContratoPrestacionServicio) { formato = ObtenerFormatoCausacion_ContratoPrestacionServicio(planPagoDto, parametroLiquidacion, parametros, valorBaseCotizacion); } formato.PlanPagoId = planPagoId; } } else { throw new Exception($"No se pudo obtener información del plan de pago"); } } catch (Exception) { throw; } return(formato); }