mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 22:58:09 +00:00
Fix various issues with new features, nullpointers and missing checks.
This commit is contained in:
@@ -137,13 +137,13 @@ class AccountController extends Controller
|
||||
|
||||
continue;
|
||||
}
|
||||
Log::debug(sprintf('Will process expense array "%s" with amount %s', $key, $endBalance));
|
||||
//Log::debug(sprintf('Will process expense array "%s" with amount %s', $key, $endBalance));
|
||||
$searchCode = $this->convertToNative ? $this->defaultCurrency->code : $key;
|
||||
Log::debug(sprintf('Search code is %s', $searchCode));
|
||||
//Log::debug(sprintf('Search code is %s', $searchCode));
|
||||
// see if there is an accompanying start amount.
|
||||
// grab the difference and find the currency.
|
||||
$startBalance = ($startBalances[$account->id][$key] ?? '0');
|
||||
Log::debug(sprintf('Start balance is %s', $startBalance));
|
||||
// Log::debug(sprintf('Start balance is %s', $startBalance));
|
||||
$diff = bcsub($endBalance, $startBalance);
|
||||
$currencies[$searchCode] ??= $this->currencyRepository->findByCode($searchCode);
|
||||
if (0 !== bccomp($diff, '0')) {
|
||||
@@ -596,13 +596,13 @@ class AccountController extends Controller
|
||||
|
||||
continue;
|
||||
}
|
||||
Log::debug(sprintf('Will process expense array "%s" with amount %s', $key, $endBalance));
|
||||
//Log::debug(sprintf('Will process expense array "%s" with amount %s', $key, $endBalance));
|
||||
$searchCode = $this->convertToNative ? $this->defaultCurrency->code : $key;
|
||||
Log::debug(sprintf('Search code is %s', $searchCode));
|
||||
//Log::debug(sprintf('Search code is %s', $searchCode));
|
||||
// see if there is an accompanying start amount.
|
||||
// grab the difference and find the currency.
|
||||
$startBalance = ($startBalances[$account->id][$key] ?? '0');
|
||||
Log::debug(sprintf('Start balance is %s', $startBalance));
|
||||
//Log::debug(sprintf('Start balance is %s', $startBalance));
|
||||
$diff = bcsub($endBalance, $startBalance);
|
||||
$currencies[$searchCode] ??= $this->currencyRepository->findByCode($searchCode);
|
||||
if (0 !== bccomp($diff, '0')) {
|
||||
|
||||
@@ -62,8 +62,6 @@ class InstallController extends Controller
|
||||
'migrate' => ['--seed' => true, '--force' => true],
|
||||
'generate-keys' => [], // an exception :(
|
||||
'firefly-iii:upgrade-database' => [],
|
||||
// 'firefly-iii:correct-database' => [],
|
||||
// 'firefly-iii:report-integrity' => [],
|
||||
'firefly-iii:set-latest-version' => ['--james-is-cool' => true],
|
||||
'firefly-iii:verify-security-alerts' => [],
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user