diff --git a/app/View/Components/EmptyPage.php b/app/View/Components/EmptyPage.php
new file mode 100644
index 0000000000..b15141f90d
--- /dev/null
+++ b/app/View/Components/EmptyPage.php
@@ -0,0 +1,31 @@
+route = $route;
+ $this->objectType = $objectType;
+ $this->type= $type;
+ }
+
+ /**
+ * Get the view / contents that represent the component.
+ */
+ public function render(): View|Closure|string
+ {
+ return view('components.empty-page');
+ }
+}
diff --git a/app/View/Components/Lists/Periods.php b/app/View/Components/Lists/Periods.php
new file mode 100644
index 0000000000..6f3d7ee3b5
--- /dev/null
+++ b/app/View/Components/Lists/Periods.php
@@ -0,0 +1,28 @@
+periods =$periods;
+ }
+
+ /**
+ * Get the view / contents that represent the component.
+ */
+ public function render(): View|Closure|string
+ {
+ return view('components.lists.periods');
+ }
+}
diff --git a/resources/views/bills/index.blade.php b/resources/views/bills/index.blade.php
index 8d50e96b14..707bf94182 100644
--- a/resources/views/bills/index.blade.php
+++ b/resources/views/bills/index.blade.php
@@ -1,8 +1,10 @@
@extends('layout.v3.session')
@section('content')
@if(0 === $total)
- TODO TODO TODO
- {% include 'partials.empty' with {objectType: 'default', type: 'bills',route: route('subscriptions.create')} %}
+ @php
+ $shownDemo = true
+ @endphp
+
+ {{ __('firefly.no_' . ($type ?? '').'_intro_'.($objectType ?? 'default')) }} +
++ {{ __('firefly.no_'.($type ?? '').'_imperative_'.($objectType ?? 'default')) }} + +
++ {{ __('firefly.no_'.($type ?? '').'_create_'.($objectType ?? 'default')) }} +
+| {{ $groups->links('pagination.bootstrap-4') }} | @else{{ $groups->links('pagination.bootstrap-4') }} | @@ -42,7 +42,7 @@ @if($showCategory){{ trans('list.category') }} | @endif - @if($showBudget) + @if($showBudget ?? false){{ trans('list.budget') }} | @endif@@ -85,7 +85,7 @@ @endforeach - @if($showCategory || $showBudget) + @if($showCategory || $showBudget ?? false) | @else | @@ -274,157 +274,146 @@ @endif @endif - {% if (fireflyiiiconfig('use_running_balance', true)) %} + @if(\FireflyIII\Support\Facades\AppConfiguration::get('use_running_balance', true)) | - {# RUNNING BALANCE #} - {% if (null == transaction.balance_dirty or false == transaction.balance_dirty) and null != transaction.destination_balance_after and null != transaction.source_balance_after %} - {% if $transaction['transaction_type_type'] == 'Deposit' %} - {% if $transaction['source_account_id'] == $account?->id %} - {{ formatAmountBySymbol(transaction.source_balance_after, $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} - {% else %} - {% if $transaction['source_account_type'] == 'Revenue account' %} - {{ formatAmountBySymbol(transaction.destination_balance_after, $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} - {% else %} - {{ formatAmountBySymbol(transaction.destination_balance_after, $transaction['foreign_currency_symbol'], $transaction['foreign_currency_decimal_places']) }} - {% endif %} - {# if this is a deposit from revenue account, use the destination account currency? For #12043 and #12169 #} - {# otherwise, keep at source account #} - {# changed from normal currency_symbol to foreign_currency_symbol for #12043 #} - - {% endif %} - - {% elseif $transaction['transaction_type_type'] == 'Withdrawal' %} - {# withdrawal into a liability #} - {% if 'Loan' == transaction.destination_account_type or 'Mortgage' == transaction.destination_account_type or 'Debt' == transaction.destination_account_type %} - {% if currency.id == transaction.currency_id %} - {% if $account?->id == $transaction['source_account_id'] %} - {{ formatAmountBySymbol(transaction.source_balance_after, $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} - {% elseif $account?->id == transaction.destination_account_id %} - {{ formatAmountBySymbol(transaction.destination_balance_after, $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} - {% else %} - - - {% endif %} - {% endif %} - {% if currency.id == transaction.foreign_currency_id and null != transaction.destination_balance_after and null != transaction.destination_balance_after %} - {{ formatAmountBySymbol(transaction.destination_balance_after, $transaction['foreign_currency_symbol'] ?? $transaction['currency_symbol'], $transaction['foreign_currency_decimal_places'] ?? $transaction['currency_decimal_places']) }} - {% endif %} - {# withdrawal into an expense account #} - {% else %} - {% if $account?->id == $transaction['source_account_id'] %} - {{ formatAmountBySymbol(transaction.source_balance_after, $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} - {% elseif $account?->id == transaction.destination_account_id %} - {{ formatAmountBySymbol(transaction.destination_balance_after, $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} - {% else %} - - - {% endif %} - {% endif %} - {% elseif $transaction['transaction_type_type'] == 'Opening balance' %} - {% if $account?->id == $transaction['source_account_id'] %} - {{ formatAmountBySymbol(transaction.source_balance_after, $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} - {% elseif $account?->id == transaction.destination_account_id %} - {{ formatAmountBySymbol(transaction.destination_balance_after, $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} - {% else %} - - - {% endif %} - {% elseif $transaction['transaction_type_type'] == 'Transfer' %} - {% if $account?->id == $transaction['source_account_id'] %} - {{ formatAmountBySymbol(transaction.source_balance_after, $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} - {% else %} - {% if null == transaction.foreign_currency_id %} - {{ formatAmountBySymbol(transaction.destination_balance_after, $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} - {% endif %} - {% if null != transaction.foreign_currency_id %} - {{ formatAmountBySymbol(transaction.destination_balance_after, $transaction['foreign_currency_symbol'], $transaction['foreign_currency_decimal_places']) }} - {% endif %} - {% endif %} - {% else %} + {{-- RUNNING BALANCE --}} + @if((null === $transaction['balance_dirty'] || false === $transaction['balance_dirty']) && null !== $transaction['destination_balance_after'] && null !== $transaction['source_balance_after']) + @if('Deposit' === $transaction['transaction_type_type']) + @if($transaction['source_account_id'] == $account?->id) + {{ formatAmountBySymbol($transaction['source_balance_after'], $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} + @else + @if('Revenue account' === $transaction['source_account_type']) + {{ formatAmountBySymbol($transaction['destination_balance_after'], $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} + @else + {{ formatAmountBySymbol($transaction['destination_balance_after'], $transaction['foreign_currency_symbol'], $transaction['foreign_currency_decimal_places']) }} + @endif + {{-- if this is a deposit from revenue account, use the destination account currency? For #12043 and #12169. Otherwise, keep at source account -}} + {{-- changed from normal currency_symbol to foreign_currency_symbol for #12043 --}} + @endif + @elseif('Withdrawal' === $transaction['transaction_type_type']) + {{-- withdrawal into a liability --}} + @if(in_array($transaction['destination_account_type'], ['Mortgage','Debt','Loan'], true)) + @if($currency['id'] === $transaction['currency_id']) + @if($account?->id === $transaction['source_account_id']) + {{ formatAmountBySymbol($transaction['source_balance_after'], $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} + @elseif($account?->id === $transaction['destination_account_id']) + {{ formatAmountBySymbol($transaction['destination_balance_after'], $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} + @else + - + @endif + @endif + @if($currency['id'] === $transaction['foreign_currency_id'] && null !== $transaction['destination_balance_after'] && null !== $transaction['destination_balance_after']) + {{ formatAmountBySymbol($transaction['destination_balance_after'], $transaction['foreign_currency_symbol'] ?? $transaction['currency_symbol'], $transaction['foreign_currency_decimal_places'] ?? $transaction['currency_decimal_places']) }} + @endif + {{-- withdrawal into an expense account --}} + @else + @if($account?->id === $transaction['source_account_id']) + {{ formatAmountBySymbol($transaction['source_balance_after'], $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} + @elseif($account?->id === $transaction['destination_account_id']) + {{ formatAmountBySymbol($transaction['destination_balance_after'], $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} + @else + - + @endif + @endif + @elseif('Opening balance' === $transaction['transaction_type_type']) + @if($account?->id == $transaction['source_account_id']) + {{ formatAmountBySymbol($transaction['source_balance_after'], $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} + @elseif($account?->id == $transaction['destination_account_id']) + {{ formatAmountBySymbol($transaction['destination_balance_after'], $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} + @else + - + @endif + @elseif('Transfer' === $transaction['transaction_type_type']) + @if($account?->id == $transaction['source_account_id']) + {{ formatAmountBySymbol($transaction['source_balance_after'], $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} + @else + @if(null === $transaction['foreign_currency_id']) + {{ formatAmountBySymbol($transaction['destination_balance_after'], $transaction['currency_symbol'], $transaction['currency_decimal_places']) }} + @endif + @if(null !== $transaction['foreign_currency_id']) + {{ formatAmountBySymbol($transaction['destination_balance_after'], $transaction['foreign_currency_symbol'], $transaction['foreign_currency_decimal_places']) }} + @endif + @endif + @else - {% endif %} - {% endif %} + @endif + @endif | - {% endif %} + @endif- {{ transaction.date.isoFormat(monthAndDayFormat) }} + {{ $transaction['date']->isoFormat($monthAndDayFormat) }} | - {% if 'Cash account' == $transaction['source_account_type'] %} - ({{ 'cash'|_ }}) - {% else %} - {{ transaction.source_account_name }} - {% endif %} + @if('Cash account' === $transaction['source_account_type']) + ({{ __('firefly.cash') }}) + @else + {{ $transaction['source_account_name'] }} + @endif | - {% if 'Cash account' == transaction.destination_account_type %} - ({{ 'cash'|_ }}) - {% else %} - {{ transaction.destination_account_name }} - {% endif %} + @if('Cash account' == $transaction['destination_account_type']) + ({{ __('firefly.cash') }}) + @else + {{ $transaction['destination_account_name'] }} + @endif | - {% if showCategory %} + @if($showCategory)- {% if transaction.category_id %} - {{ transaction.category_name }} - {% endif %} + @if(null !== $transaction['category_id']) + {{ $transaction['category_name'] }} + @endif | - {% endif %} - {% if showBudget %} + @endif + @if($showBudget)- {% if transaction.budget_id %} - {{ transaction.budget_name }} - {% endif %} + @if(null !== $transaction['budget_id']) + {{ $transaction['budget_name'] }} + @endif | - {% endif %} + @endif - {% if group.count == 1 %} + @if(1 === count($group))
+ {{ __('firefly.actions') }}
|
- {% endif %}
- {% if group.count != 1 %}
+ @endif
+ @if(1 !== count($group))
- {% endif %} + @endif |
- {% if $transaction['transaction_type_type'] != 'Reconciliation' and $transaction['transaction_type_type'] != 'Opening balance' and $transaction['transaction_type_type'] != 'Liability credit' %}
+ @if($transaction['transaction_type_type'] !== 'Reconciliation' and $transaction['transaction_type_type'] !== 'Opening balance' and $transaction['transaction_type_type'] !== 'Liability credit')
-
- {% endif %}
+ data-value="{{ $transaction['transaction_journal_id'] }}"/>
+ @endif
|
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $groups->links('pagination.bootstrap-4')|raw }} | - {% else %} -{{ $groups->links('pagination.bootstrap-4')|raw }} | - {% endif %} + @if($showCategory || $showBudget) +{{ $groups->links('pagination.bootstrap-4') }} | + @else +{{ $groups->links('pagination.bootstrap-4') }} | + @endif||||||||||||||||||||||||||||||
| {{ __('firefly.transactions') }} | +{{ $period['total_transactions'] }} | +
| {{ __('firefly.spent') }} | ++ + {{ formatAmountBySymbol($entry['amount'], $entry['currency_symbol'], $entry['currency_decimal_places']) }} + + | +
| {{ __('firefly.earned') }} | ++ + @if($entry['amount'] < 0) + {{ formatAmountBySymbol($entry['amount']*-1, $entry['currency_symbol'], $entry['currency_decimal_places']) }} + @else + {{ formatAmountBySymbol($entry['amount'], $entry['currency_symbol'], $entry['currency_decimal_places']) }} + @endif + + | +
| {{ __('firefly.transferred') }} | ++ + {{ formatAmountBySymbol($entry['amount']*-1, $entry['currency_symbol'], $entry['currency_decimal_places']) }} + + | +
| {{ __('firefly.transferred_away') }} | ++ + @if($entry['amount'] < 0) + {{ formatAmountBySymbol($entry['amount'], $entry['currency_symbol'], $entry['currency_decimal_places']) }} + @else + {{ formatAmountBySymbol($entry['amount']*-1, $entry['currency_symbol'], $entry['currency_decimal_places']) }} + @endif + + | +
| {{ __('firefly.transferred_in') }} | ++ + @if($entry['amount'] < 0) + {{ formatAmountBySymbol($entry['amount']*-1, $entry['currency_symbol'], $entry['currency_decimal_places']) }} + @else + {{ formatAmountBySymbol($entry['amount'], $entry['currency_symbol'], $entry['currency_decimal_places']) }} + @endif + + | +