From 7bf691e2bdbc3e3aa40fcd9ad3664163f35cf443 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 13 Oct 2017 17:32:14 +0200 Subject: [PATCH] Verify deposits with budget. --- app/Console/Commands/VerifyDatabase.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/VerifyDatabase.php b/app/Console/Commands/VerifyDatabase.php index 1eddd1fdab..62130e4f99 100644 --- a/app/Console/Commands/VerifyDatabase.php +++ b/app/Console/Commands/VerifyDatabase.php @@ -401,15 +401,15 @@ class VerifyDatabase extends Command $set = TransactionJournal::distinct() ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') ->leftJoin('budget_transaction_journal', 'transaction_journals.id', '=', 'budget_transaction_journal.transaction_journal_id') - ->where('transaction_types.type', TransactionType::TRANSFER) + ->whereIn('transaction_types.type', [TransactionType::TRANSFER, TransactionType::DEPOSIT]) ->whereNotNull('budget_transaction_journal.budget_id')->get(['transaction_journals.id']); /** @var TransactionJournal $entry */ foreach ($set as $entry) { $this->error( sprintf( - 'Error: Transaction journal #%d is a transfer, but has a budget. Edit it without changing anything, so the budget will be removed.', - $entry->id + 'Error: Transaction journal #%d is a %s, but has a budget. Edit it without changing anything, so the budget will be removed.', + $entry->id, $entry->transactionType->type ) ); }