mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 14:12:44 +01:00
Fix check data
This commit is contained in:
parent
fe9ac56e4f
commit
a621714951
@ -356,7 +356,10 @@ class CheckData extends Command
|
||||
private function checkInvitations()
|
||||
{
|
||||
$invoices = DB::table('invoices')
|
||||
->leftJoin('invitations', 'invitations.invoice_id', '=', 'invoices.id')
|
||||
->leftJoin('invitations', function ($join) {
|
||||
$join->on('invitations.invoice_id', '=', 'invoices.id')
|
||||
->whereNull('invitations.deleted_at');
|
||||
})
|
||||
->groupBy('invoices.id', 'invoices.user_id', 'invoices.account_id', 'invoices.client_id')
|
||||
->havingRaw('count(invitations.id) = 0')
|
||||
->get(['invoices.id', 'invoices.user_id', 'invoices.account_id', 'invoices.client_id']);
|
||||
|
Loading…
Reference in New Issue
Block a user