mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +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'));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user