Skip to content

Firefly III: a personal finances manager

Fix issue with spaces in tag report.

James Cole29b02fcac2ef
diff --git a/app/Generator/Report/Tag/MonthReportGenerator.php b/app/Generator/Report/Tag/MonthReportGenerator.php
index 5f6de0bbc9..6599ea3443 100644
--- a/app/Generator/Report/Tag/MonthReportGenerator.php
+++ b/app/Generator/Report/Tag/MonthReportGenerator.php
@@ -80,6 +80,7 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface
{
$accountIds = implode(',', $this->accounts->pluck('id')->toArray());
$tagTags = implode(',', $this->tags->pluck('tag')->toArray());
+ $tagIds = implode(',', $this->tags->pluck('id')->toArray());
$reportType = 'tag';
$expenses = $this->getExpenses();
$income = $this->getIncome();
@@ -95,7 +96,7 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface
$result = view(
'reports.tag.month', compact(
'accountIds', 'tagTags', 'reportType', 'accountSummary', 'tagSummary', 'averageExpenses', 'averageIncome', 'topIncome',
- 'topExpenses'
+ 'topExpenses', 'tagIds'
)
)->with('start', $this->start)->with('end', $this->end)->with('tags', $this->tags)->with('accounts', $this->accounts)->render();
} catch (Throwable $e) {
diff --git a/resources/views/v1/reports/tag/month.twig b/resources/views/v1/reports/tag/month.twig
index 5d51e7184c..04442d99d4 100644
--- a/resources/views/v1/reports/tag/month.twig
+++ b/resources/views/v1/reports/tag/month.twig
@@ -463,15 +463,15 @@
var tagTags = '{{ tagTags }}';
// chart uri's
- var tagIncomeUri = '{{ route('chart.tag.tag-income', [accountIds, tagTags, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
- var tagExpenseUri = '{{ route('chart.tag.tag-expense', [accountIds, tagTags, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
- var accountIncomeUri = '{{ route('chart.tag.account-income', [accountIds, tagTags, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
- var accountExpenseUri = '{{ route('chart.tag.account-expense', [accountIds, tagTags, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
+ var tagIncomeUri = '{{ route('chart.tag.tag-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
+ var tagExpenseUri = '{{ route('chart.tag.tag-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
+ var accountIncomeUri = '{{ route('chart.tag.account-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
+ var accountExpenseUri = '{{ route('chart.tag.account-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
// two new charts
- var tagBudgetUri = '{{ route('chart.tag.budget-expense', [accountIds, tagTags, start.format('Ymd'), end.format('Ymd')]) }}';
- var tagCategoryUri = '{{ route('chart.tag.category-expense', [accountIds, tagTags, start.format('Ymd'), end.format('Ymd')]) }}';
- var mainUri = '{{ route('chart.tag.main', [accountIds, tagTags, start.format('Ymd'), end.format('Ymd')]) }}';
+ var tagBudgetUri = '{{ route('chart.tag.budget-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
+ var tagCategoryUri = '{{ route('chart.tag.category-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
+ var mainUri = '{{ route('chart.tag.main', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
</script>
<script type="text/javascript" src="v1/js/ff/reports/all.js?v={{ FF_VERSION }}"></script>