From b365d8dc6e4f46d047565af795465d2074933b1d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 15 May 2019 15:19:18 +1000 Subject: [PATCH] Wire up Activity Listeners for update/create invoice --- app/Jobs/Invoice/ApplyPaymentToInvoice.php | 2 -- app/Providers/EventServiceProvider.php | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Jobs/Invoice/ApplyPaymentToInvoice.php b/app/Jobs/Invoice/ApplyPaymentToInvoice.php index 72248b32fc46..af4b47f9d6cb 100644 --- a/app/Jobs/Invoice/ApplyPaymentToInvoice.php +++ b/app/Jobs/Invoice/ApplyPaymentToInvoice.php @@ -107,7 +107,5 @@ class ApplyPaymentToInvoice implements ShouldQueue $this->invoice->save(); - /* Insert the ledger transaction */ - UpdateCompanyLedgerWithPayment::dispatch($this->payment, $adjustment); } } diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 1379be8b0651..653651a22518 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -19,7 +19,9 @@ use App\Events\Payment\PaymentWasCreated; use App\Events\User\UserCreated; use App\Listeners\Activity\CreatedClientActivity; use App\Listeners\Activity\PaymentCreatedActivity; +use App\Listeners\Invoice\CreateInvoiceActivity; use App\Listeners\Invoice\CreateInvoiceInvitations; +use App\Listeners\Invoice\UpdateInvoiceActivity; use App\Listeners\SendVerificationNotification; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; @@ -64,10 +66,10 @@ class EventServiceProvider extends ServiceProvider CreateInvoiceInvitations::class, ], InvoiceWasUpdated::class => [ - + UpdateInvoiceActivity::class, ], InvoiceWasCreated::class => [ - + CreateInvoiceActivity::class, ], ];