diff --git a/app/Http/routes.php b/app/Http/routes.php index 7bd65e479df0..f92c8febfb11 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -606,7 +606,7 @@ if (!defined('CONTACT_EMAIL')) { define('NINJA_WEB_URL', env('NINJA_WEB_URL', 'https://www.invoiceninja.com')); define('NINJA_APP_URL', env('NINJA_APP_URL', 'https://app.invoiceninja.com')); define('NINJA_DATE', '2000-01-01'); - define('NINJA_VERSION', '2.6' . env('NINJA_VERSION_SUFFIX')); + define('NINJA_VERSION', '2.6.1' . env('NINJA_VERSION_SUFFIX')); define('SOCIAL_LINK_FACEBOOK', env('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja')); define('SOCIAL_LINK_TWITTER', env('SOCIAL_LINK_TWITTER', 'https://twitter.com/invoiceninja')); diff --git a/app/Models/User.php b/app/Models/User.php index e95459f384b6..4e448ba3e5d9 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -433,7 +433,9 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac public function caddAddUsers() { - if ( ! $this->hasFeature(FEATURE_USERS)) { + if ( ! Utils::isNinja()) { + return true; + } elseif ( ! $this->hasFeature(FEATURE_USERS)) { return false; } diff --git a/app/Policies/DocumentPolicy.php b/app/Policies/DocumentPolicy.php index e9d67dd34154..aade18479e7f 100644 --- a/app/Policies/DocumentPolicy.php +++ b/app/Policies/DocumentPolicy.php @@ -24,7 +24,7 @@ class DocumentPolicy extends EntityPolicy * @param Document $document * @return bool */ - public static function view(User $user, Document $document) + public static function view(User $user, $document) { if ($user->hasPermission('view_all')) { return true; @@ -41,4 +41,4 @@ class DocumentPolicy extends EntityPolicy return $user->owns($item); } -} \ No newline at end of file +} diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php index 7314d0b3f7df..c405448c3201 100644 --- a/resources/views/invoices/edit.blade.php +++ b/resources/views/invoices/edit.blade.php @@ -830,7 +830,7 @@ model.invoice().custom_taxes2({{ $account->custom_invoice_taxes2 ? 'true' : 'false' }}); // set the default account tax rate @if ($account->invoice_taxes && ! empty($defaultTax)) - var defaultTax = {!! $defaultTax !!}; + var defaultTax = {!! $defaultTax->toJson() !!}; model.invoice().tax_rate1(defaultTax.rate); model.invoice().tax_name1(defaultTax.name); @endif