mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-07-27 16:07:45 -07:00
Expand views.
This commit is contained in:
@@ -448,8 +448,10 @@ final class TagController extends Controller
|
||||
{
|
||||
$spent = $this->opsRepository->listExpenses($start, $end, $accounts, $tags);
|
||||
$result = [];
|
||||
$incomeTopLength = 0;
|
||||
foreach ($spent as $currency) {
|
||||
foreach ($currency['tags'] as $tag) {
|
||||
$incomeTopLength++;
|
||||
foreach ($tag['transaction_journals'] as $journal) {
|
||||
$result[] = [
|
||||
'description' => $journal['description'],
|
||||
@@ -476,7 +478,7 @@ final class TagController extends Controller
|
||||
array_multisort($amounts, SORT_ASC, $result);
|
||||
|
||||
try {
|
||||
$result = view('reports.tag.partials.top-expenses', ['result' => $result])->render();
|
||||
$result = view('reports.tag.partials.top-expenses', ['result' => $result, 'incomeTopLength' => $incomeTopLength])->render();
|
||||
} catch (Throwable $e) {
|
||||
Log::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));
|
||||
$result = sprintf('Could not render view: %s', $e->getMessage());
|
||||
|
||||
Reference in New Issue
Block a user