mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Add props for exporst
This commit is contained in:
parent
ffa725a7c0
commit
616e9211c0
@ -83,6 +83,7 @@ class BaseExport
|
||||
'contact_custom_value4' => 'vendor_contact.custom_value4',
|
||||
'email' => 'vendor_contact.email',
|
||||
'status' => 'vendor.status',
|
||||
'classification' => 'vendor.classification',
|
||||
];
|
||||
|
||||
protected array $client_report_keys = [
|
||||
@ -127,6 +128,7 @@ class BaseExport
|
||||
"contact_custom_value4" => "contact.custom_value4",
|
||||
'payment_balance' => 'client.payment_balance',
|
||||
'credit_balance' => 'client.credit_balance',
|
||||
'classification' => 'client.classification',
|
||||
];
|
||||
|
||||
protected array $invoice_report_keys = [
|
||||
|
@ -74,6 +74,8 @@ class ClientExport extends BaseExport
|
||||
'status' => 'status',
|
||||
'payment_balance' => 'client.payment_balance',
|
||||
'credit_balance' => 'client.credit_balance',
|
||||
'classification' => 'client.classification',
|
||||
|
||||
];
|
||||
|
||||
public function __construct(Company $company, array $input)
|
||||
@ -225,6 +227,10 @@ class ClientExport extends BaseExport
|
||||
$entity['industry_id'] = $client->industry ? ctrans("texts.industry_{$client->industry->name}") : '';
|
||||
}
|
||||
|
||||
if (in_array('client.classification', $this->input['report_keys']) && isset($client->classification)) {
|
||||
$entity['client.classification'] = ctrans("texts.{$client->classification}") ?? '';
|
||||
}
|
||||
|
||||
return $entity;
|
||||
}
|
||||
|
||||
|
@ -139,6 +139,10 @@ class VendorExport extends BaseExport
|
||||
$entity['currency'] = $vendor->currency() ? $vendor->currency()->code : $vendor->company->currency()->code;
|
||||
}
|
||||
|
||||
if (in_array('vendor.classification', $this->input['report_keys']) && isset($vendor->classification)) {
|
||||
$entity['vendor.classification'] = ctrans("texts.{$vendor->classification}") ?? '';
|
||||
}
|
||||
|
||||
$entity['status'] = $this->calculateStatus($vendor);
|
||||
|
||||
return $entity;
|
||||
|
Loading…
Reference in New Issue
Block a user