mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 18:44:16 +00:00
Clean up code, clarify 404.
This commit is contained in:
@@ -31,7 +31,6 @@ use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Repositories\Tag\OperationsRepositoryInterface;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\View\View;
|
||||
|
||||
/**
|
||||
@@ -95,10 +94,10 @@ class TagController extends Controller
|
||||
|
||||
$report[$sourceAccountId]['currencies'][$currencyId]['tags'][$tagId]
|
||||
??= [
|
||||
'spent' => '0',
|
||||
'earned' => '0',
|
||||
'sum' => '0',
|
||||
];
|
||||
'spent' => '0',
|
||||
'earned' => '0',
|
||||
'sum' => '0',
|
||||
];
|
||||
$report[$sourceAccountId]['currencies'][$currencyId]['tags'][$tagId]['spent'] = bcadd(
|
||||
$report[$sourceAccountId]['currencies'][$currencyId]['tags'][$tagId]['spent'],
|
||||
$journal['amount']
|
||||
@@ -121,18 +120,18 @@ class TagController extends Controller
|
||||
$destinationId = $journal['destination_account_id'];
|
||||
$report[$destinationId]['currencies'][$currencyId]
|
||||
??= [
|
||||
'currency_id' => $currency['currency_id'],
|
||||
'currency_symbol' => $currency['currency_symbol'],
|
||||
'currency_name' => $currency['currency_name'],
|
||||
'currency_decimal_places' => $currency['currency_decimal_places'],
|
||||
'tags' => [],
|
||||
];
|
||||
'currency_id' => $currency['currency_id'],
|
||||
'currency_symbol' => $currency['currency_symbol'],
|
||||
'currency_name' => $currency['currency_name'],
|
||||
'currency_decimal_places' => $currency['currency_decimal_places'],
|
||||
'tags' => [],
|
||||
];
|
||||
$report[$destinationId]['currencies'][$currencyId]['tags'][$tagId]
|
||||
??= [
|
||||
'spent' => '0',
|
||||
'earned' => '0',
|
||||
'sum' => '0',
|
||||
];
|
||||
'spent' => '0',
|
||||
'earned' => '0',
|
||||
'sum' => '0',
|
||||
];
|
||||
$report[$destinationId]['currencies'][$currencyId]['tags'][$tagId]['earned'] = bcadd(
|
||||
$report[$destinationId]['currencies'][$currencyId]['tags'][$tagId]['earned'],
|
||||
$journal['amount']
|
||||
@@ -446,6 +445,7 @@ class TagController extends Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return view('reports.tag.partials.tags', compact('sums', 'report'));
|
||||
}
|
||||
|
||||
|
@@ -80,7 +80,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
$tagId = (int)$tag['id'];
|
||||
$tagName = (string)$tag['name'];
|
||||
$journalId = (int)$journal['transaction_journal_id'];
|
||||
if(!in_array($tagId, $tagIds, true)){
|
||||
if(!in_array($tagId, $tagIds, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
|
||||
// may have multiple tags:
|
||||
foreach ($journal['tags'] as $tag) {
|
||||
if(!in_array($tagId, $tagIds, true)){
|
||||
if(!in_array($tagId, $tagIds, true)) {
|
||||
continue;
|
||||
}
|
||||
$tagId = (int)$tag['id'];
|
||||
|
@@ -37,6 +37,11 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-10 col-lg-offset-1 col-md-12 col-sm-12 col-xs-12">
|
||||
{% if exception.message starts with 'Webhooks' %}
|
||||
<p class="lead">
|
||||
{{ exception.message }}
|
||||
</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
{{ trans('errors.404_page_does_not_exist') }}
|
||||
</p>
|
||||
|
Reference in New Issue
Block a user