mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Document Export
This commit is contained in:
parent
d1ae7d88d9
commit
ace76b8587
@ -96,7 +96,8 @@ class DocumentExport
|
|||||||
|
|
||||||
foreach(array_values($this->report_keys) as $key){
|
foreach(array_values($this->report_keys) as $key){
|
||||||
|
|
||||||
$entity[$key] = $transformed_entity[$key];
|
$entity[$key] = $transformed_entity[$key];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->decorateAdvancedFields($document, $entity);
|
return $this->decorateAdvancedFields($document, $entity);
|
||||||
@ -106,8 +107,11 @@ class DocumentExport
|
|||||||
private function decorateAdvancedFields(Document $document, array $entity) :array
|
private function decorateAdvancedFields(Document $document, array $entity) :array
|
||||||
{
|
{
|
||||||
|
|
||||||
// if(array_key_exists('country_id', $entity))
|
if(array_key_exists('record_type', $entity))
|
||||||
// $entity['country_id'] = $credit->client->country ? ctrans("texts.country_{$credit->client->country->name}") : "";
|
$entity['record_type'] = class_basename($document->documentable);
|
||||||
|
|
||||||
|
if(array_key_exists('record_name', $entity))
|
||||||
|
$entity['record_name'] = $document->hashed_id;
|
||||||
|
|
||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user