@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void populateItem(final Item item, final String componentId, final IModel rowModel) { final EingangsrechnungDO eingangsrechnung = (EingangsrechnungDO) rowModel.getObject(); String kreditor = StringEscapeUtils.escapeHtml4(eingangsrechnung.getKreditor()); if (form.getSearchFilter().isShowKostZuweisungStatus() == true) { final BigDecimal fehlBetrag = eingangsrechnung.getKostZuweisungFehlbetrag(); if (NumberHelper.isNotZero(fehlBetrag) == true) { kreditor += " *** " + CurrencyFormatter.format(fehlBetrag) + " ***"; } } final Label kreditorLabel = new Label(ListSelectActionPanel.LABEL_ID, kreditor); kreditorLabel.setEscapeModelStrings(false); item.add(new ListSelectActionPanel(componentId, rowModel, EingangsrechnungEditPage.class, eingangsrechnung.getId(), returnToPage, kreditorLabel)); cellItemListener.populateItem(item, componentId, rowModel); addRowClick(item, isMassUpdateMode); } });
brokenInvoices.add("[" + invoice.getKreditor() + ", " + invoice.getReferenz() + ", " + formatter.getFormattedDate(invoice.getDatum()) + "]"); } else { brokenInvoices.add("[" + invoice.getKreditor() + ", " + formatter.getFormattedDate(invoice.getDatum()) + "]");
private void setExpectedTimeOfPayment(final LiquidityEntry entry, final EingangsrechnungDO invoice) { Date dateOfInvoice = invoice.getDatum(); if (dateOfInvoice == null) { dateOfInvoice = new DayHolder().getSQLDate(); } final KontoDO account = invoice.getKonto(); if (account != null && setExpectedDateOfCreditorPayment(entry, dateOfInvoice, "account#" + account.getId(), "" + account.getNummer() + " - " + account.getBezeichnung()) == true) { return; } String creditorText = invoice.getKreditor(); if (creditorText != null) { creditorText = creditorText.toLowerCase(); if (setExpectedDateOfCreditorPayment(entry, dateOfInvoice, "creditor:" + creditorText, creditorText) == true) { return; } if (creditorText.length() > 5) { creditorText = creditorText.substring(0, 5); } if (setExpectedDateOfCreditorPayment(entry, dateOfInvoice, "shortCreditor:" + creditorText, creditorText) == true) { return; } } }
ensureAndAddCreditorPaymentValue("account#" + accountId, timeForPayment, amount); String creditorText = invoice.getKreditor(); if (creditorText != null) { creditorText = creditorText.toLowerCase();
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; }
public void addCreditorInvoicesSheet(final MyExcelExporter exporter, final String title, final Collection<EingangsrechnungDO> list) { final ExportSheet sheet = exporter.addSheet(title); sheet.createFreezePane(0, 1); final ContentProvider sheetProvider = sheet.getContentProvider(); final ExportColumn[] cols = new ExportColumn[5]; int i = 0; cols[i++] = createColumn(exporter, sheet, AbstractRechnungDO.class, "datum"); cols[i++] = createColumn(exporter, sheet, AbstractRechnungDO.class, "faelligkeit"); cols[i] = new I18nExportColumn("gross", "fibu.rechnung.bruttoBetrag", 10); exporter.putCurrencyFormat(sheetProvider, cols[i++]); cols[i++] = new I18nExportColumn("creditor", "fibu.common.creditor", 60); cols[i++] = new I18nExportColumn("subject", PropUtils.getI18nKey(AbstractRechnungDO.class, "betreff"), 100); // column property names sheet.setColumns(cols); final PropertyMapping mapping = new PropertyMapping(); for (final EingangsrechnungDO entry : list) { entry.recalculate(); mapping.add("datum", entry.getDatum()); mapping.add("faelligkeit", entry.getFaelligkeit()); mapping.add("gross", entry.getGrossSum()); mapping.add("creditor", entry.getKreditor()); mapping.add("subject", entry.getBetreff()); sheet.addRow(mapping.getMapping(), 0); } }
final EingangsrechnungDO r = (EingangsrechnungDO) rechnung; referenz = r.getReferenz(); text = r.getKreditor();