int index, int col) {
StringBuffer resumen = new StringBuffer();
StockConceptPerformance stockConceptPerformance = StocksUtils
.getStockConceptPerformance(Arrays.asList(groupdata));
Calendar calendar = GregorianCalendar.getInstance();
calendar.setTime(stockConceptPerformance.getLastDate());
Integer year = calendar.get(Calendar.YEAR);
Double percentageBelow6000 = TimeDependentConstantsBusiness.getTimeDependentConstantValueByYearAndTimeDependentConstantType(year, TimeDependentConstantType.PERCENTAGE_BELOW_6000).getNumericalValueAsDouble();
Double percentageBetween6000and30000 = TimeDependentConstantsBusiness.getTimeDependentConstantValueByYearAndTimeDependentConstantType(year, TimeDependentConstantType.PERCENTAGE_BETWEEN_6000_AND_30000).getNumericalValueAsDouble();
Double percentageAbove30000 = TimeDependentConstantsBusiness.getTimeDependentConstantValueByYearAndTimeDependentConstantType(year, TimeDependentConstantType.PERCENTAGE_ABOVE_30000).getNumericalValueAsDouble();
Double percentageUntilJune = TimeDependentConstantsBusiness.getTimeDependentConstantValueByYearAndTimeDependentConstantType(year, TimeDependentConstantType.PERCENTAGE_FOR_JUNE).getNumericalValueAsDouble();
Double percentageUntilNovember = TimeDependentConstantsBusiness.getTimeDependentConstantValueByYearAndTimeDependentConstantType(year, TimeDependentConstantType.PERCENTAGE_FOR_NOVEMBER).getNumericalValueAsDouble();
Double gananciasEnBolsa = 0.0;
Double porcentajeAplicado = 0.0;
Double aTributar = 0.0;
if (stockConceptPerformance.getProfit() > 0) {
gananciasEnBolsa = stockConceptPerformance.getProfit();
if (gananciasEnBolsa < 6000) {
porcentajeAplicado = percentageBelow6000;
} else if (gananciasEnBolsa < 30000) {
porcentajeAplicado = percentageBetween6000and30000;
} else {
porcentajeAplicado = percentageAbove30000;
}
aTributar = gananciasEnBolsa * porcentajeAplicado / 100.0;
}
resumen.append("Número de valores vendidos: "
+ stockConceptPerformance.getNumberOfStocks() + "\n"
+ "Beneficios en Bolsa: " + NumberFomatter.formatMoney(gananciasEnBolsa)
+ "€\n" + "Porcentaje Aplicado: "
+ NumberFomatter.formatPercentage(porcentajeAplicado) + "%\n"
+ "Total A Tributar: " + NumberFomatter.formatMoney(aTributar) + "€\n"
+ "\t A Tributar en Junio: " + NumberFomatter.formatMoney(aTributar * percentageUntilJune / 100.0)