mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
Limit bulk emailing
This commit is contained in:
parent
ba7e42bad1
commit
29b2c565fc
@ -135,6 +135,14 @@ class User extends Authenticatable
|
|||||||
return $this->account->isPro();
|
return $this->account->isPro();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function isPaidPro()
|
||||||
|
{
|
||||||
|
return $this->account->isPro() && ! $this->account->isTrial();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
@ -196,10 +196,12 @@ class InvoiceDatatable extends EntityDatatable
|
|||||||
'label' => mtrans($this->entityType, 'download_' . $this->entityType),
|
'label' => mtrans($this->entityType, 'download_' . $this->entityType),
|
||||||
'url' => 'javascript:submitForm_'.$this->entityType.'("download")',
|
'url' => 'javascript:submitForm_'.$this->entityType.'("download")',
|
||||||
];
|
];
|
||||||
$actions[] = [
|
if (Utils::isSelfHost() || auth()->user()->isPaidPro()) {
|
||||||
'label' => mtrans($this->entityType, 'email_' . $this->entityType),
|
$actions[] = [
|
||||||
'url' => 'javascript:submitForm_'.$this->entityType.'("emailInvoice")',
|
'label' => mtrans($this->entityType, 'email_' . $this->entityType),
|
||||||
];
|
'url' => 'javascript:submitForm_'.$this->entityType.'("emailInvoice")',
|
||||||
|
];
|
||||||
|
}
|
||||||
$actions[] = \DropdownButton::DIVIDER;
|
$actions[] = \DropdownButton::DIVIDER;
|
||||||
$actions[] = [
|
$actions[] = [
|
||||||
'label' => mtrans($this->entityType, 'mark_sent'),
|
'label' => mtrans($this->entityType, 'mark_sent'),
|
||||||
|
Loading…
Reference in New Issue
Block a user