Add trashed records to exports
This commit is contained in:
parent
42ba197a6f
commit
bfb29a7d50
6 changed files with 15 additions and 3 deletions
|
|
@ -116,6 +116,7 @@ class InvoiceItemExport extends BaseExport
|
|||
$this->csv->insertOne($this->buildHeader());
|
||||
|
||||
$query = Invoice::query()
|
||||
->withTrashed()
|
||||
->with('client')->where('company_id', $this->company->id)
|
||||
->where('is_deleted',0);
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,10 @@ class PaymentExport extends BaseExport
|
|||
//insert the header
|
||||
$this->csv->insertOne($this->buildHeader());
|
||||
|
||||
$query = Payment::query()->where('company_id', $this->company->id)->where('is_deleted', 0);
|
||||
$query = Payment::query()
|
||||
->withTrashed()
|
||||
->where('company_id', $this->company->id)
|
||||
->where('is_deleted', 0);
|
||||
|
||||
$query = $this->addDateRange($query);
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,10 @@ class ProductExport extends BaseExport
|
|||
//insert the header
|
||||
$this->csv->insertOne($this->buildHeader());
|
||||
|
||||
$query = Product::query()->where('company_id', $this->company->id)->where('is_deleted', 0);
|
||||
$query = Product::query()
|
||||
->withTrashed()
|
||||
->where('company_id', $this->company->id)
|
||||
->where('is_deleted', 0);
|
||||
|
||||
$query = $this->addDateRange($query);
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ class QuoteExport extends BaseExport
|
|||
$this->csv->insertOne($this->buildHeader());
|
||||
|
||||
$query = Quote::query()
|
||||
->withTrashed()
|
||||
->with('client')
|
||||
->where('company_id', $this->company->id)
|
||||
->where('is_deleted', 0);
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ class QuoteItemExport extends BaseExport
|
|||
$this->csv->insertOne($this->buildHeader());
|
||||
|
||||
$query = Quote::query()
|
||||
->withTrashed()
|
||||
->with('client')->where('company_id', $this->company->id)
|
||||
->where('is_deleted', 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,10 @@ class TaskExport extends BaseExport
|
|||
//insert the header
|
||||
$this->csv->insertOne($this->buildHeader());
|
||||
|
||||
$query = Task::query()->where('company_id', $this->company->id)->where('is_deleted', 0);
|
||||
$query = Task::query()
|
||||
->withTrashed()
|
||||
->where('company_id', $this->company->id)
|
||||
->where('is_deleted', 0);
|
||||
|
||||
$query = $this->addDateRange($query);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue