From 4ceff418a45922ed8d138ebf38c334a0da31d02e Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 6 Nov 2022 19:14:06 +1100 Subject: [PATCH] Add client and status by default to invoice item exports --- app/Export/CSV/InvoiceItemExport.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Export/CSV/InvoiceItemExport.php b/app/Export/CSV/InvoiceItemExport.php index 68bc6f9eeea8..9b3ca78fd98c 100644 --- a/app/Export/CSV/InvoiceItemExport.php +++ b/app/Export/CSV/InvoiceItemExport.php @@ -88,6 +88,7 @@ class InvoiceItemExport extends BaseExport private array $decorate_keys = [ 'client', 'currency_id', + 'status' ]; public function __construct(Company $company, array $input) @@ -207,10 +208,10 @@ class InvoiceItemExport extends BaseExport if(in_array('currency_id', $this->input['report_keys'])) $entity['currency'] = $invoice->client->currency() ? $invoice->client->currency()->code : $invoice->company->currency()->code; - if(in_array('client_id', $this->input['report_keys'])) + // if(in_array('client_id', $this->input['report_keys'])) $entity['client'] = $invoice->client->present()->name(); - if(in_array('status_id', $this->input['report_keys'])) + // if(in_array('status_id', $this->input['report_keys'])) $entity['status'] = $invoice->stringStatus($invoice->status_id); return $entity;