mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fix for paid invoice emails
This commit is contained in:
parent
018340cd03
commit
cab6f313fe
@ -45,9 +45,9 @@ class InvoiceEmail extends EmailBuilder
|
||||
if (iconv_strlen($subject_template) == 0) {
|
||||
if ($reminder_template == 'quote') {
|
||||
$subject_template = trans(
|
||||
'texts.invoice_subject',
|
||||
'texts.quote_subject',
|
||||
[
|
||||
'invoice' => $invoice->present()->invoice_number(),
|
||||
'number' => $invoice->number,
|
||||
'account' => $invoice->company->present()->name()
|
||||
],
|
||||
null,
|
||||
@ -55,9 +55,9 @@ class InvoiceEmail extends EmailBuilder
|
||||
);
|
||||
} else {
|
||||
$subject_template = trans(
|
||||
'texts.reminder_subject',
|
||||
'texts.invoice_subject',
|
||||
[
|
||||
'invoice' => $invoice->present()->invoice_number(),
|
||||
'number' => $invoice->number,
|
||||
'account' => $invoice->company->present()->name()
|
||||
],
|
||||
null,
|
||||
|
@ -62,7 +62,8 @@ class TriggeredActions extends AbstractService
|
||||
private function sendEmail()
|
||||
{
|
||||
|
||||
$reminder_template = $this->invoice->calculateTemplate();
|
||||
//$reminder_template = $this->invoice->calculateTemplate();
|
||||
$reminder_template = 'payment';
|
||||
|
||||
$this->invoice->invitations->load('contact.client.country','invoice.client.country','invoice.company')->each(function ($invitation) use($reminder_template){
|
||||
|
||||
|
@ -189,9 +189,7 @@ trait MakesReminders
|
||||
$client = $this->client;
|
||||
|
||||
//if the invoice
|
||||
if($this->balance == 0){
|
||||
return 'invoice';
|
||||
}elseif ($client->getSetting('enable_reminder1') !== false && $this->inReminderWindow(
|
||||
if ($client->getSetting('enable_reminder1') !== false && $this->inReminderWindow(
|
||||
$client->getSetting('schedule_reminder1'),
|
||||
$client->getSetting('num_days_reminder1')
|
||||
)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user