Fixed problem with PDF preview after upgrading

This commit is contained in:
Hillel Coren 2016-01-13 08:18:26 +02:00
parent 7171e2b5a5
commit 8cefa9a707
3 changed files with 5 additions and 5 deletions

View File

@ -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');

View File

@ -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(){

View File

@ -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()) !!};