Skip to content
Snippets Groups Projects
Commit a19bfb2a authored by simon's avatar simon
Browse files

imp: entry lines formatter with combined state and reconciliation

parent 489497bd
Branches imp-enty-lines-formatter
Tags
1 merge request!7imp: entry lines formatter with combined state and reconciliation
Pipeline #5751 passed with warnings with stages
in 7 minutes and 45 seconds
......@@ -58,18 +58,20 @@ class JournalEntryLinesFieldFormatter extends FormatterBase {
$elements[0] = [
'#type' => 'table',
'#header' => [
'date',
'name',
'account',
'description',
'debit',
'credit',
'reconciliation',
'state',
],
'#rows' => [],
];
foreach ($items as $delta => $i) {
$item = $i->entity;
$elements[0]['#rows'][] = [
$item->get('period_date')->value,
Link::createFromRoute(
$item->id(),
'entity.journal_entry_line.canonical',
......@@ -81,7 +83,7 @@ class JournalEntryLinesFieldFormatter extends FormatterBase {
$item->label(),
$item->getDebit(),
$item->getCredit(),
$item->getReconciliation() ? $item->getReconciliation()->id() : '',
$item->getState() . ($item->getReconciliation() ? " ({$item->getReconciliation()->id()})" : ''),
];
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment