Package org.projectforge.fibu

Examples of org.projectforge.fibu.AuftragsPositionDO


        final Label label = new Label(componentId, new Model<String>("#" + list.size()));
        if (list != null) {
          final StringBuffer buf = new StringBuffer();
          final Iterator<AuftragsPositionDO> it = list.iterator();
          while (it.hasNext() == true) {
            final AuftragsPositionDO pos = it.next();
            buf.append("#").append(pos.getNumber()).append(": ");
            if (pos.getPersonDays() != null && pos.getPersonDays().compareTo(BigDecimal.ZERO) != 0) {
              buf.append("(").append(NumberFormatter.format(pos.getPersonDays())).append(" ")
              .append(getString("projectmanagement.personDays.short")).append(") ");
            }
            if (pos.getNettoSumme() != null) {
              buf.append(CurrencyFormatter.format(pos.getNettoSumme()));
              if (StringUtils.isNotBlank(pos.getTitel()) == true) {
                buf.append(": ").append(pos.getTitel());
              }
              buf.append(": ");
            }
            if (pos.getTaskId() != null) {
              buf.append(taskFormatter.getTaskPath(pos.getTaskId(), false, OutputType.HTML));
            } else {
              buf.append(getString("fibu.auftrag.position.noTaskGiven"));
            }
            if (pos.getStatus() != null) {
              buf.append(", ").append(getString(pos.getStatus().getI18nKey()));
            }
            if (it.hasNext() == true) {
              buf.append("\n");
            }
          }
View Full Code Here


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

        @Override
        public boolean validateOnNullValue()
        {
          return true;
        }

        @Override
        protected String resourceKey()
        {
          return "fibu.auftrag.error.invalidPosition";
        }
      });
    }
    this.withLabelValue(true).withMatchContains(true).withMinChars(2).withWidth(800);
    add(new AttributeModifier("title", new Model<String>() {
      @Override
      public String getObject()
      {
        final AuftragsPositionDO pos = getModelObject();
        if (pos == null) {
          return "";
        }
        return getTooltip(pos);
      }
View Full Code Here

    {
      value = StringUtils.trimToEmpty(value);
      if (StringUtils.isEmpty(value) == true) {
        return null;
      }
      final AuftragsPositionDO auftragsPosition = auftragDao.getAuftragsPosition(value);
      if (auftragsPosition == null) {
        throw new ConversionException("Parse error").setResourceKey("fibu.auftrag.position.error.notFound");
      }
      return auftragsPosition;
    }
View Full Code Here

      final DivPanel panel = gridBuilder.newGridPanel().getPanel();
      final Button addPositionButton = new Button(SingleButtonPanel.WICKET_ID) {
        @Override
        public final void onSubmit()
        {
          getData().addPosition(new AuftragsPositionDO());
          refresh();
        }
      };
      final SingleButtonPanel addPositionButtonPanel = new SingleButtonPanel(panel.newChildId(), addPositionButton, getString("add"));
      addPositionButtonPanel.setTooltip(getString("fibu.auftrag.tooltip.addPosition"));
View Full Code Here

    this.ajaxPosTargets.clear();

    final Collection<FormComponent< ? >> dependentComponents = new ArrayList<FormComponent< ? >>();
    if (CollectionUtils.isEmpty(data.getPositionen()) == true) {
      // Ensure that at least one position is available:
      data.addPosition(new AuftragsPositionDO());
    }

    for (final AuftragsPositionDO position : data.getPositionen()) {

      final boolean abgeschlossenUndNichtFakturiert = position.isAbgeschlossenUndNichtVollstaendigFakturiert();
View Full Code Here

    } else if ("contactPersonId".equals(property) == true) {
      auftragDao.setContactPerson(getData(), (Integer) selectedValue);
      setSendEMailNotification();
    } else if (property.startsWith("taskId:") == true) {
      final Short number = NumberHelper.parseShort(property.substring(property.indexOf(':') + 1));
      final AuftragsPositionDO pos = getData().getPosition(number);
      auftragDao.setTask(pos, (Integer) selectedValue);
    } else {
      log.error("Property '" + property + "' not supported for selection.");
    }
  }
View Full Code Here

    } else if ("contactPersonId".equals(property) == true) {
      getData().setContactPerson(null);
      setSendEMailNotification();
    } else if (property.startsWith("taskId:") == true) {
      final Short number = NumberHelper.parseShort(property.substring(property.indexOf(':') + 1));
      final AuftragsPositionDO pos = getData().getPosition(number);
      pos.setTask(null);
    } else {
      log.error("Property '" + property + "' not supported for selection.");
    }
  }
View Full Code Here

  @Test
  public void testOrderPositions()
  {
    initialize();
    logon(getUser(TEST_FINANCE_USER));
    final AuftragDO auftrag = new AuftragDO().addPosition(new AuftragsPositionDO().setTask(getTask("TBT-5.1")).setTitel("Pos 1"))
        .addPosition(new AuftragsPositionDO().setTask(getTask("TBT-5.2.1.1")).setTitel("Pos 2"));
    auftragDao.save(auftrag.setNummer(auftragDao.getNextNumber(auftrag)));
    logon(getUser(TEST_USER));
    TimesheetDO sheet = createNewSheet();
    save(sheet.setTask(getTask("TBT-5")), "timesheet.error.taskNotBookable.orderPositionsFoundInSubTasks");
    timesheetDao.save(sheet.setTask(getTask("TBT-5.1")));
View Full Code Here

TOP

Related Classes of org.projectforge.fibu.AuftragsPositionDO

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.