1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Add option to send payment email when invoice has been marked as paid

This commit is contained in:
David Bomba 2022-09-02 20:43:35 +10:00
parent 0187e7408f
commit 0934925071
2 changed files with 7 additions and 1 deletions

View File

@ -436,9 +436,12 @@ class CompanySettings extends BaseSettings
public $auto_archive_invoice_cancelled = false;
public $vendor_portal_enable_uploads=false;
public $vendor_portal_enable_uploads = false;
public $send_email_on_mark_paid = false;
public static $casts = [
'send_email_on_mark_paid' => 'bool',
'vendor_portal_enable_uploads' => 'bool',
'besr_id' => 'string',
'qr_iban' => 'string',

View File

@ -92,6 +92,9 @@ class MarkPaid extends AbstractService
$payment->service()->applyNumber()->save();
if($payment->company->getSetting('send_email_on_mark_paid'))
$payment->service()->sendEmail();
$this->setExchangeRate($payment);
/* Create a payment relationship to the invoice entity */