diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index 705e1661e019..8050c433af1b 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -237,7 +237,7 @@ class InvoiceController extends BaseController 'metadata' => [], ]; - TransactionLog::dispatch(TransactionEvent::INVOICE_UPDATED, $transaction, $invoice->company->db); + // TransactionLog::dispatch(TransactionEvent::INVOICE_UPDATED, $transaction, $invoice->company->db); return $this->itemResponse($invoice); } @@ -433,7 +433,7 @@ class InvoiceController extends BaseController 'metadata' => [], ]; - TransactionLog::dispatch(TransactionEvent::INVOICE_UPDATED, $transaction, $invoice->company->db); + // TransactionLog::dispatch(TransactionEvent::INVOICE_UPDATED, $transaction, $invoice->company->db); return $this->itemResponse($invoice); } diff --git a/app/Jobs/Util/ReminderJob.php b/app/Jobs/Util/ReminderJob.php index 90995cab13db..403ef964a37e 100644 --- a/app/Jobs/Util/ReminderJob.php +++ b/app/Jobs/Util/ReminderJob.php @@ -216,7 +216,7 @@ class ReminderJob implements ShouldQueue 'metadata' => ['setLateFee'], ]; - TransactionLog::dispatch(TransactionEvent::CLIENT_STATUS, $transaction, $invoice->company->db); + // TransactionLog::dispatch(TransactionEvent::CLIENT_STATUS, $transaction, $invoice->company->db); return $invoice; } diff --git a/app/Listeners/Invoice/CreateInvoicePdf.php b/app/Listeners/Invoice/CreateInvoicePdf.php index db079052dcce..dcbf646a5708 100644 --- a/app/Listeners/Invoice/CreateInvoicePdf.php +++ b/app/Listeners/Invoice/CreateInvoicePdf.php @@ -38,19 +38,23 @@ class CreateInvoicePdf implements ShouldQueue if (isset($event->invoice)) { $event->invoice->invitations->each(function ($invitation) { - CreateEntityPdf::dispatch($invitation->load('invoice', 'contact.client.company')); + // CreateEntityPdf::dispatch($invitation->load('invoice', 'contact.client.company')); + (new CreateEntityPdf($invitation->load('invoice', 'contact.client.company')))->handle(); }); } if (isset($event->quote)) { $event->quote->invitations->each(function ($invitation) { - CreateEntityPdf::dispatch($invitation->load('quote', 'contact.client.company')); + // CreateEntityPdf::dispatch($invitation->load('quote', 'contact.client.company')); + (new CreateEntityPdf($invitation->load('invoice', 'contact.client.company')))->handle(); }); } if (isset($event->credit)) { $event->credit->invitations->each(function ($invitation) { - CreateEntityPdf::dispatch($invitation->load('credit', 'contact.client.company')); +// CreateEntityPdf::dispatch($invitation->load('credit', 'contact.client.company')); + (new CreateEntityPdf($invitation->load('invoice', 'contact.client.company')))->handle(); + }); } } diff --git a/app/PaymentDrivers/BaseDriver.php b/app/PaymentDrivers/BaseDriver.php index fc57b368e589..5c79eb531a0a 100644 --- a/app/PaymentDrivers/BaseDriver.php +++ b/app/PaymentDrivers/BaseDriver.php @@ -333,7 +333,7 @@ class BaseDriver extends AbstractPaymentDriver 'metadata' => [], ]; - TransactionLog::dispatch(TransactionEvent::INVOICE_FEE_APPLIED, $transaction, $invoice->company->db); + // TransactionLog::dispatch(TransactionEvent::INVOICE_FEE_APPLIED, $transaction, $invoice->company->db); }); } diff --git a/app/Repositories/PaymentRepository.php b/app/Repositories/PaymentRepository.php index b78588963852..5c912539b573 100644 --- a/app/Repositories/PaymentRepository.php +++ b/app/Repositories/PaymentRepository.php @@ -209,7 +209,7 @@ class PaymentRepository extends BaseRepository { 'metadata' => [], ]; - TransactionLog::dispatch(TransactionEvent::PAYMENT_MADE, $transaction, $payment->company->db); + // TransactionLog::dispatch(TransactionEvent::PAYMENT_MADE, $transaction, $payment->company->db); return $payment->refresh(); } diff --git a/app/Services/Invoice/ApplyPayment.php b/app/Services/Invoice/ApplyPayment.php index eea48ba3974e..d124c7f821d5 100644 --- a/app/Services/Invoice/ApplyPayment.php +++ b/app/Services/Invoice/ApplyPayment.php @@ -113,7 +113,7 @@ class ApplyPayment extends AbstractService 'metadata' => [], ]; - TransactionLog::dispatch(TransactionEvent::INVOICE_PAYMENT_APPLIED, $transaction, $this->invoice->company->db); + // TransactionLog::dispatch(TransactionEvent::INVOICE_PAYMENT_APPLIED, $transaction, $this->invoice->company->db); return $this->invoice; } diff --git a/app/Services/Invoice/HandleCancellation.php b/app/Services/Invoice/HandleCancellation.php index 52a369ede4e1..76b7545229c4 100644 --- a/app/Services/Invoice/HandleCancellation.php +++ b/app/Services/Invoice/HandleCancellation.php @@ -65,7 +65,7 @@ class HandleCancellation extends AbstractService 'metadata' => [], ]; - TransactionLog::dispatch(TransactionEvent::INVOICE_CANCELLED, $transaction, $this->invoice->company->db); + // TransactionLog::dispatch(TransactionEvent::INVOICE_CANCELLED, $transaction, $this->invoice->company->db); return $this->invoice; } diff --git a/app/Services/Invoice/HandleReversal.php b/app/Services/Invoice/HandleReversal.php index 03066b6a7c96..58ecfa10c134 100644 --- a/app/Services/Invoice/HandleReversal.php +++ b/app/Services/Invoice/HandleReversal.php @@ -147,7 +147,7 @@ class HandleReversal extends AbstractService 'metadata' => [], ]; - TransactionLog::dispatch(TransactionEvent::INVOICE_REVERSED, $transaction, $this->invoice->company->db); + // TransactionLog::dispatch(TransactionEvent::INVOICE_REVERSED, $transaction, $this->invoice->company->db); return $this->invoice; //create a ledger row for this with the resulting Credit ( also include an explanation in the notes section ) diff --git a/app/Services/Invoice/MarkInvoiceDeleted.php b/app/Services/Invoice/MarkInvoiceDeleted.php index 96c03ac92b77..4b61f0a6f4c3 100644 --- a/app/Services/Invoice/MarkInvoiceDeleted.php +++ b/app/Services/Invoice/MarkInvoiceDeleted.php @@ -56,7 +56,7 @@ class MarkInvoiceDeleted extends AbstractService 'metadata' => ['total_payments' => $this->total_payments, 'balance_adjustment' => $this->balance_adjustment, 'adjustment_amount' => $this->adjustment_amount], ]; - TransactionLog::dispatch(TransactionEvent::INVOICE_DELETED, $transaction, $this->invoice->company->db); + // TransactionLog::dispatch(TransactionEvent::INVOICE_DELETED, $transaction, $this->invoice->company->db); return $this->invoice; } diff --git a/app/Services/Invoice/MarkPaid.php b/app/Services/Invoice/MarkPaid.php index 60182238642c..31b6f04a8402 100644 --- a/app/Services/Invoice/MarkPaid.php +++ b/app/Services/Invoice/MarkPaid.php @@ -141,7 +141,7 @@ class MarkPaid extends AbstractService 'metadata' => [], ]; - TransactionLog::dispatch(TransactionEvent::INVOICE_MARK_PAID, $transaction, $this->invoice->company->db); + // TransactionLog::dispatch(TransactionEvent::INVOICE_MARK_PAID, $transaction, $this->invoice->company->db); return $this->invoice; } diff --git a/app/Services/Payment/DeletePayment.php b/app/Services/Payment/DeletePayment.php index 6454919238de..0b70b4c9f855 100644 --- a/app/Services/Payment/DeletePayment.php +++ b/app/Services/Payment/DeletePayment.php @@ -132,7 +132,7 @@ class DeletePayment 'metadata' => [], ]; - TransactionLog::dispatch(TransactionEvent::PAYMENT_DELETED, $transaction, $paymentable_invoice->company->db); + // TransactionLog::dispatch(TransactionEvent::PAYMENT_DELETED, $transaction, $paymentable_invoice->company->db); }); } @@ -151,7 +151,7 @@ class DeletePayment 'metadata' => [], ]; - TransactionLog::dispatch(TransactionEvent::CLIENT_STATUS, $transaction, $this->payment->company->db); + // TransactionLog::dispatch(TransactionEvent::CLIENT_STATUS, $transaction, $this->payment->company->db); return $this; } diff --git a/app/Services/Payment/RefundPayment.php b/app/Services/Payment/RefundPayment.php index 17391f96bc81..f16576c0d11f 100644 --- a/app/Services/Payment/RefundPayment.php +++ b/app/Services/Payment/RefundPayment.php @@ -77,7 +77,7 @@ class RefundPayment 'metadata' => [], ]; - TransactionLog::dispatch(TransactionEvent::PAYMENT_REFUND, $transaction, $this->payment->company->db); + // TransactionLog::dispatch(TransactionEvent::PAYMENT_REFUND, $transaction, $this->payment->company->db); $notes = ctrans('texts.refunded') . " : {$this->total_refund} - " . ctrans('texts.gateway_refund') . " : "; $notes .= $this->refund_data['gateway_refund'] !== false ? ctrans('texts.yes') : ctrans('texts.no'); @@ -296,7 +296,7 @@ class RefundPayment 'metadata' => [], ]; - TransactionLog::dispatch(TransactionEvent::PAYMENT_REFUND, $transaction, $invoice->company->db); + // TransactionLog::dispatch(TransactionEvent::PAYMENT_REFUND, $transaction, $invoice->company->db); if ($invoice->is_deleted) { $invoice->delete(); @@ -319,7 +319,7 @@ class RefundPayment 'metadata' => [], ]; - TransactionLog::dispatch(TransactionEvent::PAYMENT_REFUND, $transaction, $client->company->db); + // TransactionLog::dispatch(TransactionEvent::PAYMENT_REFUND, $transaction, $client->company->db); } else { //if we are refunding and no payments have been tagged, then we need to decrement the client->paid_to_date by the total refund amount. @@ -339,7 +339,7 @@ class RefundPayment 'metadata' => [], ]; - TransactionLog::dispatch(TransactionEvent::PAYMENT_REFUND, $transaction, $client->company->db); + // TransactionLog::dispatch(TransactionEvent::PAYMENT_REFUND, $transaction, $client->company->db); } return $this; diff --git a/app/Services/Payment/UpdateInvoicePayment.php b/app/Services/Payment/UpdateInvoicePayment.php index 5c170e93f557..ddc2fd03993e 100644 --- a/app/Services/Payment/UpdateInvoicePayment.php +++ b/app/Services/Payment/UpdateInvoicePayment.php @@ -119,7 +119,7 @@ class UpdateInvoicePayment 'metadata' => [], ]; - TransactionLog::dispatch(TransactionEvent::GATEWAY_PAYMENT_MADE, $transaction, $invoice->company->db); + // TransactionLog::dispatch(TransactionEvent::GATEWAY_PAYMENT_MADE, $transaction, $invoice->company->db); });