mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-04 07:14:37 -04:00
Fixes for credits on statements
This commit is contained in:
parent
7d17fcc779
commit
c0c818d918
@ -375,7 +375,8 @@ class Statement
|
||||
->whereIn('status_id', [Credit::STATUS_SENT, Credit::STATUS_PARTIAL, Credit::STATUS_APPLIED])
|
||||
->whereBetween('date', [Carbon::parse($this->options['start_date']), Carbon::parse($this->options['end_date'])])
|
||||
->where(function ($query) {
|
||||
$query->whereDate('due_date', '>=', $this->options['end_date'])
|
||||
// $query->whereDate('due_date', '>=', $this->options['end_date'])
|
||||
$query->whereDate('due_date', '>=', now())
|
||||
->orWhereNull('due_date');
|
||||
})
|
||||
->orderBy('date', 'ASC');
|
||||
|
Loading…
x
Reference in New Issue
Block a user