mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge quote report fix
This commit is contained in:
parent
3dec3f07bf
commit
074adf4094
@ -19,19 +19,17 @@ class QuoteReport extends AbstractReport
|
|||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
$account = Auth::user()->account;
|
$account = Auth::user()->account;
|
||||||
$status = $this->options['invoice_status'];
|
$statusIds = $this->options['status_ids'];
|
||||||
$exportFormat = $this->options['export_format'];
|
$exportFormat = $this->options['export_format'];
|
||||||
|
|
||||||
$clients = Client::scope()
|
$clients = Client::scope()
|
||||||
->orderBy('name')
|
->orderBy('name')
|
||||||
->withArchived()
|
->withArchived()
|
||||||
->with('contacts')
|
->with('contacts')
|
||||||
->with(['invoices' => function ($query) use ($status) {
|
->with(['invoices' => function ($query) use ($statusIds) {
|
||||||
if ($status == 'draft') {
|
|
||||||
$query->whereIsPublic(false);
|
|
||||||
}
|
|
||||||
$query->quotes()
|
$query->quotes()
|
||||||
->withArchived()
|
->withArchived()
|
||||||
|
->statusIds($statusIds)
|
||||||
->where('invoice_date', '>=', $this->startDate)
|
->where('invoice_date', '>=', $this->startDate)
|
||||||
->where('invoice_date', '<=', $this->endDate)
|
->where('invoice_date', '<=', $this->endDate)
|
||||||
->with(['invoice_items']);
|
->with(['invoice_items']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user