From 79c70c59e35d8ace244ccc78ec8eb016bbf66095 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 7 Dec 2021 06:15:27 +0100 Subject: [PATCH] Fix #5371 in other places as well. --- app/Http/Controllers/Account/EditController.php | 4 ++-- app/Http/Controllers/PiggyBank/EditController.php | 2 +- app/Http/Controllers/Transaction/MassController.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Account/EditController.php b/app/Http/Controllers/Account/EditController.php index 47da02f884..930ce6252d 100644 --- a/app/Http/Controllers/Account/EditController.php +++ b/app/Http/Controllers/Account/EditController.php @@ -143,9 +143,9 @@ class EditController extends Controller 'BIC' => $repository->getMetaValue($account, 'BIC'), 'opening_balance_date' => $openingBalanceDate, 'liability_type_id' => $account->account_type_id, - 'opening_balance' => number_format((float)$openingBalanceAmount, $currency->decimal_places), + 'opening_balance' => number_format((float)$openingBalanceAmount, $currency->decimal_places,'.',''), 'liability_direction' => $this->repository->getMetaValue($account, 'liability_direction'), - 'virtual_balance' => number_format((float)$account->virtual_balance, $currency->decimal_places), + 'virtual_balance' => number_format((float)$account->virtual_balance, $currency->decimal_places,'.',''), 'currency_id' => $currency->id, 'include_net_worth' => $includeNetWorth, 'interest' => $repository->getMetaValue($account, 'interest'), diff --git a/app/Http/Controllers/PiggyBank/EditController.php b/app/Http/Controllers/PiggyBank/EditController.php index 0b1e293d96..c1c9ac6fcf 100644 --- a/app/Http/Controllers/PiggyBank/EditController.php +++ b/app/Http/Controllers/PiggyBank/EditController.php @@ -87,7 +87,7 @@ class EditController extends Controller $preFilled = ['name' => $piggyBank->name, 'account_id' => $piggyBank->account_id, - 'targetamount' => number_format((float)$piggyBank->targetamount, $currency->decimal_places), + 'targetamount' => number_format((float)$piggyBank->targetamount, $currency->decimal_places,'.',''), 'targetdate' => $targetDate, 'startdate' => $startDate, 'object_group' => $piggyBank->objectGroups->first() ? $piggyBank->objectGroups->first()->title : '', diff --git a/app/Http/Controllers/Transaction/MassController.php b/app/Http/Controllers/Transaction/MassController.php index 49892fe98f..b1004c1cdc 100644 --- a/app/Http/Controllers/Transaction/MassController.php +++ b/app/Http/Controllers/Transaction/MassController.php @@ -146,7 +146,7 @@ class MassController extends Controller // reverse amounts foreach ($journals as $index => $journal) { - $journals[$index]['amount'] = number_format((float) app('steam')->positive($journal['amount']), $journal['currency_decimal_places']); + $journals[$index]['amount'] = number_format((float) app('steam')->positive($journal['amount']), $journal['currency_decimal_places'],'.',''); $journals[$index]['foreign_amount'] = null === $journal['foreign_amount'] ? null : app('steam')->positive($journal['foreign_amount']); }