diff --git a/app/Http/Controllers/Chart/BillController.php b/app/Http/Controllers/Chart/BillController.php index 6ba30c5dec..ff1782f1b5 100644 --- a/app/Http/Controllers/Chart/BillController.php +++ b/app/Http/Controllers/Chart/BillController.php @@ -31,7 +31,6 @@ use FireflyIII\Repositories\Bill\BillRepositoryInterface; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Http\JsonResponse; -use JsonException; /** * Class BillController. @@ -134,7 +133,7 @@ class BillController extends Controller } ); - $chartData = [ + $chartData = [ ['type' => 'line', 'label' => (string) trans('firefly.min-amount'), 'currency_symbol' => $bill->transactionCurrency->symbol, 'currency_code' => $bill->transactionCurrency->code, 'entries' => []], ['type' => 'line', 'label' => (string) trans('firefly.max-amount'), 'currency_symbol' => $bill->transactionCurrency->symbol, @@ -142,7 +141,7 @@ class BillController extends Controller ['type' => 'bar', 'label' => (string) trans('firefly.journal-amount'), 'currency_symbol' => $bill->transactionCurrency->symbol, 'currency_code' => $bill->transactionCurrency->code, 'entries' => []], ]; - + $currencyId = (int) $bill->transaction_currency_id; foreach ($journals as $journal) { $date = $journal['date']->isoFormat((string) trans('config.month_and_day_js', [], $locale)); $chartData[0]['entries'][$date] = $bill->amount_min; // minimum amount of bill @@ -152,7 +151,12 @@ class BillController extends Controller if (!array_key_exists($date, $chartData[2]['entries'])) { $chartData[2]['entries'][$date] = '0'; } - $amount = bcmul($journal['amount'], '-1'); + $amount = bcmul($journal['amount'], '-1'); + if ($currencyId === $journal['foreign_currency_id']) { + $amount = bcmul($journal['foreign_amount'], '-1'); + } + + $chartData[2]['entries'][$date] = bcadd($chartData[2]['entries'][$date], $amount); // amount of journal } diff --git a/resources/assets/js/components/passport/Clients.vue b/resources/assets/js/components/passport/Clients.vue index edbfa9d982..68920664d5 100644 --- a/resources/assets/js/components/passport/Clients.vue +++ b/resources/assets/js/components/passport/Clients.vue @@ -127,7 +127,7 @@
- @@ -141,7 +141,7 @@
- @@ -214,7 +214,7 @@
- @@ -228,7 +228,7 @@
- @@ -268,7 +268,7 @@ {{ $t('firefly.profile_oauth_client_secret_expl') }}

- +
diff --git a/resources/assets/js/components/passport/PersonalAccessTokens.vue b/resources/assets/js/components/passport/PersonalAccessTokens.vue index bb490f85de..ffa0dea671 100644 --- a/resources/assets/js/components/passport/PersonalAccessTokens.vue +++ b/resources/assets/js/components/passport/PersonalAccessTokens.vue @@ -108,7 +108,7 @@
- +
diff --git a/resources/assets/js/components/transactions/AccountSelect.vue b/resources/assets/js/components/transactions/AccountSelect.vue index 5a84ccb7d1..ca3705c628 100644 --- a/resources/assets/js/components/transactions/AccountSelect.vue +++ b/resources/assets/js/components/transactions/AccountSelect.vue @@ -25,6 +25,7 @@
-
-
-
-
-
- +
{{ currency.symbol }} - +
@@ -55,13 +55,13 @@
- +
{{ currency.symbol }} - +
diff --git a/resources/views/auth/two-factor-removeme.twig b/resources/views/auth/two-factor-removeme.twig index 2653d42c40..46ebd2864d 100644 --- a/resources/views/auth/two-factor-removeme.twig +++ b/resources/views/auth/two-factor-removeme.twig @@ -22,7 +22,7 @@
- +
diff --git a/resources/views/layout/default.twig b/resources/views/layout/default.twig index aedf826479..d1039ef92f 100644 --- a/resources/views/layout/default.twig +++ b/resources/views/layout/default.twig @@ -101,7 +101,7 @@
diff --git a/resources/views/profile/delete-account.twig b/resources/views/profile/delete-account.twig index 5783b1d910..839380e039 100644 --- a/resources/views/profile/delete-account.twig +++ b/resources/views/profile/delete-account.twig @@ -38,7 +38,7 @@
- +
diff --git a/resources/views/profile/logout-other-sessions.twig b/resources/views/profile/logout-other-sessions.twig index 01a40dfd9d..4399b044c0 100644 --- a/resources/views/profile/logout-other-sessions.twig +++ b/resources/views/profile/logout-other-sessions.twig @@ -19,7 +19,7 @@
-
diff --git a/resources/views/search/index.twig b/resources/views/search/index.twig index 6531669958..811d799b68 100644 --- a/resources/views/search/index.twig +++ b/resources/views/search/index.twig @@ -20,7 +20,7 @@
-
diff --git a/resources/views/transactions/bulk/edit.twig b/resources/views/transactions/bulk/edit.twig index 509a35838f..223b50788b 100644 --- a/resources/views/transactions/bulk/edit.twig +++ b/resources/views/transactions/bulk/edit.twig @@ -60,8 +60,8 @@ ({{ formatAmountBySymbol(journal.foreign_amount, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places) }}) {% endif %} {% endif %} - - + + {{ journal.date.isoFormat(monthAndDayFormat) }} @@ -104,7 +104,7 @@ {{ trans('list.category') }} - +
@@ -136,7 +136,7 @@ {{ trans('list.tags') }} - +
diff --git a/resources/views/transactions/mass/edit.twig b/resources/views/transactions/mass/edit.twig index 6dca509a69..0402ecc3c7 100644 --- a/resources/views/transactions/mass/edit.twig +++ b/resources/views/transactions/mass/edit.twig @@ -111,7 +111,7 @@ {# SOURCE ACCOUNT NAME FOR DEPOSIT #} {% if journal.transaction_type_type == 'Deposit' %} - @@ -141,7 +141,7 @@ {# category #} - {# budget #}