Various code cleanup.

This commit is contained in:
James Cole
2023-11-05 19:41:37 +01:00
parent a0564751d6
commit 1d2e95f5af
136 changed files with 1171 additions and 514 deletions

View File

@@ -149,9 +149,9 @@ class UpgradeLiabilities extends Command
return;
}
// source MUST be the liability.
if ((int)$destination->account_id === (int)$account->id) {
if ($destination->account_id === $account->id) {
// so if not, switch things around:
$sourceAccountId = (int)$source->account_id;
$sourceAccountId = $source->account_id;
$source->account_id = $destination->account_id;
$destination->account_id = $sourceAccountId;
$source->save();