Expand views.

This commit is contained in:
James Cole
2026-06-28 17:18:02 +02:00
parent 23dc005d9f
commit 3bb48c587d
26 changed files with 219 additions and 434 deletions
@@ -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());
+3 -3
View File
@@ -1488,9 +1488,9 @@
}
},
"node_modules/i18next": {
"version": "26.3.2",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-26.3.2.tgz",
"integrity": "sha512-QQkXAM1sPDHqhxMQuBeHVMUn6mJchF+wdpOoQerciLAFqO3ZYdxO0EUbeEhruyutnNwpUQIITDVzLjwnNL0T1w==",
"version": "26.3.3",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-26.3.3.tgz",
"integrity": "sha512-aYVegyBdXSO93CMMihvr47jI7GHSOcIahMpJX+qzUXDzW4xDJf2uenIA+45vDU+YhiVdcfsql70AC9RVdMNrHg==",
"funding": [
{
"type": "individual",
@@ -167,7 +167,7 @@
<li class="{{ activeRoutePartial('tags') }}">
<a href="{{ route('tags.index') }}">
<span class="bi bi-caret-right"></span>
<span>{{ 'tags'|_ }}</span>
<span>{{ __('firefly.tags') }}</span>
</a>
</li>
<li class="{{ activeRoutePartial('object-groups') }}">
+1 -1
View File
@@ -105,7 +105,7 @@
<tr>
<td>{{ __('firefly.suggested_amount') }}</td>
<td>
{!! format_amount_by_symbol($piggy['save_per_month'], $piggy['currency_symbol'], $piggy['currency_decimal_places']) }}
{!! format_amount_by_symbol($piggy['save_per_month'], $piggy['currency_symbol'], $piggy['currency_decimal_places']) !!}
</td>
</tr>
@endif
@@ -74,11 +74,11 @@
{% for rtt in rt.transactions %}
<li>
{{-- normal amount + comma --}}
{!! format_amount_by_symbol(rtt['amount'],rtt['currency_symbol'],rtt['currency_decimal_places']) }}{% if rtt['foreign_amount'] == null %},@endif
{!! format_amount_by_symbol(rtt['amount'],rtt['currency_symbol'],rtt['currency_decimal_places']) !!}{% if rtt['foreign_amount'] == null %},@endif
{{-- foreign amount + comma --}}
{% if null != rtt['foreign_amount'] %}
({!! format_amount_by_symbol(rtt['foreign_amount'],rtt['foreign_currency_symbol'],rtt['foreign_currency_decimal_places']) }}),
({!! format_amount_by_symbol(rtt['foreign_amount'],rtt['foreign_currency_symbol'],rtt['foreign_currency_decimal_places']) !!}),
@endif
<a href="{{ route('accounts.show', rtt['source_id']) }}">{{ rtt['source_name'] }}</a>
&rarr;
@@ -26,7 +26,7 @@
<td data-sortable="false">
<a href="{{ route('accounts.show', $row['source_account_id']) }}">
{{ row['source_account_name'] }}
{{ $row['source_account_name'] }}
</a>
</td>
<td data-sortable="false">
@@ -36,7 +36,7 @@
</td>
<td data-value="{{ $row['amount'] }}" class="text-end">
{!! format_amount_by_symbol($row['amount'], $row['currency_symbol'], $row['currency_decimal_places']) }}
{!! format_amount_by_symbol($row['amount'], $row['currency_symbol'], $row['currency_decimal_places']) !!}
</td>
</tr>
@@ -11,32 +11,32 @@
@foreach($report as $account)
<tr>
<td>
<a href="{{ route('accounts.show', [account.account_id]) }}" title="{{ account.account_name }}">{{ account.account_name }}</a>
<a href="{{ route('accounts.show', [$account['account_id']]) }}" title="{{ $account['account_name'] }}">{{ $account['account_name'] }}</a>
</td>
<td class="text-end">
{!! format_amount_by_symbol(account.spent, account.currency_symbol, account.currency_decimal_places) }}
{!! format_amount_by_symbol($account['spent'], $account['currency_symbol'], $account['currency_decimal_places']) !!}
</td>
<td class="text-end">
{!! format_amount_by_symbol(account.earned, account.currency_symbol, account.currency_decimal_places) }}
{!! format_amount_by_symbol($account['earned'], $account['currency_symbol'], $account['currency_decimal_places']) !!}
</td>
<td class="text-end">
{!! format_amount_by_symbol(account.sum, account.currency_symbol, account.currency_decimal_places) }}
{!! format_amount_by_symbol($account['sum'], $account['currency_symbol'], $account['currency_decimal_places']) !!}
</td>
</tr>
@endforeach
</tbody>
<tfoot>
{% for sum in sums %}
@foreach($sums as $sum)
<tr>
<td>{{ __('firefly.sum') }} ({{ sum.currency_name }})</td>
<td>{{ __('firefly.sum') }} ({{ $sum['currency_name'] }})</td>
<td class="text-end">
{!! format_amount_by_symbol(sum.spent, sum.currency_symbol, sum.currency_decimal_places) }}
{!! format_amount_by_symbol($sum['spent'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
</td>
<td class="text-end">
{!! format_amount_by_symbol(sum.earned, sum.currency_symbol, sum.currency_decimal_places) }}
{!! format_amount_by_symbol($sum['earned'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
</td>
<td class="text-end">
{!! format_amount_by_symbol(sum.sum, sum.currency_symbol, sum.currency_decimal_places) }}
{!! format_amount_by_symbol($sum['sum'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
</td>
</tr>
@endforeach
@@ -11,43 +11,43 @@
@foreach($report as $account)
<tr>
<td>
{% if account.source_name == account.dest_name %}
{{ account.source_name }}
@if($account['source_name'] === $account['dest_name'])
{{ $account['source_name'] }}
@else
{{ account.source_name }} / {{ account.dest_name }}
{{ $account['source_name'] }} / {{ $account['dest_name'] }}
@endif
{% if account.source_iban != '' and account.dest_iban != '' %}
{% if account.source_iban == account.dest_iban %}
({{ account.source_iban }})
@if($iban['source_iban'] !== '' && $account['dest_iban'] !== '')
@if($iban['source_iban'] === $iban['dest_iban'])
({{ $account['source_iban'] }})
@else
({{ account.source_iban }} / ({{ account.dest_iban }}))
({{ $account['source_iban'] }} / ({{ $account['dest_iban'] }}))
@endif
@endif
</td>
<td class="text-end">
{!! format_amount_by_symbol(account.spent, account.currency_symbol, account.currency_decimal_places) }}
{!! format_amount_by_symbol($account['spent'], $account['currency_symbol'], $account['currency_decimal_places']) !!}
</td>
<td class="text-end">
{!! format_amount_by_symbol(account.earned, account.currency_symbol, account.currency_decimal_places) }}
{!! format_amount_by_symbol($account['earned'], $account['currency_symbol'], $account['currency_decimal_places']) !!}
</td>
<td class="text-end">
{!! format_amount_by_symbol(account.sum, account.currency_symbol, account.currency_decimal_places) }}
{!! format_amount_by_symbol($account['sum'], $account['currency_symbol'], $account['currency_decimal_places']) !!}
</td>
</tr>
@endforeach
</tbody>
<tfoot>
{% for sum in sums %}
@foreach($sums as $sum)
<tr>
<td>{{ __('firefly.sum') }} ({{ sum.currency_name }})</td>
<td>{{ __('firefly.sum') }} ({{ $sum['currency_name'] }})</td>
<td class="text-end">
{!! format_amount_by_symbol(sum.spent, sum.currency_symbol, sum.currency_decimal_places) }}
{!! format_amount_by_symbol($sum['spent'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
</td>
<td class="text-end">
{!! format_amount_by_symbol(sum.earned, sum.currency_symbol, sum.currency_decimal_places) }}
{!! format_amount_by_symbol($sum['earned'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
</td>
<td class="text-end">
{!! format_amount_by_symbol(sum.sum, sum.currency_symbol, sum.currency_decimal_places) }}
{!! format_amount_by_symbol($sum['sum'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
</td>
</tr>
@endforeach
@@ -16,15 +16,15 @@
@endif
<td data-sortable="false">
<a href="{{ route('accounts.show', $row['source_account_id']) }}">
{{ row['source_account_name'] }}
{{ $row['source_account_name'] }}
</a>
</td>
<td data-value="{{ $row['avg'] }}" class="text-end">
{!! format_amount_by_symbol($row['avg'], $row['currency_symbol'], $row['currency_decimal_places']) }}
{!! format_amount_by_symbol($row['avg'], $row['currency_symbol'], $row['currency_decimal_places']) !!}
</td>
<td data-value="{{ $row['sum'] }}" class="text-end">
{!! format_amount_by_symbol($row['sum'], $row['currency_symbol'], $row['currency_decimal_places']) }}
{!! format_amount_by_symbol($row['sum'], $row['currency_symbol'], $row['currency_decimal_places']) !!}
</td>
<td data-value="{{ $row['transactions'] }}">
@@ -20,11 +20,11 @@
</a>
</td>
<td data-value="{{ $row['avg'] }}" class="text-end">
{!! format_amount_by_symbol($row['avg'], $row['currency_symbol'], $row['currency_decimal_places']) }}
{!! format_amount_by_symbol($row['avg'], $row['currency_symbol'], $row['currency_decimal_places']) !!}
</td>
<td data-value="{{ $row['sum'] }}" class="text-end">
{!! format_amount_by_symbol($row['sum'], $row['currency_symbol'], $row['currency_decimal_places']) }}
{!! format_amount_by_symbol($row['sum'], $row['currency_symbol'], $row['currency_decimal_places']) !!}
</td>
<td data-value="{{ $row['transactions'] }}">
@@ -3,8 +3,8 @@
<tr>
<th data-defaultsort="disabled">{{ __('firefly.description') }}</th>
<th data-defaultsign="month">{{ __('firefly.date') }}</th>
<th data-defaultsign="az">{{ 'source_account'|_ }}</th>
<th data-defaultsign="az">{{ 'destination_account'|_ }}</th>
<th data-defaultsign="az">{{ __('firefly.source_account') }}</th>
<th data-defaultsign="az">{{ __('firefly.destination_account') }}</th>
<th data-defaultsign="_19" class="text-end">{{ __('firefly.amount') }}</th>
</tr>
</thead>
@@ -26,7 +26,7 @@
<td data-sortable="false">
<a href="{{ route('accounts.show', $row['source_account_id']) }}">
{{ row['source_account_name'] }}
{{ $row['source_account_name'] }}
</a>
</td>
<td data-sortable="false">
@@ -37,7 +37,7 @@
<td data-value="{{ $row['amount'] }}" class="text-end">
{!! format_amount_by_symbol($row['amount'], $row['currency_symbol'], $row['currency_decimal_places']) }}
{!! format_amount_by_symbol($row['amount'], $row['currency_symbol'], $row['currency_decimal_places']) !!}
</td>
</tr>
@@ -3,8 +3,8 @@
<tr>
<th data-defaultsort="disabled">{{ __('firefly.description') }}</th>
<th data-defaultsign="month">{{ __('firefly.date') }}</th>
<th data-defaultsign="az">{{ 'source_account'|_ }}</th>
<th data-defaultsign="az">{{ 'destination_account'|_ }}</th>
<th data-defaultsign="az">{{ __('firefly.source_account') }}</th>
<th data-defaultsign="az">{{ __('firefly.destination_account') }}</th>
<th data-defaultsign="_19" class="text-end">{{ __('firefly.amount') }}</th>
</tr>
</thead>
@@ -37,7 +37,7 @@
<td data-value="{{ $row['amount'] }}" class="text-end">
{!! format_amount_by_symbol($row['amount'], $row['currency_symbol'], $row['currency_decimal_places']) }}
{!! format_amount_by_symbol($row['amount'], $row['currency_symbol'], $row['currency_decimal_places']) !!}
</td>
</tr>
+41 -42
View File
@@ -1,16 +1,15 @@
@extends('layout.v3.session')
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, accountIds, doubleIds, start, end) }}
@section('breadcrumbs')
{{ Breadcrumbs::render(Route::getCurrentRoute()->getName(), $accountIds, $doubleIds, $start, $end) }}
@endsection
@section('content')
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ 'in_out_accounts'|_ }}</h3>
<h3 class="card-title">{{ __('firefly.in_out_accounts') }}</h3>
</div>
<div class="card-body p-0" id="opsAccounts">
{{-- loading indicator --}}
@@ -24,9 +23,9 @@
</div>
<div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ 'in_out_accounts_per_asset'|_ }}</h3>
<h3 class="card-title">{{ __('firefly.in_out_accounts_per_asset') }}</h3>
</div>
<div class="card-body p-0" id="opsAccountsAsset">
{{-- loading indicator --}}
@@ -42,7 +41,7 @@
<div class="row">
<div class="col-lg-4 col-md-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.expense_per_category') }}</h3>
</div>
@@ -54,7 +53,7 @@
</div>
</div>
<div class="col-lg-4 col-md-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.income_per_category') }}</h3>
</div>
@@ -66,7 +65,7 @@
</div>
</div>
<div class="col-lg-4 col-md-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.expense_per_budget') }}</h3>
</div>
@@ -81,9 +80,9 @@
<div class="row">
<div class="col-lg-6 col-md-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ 'expense_per_tag'|_ }}</h3>
<h3 class="card-title">{{ __('firefly.expense_per_tag') }}</h3>
</div>
<div class="card-body">
<div class="center-chart">
@@ -92,15 +91,15 @@
</div>
<div class="card-footer">
<p class="text-info">
<em>{{ 'double_report_expenses_charted_once'|_ }}</em>
<em>{{ __('firefly.double_report_expenses_charted_once') }}</em>
</p>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ 'income_per_tag'|_ }}</h3>
<h3 class="card-title">{{ __('firefly.income_per_tag') }}</h3>
</div>
<div class="card-body">
<div class="center-chart">
@@ -109,25 +108,24 @@
</div>
<div class="card-footer">
<p class="text-info">
<em>{{ 'double_report_expenses_charted_once'|_ }}</em>
<em>{{ __('firefly.double_report_expenses_charted_once') }}</em>
</p>
</div>
</div>
</div>
</div>
{% for account in doubles %}
@foreach($doubles as $account)
<div class="row">
<div class="col-lg-12">
<div class="card" id="incomeAndExpensesChart">
<div class="card mb-2" id="incomeAndExpensesChart">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.income_and_expenses') }} ({{ $account['name'] }}) {% if $account['iban'] %}({{ $account['iban'] }})@endif</h3>
<h3 class="card-title">{{ __('firefly.income_and_expenses') }} ({{ $account['name'] }}) @if(null !== $account['iban'])({{ $account['iban'] }})@endif</h3>
</div>
<div class="card-body">
<canvas class="main_double_canvas"
data-url="{{ route('chart.double.main', [accountIds, account.id, $start->format('Ymd'), $end->format('Ymd')]) }}"
id="in-out-chart-{{ account.id }}" class="wide-chart" height="400" width="100%"></canvas>
<canvas class="main_double_canvas wide-chart"
data-url="{{ route('chart.double.main', [$accountIds, $account['id'], $start->format('Ymd'), $end->format('Ymd')]) }}"
id="in-out-chart-{{ $account['id'] }}" height="400" width="100%"></canvas>
</div>
</div>
</div>
@@ -136,7 +134,7 @@
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.expenses') }} ({{ trans('firefly.topX', ['number' => $listLength]) }})</h3>
</div>
@@ -152,7 +150,7 @@
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.income') }} ({{ trans('firefly.topX', ['number' => $listLength]) }})</h3>
</div>
@@ -170,9 +168,9 @@
<div class="row">
<div class="col-lg-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ 'average_spending_per_source'|_ }}</h3>
<h3 class="card-title">{{ __('firefly.average_spending_per_source') }}</h3>
</div>
<div class="card-body p-0" id="avgExpensesHolder">
</div>
@@ -185,9 +183,9 @@
</div>
</div>
<div class="col-lg-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ 'average_earning_per_destination'|_ }}</h3>
<h3 class="card-title">{{ __('firefly.average_earning_per_destination') }}</h3>
</div>
<div class="card-body p-0" id="avgIncomeHolder">
</div>
@@ -204,6 +202,7 @@
@endsection
@section('scripts')
@vite(['js/pages/generic.js'])
<script type="text/javascript" src="v1/js/lib/Chart.bundle.min.js?v={{ $FF_BUILD_TIME }}" nonce="{{ $JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/charts.defaults.js?v={{ $FF_BUILD_TIME }}" nonce="{{ $JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/charts.js?v={{ $FF_BUILD_TIME }}" nonce="{{ $JS_NONCE }}"></script>
@@ -213,25 +212,25 @@
// to report another URL:
var startDate = '{{ $start->format('Ymd') }}';
var endDate = '{{ $end->format('Ymd') }}';
var accountIds = '{{ accountIds }}';
var doubleIds = '{{ doubleIds }}';
var accountIds = '{{ $accountIds }}';
var doubleIds = '{{ $doubleIds }}';
// html blocks.
var opsAccountsUrl = '{{ route('report-data.double.operations', [accountIds, doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var opsAccountsAssetUrl = '{{ route('report-data.double.ops-asset', [accountIds, doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var opsAccountsUrl = '{{ route('report-data.double.operations', [$accountIds, $doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var opsAccountsAssetUrl = '{{ route('report-data.double.ops-asset', [$accountIds, $doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
// pie charts:
var categoryOutUrl = '{{ route('chart.double.category-expense', [accountIds, doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var categoryInUrl = '{{ route('chart.double.category-income', [accountIds, doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var budgetsOutUrl = '{{ route('chart.double.budget-expense', [accountIds, doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var tagOutUrl = '{{ route('chart.double.tag-expense', [accountIds, doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var tagInUrl = '{{ route('chart.double.tag-income', [accountIds, doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var categoryOutUrl = '{{ route('chart.double.category-expense', [$accountIds, $doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var categoryInUrl = '{{ route('chart.double.category-income', [$accountIds, $doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var budgetsOutUrl = '{{ route('chart.double.budget-expense', [$accountIds, $doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var tagOutUrl = '{{ route('chart.double.tag-expense', [$accountIds, $doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var tagInUrl = '{{ route('chart.double.tag-income', [$accountIds, $doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var avgExpensesUrl = '{{ route('report-data.double.avg-expenses', [accountIds, doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var topExpensesUrl = '{{ route('report-data.double.top-expenses', [accountIds, doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var avgIncomeUrl = '{{ route('report-data.double.avg-income', [accountIds, doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var topIncomeUrl = '{{ route('report-data.double.top-income', [accountIds, doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var avgExpensesUrl = '{{ route('report-data.double.avg-expenses', [$accountIds, $doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var topExpensesUrl = '{{ route('report-data.double.top-expenses', [$accountIds, $doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var avgIncomeUrl = '{{ route('report-data.double.avg-income', [$accountIds, $doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var topIncomeUrl = '{{ route('report-data.double.top-income', [$accountIds, $doubleIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
</script>
<script type="text/javascript" src="v1/js/ff/reports/all.js?v={{ $FF_BUILD_TIME }}" nonce="{{ $JS_NONCE }}"></script>
@@ -6,21 +6,21 @@
</tr>
</thead>
<tbody>
{% for budgetId, entry in together %}
@foreach($together as $budgetId => $entry)
<tr>
<td data-value="{% if entry.budget == null %}zzzzzzzzzzz@else{{ entry.budget }}@endif">
{% if entry.budget == null %}
<a href="{{ route('budgets.no-budget') }}">{{ 'no_budget_squared'|_ }}</a>
<td data-value="@if(null === $entry['budget'])zzzzzzzzzzz@else{{ $entry['budget'] }}@endif">
@if(null === $entry['budget'])
<a href="{{ route('budgets.no-budget') }}">{{ __('firefly.no_budget_squared') }}</a>
@else
<a href="{{ route('budgets.show', budgetId) }}">{{ entry.budget }}</a>
<a href="{{ route('budgets.show', [$budgetId]) }}">{{ $entry['budget'] }}</a>
@endif
</td>
<td data-value="{{ entry.spent.grand_total }}">
{% if entry.spent.per_currency|length ==0 %}
{{ '0'|formatAmount }}
<td data-value="{{ $entry['spent']['grand_total'] }}">
@if(count($entry['spent']['per_currency']) === 0)
{{ format_amount_by_currency($primaryCurrency, '0', true) }}
@else
{% for expense in entry.spent.per_currency %}
{!! format_amount_by_symbol(expense.sum, expense.currency.symbol, expense.currency.dp) }}<br/>
@foreach($entry['spent']['per_currency'] as $expense)
{!! format_amount_by_symbol($expense['sum'], $expense['currency']['symbol'], $expense['currency']['dp']) !!}<br/>
@endforeach
@endif
</td>
@@ -7,31 +7,30 @@
</tr>
</thead>
<tbody>
{% for categoryId, entry in together %}
@foreach($together as $categoryId => $entry)
<tr>
<td data-value="{% if entry.category == null %}zzzzzzzzzzz@else{{ entry.category }}@endif">
{% if entry.category == null %}
<a href="{{ route('categories.no-category') }}">{{ 'noCategory'|_ }}</a>
<td data-value="@if(null === $entry['category'])zzzzzzzzzzz@else{{ $entry['category'] }}@endif">
@if(null === $entry['category'])
<a href="{{ route('categories.no-category') }}">{{ __('firefly.noCategory') }}</a>
@else
<a href="{{ route('categories.show', categoryId) }}">{{ entry.category }}</a>
<a href="{{ route('categories.show', [$categoryId]) }}">{{ $entry['category'] }}</a>
@endif
</td>
<td data-value="{{ entry.spent.grand_total }}">
{% if entry.spent.per_currency|length ==0 %}
{{ '0'|formatAmount }}
<td data-value="{{ $entry['spent']['grand_total'] }}">
@if(0 === count($entry['spent']['per_currency']))
{!! format_amount_by_currency($primaryCurrency,'0',true) !!}
@else
{% for expense in entry.spent.per_currency %}
{!! format_amount_by_symbol(expense.sum, expense.currency.symbol, expense.currency.dp) }}<br/>
@foreach($entry['spent']['per_currency'] as $expense)
{!! format_amount_by_symbol($expense['sum'], $expense['currency']['symbol'], $expense['currency']['dp']) !!}<br/>
@endforeach
@endif
</td>
<td data-value="{{ entry.earned.grand_total }}">
{% if entry.earned.per_currency|length ==0 %}
{{ '0'|formatAmount }}
<td data-value="{{ $entry['earned']['grand_total'] }}">
@if(0 === count($entry['earned']['per_currency']))
{!! format_amount_by_currency($primaryCurrency,'0',true) !!}
@else
{% for income in entry.earned.per_currency %}
{!! format_amount_by_symbol(income.sum * -1, income.currency.symbol, income.currency.dp) }}<br/>
@foreach($entry['earned']['per_currency'] as $income)
{!! format_amount_by_symbol($income['sum'] * -1, $income['currency']['symbol'], $income['currency']['dp']) !!}<br/>
@endforeach
@endif
</td>
@@ -16,7 +16,8 @@
@endif
{% for expense in amounts.spent.per_currency %}
{!! format_amount_by_symbol(expense.sum, expense.currency.symbol, expense.currency.dp) }}<br/>
@endforeach
@endforeachkvr
</td>
<td data-value="{{ amounts.earned.grand_sum }}">
{% if amounts.earned.per_currency|length == 0 %}
@@ -27,7 +27,7 @@
{{-- even more optional fields --}}
<th class="hide-interest_date">{{ trans('list.interest_date') }}</th>
<th class="hide-book_date">{{ trans('list.book_date') }}</th>
<th class="hide-process_date">{{ trans('list.process_date') }}</th>
<th class="hide-process_date"> {{ trans('list.process_date') }}</th>
<th class="hide-due_date">{{ trans('list.due_date') }}</th>
<th class="hide-payment_date">{{ trans('list.payment_date') }}</th>
<th class="hide-invoice_date">{{ trans('list.invoice_date') }}</th>
+47 -47
View File
@@ -1,14 +1,13 @@
@extends('layout.v3.session')
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, accountIds, tagIds, start, end) }}
@section('breadcrumbs')
{{ Breadcrumbs::render(Route::getCurrentRoute()->getName(), $accountIds, $tagIds, $start, $end) }}
@endsection
@section('content')
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.accounts') }}</h3>
</div>
@@ -23,9 +22,9 @@
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ 'tags'|_ }}</h3>
<h3 class="card-title">{{ __('firefly.tags') }}</h3>
</div>
<div class="card-body p-0" id="tagsHolder">
</div>
@@ -40,9 +39,9 @@
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ 'account_per_tag'|_ }}</h3>
<h3 class="card-title">{{ __('firefly.account_per_tag') }}</h3>
</div>
<div class="card-body p-0" id="accountPerTagHolder">
</div>
@@ -57,9 +56,9 @@
</div>
<div class="row">
<div class="col-lg-6 col-md-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ 'expense_per_tag'|_ }}</h3>
<h3 class="card-title">{{ __('firefly.expense_per_tag') }}</h3>
</div>
<div class="card-body">
<div class="center-chart">
@@ -69,9 +68,9 @@
</div>
</div>
<div class="col-lg-6 col-md-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ 'income_per_tag'|_ }}</h3>
<h3 class="card-title">{{ __('firefly.income_per_tag') }}</h3>
</div>
<div class="card-body">
<div class="center-chart">
@@ -83,7 +82,7 @@
</div>
<div class="row">
<div class="col-lg-4 col-md-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.expense_per_category') }}</h3>
</div>
@@ -95,7 +94,7 @@
</div>
</div>
<div class="col-lg-4 col-md-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.income_per_category') }}</h3>
</div>
@@ -107,7 +106,7 @@
</div>
</div>
<div class="col-lg-4 col-md-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.expense_per_budget') }}</h3>
</div>
@@ -121,7 +120,7 @@
</div>
<div class="row">
<div class="col-lg-6 col-md-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.expense_per_source_account') }}</h3>
</div>
@@ -133,7 +132,7 @@
</div>
</div>
<div class="col-lg-6 col-md-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.income_per_source_account') }}</h3>
</div>
@@ -147,7 +146,7 @@
</div>
<div class="row">
<div class="col-lg-6 col-md-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.expense_per_destination_account') }}</h3>
</div>
@@ -159,7 +158,7 @@
</div>
</div>
<div class="col-lg-6 col-md-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.income_per_destination_account') }}</h3>
</div>
@@ -172,20 +171,20 @@
</div>
</div>
{% for tag in tags %}
@foreach($tags as $tag)
<div class="row">
<div class="col-lg-12">
<div class="box main_budget_chart">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.income_and_expenses') }} ({{ tag.tag }})</h3>
<h3 class="card-title">{{ __('firefly.income_and_expenses') }} ({{ $tag->tag }})</h3>
</div>
<div class="card-body">
<canvas class="main_tag_canvas"
data-url="{{ route('chart.tag.main', [accountIds, tag.id, $start->format('Ymd'), $end->format('Ymd')]) }}"
id="in-out-chart-{{ tag.id }}" class="wide-chart" height="400" width="100%"></canvas>
<canvas class="main_tag_canvas wide-chart"
data-url="{{ route('chart.tag.main', [$accountIds, $tag->id, $start->format('Ymd'), $end->format('Ymd')]) }}"
id="in-out-chart-{{ $tag->id }}" height="400" width="100%"></canvas>
</div>
<div class="card-footer">
<p class="text-info"><em>{{ 'tag_report_chart_single_tag'|_ }}</em></p>
<p class="text-info"><em>{{ __('firefly.tag_report_chart_single_tag') }}</em></p>
</div>
</div>
</div>
@@ -193,7 +192,7 @@
@endforeach
<div class="row">
<div class="col-lg-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.average_spending_per_destination') }}</h3>
</div>
@@ -208,7 +207,7 @@
</div>
</div>
<div class="col-lg-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.average_earning_per_source') }}</h3>
</div>
@@ -225,7 +224,7 @@
</div>
<div class="row">
<div class="col-lg-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.expenses') }} ({{ trans('firefly.topX', ['number' => $listLength]) }})</h3>
</div>
@@ -240,7 +239,7 @@
</div>
</div>
<div class="col-lg-6">
<div class="card">
<div class="card mb-2">
<div class="card-header">
<h3 class="card-title">{{ __('firefly.income') }} ({{ trans('firefly.topX', ['number' => $listLength]) }})</h3>
</div>
@@ -259,6 +258,7 @@
@endsection
@section('scripts')
@vite(['js/pages/generic.js'])
<script type="text/javascript" src="v1/js/lib/Chart.bundle.min.js?v={{ $FF_BUILD_TIME }}" nonce="{{ $JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/charts.defaults.js?v={{ $FF_BUILD_TIME }}" nonce="{{ $JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/charts.js?v={{ $FF_BUILD_TIME }}" nonce="{{ $JS_NONCE }}"></script>
@@ -269,29 +269,29 @@
// to report another URL:
var startDate = '{{ $start->format('Ymd') }}';
var endDate = '{{ $end->format('Ymd') }}';
var accountIds = '{{ accountIds }}';
var tagIds = '{{ tagIds }}';
var accountIds = '{{ $accountIds }}';
var tagIds = '{{ $tagIds }}';
var accountsUrl = '{{ route('report-data.tag.accounts', [accountIds, tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var tagsUrl = '{{ route('report-data.tag.tags', [accountIds, tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var accountPerTagUrl = '{{ route('report-data.tag.account-per-tag', [accountIds, tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var accountsUrl = '{{ route('report-data.tag.accounts', [$accountIds, $tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var tagsUrl = '{{ route('report-data.tag.tags', [$accountIds, $tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var accountPerTagUrl = '{{ route('report-data.tag.account-per-tag', [$accountIds, $tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
// pie charts:
var tagOutUrl = '{{ route('chart.tag.tag-expense', [accountIds, tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var tagInUrl = '{{ route('chart.tag.tag-income', [accountIds, tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var categoryOutUrl = '{{ route('chart.tag.category-expense', [accountIds, tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var categoryInUrl = '{{ route('chart.tag.category-income', [accountIds, tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var budgetsOutUrl = '{{ route('chart.tag.budget-expense', [accountIds, tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var sourceOutUrl = '{{ route('chart.tag.source-expense', [accountIds, tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var sourceInUrl = '{{ route('chart.tag.source-income', [accountIds, tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var destOutUrl = '{{ route('chart.tag.dest-expense', [accountIds, tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var destInUrl = '{{ route('chart.tag.dest-income', [accountIds, tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var tagOutUrl = '{{ route('chart.tag.tag-expense', [$accountIds, $tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var tagInUrl = '{{ route('chart.tag.tag-income', [$accountIds, $tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var categoryOutUrl = '{{ route('chart.tag.category-expense', [$accountIds, $tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var categoryInUrl = '{{ route('chart.tag.category-income', [$accountIds, $tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var budgetsOutUrl = '{{ route('chart.tag.budget-expense', [$accountIds, $tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var sourceOutUrl = '{{ route('chart.tag.source-expense', [$accountIds, $tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var sourceInUrl = '{{ route('chart.tag.source-income', [$accountIds, $tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var destOutUrl = '{{ route('chart.tag.dest-expense', [$accountIds, $tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var destInUrl = '{{ route('chart.tag.dest-income', [$accountIds, $tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var avgExpensesUrl = '{{ route('report-data.tag.avg-expenses', [accountIds, tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var topExpensesUrl = '{{ route('report-data.tag.top-expenses', [accountIds, tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var avgIncomeUrl = '{{ route('report-data.tag.avg-income', [accountIds, tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var topIncomeUrl = '{{ route('report-data.tag.top-income', [accountIds, tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var avgExpensesUrl = '{{ route('report-data.tag.avg-expenses', [$accountIds, $tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var topExpensesUrl = '{{ route('report-data.tag.top-expenses', [$accountIds, $tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var avgIncomeUrl = '{{ route('report-data.tag.avg-income', [$accountIds, $tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
var topIncomeUrl = '{{ route('report-data.tag.top-income', [$accountIds, $tagIds, $start->format('Ymd'), $end->format('Ymd')]) }}';
</script>
<script type="text/javascript" src="v1/js/ff/reports/tag/month.js?v={{ $FF_BUILD_TIME }}" nonce="{{ $JS_NONCE }}"></script>
@@ -2,8 +2,8 @@
<thead>
<tr>
<th data-defaultsign="az">{{ __('firefly.name') }}</th>
{% for tag in tags %}
<th data-defaultsign="_19" class="text-end">{{ tag.tag }}</th>
@foreach($tags as $tag)
<th data-defaultsign="_19" class="text-end">{{ $tag['tag'] }}</th>
@endforeach
</tr>
</thead>
@@ -12,13 +12,14 @@
@foreach($account['currencies'] as $currency)
<tr>
<td data-value="{{ $account['name'] }} ({{ $currency['currency_name'] }})">
<a href="{{ route('accounts.show', account.id) }}" title="{{ $account['iban'] }}">{{ $account['name'] }} ({{ $currency['currency_name'] }})</a>
<a href="{{ route('accounts.show', [$account['id']]) }}" title="{{ $account['iban'] }}">{{ $account['name'] }} ({{ $currency['currency_name'] }})</a>
</td>
{% for tag in tags %}
@foreach($tags as $tag)
<td class="text-end">
{% if currency.tags[tag.id] %}
<span title="{{ __('firefly.earned') }}: {!! format_amount_by_symbol(currency.tags[tag.id].earned, currency.currency_symbol, currency.currency_decimal_places, false) }}, {{ __('firefly.spent') }}: {!! format_amount_by_symbol(currency.tags[tag.id].spent, currency.currency_symbol, currency.currency_decimal_places, false) }}"
{!! format_amount_by_symbol(currency.tags[tag.id].sum, currency.currency_symbol, currency.currency_decimal_places) }}
@if(array_key_exists($tag['id'], $currency['tags']))
<span title="{{ __('firefly.earned') }}: {!! format_amount_by_symbol($currency['tags'][$tag['id']]['earned'], $currency['currency_symbol'], $currency['currency_decimal_places'], false) !!}, {{ __('firefly.spent') }}: {!! format_amount_by_symbol($currency['tags'][$tag['id']]['spent'], $currency['currency_symbol'], $currency['currency_decimal_places'], false) !!}">
{!! format_amount_by_symbol($currency['tags'][$tag['id']]['sum'], $currency['currency_symbol'], $currency['currency_decimal_places']) !!}
@else
&mdash;
@endif
@@ -30,9 +31,9 @@
</tbody>
<tfoot>
<tr>
<td colspan="{{ 1 + tags|length }}">
<td colspan="{{ 1 + count($tags) }}">
<p class="text-info">
<em>{{ 'tag_report_expenses_listed_once'|_ }}</em>
<em>{{ __('firefly.tag_report_expenses_listed_once') }}</em>
</p>
</td>
</tr>
@@ -12,33 +12,33 @@
@foreach($account['currencies'] as $currency)
<tr>
<td data-value="{{ $account['name'] }} ({{ $currency['currency_name'] }})">
<a href="{{ route('accounts.show', account.id) }}" title="{{ $account['iban'] }}">{{ $account['name'] }} ({{ $currency['currency_name'] }})</a>
<a href="{{ route('accounts.show', $account['id']) }}" title="{{ $account['iban'] }}">{{ $account['name'] }} ({{ $currency['currency_name'] }})</a>
</td>
<td data-value="{{ currency.spent }}" class="text-end">
{!! format_amount_by_symbol(currency.spent, currency.currency_symbol, currency.currency_decimal_places) }}
<td data-value="{{ $currency['spent'] }}" class="text-end">
{!! format_amount_by_symbol($currency['spent'], $currency['currency_symbol'], $currency['currency_decimal_places']) !!}
</td>
<td data-value="{{ currency.earned }}" class="text-end">
{!! format_amount_by_symbol(currency.earned, currency.currency_symbol, currency.currency_decimal_places) }}
<td data-value="{{ $currency['earned'] }}" class="text-end">
{!! format_amount_by_symbol($currency['earned'], $currency['currency_symbol'], $currency['currency_decimal_places']) !!}
</td>
<td data-value="{{ currency.sum }}" class="text-end">
{!! format_amount_by_symbol(currency.sum, currency.currency_symbol, currency.currency_decimal_places) }}
<td data-value="{{ $currency['sum'] }}" class="text-end">
{!! format_amount_by_symbol($currency['sum'] , $currency['currency_symbol'], $currency['currency_decimal_places']) !!}
</td>
</tr>
@endforeach
@endforeach
</tbody>
<tfoot>
{% for sum in sums %}
@foreach($sums as $sum)
<tr>
<td>{{ __('firefly.sum') }} ({{ sum.currency_name }})</td>
<td>{{ __('firefly.sum') }} ({{ $sum['currency_name'] }})</td>
<td class="text-end">
{!! format_amount_by_symbol(sum.spent_sum, sum.currency_symbol, sum.currency_decimal_places) }}
{!! format_amount_by_symbol($sum['spent_sum'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
</td>
<td class="text-end">
{!! format_amount_by_symbol(sum.earned_sum, sum.currency_symbol, sum.currency_decimal_places) }}
{!! format_amount_by_symbol($sum['earned_sum'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
</td>
<td class="text-end">
{!! format_amount_by_symbol(sum.total_sum, sum.currency_symbol, sum.currency_decimal_places) }}
{!! format_amount_by_symbol($sum['total_sum'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
</td>
</tr>
@endforeach
@@ -20,11 +20,11 @@
</a>
</td>
<td data-value="{{ $row['avg'] }}" class="text-end">
{!! format_amount_by_symbol($row['avg'], $row['currency_symbol'], $row['currency_decimal_places']) }}
{!! format_amount_by_symbol($row['avg'], $row['currency_symbol'], $row['currency_decimal_places']) !!}
</td>
<td data-value="{{ $row['sum'] }}" class="text-end">
{!! format_amount_by_symbol($row['sum'], $row['currency_symbol'], $row['currency_decimal_places']) }}
{!! format_amount_by_symbol($row['sum'], $row['currency_symbol'], $row['currency_decimal_places']) !!}
</td>
<td data-value="{{ $row['transactions'] }}">
@@ -16,15 +16,15 @@
@endif
<td data-sortable="false">
<a href="{{ route('accounts.show', $row['source_account_id']) }}">
{{ row['source_account_name'] }}
{{ $row['source_account_name'] }}
</a>
</td>
<td data-value="{{ $row['avg'] }}" class="text-end">
{!! format_amount_by_symbol($row['avg'], $row['currency_symbol'], $row['currency_decimal_places']) }}
{!! format_amount_by_symbol($row['avg'], $row['currency_symbol'], $row['currency_decimal_places']) !!}
</td>
<td data-value="{{ $row['sum'] }}" class="text-end">
{!! format_amount_by_symbol($row['sum'], $row['currency_symbol'], $row['currency_decimal_places']) }}
{!! format_amount_by_symbol($row['sum'], $row['currency_symbol'], $row['currency_decimal_places']) !!}
</td>
<td data-value="{{ $row['transactions'] }}">
@@ -8,54 +8,54 @@
</tr>
</thead>
<tbody>
{% for tag in report %}
{% if tag.currencies|length == 0 %}
@foreach($report as $tag)
@if(0 === count($tag['currencies']))
<tr>
<td data-value="{{ tag.name }}">
<a href="{{ route('tags.show', [tag.id]) }}" title="{{ tag.name }}">{{ tag.name }}</a>
<td data-value="{{ $tag['name'] }}">
<a href="{{ route('tags.show', [$tag['id']]) }}" title="{{ $tag['name'] }}">{{ $tag['name'] }}</a>
</td>
<td class="text-end">&mdash;</td>
<td class="text-end">&mdash;</td>
<td class="text-end">&mdash;</td>
</tr>
@endif
{% for currency in tag.currencies %}
@foreach($tag['currencies'] as $currency)
<tr>
<td data-value="{{ tag.name }} ({{ $currency['currency_name'] }})">
<a href="{{ route('tags.show', [tag.id]) }}" title="{{ tag.name }}">{{ tag.name }} ({{ $currency['currency_name'] }})</a>
<td data-value="{{ $tag['name'] }} ({{ $currency['currency_name'] }})">
<a href="{{ route('tags.show', [$tag['id']]) }}" title="{{ $tag['name'] }}">{{ $tag['name'] }} ({{ $currency['currency_name'] }})</a>
</td>
<td data-value="{{ currency.spent }}" class="text-end">
{!! format_amount_by_symbol(currency.spent, currency.currency_symbol, currency.currency_decimal_places) }}
<td data-value="{{ $currency['spent'] }}" class="text-end">
{!! format_amount_by_symbol($currency['spent'], $currency['currency_symbol'], $currency['currency_decimal_places']) !!}
</td>
<td data-value="{{ currency.earned }}" class="text-end">
{!! format_amount_by_symbol(currency.earned, currency.currency_symbol, currency.currency_decimal_places) }}
<td data-value="{{ $currency['earned'] }}" class="text-end">
{!! format_amount_by_symbol($currency['earned'], $currency['currency_symbol'], $currency['currency_decimal_places']) !!}
</td>
<td data-value="{{ currency.sum }}" class="text-end">
{!! format_amount_by_symbol(currency.sum, currency.currency_symbol, currency.currency_decimal_places) }}
<td data-value="{{ $currency['sum'] }}" class="text-end">
{!! format_amount_by_symbol($currency['sum'], $currency['currency_symbol'], $currency['currency_decimal_places']) !!}
</td>
</tr>
@endforeach
@endforeach
</tbody>
<tfoot>
{% for sum in sums %}
@foreach($sums as $sum)
<tr>
<td>{{ __('firefly.sum') }} ({{ sum.currency_name }})</td>
<td>{{ __('firefly.sum') }} ({{ $sum['currency_name'] }})</td>
<td class="text-end">
{!! format_amount_by_symbol(sum.spent_sum, sum.currency_symbol, sum.currency_decimal_places) }}
{!! format_amount_by_symbol($sum['spent_sum'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
</td>
<td class="text-end">
{!! format_amount_by_symbol(sum.earned_sum, sum.currency_symbol, sum.currency_decimal_places) }}
{!! format_amount_by_symbol($sum['earned_sum'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
</td>
<td class="text-end">
{!! format_amount_by_symbol(sum.total_sum, sum.currency_symbol, sum.currency_decimal_places) }}
{!! format_amount_by_symbol($sum['total_sum'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
</td>
</tr>
@endforeach
<tr>
<td colspan="4">
<p class="text-info">
<em>{{ 'tag_report_expenses_listed_once'|_ }}</em>
<em>{{ __('firefly.tag_report_expenses_listed_once') }}</em>
</p>
</td>
</tr>
@@ -4,7 +4,7 @@
<th data-defaultsort="disabled">{{ __('firefly.description') }}</th>
<th data-defaultsign="month">{{ __('firefly.date') }}</th>
<th data-defaultsign="az">{{ __('firefly.account') }}</th>
<th data-defaultsign="az">{{ 'tag'|_ }}</th>
<th data-defaultsign="az">{{ __('firefly.tag') }}</th>
<th data-defaultsign="_19" class="text-end">{{ __('firefly.amount') }}</th>
</tr>
</thead>
@@ -30,13 +30,13 @@
</a>
</td>
<td data-sortable="false">
<a href="{{ route('tags.show', row.tag_id) }}">
{{ row.tag_name }}
<a href="{{ route('tags.show', [$row['tag_id']]) }}">
{{ $row['tag_name'] }}
</a>
</td>
<td data-value="{{ $row['amount'] }}" class="text-end">
{!! format_amount_by_symbol($row['amount'], $row['currency_symbol'], $row['currency_decimal_places']) }}
{!! format_amount_by_symbol($row['amount'], $row['currency_symbol'], $row['currency_decimal_places']) !!}
</td>
</tr>
@@ -4,7 +4,7 @@
<th data-defaultsort="disabled">{{ __('firefly.description') }}</th>
<th data-defaultsign="month">{{ __('firefly.date') }}</th>
<th data-defaultsign="az">{{ __('firefly.account') }}</th>
<th data-defaultsign="az">{{ 'tag'|_ }}</th>
<th data-defaultsign="az">{{ __('firefly.tag') }}</th>
<th data-defaultsign="_19" class="text-end">{{ __('firefly.amount') }}</th>
</tr>
</thead>
@@ -26,17 +26,17 @@
<td data-sortable="false">
<a href="{{ route('accounts.show', $row['source_account_id']) }}">
{{ row['source_account_name'] }}
{{ $row['source_account_name'] }}
</a>
</td>
<td data-sortable="false">
<a href="{{ route('tags.show', row.tag_id) }}">
{{ row.tag_name }}
<a href="{{ route('tags.show', $row['tag_id']) }}">
{{ $row['tag_name'] }}
</a>
</td>
<td data-value="{{ $row['amount'] }}" class="text-end">
{!! format_amount_by_symbol($row['amount'], $row['currency_symbol'], $row['currency_decimal_places']) }}
{!! format_amount_by_symbol($row['amount'], $row['currency_symbol'], $row['currency_decimal_places']) !!}
</td>
</tr>
-217
View File
@@ -1,217 +0,0 @@
@extends('layout.v3.session')
{{ Breadcrumbs.render(Route.getCurrentRoute.getName) }}
@endsection
@section('content')
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="btn-group">
<a href="{{ route('rule-groups.create') }}" id="new_rule_group" class="btn btn-success">{{ 'new_rule_group'|_ }}</a>
<a href="{{ route('rules.create') }}" class="btn btn-success new_rule">{{ 'new_rule'|_ }}</a>
</div>
<p></p>
</div>
</div>
{% if ruleGroups|length == 1 and ruleGroups[0].rules.count() == 0 %}
{% include 'partials.empty' with {objectType: 'default', type: 'rules',route: route('rules.create')} %}
{{-- make FF ignore demo for now. --}}
{% set shownDemo = true %}
@endif
{% for ruleGroup in ruleGroups %}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="box rules-box" data-group="{{ ruleGroup.id }}">
<div class="card-header">
<h3 class="card-title">
{% if ruleGroup.active %}
{{ ruleGroup.title }}
@else
<s>{{ ruleGroup.title }}</s> ({{ 'inactive'|_|lower }})
@endif
</h3>
<div class="box-tools text-end">
<div class="btn-group">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><span class="fa fa-minus"></span>
</button>
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><span
class="bi bi-list"></span></button>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ route('rule-groups.edit',ruleGroup.id) }}"><span class="bi bi-pencil"></span> {{ __('firefly.edit') }}</a></li>
<li><a href="{{ route('rule-groups.delete',ruleGroup.id) }}"><span class="bi bi-trash"></span> {{ __('firefly.delete') }}</a></li>
<li><a href="{{ route('rule-groups.select-transactions',ruleGroup.id) }}"><span
class="fa fa-power-off"></span> {{ trans('firefly.apply_rule_group_selection', {title: ruleGroup.title}) }}
</a></li>
{% if ruleGroup.order > 1 %}
<li><a href="#" class="move-group" data-direction="up" data-id="{{ ruleGroup.id }}"><span
class="fa fa-arrow-up"></span> {{ 'move_rule_group_up'|_ }}</a></li>
@endif
{% if ruleGroup.order < ruleGroups|length %}
<li><a href="#" class="move-group" data-direction="down" data-id="{{ ruleGroup.id }}"><span
class="fa fa-arrow-down"></span> {{ 'move_rule_group_down'|_ }}
</a></li>
@endif
</ul>
</div>
</div>
</div>
<div class="card-body">
<p>
<em>{{ ruleGroup.description }}</em>
</p>
<p>
<a href="{{ route('rules.create', ruleGroup.id) }}"
class="btn btn-success new_rule">{{ 'new_rule'|_ }}</a>
</p>
{% if ruleGroup.rules.count() > 0 %}
<table class="table table-hover table-striped group-rules">
<thead>
<tr>
<th class="five">&nbsp;</th>
<th class="ten">&nbsp;</th>
<th class="ten">&nbsp;</th>
<th class="quarter">{{ 'rule_name'|_ }}</th>
<th class="quarter hidden-xs">{{ 'rule_triggers'|_ }}</th>
<th class="quarter hidden-xs">{{ 'rule_actions'|_ }}</th>
</tr>
</thead>
<tbody class="rule-connected-list">
{% for rule in ruleGroup.rules %}
<tr class="single-rule" data-order="{{ rule.order }}" data-id="{{ rule.id }}" data-group-id="{{ ruleGroup.id }}" data-position="{{ loop.index0 }}">
<td>
<div class="btn-group btn-group-sm prio_buttons">
<span class="fa fa-bars rule-handle"></span>
</div>
</td>
<td>
<div class="btn-group btn-group-sm edit_buttons">
<a title="{{ __('firefly.edit') }}" href="{{ route('rules.edit', rule.id) }}"
class="btn btn-outline-secondary"><span
class="bi bi-pencil"></span></a>
<a title="{{ __('firefly.delete') }}"
href="{{ route('rules.delete', rule.id) }}"
class="btn btn-danger"><span
class="bi bi-trash"></span></a>
</div>
</td>
<td>
<div class="btn-group btn-group-sm test_buttons">
{{-- show which transactions would match --}}
<a href="{{ route('rules.search',rule.id) }}" class="btn btn-outline-secondary {% if false == rule.strict %}test_rule_triggers@endif" data-id="{{ rule.id }}" title="{{ 'test_rule_triggers'|_ }}"><span data-id="{{ rule.id }}" class="fa fa-flask"></span></a>
{% if rule.active %}
{{-- actually execute rule --}}
<a href="{{ route('rules.select-transactions',rule.id) }}" class="btn btn-outline-secondary" title=" {{ trans('firefly.apply_rule_selection', {title: rule.title}) }}"><span class="fa fa-power-off "></span></a>
@endif
{{-- duplicate rule --}}
<a href="#" class="btn btn-outline-secondary duplicate-rule" data-id="{{ rule.id }}" title=" {{ trans('firefly.duplicate_rule', {title: rule.title}) }}"><span class="bi bi-copy"></span></a>
</div>
</td>
<td class="markdown">
{% if rule.active %}
{{ rule.title }}
@else
<s>{{ rule.title }}</s> ({{ 'inactive'|_|lower }})
@endif
{% if rule.stop_processing %}
<span class="fa fa-stop-circle-o"></span>
@endif
{% if rule.description != "" %}
<small class="hidden-xs"
{% if not rule.active %}
class="text-muted"
@endif
><br/>{{ rule.description|default('')|markdown }}</small>
@endif
<small>({% if rule.strict %}<span class="text-danger">{{ 'rule_is_strict'|_ }}</span>@else<span class="text-success">{{ 'rule_is_not_strict'|_ }}</span>@endif)</small>
</td>
<td class="hidden-xs">
{% if rule.ruleTriggers.count() > 0 %}
<ul class="small rule-trigger-list" data-count="{{ rule.ruleTriggers.count() }}" data-id="{{ rule.id }}">
{% for trigger in rule.ruleTriggers %}
{% if trigger.trigger_type != "user_action" %}
<li
{% if not rule.active %}
class="text-muted"
@endif
data-id="{{ trigger.id }}">
{{ trans(('firefly.rule_trigger_' ~ get_root_search_operator(trigger.trigger_type)), {trigger_value: trigger.trigger_value}) }}
{% if trigger.stop_processing %}
<span class="fa fa-stop-circle-o"></span>
@endif
</li>
@endif
@endforeach
</ul>
<ul class="small rule-triggers-show hidden pointer" data-id="{{ rule.id }}">
<li data-id="{{ rule.id }}">{{ 'show_triggers'|_ }}</li>
</ul>
@endif
</td>
<td class="hidden-xs">
{% if rule.ruleActions.count() > 0 %}
<ul class="small rule-action-list" data-count="{{ rule.ruleActions.count() }}" data-id="{{ rule.id }}">
{% for action in rule.ruleActions %}
<li
{% if not rule.active %}
class="text-muted"
@endif
data-id="{{ action.id }}">{{ trans(('firefly.rule_action_' ~ action.action_type), {action_value: action.action_value}) }}
{% if action.stop_processing %}
<span class="fa fa-stop-circle-o"></span>
@endif
</li>
@endforeach
</ul>
<ul class="small rule-actions-show hidden pointer" data-id="{{ rule.id }}">
<li>{{ 'show_actions'|_ }}</li>
</ul>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
@else
<p>
<em>{{ 'no_rules_in_group'|_ }}</em>
</p>
@endif
<p>
<br/>
<a href="{{ route('rules.create', ruleGroup.id) }}"
class="btn btn-success new_rule">{{ 'new_rule'|_ }}</a>
</p>
</div>
</div>
</div>
</div>
@endforeach
{% include 'rules.partials.test-trigger-modal' %}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<a href="{{ route('rule-groups.create') }}" class="btn btn-success">{{ 'new_rule_group'|_ }}</a>
</div>
</div>
@endsection
@section('scripts')
<script type="text/javascript" nonce="{{ $JS_NONCE }}">
var moveRuleGroupUrl = '{{ route('rule-groups.move') }}';
var duplicateRuleUrl = '{{ route('rules.duplicate') }}';
</script>
<script type="text/javascript" src="v1/js/lib/jquery-ui.min.js?v={{ $FF_BUILD_TIME }}" nonce="{{ $JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/rules/index.js?v={{ $FF_BUILD_TIME }}" nonce="{{ $JS_NONCE }}"></script>
@endsection