1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

Check if $entity is App\Models\Quote to make sure right variables are passed

This commit is contained in:
Benjamin Beganović 2020-08-10 17:31:23 +02:00
parent 5eb2ad0e77
commit 347ec1d441
9 changed files with 36 additions and 0 deletions

View File

@ -117,6 +117,10 @@ class Bold extends BaseDesign
{
$variables = $this->entity->company->settings->pdf_variables->invoice_details;
if ($this->entity instanceof \App\Models\Quote) {
$variables = $this->entity->company->settings->pdf_variables->quote_details;
}
$elements = [];
foreach ($variables as $variable) {

View File

@ -117,6 +117,10 @@ class Business extends BaseDesign
{
$variables = $this->entity->company->settings->pdf_variables->invoice_details;
if ($this->entity instanceof \App\Models\Quote) {
$variables = $this->entity->company->settings->pdf_variables->quote_details;
}
$elements = [];
foreach ($variables as $variable) {

View File

@ -104,6 +104,10 @@ class Clean extends BaseDesign
{
$variables = $this->entity->company->settings->pdf_variables->invoice_details;
if ($this->entity instanceof \App\Models\Quote) {
$variables = $this->entity->company->settings->pdf_variables->quote_details;
}
$elements = [];
foreach ($variables as $variable) {

View File

@ -117,6 +117,10 @@ class Creative extends BaseDesign
{
$variables = $this->entity->company->settings->pdf_variables->invoice_details;
if ($this->entity instanceof \App\Models\Quote) {
$variables = $this->entity->company->settings->pdf_variables->quote_details;
}
$elements = [];
foreach ($variables as $variable) {

View File

@ -78,6 +78,10 @@ class Elegant extends BaseDesign
{
$variables = $this->entity->company->settings->pdf_variables->invoice_details;
if ($this->entity instanceof \App\Models\Quote) {
$variables = $this->entity->company->settings->pdf_variables->quote_details;
}
$elements = [];
foreach ($variables as $variable) {

View File

@ -117,6 +117,10 @@ class Hipster extends BaseDesign
{
$variables = $this->entity->company->settings->pdf_variables->invoice_details;
if ($this->entity instanceof \App\Models\Quote) {
$variables = $this->entity->company->settings->pdf_variables->quote_details;
}
$elements = [];
foreach ($variables as $variable) {

View File

@ -78,6 +78,10 @@ class Modern extends BaseDesign
{
$variables = $this->entity->company->settings->pdf_variables->invoice_details;
if ($this->entity instanceof \App\Models\Quote) {
$variables = $this->entity->company->settings->pdf_variables->quote_details;
}
$elements = [];
foreach ($variables as $variable) {

View File

@ -87,6 +87,10 @@ class Plain extends BaseDesign
{
$variables = $this->entity->company->settings->pdf_variables->invoice_details;
if ($this->entity instanceof \App\Models\Quote) {
$variables = $this->entity->company->settings->pdf_variables->quote_details;
}
$elements = [];
foreach ($variables as $variable) {

View File

@ -78,6 +78,10 @@ class Playful extends BaseDesign
{
$variables = $this->entity->company->settings->pdf_variables->invoice_details;
if ($this->entity instanceof \App\Models\Quote) {
$variables = $this->entity->company->settings->pdf_variables->quote_details;
}
$elements = [];
foreach ($variables as $variable) {