Various code cleanup

This commit is contained in:
James Cole
2023-01-03 06:48:53 +01:00
parent 6784fe4436
commit 07e4e93632
47 changed files with 118 additions and 211 deletions

View File

@@ -60,11 +60,7 @@ class DeleteZeroAmount extends Command
/** @var TransactionJournal $journal */
foreach ($journals as $journal) {
$this->info(sprintf('Deleted transaction journal #%d because the amount is zero (0.00).', $journal->id));
try {
$journal->delete();
} catch (QueryException $e) {
$this->line($e->getMessage());
}
$journal->delete();
Transaction::where('transaction_journal_id', $journal->id)->delete();
}