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