Fixes for created at timestmap for document export
This commit is contained in:
parent
cecbcacde7
commit
52db82bb12
|
|
@ -134,6 +134,10 @@ class DocumentExport extends BaseExport
|
||||||
$entity['record_type'] = class_basename($document->documentable);
|
$entity['record_type'] = class_basename($document->documentable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (in_array('created_at', $this->input['report_keys'])) {
|
||||||
|
$entity['created_at'] = \Carbon\Carbon::createFromTimestamp($document->created_at)->format('Y-m-d H:i:s');
|
||||||
|
}
|
||||||
|
|
||||||
// if(in_array('record_name', $this->input['report_keys']))
|
// if(in_array('record_name', $this->input['report_keys']))
|
||||||
// $entity['record_name'] = $document->hashed_id;
|
// $entity['record_name'] = $document->hashed_id;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -220,7 +220,6 @@ class InvoiceExport extends BaseExport
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$entity = $this->decorateAdvancedFields($invoice, $entity);
|
$entity = $this->decorateAdvancedFields($invoice, $entity);
|
||||||
|
|
||||||
return $this->convertFloats($entity);
|
return $this->convertFloats($entity);
|
||||||
|
|
|
||||||
|
|
@ -675,10 +675,10 @@ class HtmlEngine
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$signature_invite = $this->invitation->signature_base64 ? $this->invitation : $this->entity->invitations()->whereNotNull('signature_base64')->orderBy('updated_at','desc')->first();
|
$signature_invite = $this->invitation->signature_base64 ? $this->invitation : $this->enZtity->invitations()->whereNotNull('signature_base64')->orderBy('updated_at','desc')->first();
|
||||||
|
|
||||||
if ($this->settings->signature_on_pdf) {
|
if ($this->settings->signature_on_pdf) {
|
||||||
$data['$contact.signature'] = ['value' => $signature_invite->signature_base64, 'label' => ctrans('texts.signature')];
|
$data['$contact.signature'] = ['value' => $signature_invite?->signature_base64 ?? '', 'label' => ctrans('texts.signature')];
|
||||||
} else {
|
} else {
|
||||||
$data['$contact.signature'] = ['value' => '', 'label' => ''];
|
$data['$contact.signature'] = ['value' => '', 'label' => ''];
|
||||||
}
|
}
|
||||||
|
|
@ -687,9 +687,9 @@ class HtmlEngine
|
||||||
$data['$quote.reference'] = ['value' => $this->entity->quote->number ?: ' ', 'label' => ctrans('texts.quote_number')];
|
$data['$quote.reference'] = ['value' => $this->entity->quote->number ?: ' ', 'label' => ctrans('texts.quote_number')];
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['$contact.signature_raw'] = ['value' => $signature_invite->signature_base64, 'label' => ctrans('texts.signature')];
|
$data['$contact.signature_raw'] = ['value' => $signature_invite?->signature_base64 ?? '', 'label' => ctrans('texts.signature')];
|
||||||
$data['$contact.signature_date'] = ['value' => $signature_invite->signature_date ? $this->translateDate($signature_invite->signature_date, $this->client->date_format(), $this->client->locale()) : ' ', 'label' => ctrans('texts.date')];
|
$data['$contact.signature_date'] = ['value' => $signature_invite?->signature_date ? $this->translateDate($signature_invite->signature_date, $this->client->date_format(), $this->client->locale()) : ' ', 'label' => ctrans('texts.date')];
|
||||||
$data['$contact.signature_ip'] = ['value' => $signature_invite->signature_ip ?? '', 'label' => ctrans('texts.address')];
|
$data['$contact.signature_ip'] = ['value' => $signature_invite?->signature_ip ?? '', 'label' => ctrans('texts.address')];
|
||||||
|
|
||||||
$data['$thanks'] = ['value' => '', 'label' => ctrans('texts.thanks')];
|
$data['$thanks'] = ['value' => '', 'label' => ctrans('texts.thanks')];
|
||||||
$data['$from'] = ['value' => '', 'label' => ctrans('texts.from')];
|
$data['$from'] = ['value' => '', 'label' => ctrans('texts.from')];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue