Limit bulk emailing
This commit is contained in:
parent
62ddfdedd3
commit
0da944a887
2 changed files with 14 additions and 4 deletions
|
|
@ -135,6 +135,14 @@ class User extends Authenticatable
|
|||
return $this->account->isPro();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function isPaidPro()
|
||||
{
|
||||
return $this->account->isPro() && ! $this->account->isTrial();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -196,10 +196,12 @@ class InvoiceDatatable extends EntityDatatable
|
|||
'label' => mtrans($this->entityType, 'download_' . $this->entityType),
|
||||
'url' => 'javascript:submitForm_'.$this->entityType.'("download")',
|
||||
];
|
||||
$actions[] = [
|
||||
'label' => mtrans($this->entityType, 'email_' . $this->entityType),
|
||||
'url' => 'javascript:submitForm_'.$this->entityType.'("emailInvoice")',
|
||||
];
|
||||
if (Utils::isSelfHost() || auth()->user()->isPaidPro()) {
|
||||
$actions[] = [
|
||||
'label' => mtrans($this->entityType, 'email_' . $this->entityType),
|
||||
'url' => 'javascript:submitForm_'.$this->entityType.'("emailInvoice")',
|
||||
];
|
||||
}
|
||||
$actions[] = \DropdownButton::DIVIDER;
|
||||
$actions[] = [
|
||||
'label' => mtrans($this->entityType, 'mark_sent'),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue