diff --git a/app/Http/routes.php b/app/Http/routes.php index 04e0493556b3..002c08892e25 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -437,7 +437,7 @@ if (!defined('CONTACT_EMAIL')) { define('NINJA_GATEWAY_CONFIG', 'NINJA_GATEWAY_CONFIG'); define('NINJA_WEB_URL', 'https://www.invoiceninja.com'); define('NINJA_APP_URL', 'https://app.invoiceninja.com'); - define('NINJA_VERSION', '2.4.9.2'); + define('NINJA_VERSION', '2.4.9.3'); define('NINJA_DATE', '2000-01-01'); define('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja'); diff --git a/app/Models/Account.php b/app/Models/Account.php index aa64607c8d0e..ebd9e57bc6bf 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -923,11 +923,11 @@ class Account extends Eloquent } public function getHeaderFontId() { - return $this->isPro() ? $this->header_font_id : DEFAULT_HEADER_FONT; + return ($this->isPro() && $this->header_font_id) ? $this->header_font_id : DEFAULT_HEADER_FONT; } public function getBodyFontId() { - return $this->isPro() ? $this->body_font_id : DEFAULT_BODY_FONT; + return ($this->isPro() && $this->body_font_id) ? $this->body_font_id : DEFAULT_BODY_FONT; } public function getHeaderFontName(){ diff --git a/resources/views/invoices/pdf.blade.php b/resources/views/invoices/pdf.blade.php index 82ff81817a85..8ca82c740065 100644 --- a/resources/views/invoices/pdf.blade.php +++ b/resources/views/invoices/pdf.blade.php @@ -76,8 +76,8 @@ NINJA.primaryColor = "{{ $account->primary_color }}"; NINJA.secondaryColor = "{{ $account->secondary_color }}"; NINJA.fontSize = {{ $account->font_size }}; - NINJA.headerFont = {!! json_encode(Auth::user()->account->getHeaderFontName()) !!}; - NINJA.bodyFont = {!! json_encode(Auth::user()->account->getBodyFontName()) !!}; + NINJA.headerFont = {!! json_encode($account->getHeaderFontName()) !!}; + NINJA.bodyFont = {!! json_encode($account->getBodyFontName()) !!}; @endif var invoiceLabels = {!! json_encode($account->getInvoiceLabels()) !!};