mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
Limit reminders for free plans
This commit is contained in:
parent
5ef6afdc28
commit
db03dccbaf
@ -16,6 +16,7 @@ use App\Events\Invoice\InvoiceWasEmailed;
|
|||||||
use App\Jobs\Entity\EmailEntity;
|
use App\Jobs\Entity\EmailEntity;
|
||||||
use App\Jobs\Util\WebHookHandler;
|
use App\Jobs\Util\WebHookHandler;
|
||||||
use App\Libraries\MultiDB;
|
use App\Libraries\MultiDB;
|
||||||
|
use App\Models\Account;
|
||||||
use App\Models\Invoice;
|
use App\Models\Invoice;
|
||||||
use App\Models\Webhook;
|
use App\Models\Webhook;
|
||||||
use App\Utils\Ninja;
|
use App\Utils\Ninja;
|
||||||
@ -207,7 +208,7 @@ class SendReminders implements ShouldQueue
|
|||||||
$invoice->invitations->each(function ($invitation) use ($template, $invoice) {
|
$invoice->invitations->each(function ($invitation) use ($template, $invoice) {
|
||||||
|
|
||||||
//only send if enable_reminder setting is toggled to yes
|
//only send if enable_reminder setting is toggled to yes
|
||||||
if ($this->checkSendSetting($invoice, $template)) {
|
if ($this->checkSendSetting($invoice, $template) && $invoice->company->account->hasFeature(Account::FEATURE_EMAIL_TEMPLATES_REMINDERS)) {
|
||||||
nlog("firing email");
|
nlog("firing email");
|
||||||
|
|
||||||
EmailEntity::dispatchNow($invitation, $invitation->company, $template);
|
EmailEntity::dispatchNow($invitation, $invitation->company, $template);
|
||||||
|
@ -19,6 +19,7 @@ trait SavesDocuments
|
|||||||
{
|
{
|
||||||
public function saveDocuments($document_array, $entity, $is_public = true)
|
public function saveDocuments($document_array, $entity, $is_public = true)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($entity instanceof Company) {
|
if ($entity instanceof Company) {
|
||||||
$account = $entity->account;
|
$account = $entity->account;
|
||||||
$company = $entity;
|
$company = $entity;
|
||||||
|
Loading…
Reference in New Issue
Block a user