/** * @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<ProjektDO>> item, final String componentId, final IModel<ProjektDO> rowModel) { final ProjektDO projekt = rowModel.getObject(); final KontoDO konto = kontoCache.getKonto(projekt); item.add(new Label(componentId, konto != null ? konto.formatKonto() : "")); cellItemListener.populateItem(item, componentId, rowModel); } });
/** * @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<RechnungDO>> item, final String componentId, final IModel<RechnungDO> rowModel) { final RechnungDO invoice = rowModel.getObject(); final KontoDO konto = kontoCache.getKonto(invoice); item.add(new Label(componentId, konto != null ? konto.formatKonto() : "")); cellItemListener.populateItem(item, componentId, rowModel); } });
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void populateItem(final Item item, final String componentId, final IModel rowModel) { final EingangsrechnungDO rechnung = (EingangsrechnungDO) rowModel.getObject(); final KontoDO konto = kontoCache.getKonto(rechnung.getKontoId()); item.add(new Label(componentId, konto != null ? konto.formatKonto() : "")); cellItemListener.populateItem(item, componentId, rowModel); } });
/** * @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); } });
/** * Gets account of given project if given, otherwise the account assigned to the customer assigned to this project. If * no account is given at all, null is returned.<br/> * Please note: The object of project must be initialized including the assigned customer, if not a * {@link LazyInitializationException} could be thrown. * * @param project * @return The assigned account if given, otherwise null. */ public KontoDO getKonto(final ProjektDO project) { if (project == null) { return null; } checkRefresh(); KontoDO konto = getKonto(project.getKontoId()); if (konto != null) { return konto; } final KundeDO customer = project.getKunde(); if (customer != null) { konto = getKonto(customer.getKontoId()); } return konto; }
/** * @see ExcelExporter#addMapping(PropertyMapping, java.lang.Object, * java.lang.reflect.Field) */ @Override public void addMapping(final PropertyMapping mapping, final Object entry, final Field field) { if ("konto".equals(field.getName()) == true) { Integer kontoNummer = null; final Integer kontoId = ((EingangsrechnungDO) entry).getKontoId(); if (kontoId != null) { final KontoDO konto = kontoCache.getKonto(kontoId); if (konto != null) { kontoNummer = konto.getNummer(); } } mapping.add(field.getName(), kontoNummer != null ? kontoNummer : ""); } else { super.addMapping(mapping, entry, field); } }
/** * @see ExcelExporter#addMapping(PropertyMapping, java.lang.Object, * java.lang.reflect.Field) */ @Override public void addMapping(final PropertyMapping mapping, final Object entry, final Field field) { if ("kunde".equals(field.getName()) == true) { final RechnungDO rechnung = (RechnungDO) entry; mapping.add(field.getName(), KundeFormatter.formatKundeAsString(rechnung.getKunde(), rechnung.getKundeText())); } else if ("konto".equals(field.getName()) == true) { Integer kontoNummer = null; final KontoDO konto = kontoCache.getKonto((RechnungDO) entry); if (konto != null) { kontoNummer = konto.getNummer(); } mapping.add(field.getName(), kontoNummer != null ? kontoNummer : ""); } else { super.addMapping(mapping, entry, field); } }
/** * @see ExcelExporter#addMappings(PropertyMapping, java.lang.Object) */ @Override protected void addMappings(final PropertyMapping mapping, final Object entry) { final RechnungDO invoice = (RechnungDO) entry; String kontoBezeichnung = null; final KontoDO konto = kontoCache.getKonto(invoice); if (konto != null) { kontoBezeichnung = konto.getBezeichnung(); } mapping.add("kontoBezeichnung", kontoBezeichnung != null ? kontoBezeichnung : ""); mapping.add("grossSum", invoice.getGrossSum()); mapping.add("netSum", invoice.getNetSum()); } };
/** * @see ExcelExporter#addMappings(PropertyMapping, java.lang.Object) */ @Override protected void addMappings(final PropertyMapping mapping, final Object entry) { final EingangsrechnungDO invoice = (EingangsrechnungDO) entry; String kontoBezeichnung = null; final Integer kontoId = ((EingangsrechnungDO) entry).getKontoId(); if (kontoId != null) { final KontoDO konto = kontoCache.getKonto(kontoId); if (konto != null) { kontoBezeichnung = konto.getBezeichnung(); } } mapping.add("kontoBezeichnung", kontoBezeichnung != null ? kontoBezeichnung : ""); mapping.add("grossSum", invoice.getGrossSum()); mapping.add("netSum", invoice.getNetSum()); } };
ensureAndAddDebitorPaymentValue("customer#" + customerId, timeForPayment, amount); final KontoDO account = accountCache.getKonto(invoice); final Integer accountId = account != null ? account.getId() : null; if (accountId != null) {
return; final KontoDO account = accountCache.getKonto(invoice); if (account != null && setExpectedDateOfPayment(entry, dateOfInvoice, "account#" + account.getId(),
Integer kontoNummer = null; if (rechnung instanceof RechnungDO) { final KontoDO konto = kontoCache.getKonto(((RechnungDO) rechnung)); if (konto != null) { kontoNummer = konto.getNummer(); final Integer kontoId = ((EingangsrechnungDO) rechnung).getKontoId(); if (kontoId != null) { final KontoDO konto = kontoCache.getKonto(kontoId); if (konto != null) { kontoNummer = konto.getNummer();