1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 13:42:49 +01:00

Bug fixes

This commit is contained in:
Hillel Coren 2016-07-14 12:47:33 +03:00
parent 09e06703ea
commit 7438545aea
4 changed files with 7 additions and 5 deletions

View File

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

View File

@ -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;
}

View File

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

View File

@ -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