mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
catches for company set
This commit is contained in:
parent
b925b536c1
commit
b67951d128
@ -113,6 +113,7 @@ class PdfBuilder
|
||||
$contents = $this->document->getElementsByTagName('ninja');
|
||||
|
||||
$template_service = new TemplateService();
|
||||
$template_service->setCompany($this->service->company);
|
||||
$data = $template_service->processData($this->service->options)->getData();
|
||||
|
||||
$twig = $template_service->twig;
|
||||
|
@ -81,6 +81,17 @@ class PdfMaker
|
||||
$contents = $this->document->getElementsByTagName('ninja');
|
||||
|
||||
$ts = new TemplateService();
|
||||
|
||||
if(isset($this->data['template']['entity'])){
|
||||
try{
|
||||
$entity = $this->data['template']['entity'];
|
||||
$ts->setCompany($entity->company);
|
||||
}
|
||||
catch(\Exception $e){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$data = $ts->processData($this->options)->getData();
|
||||
$twig = $ts->twig;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user