From 045cec4421648934bc028fbab5509eb9453186e1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 26 Oct 2020 06:43:09 +0100 Subject: [PATCH] Fix #3992 --- app/Support/Steam.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Support/Steam.php b/app/Support/Steam.php index d73518b2e8..0dbcd6bc88 100644 --- a/app/Support/Steam.php +++ b/app/Support/Steam.php @@ -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();