mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Updates for email sending activitiues
This commit is contained in:
parent
f21444be90
commit
be22f4bde9
@ -11,10 +11,12 @@
|
||||
|
||||
namespace App\Services\Invoice;
|
||||
|
||||
use App\Jobs\Entity\EmailEntity;
|
||||
use App\Models\ClientContact;
|
||||
use App\Utils\Ninja;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\ClientContact;
|
||||
use App\Jobs\Entity\EmailEntity;
|
||||
use App\Services\AbstractService;
|
||||
use App\Events\Invoice\InvoiceWasEmailed;
|
||||
|
||||
class SendEmail extends AbstractService
|
||||
{
|
||||
@ -36,5 +38,10 @@ class SendEmail extends AbstractService
|
||||
EmailEntity::dispatch($invitation, $invitation->company, $this->reminder_template)->delay(10);
|
||||
}
|
||||
});
|
||||
|
||||
if ($this->invoice->invitations->count() >= 1) {
|
||||
event(new InvoiceWasEmailed($this->invoice->invitations->first(), $this->invoice->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null), $this->reminder_template ?? 'invoice'));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user