mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-14 11:54:36 -04:00
Fixes for tests
This commit is contained in:
parent
99bf34b20f
commit
cb0385dd39
@ -114,11 +114,12 @@ class CreateRawPdf
|
|||||||
} catch (\Exception) {
|
} catch (\Exception) {
|
||||||
throw new FilePermissionsFailure('Unable to generate the raw PDF');
|
throw new FilePermissionsFailure('Unable to generate the raw PDF');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->entity_string == "invoice" && $this->entity->client->getSetting("merge_e_invoice_to_pdf")) {
|
if ($this->entity_string == "invoice" && $this->entity->client->getSetting("merge_e_invoice_to_pdf")) {
|
||||||
$pdf = (new MergeEDocument($this->entity, $pdf))->handle();
|
$pdf = (new MergeEDocument($this->entity, $pdf))->handle();
|
||||||
}
|
}
|
||||||
|
|
||||||
$merge_docs = $this->entity->client ? $this->entity->client->getSetting('embed_documents') : $this->company->getSetting('embed_documents');
|
$merge_docs = isset($this->entity->client) ? $this->entity->client->getSetting('embed_documents') : $this->company->getSetting('embed_documents');
|
||||||
|
|
||||||
if($merge_docs && ($this->entity->documents()->where('is_public', true)->count() > 0 || $this->company->documents()->where('is_public', true)->count() > 0)) {
|
if($merge_docs && ($this->entity->documents()->where('is_public', true)->count() > 0 || $this->company->documents()->where('is_public', true)->count() > 0)) {
|
||||||
$pdf = $this->entity->documentMerge($pdf);
|
$pdf = $this->entity->documentMerge($pdf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user