use of com.axelor.apps.account.db.Budget in project axelor-open-suite by axelor.
the class BudgetService method updateBudgetLinesFromInvoice.
public void updateBudgetLinesFromInvoice(Invoice invoice) {
List<InvoiceLine> invoiceLineList = invoice.getInvoiceLineList();
if (invoiceLineList == null) {
return;
}
invoiceLineList.stream().filter(invoiceLine -> invoiceLine.getBudgetDistributionList() != null).flatMap(x -> x.getBudgetDistributionList().stream()).forEach(budgetDistribution -> {
Budget budget = budgetDistribution.getBudget();
updateLines(budget);
computeTotalAmountRealized(budget);
});
}
Aggregations