mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 08:04:33 -04: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
|
public function handle() : void
|
||||||
{
|
{
|
||||||
info(" in the handle ");
|
|
||||||
|
|
||||||
// Generate Standard Invoice
|
// Generate Standard Invoice
|
||||||
$invoice = RecurringInvoiceToInvoiceFactory::create($this->recurring_invoice, $this->recurring_invoice->client);
|
$invoice = RecurringInvoiceToInvoiceFactory::create($this->recurring_invoice, $this->recurring_invoice->client);
|
||||||
|
|
||||||
@ -99,8 +97,9 @@ class SendRecurring implements ShouldQueue
|
|||||||
|
|
||||||
$this->recurring_invoice->save();
|
$this->recurring_invoice->save();
|
||||||
|
|
||||||
if ($invoice->invitations->count() > 0)
|
//this is duplicated!!
|
||||||
event(new InvoiceWasEmailed($invoice->invitations->first(), $invoice->company, Ninja::eventVars()));
|
// 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) {
|
if (($key = array_search('mail', $methods)) !== false && $first_notification_sent === true) {
|
||||||
unset($methods[$key]);
|
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);
|
EntitySentMailer::dispatch($event->invitation, 'invoice', $user, $event->invitation->company);
|
||||||
$first_notification_sent = false;
|
$first_notification_sent = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$notification->method = $methods;
|
$notification->method = $methods;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user