1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Merge quote report fix

This commit is contained in:
Hillel Coren 2018-01-24 10:00:27 +02:00
parent 3dec3f07bf
commit 074adf4094

View File

@ -19,19 +19,17 @@ class QuoteReport extends AbstractReport
public function run()
{
$account = Auth::user()->account;
$status = $this->options['invoice_status'];
$statusIds = $this->options['status_ids'];
$exportFormat = $this->options['export_format'];
$clients = Client::scope()
->orderBy('name')
->withArchived()
->with('contacts')
->with(['invoices' => function ($query) use ($status) {
if ($status == 'draft') {
$query->whereIsPublic(false);
}
->with(['invoices' => function ($query) use ($statusIds) {
$query->quotes()
->withArchived()
->statusIds($statusIds)
->where('invoice_date', '>=', $this->startDate)
->where('invoice_date', '<=', $this->endDate)
->with(['invoice_items']);