Package org.projectforge.fibu.kost

Examples of org.projectforge.fibu.kost.Kost1DO


   * @param kost1Id If null, then kost1 will be set to null;
   * @see BaseDao#getOrLoad(Integer)
   */
  public void setKost1(final EmployeeDO employee, final Integer kost1Id)
  {
    final Kost1DO kost1 = kost1Dao.getOrLoad(kost1Id);
    employee.setKost1(kost1);
  }
View Full Code Here


      final BuchungssatzDO satz = el.getValue();
      if (el.isFaulty() == true) {
        String kost = (String) el.getErrorProperty("kost1");
        if (kost != null) {
          final int[] vals = KostFormatter.splitKost(kost);
          final Kost1DO kost1 = kost1Dao.getKost1(vals[0], vals[1], vals[2], vals[3]);
          if (kost1 != null) {
            satz.setKost1(kost1);
            el.removeErrorProperty("kost1");
          }
        }
View Full Code Here

      satz.setGegenKonto(konto);
    } else {
      element.putErrorProperty("gegenkonto", row.gegenkonto);
    }
    int[] values = KostFormatter.splitKost(row.getKost1());
    final Kost1DO kost1 = kost1Dao.getKost1(values[0], values[1], values[2], values[3]);
    if (kost1 != null) {
      satz.setKost1(kost1);
    } else {
      element.putErrorProperty("kost1", KostFormatter.formatKost(row.kost1));
    }
View Full Code Here

  {
    final List<IColumn<Kost1DO, String>> columns = new ArrayList<IColumn<Kost1DO, String>>();
    final CellItemListener<Kost1DO> cellItemListener = new CellItemListener<Kost1DO>() {
      public void populateItem(final Item<ICellPopulator<Kost1DO>> item, final String componentId, final IModel<Kost1DO> rowModel)
      {
        final Kost1DO kost1 = rowModel.getObject();
        appendCssClasses(item, kost1.getId(), kost1.isDeleted());
      }
    };
    columns.add(new CellItemListenerPropertyColumn<Kost1DO>(new Model<String>(getString("fibu.kost1")), getSortable("formattedNumber",
        sortable), "formattedNumber", cellItemListener) {
      /**
       * @see org.projectforge.web.wicket.CellItemListenerPropertyColumn#populateItem(org.apache.wicket.markup.repeater.Item,
       *      java.lang.String, org.apache.wicket.model.IModel)
       */
      @Override
      public void populateItem(final Item<ICellPopulator<Kost1DO>> item, final String componentId, final IModel<Kost1DO> rowModel)
      {
        final Kost1DO kost1 = rowModel.getObject();
        if (isSelectMode() == false) {
          item.add(new ListSelectActionPanel(componentId, rowModel, Kost1EditPage.class, kost1.getId(), returnToPage, String.valueOf(kost1
              .getFormattedNumber())));
          cellItemListener.populateItem(item, componentId, rowModel);
        } else {
          item.add(new ListSelectActionPanel(componentId, rowModel, caller, selectProperty, kost1.getId(), String.valueOf(kost1
              .getFormattedNumber())));
        }
        cellItemListener.populateItem(item, componentId, rowModel);
        addRowClick(item);
      }
View Full Code Here

      final PFUserDO user = userGroupCache.getUser(salary.getEmployee().getUserId());
      Validate.isTrue(year == salary.getYear());
      Validate.isTrue(month == salary.getMonth());
      final MonthlyEmployeeReport report = monthlyEmployeeReportDao.getReport(year, month, user);
      mapping.add(ExcelColumn.MITARBEITER, user.getFullname());
      final Kost1DO kost1 = salary.getEmployee().getKost1();
      final BigDecimal bruttoMitAGAnteil = salary.getBruttoMitAgAnteil();
      final BigDecimal netDuration = new BigDecimal(report.getTotalNetDuration());
      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);
View Full Code Here

        public String getObject()
        {
          if (report == null) {
            return "";
          }
          final Kost1DO kost1 = kost1Dao.internalGetById(report.getKost1Id());
          return kost1 != null ? KostFormatter.format(kost1) : "";
        }
      }));
    }
    gridBuilder.newSplitPanel(gridSize);
View Full Code Here

    data.put("year", form.filter.getYear());
    data.put("month", form.filter.getFormattedMonth());
    data.put("workingDaysLabel", getString("fibu.common.workingDays"));
    data.put("workingDays", report.getNumberOfWorkingDays());
    data.put("kost1Label", getString("fibu.kost1"));
    final Kost1DO kost1 = kost1Dao.internalGetById(report.getKost1Id());
    data.put("kost1", kost1 != null ? kost1.getFormattedNumber() : "--");
    data.put("kost2Label", getString("fibu.kost2"));
    data.put("kundeLabel", getString("fibu.kunde"));
    data.put("projektLabel", getString("fibu.projekt"));
    data.put("kost2ArtLabel", getString("fibu.kost2.art"));
    data.put("sumLabel", getString("sum"));
View Full Code Here

      setRequired(true);
      add(new AbstractValidator<Kost1DO>() {
        @Override
        protected void onValidate(final IValidatable<Kost1DO> validatable)
        {
          final Kost1DO value = validatable.getValue();
          if (value == null) {
            error(validatable);
          }
        }
View Full Code Here

  }

  @Override
  protected String getTooltip()
  {
    final Kost1DO kost1 = getModelObject();
    if (kost1 == null) {
      return "";
    }
    return KostFormatter.format(kost1) + " - " + KostFormatter.formatToolTip(kost1);
  }
View Full Code Here

      addCell(cellRepeater, DateTimeFormatter.instance().getFormattedDate(satz.getDatum()), style + " white-space: nowrap;");
      addCell(cellRepeater, CurrencyFormatter.format(satz.getBetrag()), style + " white-space: nowrap; text-align: right;");
      addCell(cellRepeater, satz.getText(), style);
      addCell(cellRepeater, satz.getKonto() != null ? satz.getKonto().getNummer() : null, style);
      addCell(cellRepeater, satz.getGegenKonto() != null ? satz.getGegenKonto().getNummer() : null, style);
      final Kost1DO kost1 = satz.getKost1();
      Component comp = addCell(cellRepeater, kost1 != null ? kost1.getShortDisplayName() : null, style);
      if (kost1 != null) {
        WicketUtils.addTooltip(comp, KostFormatter.formatToolTip(kost1));
      }
      final Kost2DO kost2 = satz.getKost2();
      comp = addCell(cellRepeater, kost2 != null ? kost2.getShortDisplayName() : null, style);
View Full Code Here

TOP

Related Classes of org.projectforge.fibu.kost.Kost1DO

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.