use of org.estatio.module.capex.dom.invoice.contributions.Project_InvoiceItemsNotOnProjectItem in project estatio by estatio.
the class Project_CreateMissingItems method chargesLinkedNotOnItems.
private List<Charge> chargesLinkedNotOnItems() {
List<Charge> result = new ArrayList<>();
Project_OrderItemsNotOnProjectItem orderItemsMixin = new Project_OrderItemsNotOnProjectItem(project);
serviceRegistry2.injectServicesInto(orderItemsMixin);
for (Charge chargeCandidate : orderItemsMixin.orderItemsNotOnProjectItem().stream().filter(x -> x.getCharge() != null).map(x -> x.getCharge()).collect(Collectors.toList())) {
if (!result.contains(chargeCandidate)) {
result.add(chargeCandidate);
}
}
Project_InvoiceItemsNotOnProjectItem invoiceItemsMixin = new Project_InvoiceItemsNotOnProjectItem(project);
serviceRegistry2.injectServicesInto(invoiceItemsMixin);
for (Charge chargeCandidate : invoiceItemsMixin.invoiceItemsNotOnProjectItem().stream().filter(x -> x.getCharge() != null).map(x -> x.getCharge()).collect(Collectors.toList())) {
if (!result.contains(chargeCandidate)) {
result.add(chargeCandidate);
}
}
return result;
}
Aggregations