Update configuration and fix some files.

This commit is contained in:
James Cole
2025-05-27 17:02:18 +02:00
parent c074fec0a7
commit d8f512ca3a
31 changed files with 154 additions and 111 deletions

View File

@@ -76,7 +76,7 @@ class CorrectsOpeningBalanceCurrencies extends Command
{
// get the asset account for this opening balance:
$account = $this->getAccount($journal);
if (null === $account) {
if (!$account instanceof Account) {
$message = sprintf('Transaction journal #%d has no valid account. Can\'t fix this line.', $journal->id);
app('log')->warning($message);
$this->friendlyError($message);

View File

@@ -387,7 +387,7 @@ class CorrectsUnevenAmount extends Command
continue;
}
if (0 === bccomp($source->amount, $source->foreign_amount) && 0 === bccomp($source->foreign_amount, $source->amount)) {
if (0 === bccomp((string) $source->amount, (string) $source->foreign_amount) && 0 === bccomp((string) $source->foreign_amount, (string) $source->amount)) {
Log::debug('Already fixed, continue.');
continue;