@Override public void populateItem(final Item<ICellPopulator<EingangsrechnungDO>> item, final String componentId, final IModel<EingangsrechnungDO> rowModel) { final EingangsrechnungDO eingangsrechnung = rowModel.getObject(); appendCssClasses(item, eingangsrechnung.getId(), eingangsrechnung.isDeleted()); if (eingangsrechnung.isDeleted() == true) { // Do nothing further } else if (eingangsrechnung.isUeberfaellig() == true) { appendCssClasses(item, RowCssClass.IMPORTANT_ROW); } else if (eingangsrechnung.isBezahlt() == false) { appendCssClasses(item, RowCssClass.BLUE); } } };
public LiquidityForecast setCreditorInvoices(final Collection<EingangsrechnungDO> list) { this.creditorInvoices = list; this.creditorInvoicesLiquidityEntries = new LinkedList<LiquidityEntry>(); if (list == null) { return this; } for (final EingangsrechnungDO invoice : list) { final LiquidityEntry entry = new LiquidityEntry(); if (invoice.getBezahlDatum() != null) { entry.setDateOfPayment(invoice.getBezahlDatum()); } else { entry.setDateOfPayment(invoice.getFaelligkeit()); } entry.setAmount(invoice.getGrossSum().negate()); entry.setPaid(invoice.isBezahlt()); entry.setSubject(invoice.getKreditor() + ": " + invoice.getBetreff()); entry.setType(LiquidityEntryType.CREDITOR); setExpectedTimeOfPayment(entry, invoice); this.creditorInvoicesLiquidityEntries.add(entry); } return this; }