mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-04 07:34:37 -04:00
Adjustments for reports
This commit is contained in:
parent
1f1716a3cd
commit
efa6743edf
@ -90,6 +90,9 @@ class ARDetailReport extends BaseExport
|
||||
|
||||
$query = Invoice::query()
|
||||
->withTrashed()
|
||||
->whereHas('client', function ($query){
|
||||
$query->where('is_deleted', 0);
|
||||
})
|
||||
->where('company_id', $this->company->id)
|
||||
->where('is_deleted', 0)
|
||||
->where('balance', '>', 0)
|
||||
|
@ -125,9 +125,9 @@ class ARSummaryReport extends BaseExport
|
||||
$amount = Invoice::withTrashed()
|
||||
->where('client_id', $this->client->id)
|
||||
->where('company_id', $this->client->company_id)
|
||||
->where('is_deleted', 0)
|
||||
->whereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL])
|
||||
->where('balance', '>', 0)
|
||||
->where('is_deleted', 0)
|
||||
->where(function ($query) {
|
||||
$query->where('due_date', '>', now()->startOfDay())
|
||||
->orWhereNull('due_date');
|
||||
|
@ -75,8 +75,8 @@ class TaxSummaryReport extends BaseExport
|
||||
|
||||
$query = Invoice::query()
|
||||
->withTrashed()
|
||||
->whereIn('status_id', [2,3,4])
|
||||
->where('company_id', $this->company->id)
|
||||
->whereIn('status_id', [2,3,4])
|
||||
->where('is_deleted', 0)
|
||||
->orderBy('balance', 'desc');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user