Fire invoice observer for invoice created from recurring

This commit is contained in:
David Bomba 2021-11-09 18:54:56 +11:00
parent 64aa4fe00f
commit 1d66cf3772
2 changed files with 2 additions and 0 deletions

View File

@ -120,6 +120,7 @@ class SendRecurring implements ShouldQueue
*/ */
event('eloquent.created: App\Models\Invoice', $invoice);
//Admin notification for recurring invoice sent. //Admin notification for recurring invoice sent.
if ($invoice->invitations->count() >= 1 ) { if ($invoice->invitations->count() >= 1 ) {

View File

@ -29,6 +29,7 @@ class InvoiceObserver
*/ */
public function created(Invoice $invoice) public function created(Invoice $invoice)
{ {
nlog("ppo0");
$subscriptions = Webhook::where('company_id', $invoice->company_id) $subscriptions = Webhook::where('company_id', $invoice->company_id)
->where('event_id', Webhook::EVENT_CREATE_INVOICE) ->where('event_id', Webhook::EVENT_CREATE_INVOICE)