mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-10 18:54:38 -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])
|
->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'])])
|
->whereBetween('date', [Carbon::parse($this->options['start_date']), Carbon::parse($this->options['end_date'])])
|
||||||
->where(function ($query) {
|
->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');
|
->orWhereNull('due_date');
|
||||||
})
|
})
|
||||||
->orderBy('date', 'ASC');
|
->orderBy('date', 'ASC');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user