Fix array bug.

This commit is contained in:
James Cole
2024-12-23 06:55:14 +01:00
parent d90ac519f7
commit 1cf9c76329
4 changed files with 15 additions and 9 deletions

View File

@@ -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.