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, ], ];