mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 23:50:09 +00:00
Fix array bug.
This commit is contained in:
@@ -93,6 +93,8 @@ class IndexController extends Controller
|
||||
$endBalances = app('steam')->finalAccountsBalance($accounts, $end);
|
||||
$activities = app('steam')->getLastActivities($ids);
|
||||
|
||||
|
||||
|
||||
$accounts->each(
|
||||
function (Account $account) use ($activities, $startBalances, $endBalances): void {
|
||||
$account->lastActivityDate = $this->isInArrayDate($activities, $account->id);
|
||||
@@ -152,7 +154,6 @@ class IndexController extends Controller
|
||||
$startBalances = app('steam')->finalAccountsBalance($accounts, $start);
|
||||
$endBalances = app('steam')->finalAccountsBalance($accounts, $end);
|
||||
$activities = app('steam')->getLastActivities($ids);
|
||||
|
||||
$accounts->each(
|
||||
function (Account $account) use ($activities, $startBalances, $endBalances): void {
|
||||
$interest = (string) $this->repository->getMetaValue($account, 'interest');
|
||||
|
||||
@@ -114,7 +114,9 @@ class AccountController extends Controller
|
||||
$accountId = (int) $accountId;
|
||||
// loop each expense entry (each entry can be a different currency).
|
||||
foreach ($expenses as $currencyCode => $endAmount) {
|
||||
|
||||
if(3 !== strlen($currencyCode)) {
|
||||
continue;
|
||||
}
|
||||
// see if there is an accompanying start amount.
|
||||
// grab the difference and find the currency.
|
||||
$startAmount = (string) ($startBalances[$accountId][$currencyCode] ?? '0');
|
||||
@@ -514,6 +516,9 @@ class AccountController extends Controller
|
||||
$accountId = (int) $accountId;
|
||||
// loop each expense entry (each entry can be a different currency).
|
||||
foreach ($expenses as $currencyCode => $endAmount) {
|
||||
if(3 !== strlen($currencyCode)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// see if there is an accompanying start amount.
|
||||
// grab the difference and find the currency.
|
||||
|
||||
Reference in New Issue
Block a user