Package org.projectforge.fibu

Examples of org.projectforge.fibu.AbstractRechnungsPositionDO


    sheetProvider.putFormat(InvoicesCol.KOST2, "#");
    sheetProvider.putFormat(InvoicesCol.DATE, "dd.MM.yyyy");

    final PropertyMapping mapping = new PropertyMapping();
    for (final KostZuweisungDO zuweisung : list) {
      final AbstractRechnungsPositionDO position;
      final AbstractRechnungDO< ? > rechnung;
      final String referenz;
      final String text;
      if (zuweisung.getRechnungsPosition() != null) {
        position = zuweisung.getRechnungsPosition();
        rechnung = ((RechnungsPositionDO) position).getRechnung();
        final RechnungDO r = (RechnungDO) rechnung;
        referenz = String.valueOf(r.getNummer());
        text = ProjektFormatter.formatProjektKundeAsString(r.getProjekt(), r.getKunde(), r.getKundeText());
      } else {
        position = zuweisung.getEingangsrechnungsPosition();
        rechnung = ((EingangsrechnungsPositionDO) position).getEingangsrechnung();
        final EingangsrechnungDO r = (EingangsrechnungDO) rechnung;
        referenz = r.getReferenz();
        text = r.getKreditor();
      }
      final BigDecimal grossSum = position.getBruttoSum();

      BigDecimal korrektur = null;
      if (grossSum.compareTo(position.getKostZuweisungGrossSum()) != 0) {
        korrektur = CurrencyHelper.getGrossAmount(position.getKostZuweisungNetFehlbetrag(), position.getVat());
        if (NumberHelper.isZeroOrNull(korrektur) == true) {
          korrektur = null;
        }
      }
      mapping.add(InvoicesCol.BRUTTO, zuweisung.getBrutto());
      mapping.add(InvoicesCol.VAT, NumberHelper.isNotZero(position.getVat()));
      Integer kontoNummer = null;
      if (rechnung instanceof RechnungDO) {
        final KontoDO konto = kontoCache.getKonto(((RechnungDO) rechnung));
        if (konto != null) {
          kontoNummer = konto.getNummer();
View Full Code Here


  }

  @Override
  protected void appendDestEntry(final List<KostZuweisungDO> destList, final KostZuweisungDO srcEntry, final Object... objects)
  {
    final AbstractRechnungsPositionDO destPositionDO = (AbstractRechnungsPositionDO) objects[0];
    final KostZuweisungDO destEntry = new KostZuweisungDO();
    destEntry.copyValuesFrom(srcEntry, IGNORE_FIELDS);
    destPositionDO.addKostZuweisung(destEntry);
  }
View Full Code Here

  @Override
  protected void removeDestEntry(final List<KostZuweisungDO> destList, final KostZuweisungDO destEntry, final int pos,
      final Object... objects)
  {
    final AbstractRechnungsPositionDO destPositionDO = (AbstractRechnungsPositionDO) objects[0];
    destPositionDO.deleteKostZuweisung(destEntry.getIndex());
  }
View Full Code Here

     */
    @Override
    protected boolean onCloseButtonSubmit(final AjaxRequestTarget target)
    {
      // Copy edited values to DO object.
      final AbstractRechnungsPositionDO srcPosition = rechnungCostEditTablePanel.getPosition();
      final KostZuweisungenCopyHelper kostZuweisungCopyHelper = new KostZuweisungenCopyHelper();
      kostZuweisungCopyHelper.mycopy(srcPosition.getKostZuweisungen(), position.getKostZuweisungen(), position);
      target.add(costTable.refresh().getTable());
      return super.onCloseButtonSubmit(target);
    }
View Full Code Here

TOP

Related Classes of org.projectforge.fibu.AbstractRechnungsPositionDO

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.