mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 22:44:35 -04:00
Fixes for client credits
This commit is contained in:
parent
fc4e21c5cb
commit
5c1b9d5b2d
@ -65,8 +65,10 @@ class ClientService
|
|||||||
return $this->client->credits()
|
return $this->client->credits()
|
||||||
->where('is_deleted', false)
|
->where('is_deleted', false)
|
||||||
->where('balance', '>', 0)
|
->where('balance', '>', 0)
|
||||||
->whereDate('due_date', '<=', now()->format('Y-m-d'))
|
->where(function ($query){
|
||||||
->orWhere('due_date', NULL)
|
$query->whereDate('due_date', '<=', now()->format('Y-m-d'))
|
||||||
|
->orWhereNull('due_date');
|
||||||
|
})
|
||||||
->orderBy('created_at','ASC');
|
->orderBy('created_at','ASC');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user