1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

Payment notifications for online payments to the client

This commit is contained in:
David Bomba 2021-01-18 08:31:49 +11:00
parent 2e49776d75
commit a33c781919
3 changed files with 5 additions and 8 deletions

View File

@ -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();

View File

@ -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;
}

View File

@ -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()));