This commit is contained in:
James Cole 2020-10-26 06:43:09 +01:00
parent e0526508cb
commit 045cec4421
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D

View File

@ -54,6 +54,7 @@ class Steam
$cache->addProperty($account->id);
$cache->addProperty('balance');
$cache->addProperty($date);
$cache->addProperty($currency ? $currency->id : 0);
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
@ -186,7 +187,7 @@ class Steam
$end->addDay();
$balances = [];
$formatted = $start->format('Y-m-d');
$startBalance = $this->balance($account, $start);
$startBalance = $this->balance($account, $start, $currency);
/** @var AccountRepositoryInterface $repository */
@ -196,7 +197,7 @@ class Steam
$repository->setUser($account->user);
$currency = $repository->getAccountCurrency($account) ?? app('amount')->getDefaultCurrencyByUser($account->user);
}
$currencyId = $currency->id;
$currencyId = (int)$currency->id;
$start->addDay();