mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Remove redundant entity notification
This commit is contained in:
parent
49e4e77290
commit
a8f186c921
@ -56,8 +56,6 @@ class SendRecurring implements ShouldQueue
|
||||
*/
|
||||
public function handle() : void
|
||||
{
|
||||
info(" in the handle ");
|
||||
|
||||
// Generate Standard Invoice
|
||||
$invoice = RecurringInvoiceToInvoiceFactory::create($this->recurring_invoice, $this->recurring_invoice->client);
|
||||
|
||||
@ -99,8 +97,9 @@ class SendRecurring implements ShouldQueue
|
||||
|
||||
$this->recurring_invoice->save();
|
||||
|
||||
if ($invoice->invitations->count() > 0)
|
||||
event(new InvoiceWasEmailed($invoice->invitations->first(), $invoice->company, Ninja::eventVars()));
|
||||
//this is duplicated!!
|
||||
// if ($invoice->invitations->count() > 0)
|
||||
// event(new InvoiceWasEmailed($invoice->invitations->first(), $invoice->company, Ninja::eventVars()));
|
||||
|
||||
}
|
||||
|
||||
|
@ -60,12 +60,9 @@ class InvoiceEmailedNotification implements ShouldQueue
|
||||
if (($key = array_search('mail', $methods)) !== false && $first_notification_sent === true) {
|
||||
unset($methods[$key]);
|
||||
|
||||
//Fire mail notification here!!!
|
||||
//This allows us better control of how we
|
||||
//handle the mailer
|
||||
|
||||
EntitySentMailer::dispatch($event->invitation, 'invoice', $user, $event->invitation->company);
|
||||
$first_notification_sent = false;
|
||||
|
||||
}
|
||||
|
||||
$notification->method = $methods;
|
||||
|
Loading…
Reference in New Issue
Block a user