diff --git a/app/PaymentDrivers/BaseDriver.php b/app/PaymentDrivers/BaseDriver.php index d99ca01a11c0..87c2f85aaa27 100644 --- a/app/PaymentDrivers/BaseDriver.php +++ b/app/PaymentDrivers/BaseDriver.php @@ -228,6 +228,9 @@ class BaseDriver extends AbstractPaymentDriver $payment->service()->updateInvoicePayment($this->payment_hash); + if ($this->client->getSetting('client_online_payment_notification')) + $payment->service()->sendEmail(); + event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars())); return $payment->service()->applyNumber()->save(); diff --git a/app/Services/Invoice/InvoiceService.php b/app/Services/Invoice/InvoiceService.php index 603bb30dc269..7b9fc1a13b3c 100644 --- a/app/Services/Invoice/InvoiceService.php +++ b/app/Services/Invoice/InvoiceService.php @@ -375,11 +375,6 @@ class InvoiceService if (!isset($this->invoice->terms)) { $this->invoice->terms = $settings->invoice_terms; } - - if(!isset($this->invoice->public_notes)) { - $this->invoice->public_notes = $settings->public_notes; - } - return $this; } diff --git a/app/Services/Invoice/MarkPaid.php b/app/Services/Invoice/MarkPaid.php index 67810c3d8800..2800e673660d 100644 --- a/app/Services/Invoice/MarkPaid.php +++ b/app/Services/Invoice/MarkPaid.php @@ -74,9 +74,8 @@ class MarkPaid extends AbstractService ->applyNumber() ->save(); - if ($this->invoice->client->getSetting('client_manual_payment_notification')) { - EmailPayment::dispatch($payment, $payment->company, $payment->client->primary_contact()->first()); - } + if ($this->invoice->client->getSetting('client_manual_payment_notification')) + $payment->service()->sendEmail(); /* Update Invoice balance */ event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars()));