isExecuted() && true !== $this->option('force')) { $this->friendlyInfo('This command has already been executed.'); return 0; } if (config('firefly.feature_flags.running_balance_column')) { $this->friendlyInfo('Will recalculate account balances. This may take a LONG time. Please be patient.'); $this->markAsExecuted(); $this->correctBalanceAmounts(); $this->friendlyInfo('Done recalculating account balances.'); return 0; } $this->friendlyWarning('This command has been disabled.'); return 0; } private function correctBalanceAmounts(): void { return; AccountBalanceCalculator::recalculateAll(true); } private function isExecuted(): bool { $configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); return (bool) $configVar?->data; } private function markAsExecuted(): void { app('fireflyconfig')->set(self::CONFIG_NAME, true); } }