Skip to content

Firefly III: a personal finances manager

Fix https://github.com/orgs/firefly-iii/discussions/11408

James Cole525f0c752a79
diff --git a/app/Repositories/TransactionGroup/TransactionGroupRepository.php b/app/Repositories/TransactionGroup/TransactionGroupRepository.php
index 10ca551313..675890e8a4 100644
--- a/app/Repositories/TransactionGroup/TransactionGroupRepository.php
+++ b/app/Repositories/TransactionGroup/TransactionGroupRepository.php
@@ -166,7 +166,7 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface,
$set = TransactionJournalLink::where(static function (Builder $q) use ($journals): void {
$q->whereIn('source_id', $journals);
$q->orWhereIn('destination_id', $journals);
- })->with(['source', 'destination', 'source.transactions'])->leftJoin('link_types', 'link_types.id', '=', 'journal_links.link_type_id')->get([
+ })->with(['source','notes', 'destination', 'source.transactions'])->leftJoin('link_types', 'link_types.id', '=', 'journal_links.link_type_id')->get([
'journal_links.*',
'link_types.inward',
'link_types.outward',
@@ -191,6 +191,7 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface,
'editable' => 1 === (int) $entry->editable,
'amount' => $amount,
'foreign_amount' => $foreignAmount,
+ 'notes' => null === $entry->notes->first() ? '' : $entry->notes->first()->text,
];
}
if ($journalId === $entry->destination_id) {
@@ -204,6 +205,7 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface,
'editable' => 1 === (int) $entry->editable,
'amount' => $amount,
'foreign_amount' => $foreignAmount,
+ 'notes' => null === $entry->notes->first() ? '' : $entry->notes->first()->text,
];
}
}
diff --git a/resources/views/transactions/show.twig b/resources/views/transactions/show.twig
index 07c4bc6505..6071ea9336 100644
--- a/resources/views/transactions/show.twig
+++ b/resources/views/transactions/show.twig
@@ -487,6 +487,9 @@
{% if '' != link.foreign_amount %}
({{ link.foreign_amount|raw }})
{% endif %}
+ {% if link.notes != "" %}
+ ({{ link.notes }})
+ {% endif %}
</td>
</tr>
{% endfor %}