Skip to content

Firefly III: a personal finances manager

Add bill / category and budget info

James Cole5d192ad4c28a
diff --git a/app/Generator/Report/Audit/MonthReportGenerator.php b/app/Generator/Report/Audit/MonthReportGenerator.php
index 23abef23a3..d8cb8d1ddf 100644
--- a/app/Generator/Report/Audit/MonthReportGenerator.php
+++ b/app/Generator/Report/Audit/MonthReportGenerator.php
@@ -116,7 +116,8 @@ class MonthReportGenerator implements ReportGeneratorInterface
/** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class);
- $collector->setAccounts(new Collection([$account]))->setRange($this->start, $this->end)->withAccountInformation();
+ $collector->setAccounts(new Collection([$account]))->setRange($this->start, $this->end)->withAccountInformation()
+ ->withBudgetInformation()->withCategoryInformation()->withBillInformation();
$journals = $collector->getExtractedJournals();
$journals = array_reverse($journals, true);
diff --git a/resources/views/v1/reports/partials/journals-audit.twig b/resources/views/v1/reports/partials/journals-audit.twig
index dff077d4c4..88389d5e03 100644
--- a/resources/views/v1/reports/partials/journals-audit.twig
+++ b/resources/views/v1/reports/partials/journals-audit.twig
@@ -104,13 +104,19 @@
<a href="{{ route('accounts.show', [journal.destination_account_id]) }}" title="{{ journal.destination_account_iban|default(journal.destination_account_name) }}">{{ journal.destination_account_name }}</a>
</td>
<td class="hide-budget">
- {# TODO BUDGET #}
+ {% if journal.budget_id %}
+ <a href="{{ route('budgets.show', [journal.budget_id]) }}" title="{{ journal.budget_name }}">{{ journal.budget_name }}</a>
+ {% endif %}
</td>
<td class="hide-category">
- {# TODO CATEGORY#}
+ {% if journal.category_id %}
+ <a href="{{ route('categories.show', [journal.category_id]) }}" title="{{ journal.category_name }}">{{ journal.category_name }}</a>
+ {% endif %}
</td>
<td class="hide-bill">
- {#TODO BILL#}
+ {% if journal.bill_id %}
+ <a href="{{ route('bills.show', [journal.bill_id]) }}" title="{{ journal.bill_name }}">{{ journal.bill_name }}</a>
+ {% endif %}
</td>
<!-- new optional fields (2x) -->