Package org.projectforge.fibu

Examples of org.projectforge.fibu.KundeDO


  private Object getTargetObject(final HRFilter filter, final ProjektDO projekt)
  {
    if (projekt == null) {
      return null;
    }
    final KundeDO kunde = projekt.getKunde();
    if (filter.isOnlyMyProjects() == true) {
      if (isMyProject(projekt) == true) {
        if (filter.isAllProjectsGroupedByCustomer() == true) {
          return kunde;
        } else {
View Full Code Here


    final List<IColumn<KundeDO, String>> columns = new ArrayList<IColumn<KundeDO, String>>();

    final CellItemListener<KundeDO> cellItemListener = new CellItemListener<KundeDO>() {
      public void populateItem(final Item<ICellPopulator<KundeDO>> item, final String componentId, final IModel<KundeDO> rowModel)
      {
        final KundeDO kunde = rowModel.getObject();
        if (kunde.getStatus() == null) {
          // Should not occur:
          return;
        }
        appendCssClasses(item, kunde.getId(), kunde.isDeleted() == true || kunde.getStatus().isIn(KundeStatus.ENDED) == true);
      }
    };
    columns.add(new CellItemListenerPropertyColumn<KundeDO>(new Model<String>(getString("fibu.kunde.nummer")), "kost", "kost",
        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<KundeDO>> item, final String componentId, final IModel<KundeDO> rowModel)
      {
        final KundeDO kunde = rowModel.getObject();
        if (isSelectMode() == false) {
          item.add(new ListSelectActionPanel(componentId, rowModel, CustomerEditPage.class, kunde.getId(), returnToPage, String
              .valueOf(kunde.getKost())));
        } else {
          item.add(new ListSelectActionPanel(componentId, rowModel, caller, selectProperty, kunde.getId(), String.valueOf(kunde.getKost())));
        }
        cellItemListener.populateItem(item, componentId, rowModel);
        addRowClick(item);
      }
    });
    columns.add(new CellItemListenerPropertyColumn<KundeDO>(new Model<String>(getString("fibu.kunde.identifier")), "identifier",
        "identifier", cellItemListener));
    columns.add(new CellItemListenerPropertyColumn<KundeDO>(new Model<String>(getString("fibu.kunde.name")), "name", "name",
        cellItemListener));
    columns.add(new CellItemListenerPropertyColumn<KundeDO>(new Model<String>(getString("fibu.kunde.division")), "division", "division",
        cellItemListener));
    columns.add(new CellItemListenerPropertyColumn<KundeDO>(new Model<String>(getString("fibu.konto")), null, "konto", 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<KundeDO>> item, final String componentId, final IModel<KundeDO> rowModel)
      {
        final KundeDO kunde = rowModel.getObject();
        final KontoDO konto = kontoCache.getKonto(kunde.getKontoId());
        item.add(new Label(componentId, konto != null ? konto.formatKonto() : ""));
        cellItemListener.populateItem(item, componentId, rowModel);
      }
    });
    columns.add(new CellItemListenerPropertyColumn<KundeDO>(new Model<String>(getString("status")), "status", "status", cellItemListener));
View Full Code Here

      if (kost2 != null) {
        kost2Name = kost2.getShortDisplayName();
        final ProjektDO projekt = kost2.getProjekt();
        if (projekt != null) {
          projektName = projekt.getName();
          final KundeDO kunde = projekt.getKunde();
          if (kunde != null) {
            kundeName = kunde.getName();
          } else {
          }
        }
      }
      mapping.add(Col.KOST2, kost2Name);
View Full Code Here

    };
    result.add(link);
    WicketUtils.addRowClick(row);
    if (cost2 != null) {
      final ProjektDO project = cost2.getProjekt();
      final KundeDO customer = project != null ? project.getKunde() : null;
      final Kost2ArtDO costType = cost2.getKost2Art();
      link.add(new Label("label", KostFormatter.format(cost2)));
      if (project != null) {
        row.add(new Label("customer", customer != null ? customer.getName() : ""));
        row.add(new Label("project", project.getName()));
      } else {
        row.add(new Label("customer", cost2.getDescription()).add(AttributeModifier.replace("colspan", "2")));
        row.add(new Label("project", "").setVisible(false));
      }
View Full Code Here

    if (project != null
        && setExpectedDateOfPayment(entry, dateOfInvoice, "project#" + project.getId(),
            ProjektFormatter.formatProjektKundeAsString(project, null, null)) == true) {
      return;
    }
    final KundeDO customer = invoice.getKunde();
    if (customer != null
        && setExpectedDateOfPayment(entry, dateOfInvoice, "customer#" + customer.getId(),
            KundeFormatter.formatKundeAsString(customer, null)) == true) {
      return;
    }
    final KontoCache accountCache = Registry.instance().getKontoCache();
    final KontoDO account = accountCache.getKonto(invoice);
View Full Code Here

    if (projekt != null) {
      numberRange = projekt.getNummernkreis();
      area = projekt.getBereich();
      number = projekt.getNummer();
    } else {
      final KundeDO customer = invoice.getKunde();
      if (customer == null) {
        return;
      }
      numberRange = customer.getNummernkreis();
      number = customer.getBereich();
    }
    boolean differs = false;
    if (numberRange >= 0 && cost2.getNummernkreis() != numberRange) {
      differs = true;
    } else if (area >= 0 && cost2.getBereich() != area) {
View Full Code Here

  {
    if (initialized == true) {
      return;
    }
    logon(TestBase.TEST_FINANCE_USER);
    final KundeDO kunde = new KundeDO();
    kunde.setName("ACME ltd.");
    kunde.setId(59);
    kundeDao.save(kunde);
    projekt1 = initTestDB.addProjekt(kunde, 0, "Web portal");
    projekt2 = initTestDB.addProjekt(kunde, 1, "Order management");
    initialized = true;
  }
View Full Code Here

    cost2.setNumber(kost2DO.getFormattedNumber());
    if (kost2DO.getKost2Art() != null) {
      cost2.setType(kost2DO.getKost2Art().getName());
    }
    final ProjektDO projektDO = kost2DO.getProjekt();
    KundeDO kundeDO = null;
    if (projektDO != null) {
      cost2.setProject(projektDO.getName());
      kundeDO = projektDO.getKunde();
      if (kundeDO != null) {
        cost2.setCustomer(kundeDO.getName());
      }
    }
    return cost2;
  }
View Full Code Here

  public void massUpdateWithKost2Transformation()
  {
    logon(getUser(TEST_FINANCE_USER));
    final String prefix = "ts-mu50-";
    final List<TimesheetDO> list = new ArrayList<TimesheetDO>();
    final KundeDO kunde = new KundeDO();
    kunde.setName("ACME");
    kunde.setId(50);
    kundeDao.save(kunde);

    final ProjektDO projekt1 = createProjekt(kunde, 1, "Webportal", 0, 1, 2);
    final ProjektDO projekt2 = createProjekt(kunde, 2, "iPhone App", 0, 1);
View Full Code Here

  public void massUpdateWithKost2()
  {
    logon(getUser(TEST_FINANCE_USER));
    final String prefix = "ts-mu51-";
    final List<TimesheetDO> list = new ArrayList<TimesheetDO>();
    final KundeDO kunde = new KundeDO();
    kunde.setName("ACME ltd.");
    kunde.setId(51);
    kundeDao.save(kunde);

    final ProjektDO projekt1 = createProjekt(kunde, 1, "Webportal", 0, 1, 2);
    final ProjektDO projekt2 = createProjekt(kunde, 2, "iPhone App", 0, 1);
View Full Code Here

TOP

Related Classes of org.projectforge.fibu.KundeDO

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.