mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Support filtering email notifications
This commit is contained in:
parent
a70d4bc805
commit
2853351ca2
@ -1797,6 +1797,11 @@ class Account extends Eloquent
|
|||||||
return $this->company->accounts->count() > 1;
|
return $this->company->accounts->count() > 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function hasMultipleUsers()
|
||||||
|
{
|
||||||
|
return $this->users->count() > 1;
|
||||||
|
}
|
||||||
|
|
||||||
public function getPrimaryAccount()
|
public function getPrimaryAccount()
|
||||||
{
|
{
|
||||||
return $this->company->accounts()->orderBy('id')->first();
|
return $this->company->accounts()->orderBy('id')->first();
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
{!! Former::checkbox('notify_paid')->label(' ')->text(trans('texts.email_paid'))->value(1) !!}
|
{!! Former::checkbox('notify_paid')->label(' ')->text(trans('texts.email_paid'))->value(1) !!}
|
||||||
{!! Former::checkbox('notify_approved')->label(' ')->text(trans('texts.email_approved'))->value(1) !!}
|
{!! Former::checkbox('notify_approved')->label(' ')->text(trans('texts.email_approved'))->value(1) !!}
|
||||||
|
|
||||||
@if (true || Auth()->user()->account->users->count() > 1)
|
@if (Auth()->user()->account->hasMultipleUsers())
|
||||||
<br/>
|
<br/>
|
||||||
{!! Former::radios('only_notify_owned')->radios([
|
{!! Former::radios('only_notify_owned')->radios([
|
||||||
trans('texts.all_invoices') => array('name' => 'only_notify_owned', 'value' => 0),
|
trans('texts.all_invoices') => array('name' => 'only_notify_owned', 'value' => 0),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user