Package org.projectforge.fibu

Examples of org.projectforge.fibu.MonthlyEmployeeReportEntry


      final Map<String, Kost2Row> rows = report.getKost2Rows();
      BigDecimal sum = BigDecimal.ZERO;
      int j = rows.size();
      for (final Kost2Row row : rows.values()) {
        final Kost2DO kost2 = row.getKost2();
        final MonthlyEmployeeReportEntry entry = report.getKost2Durations().get(kost2.getId());
        mapping.add(ExcelColumn.KOST1, kost1.getNummer());
        mapping.add(ExcelColumn.MITARBEITER, user.getFullname());
        mapping.add(ExcelColumn.KOST2, kost2.getNummer());
        final BigDecimal duration = new BigDecimal(entry.getMillis() / 1000); // Seconds
        // duration = duration.divide(new BigDecimal(60 * 60 * 24), 8, RoundingMode.HALF_UP); // Fraction of day (24 hours)
        // mapping.add(ExcelColumn.STUNDEN, duration);
        mapping.add(ExcelColumn.STUNDEN, duration.divide(new BigDecimal(3600), 2, RoundingMode.HALF_UP));
        mapping.add(ExcelColumn.BEZEICHNUNG, kost2.getToolTip());
        final BigDecimal betrag = CurrencyHelper.multiply(bruttoMitAGAnteil,
            new BigDecimal(entry.getMillis()).divide(netDuration, 8, RoundingMode.HALF_UP));
        sum = sum.add(betrag);
        if (--j == 0) {
          final BigDecimal korrektur = bruttoMitAGAnteil.subtract(sum);
          mapping.add(ExcelColumn.BRUTTO_MIT_AG, betrag.add(korrektur));
          mapping.add(ExcelColumn.KORREKTUR, korrektur);
View Full Code Here


      addLabelCols(row, cost2, null, "kost2.nummer:" + cost2.getFormattedNumber(), report.getUser(), report.getFromDate().getTime(), report
          .getToDate().getTime());
      final RepeatingView colWeekRepeater = new RepeatingView("colWeekRepeater");
      row.add(colWeekRepeater);
      for (final MonthlyEmployeeReportWeek week : report.getWeeks()) {
        final MonthlyEmployeeReportEntry entry = week.getKost2Entries().get(kost2Row.getKost2().getId());
        colWeekRepeater.add(new Label(colWeekRepeater.newChildId(), entry != null ? entry.getFormattedDuration() : ""));
      }
      row.add(new Label("sum", report.getKost2Durations().get(cost2.getId()).getFormattedDuration()));
    }

    for (final Map.Entry<String, TaskDO> rowEntry : report.getTaskEntries().entrySet()) {
      final WebMarkupContainer row = new WebMarkupContainer(rowRepeater.newChildId());
      rowRepeater.add(row);
      if (rowCounter++ % 2 == 0) {
        row.add(AttributeModifier.replace("class", "even"));
      } else {
        row.add(AttributeModifier.replace("class", "odd"));
      }
      final TaskDO task = rowEntry.getValue();
      addLabelCols(row, null, task, null, report.getUser(), report.getFromDate().getTime(), report.getToDate().getTime());
      final RepeatingView colWeekRepeater = new RepeatingView("colWeekRepeater");
      row.add(colWeekRepeater);
      for (final MonthlyEmployeeReportWeek week : report.getWeeks()) {
        final MonthlyEmployeeReportEntry entry = week.getTaskEntries().get(task.getId());
        colWeekRepeater.add(new Label(colWeekRepeater.newChildId(), entry != null ? entry.getFormattedDuration() : ""));
      }
      row.add(new Label("sum", report.getTaskDurations().get(task.getId()).getFormattedDuration()));
    }
    {
      // Sum row.
View Full Code Here

TOP

Related Classes of org.projectforge.fibu.MonthlyEmployeeReportEntry

Copyright © 2018 www.massapicom. 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.