diff --git a/app/Support/Binder/TagList.php b/app/Support/Binder/TagList.php index 60ec2f86dd..8cf851c9dc 100644 --- a/app/Support/Binder/TagList.php +++ b/app/Support/Binder/TagList.php @@ -45,7 +45,7 @@ class TagList implements BinderInterface $list = []; $incoming = explode(',', $value); foreach ($incoming as $entry) { - $list[] = trim($entry); + $list[] = strtolower(trim($entry)); } $list = array_unique($list); if (count($list) === 0) { @@ -57,7 +57,7 @@ class TagList implements BinderInterface $collection = $allTags->filter( function (Tag $tag) use ($list) { - return in_array($tag->tag, $list); + return in_array(strtolower($tag->tag), $list); } ); diff --git a/resources/views/reports/tag/month.twig b/resources/views/reports/tag/month.twig index 32966ae224..a3a6eb826c 100644 --- a/resources/views/reports/tag/month.twig +++ b/resources/views/reports/tag/month.twig @@ -42,6 +42,13 @@ {% endfor %} + + + {{ 'sum'|_ }} + {{ accountSummary.sum.earned|formatAmount }} + {{ accountSummary.sum.spent|formatAmount }} + + @@ -120,6 +127,13 @@ {% endfor %} + + + {{ 'sum'|_ }} + {{ tagSummary.sum.earned|formatAmount }} + {{ tagSummary.sum.spent|formatAmount }} + + @@ -196,7 +210,11 @@ + {% set totalCount = 0 %} + {% set totalSum = 0 %} {% for row in averageExpenses %} + {% set totalCount = totalCount+ row.count %} + {% set totalSum = totalSum + row.sum %} {% if loop.index > listLength %} {% else %} @@ -225,6 +243,13 @@ {% endif %} + + + {{ 'sum'|_ }} + + {{ totalSum|formatAmount }} + {{ totalCount }} + @@ -249,7 +274,9 @@ + {% set totalSum = 0 %} {% for row in topExpenses %} + {% set totalSum = totalSum + row.transaction_amount %} {% if loop.index > listLength %} {% else %} @@ -286,6 +313,12 @@ {% endif %} + + + {{ 'sum'|_ }} + + {{ totalSum|formatAmount }} + @@ -305,21 +338,25 @@ {{ 'account'|_ }} - {{ 'income_average'|_ }} - {{ 'total'|_ }} + {{ 'income_average'|_ }} + {{ 'total'|_ }} {{ 'transaction_count'|_ }} + {% set totalCount = 0 %} + {% set totalSum = 0 %} {% for row in averageIncome %} + {% set totalCount = totalCount+ row.count %} + {% set totalSum = totalSum + row.sum %} {{ row.name }} - + {{ row.average|formatAmount }} - + {{ row.sum|formatAmount }} @@ -327,6 +364,13 @@ {% endfor %} + + + {{ 'sum'|_ }} + + {{ totalSum|formatAmount }} + {{ totalCount }} + @@ -346,11 +390,13 @@ {{ 'description'|_ }} {{ 'date'|_ }} {{ 'account'|_ }} - {{ 'amount'|_ }} + {{ 'amount'|_ }} + {% set totalSum = 0 %} {% for row in topIncome %} + {% set totalSum = totalSum + row.transaction_amount %} {% if loop.index > listLength %} {% else %} @@ -373,7 +419,7 @@ {{ row.opposing_account_name }} - + {{ row.transaction_amount|formatAmount }} @@ -387,6 +433,12 @@ {% endif %} + + + {{ 'sum'|_ }} + + {{ totalSum|formatAmount }} +