Adjustments for tests

This commit is contained in:
David Bomba 2024-05-29 23:19:03 +10:00
parent 743ff50b82
commit 4852a134da
12 changed files with 20 additions and 19 deletions

View File

@ -127,7 +127,7 @@ class ClientExport extends BaseExport
->withTrashed()
->where('company_id', $this->company->id);
if(!$this->input['include_deleted'])
if(!$this->input['include_deleted'] ?? false)
$query->where('is_deleted', 0);
$query = $this->addDateRange($query);

View File

@ -62,7 +62,8 @@ class InvoiceExport extends BaseExport
})
->where('company_id', $this->company->id);
if(!$this->input['include_deleted']) {
if(!$this->input['include_deleted'] ?? false){
$query->where('is_deleted', 0);
}

View File

@ -75,7 +75,7 @@ class InvoiceItemExport extends BaseExport
})
->where('company_id', $this->company->id);
if(!$this->input['include_deleted']) {
if(!$this->input['include_deleted'] ?? false){
$query->where('is_deleted', 0);
}

View File

@ -76,7 +76,7 @@ class ProductExport extends BaseExport
->where('company_id', $this->company->id);
if(!$this->input['include_deleted']) {
if(!$this->input['include_deleted'] ?? false){
$query->where('is_deleted', 0);
}

View File

@ -63,7 +63,7 @@ class PurchaseOrderExport extends BaseExport
})
->where('company_id', $this->company->id);
if(!$this->input['include_deleted']) {
if(!$this->input['include_deleted'] ?? false){
$query->where('is_deleted', 0);
}

View File

@ -67,7 +67,7 @@ class PurchaseOrderItemExport extends BaseExport
})
->with('vendor')->where('company_id', $this->company->id);
if(!$this->input['include_deleted']) {
if(!$this->input['include_deleted'] ?? false){
$query->where('is_deleted', 0);
}

View File

@ -69,7 +69,7 @@ class QuoteExport extends BaseExport
})
->where('company_id', $this->company->id);
if(!$this->input['include_deleted']) {
if(!$this->input['include_deleted'] ?? false){
$query->where('is_deleted', 0);
}

View File

@ -70,7 +70,7 @@ class QuoteItemExport extends BaseExport
})
->with('client')->where('company_id', $this->company->id);
if(!$this->input['include_deleted']) {
if(!$this->input['include_deleted'] ?? false){
$query->where('is_deleted', 0);
}

View File

@ -61,7 +61,7 @@ class RecurringInvoiceExport extends BaseExport
})
->where('company_id', $this->company->id);
if(!$this->input['include_deleted']) {
if(!$this->input['include_deleted'] ?? false){
$query->where('is_deleted', 0);
}

View File

@ -70,7 +70,7 @@ class TaskExport extends BaseExport
->withTrashed()
->where('company_id', $this->company->id);
if(!$this->input['include_deleted']) {
if(!$this->input['include_deleted'] ?? false){
$query->where('is_deleted', 0);
}

View File

@ -64,7 +64,7 @@ class VendorExport extends BaseExport
->withTrashed()
->where('company_id', $this->company->id);
if(!$this->input['include_deleted']) {
if(!$this->input['include_deleted'] ?? false){
$query->where('is_deleted', 0);
}

View File

@ -68,14 +68,14 @@ class GenericReportRequest extends Request
$input['user_id'] = auth()->user()->id;
// if(!$this->checkAuthority()){
// $input['date_range'] = '';
// $input['start_date'] = '';
// $input['end_date'] = '';
// $input['send_email'] = true;
// $input['report_keys'] = [];
// $input['document_email_attachment'] = false;
// }
if(!$this->checkAuthority()){
$input['date_range'] = '';
$input['start_date'] = '';
$input['end_date'] = '';
$input['send_email'] = true;
$input['report_keys'] = [];
$input['document_email_attachment'] = false;
}
$this->replace($input);
}