mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix #3099
This commit is contained in:
parent
cebc0d7568
commit
4cd642b8da
@ -240,7 +240,7 @@ class PiggyBankController extends Controller
|
||||
foreach ($collection as $piggy) {
|
||||
$array = $transformer->transform($piggy);
|
||||
$account = $accountTransformer->transform($piggy->account);
|
||||
$accountId = $account['id'];
|
||||
$accountId = (int)$account['id'];
|
||||
if (!isset($accounts[$accountId])) {
|
||||
// create new:
|
||||
$accounts[$accountId] = $account;
|
||||
|
@ -180,10 +180,11 @@ class AccountTransformer extends AbstractTransformer
|
||||
private function getCurrency(Account $account): array
|
||||
{
|
||||
$currency = $this->repository->getAccountCurrency($account);
|
||||
$currencyId = null;
|
||||
$currencyCode = null;
|
||||
$decimalPlaces = 2;
|
||||
$currencySymbol = null;
|
||||
$default = app('amount')->getDefaultCurrencyByUser($account->user);
|
||||
$currencyId = $default->id;
|
||||
$currencyCode = $default->code;
|
||||
$decimalPlaces = $default->decimal_places;
|
||||
$currencySymbol = $default->symbol;
|
||||
if (null !== $currency) {
|
||||
$currencyId = $currency->id;
|
||||
$currencyCode = $currency->code;
|
||||
|
Loading…
Reference in New Issue
Block a user