Examples of StockConceptPerformance


Examples of org.pau.assetmanager.viewmodel.stocks.StockConceptPerformance

      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)
View Full Code Here

Examples of org.pau.assetmanager.viewmodel.stocks.StockConceptPerformance

      Map<String, StockConceptPerformance> stocksConceptToProfitLimitedToNumberOfSoldSlocks) {
    DefaultCategoryDataset model = new DefaultCategoryDataset();

    for (String concept : stocksConceptToProfitLimitedToNumberOfSoldSlocks
        .keySet()) {
      StockConceptPerformance stockConceptPerformance = stocksConceptToProfitLimitedToNumberOfSoldSlocks
          .get(concept);
      model.addValue(stockConceptPerformance.getProfit(), concept,
          stockConceptPerformance);
    }
    return model;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.