mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 04:14:34 -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 (iconv_strlen($subject_template) == 0) {
|
||||||
if ($reminder_template == 'quote') {
|
if ($reminder_template == 'quote') {
|
||||||
$subject_template = trans(
|
$subject_template = trans(
|
||||||
'texts.invoice_subject',
|
'texts.quote_subject',
|
||||||
[
|
[
|
||||||
'invoice' => $invoice->present()->invoice_number(),
|
'number' => $invoice->number,
|
||||||
'account' => $invoice->company->present()->name()
|
'account' => $invoice->company->present()->name()
|
||||||
],
|
],
|
||||||
null,
|
null,
|
||||||
@ -55,9 +55,9 @@ class InvoiceEmail extends EmailBuilder
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$subject_template = trans(
|
$subject_template = trans(
|
||||||
'texts.reminder_subject',
|
'texts.invoice_subject',
|
||||||
[
|
[
|
||||||
'invoice' => $invoice->present()->invoice_number(),
|
'number' => $invoice->number,
|
||||||
'account' => $invoice->company->present()->name()
|
'account' => $invoice->company->present()->name()
|
||||||
],
|
],
|
||||||
null,
|
null,
|
||||||
|
@ -62,7 +62,8 @@ class TriggeredActions extends AbstractService
|
|||||||
private function sendEmail()
|
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){
|
$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;
|
$client = $this->client;
|
||||||
|
|
||||||
//if the invoice
|
//if the invoice
|
||||||
if($this->balance == 0){
|
if ($client->getSetting('enable_reminder1') !== false && $this->inReminderWindow(
|
||||||
return 'invoice';
|
|
||||||
}elseif ($client->getSetting('enable_reminder1') !== false && $this->inReminderWindow(
|
|
||||||
$client->getSetting('schedule_reminder1'),
|
$client->getSetting('schedule_reminder1'),
|
||||||
$client->getSetting('num_days_reminder1')
|
$client->getSetting('num_days_reminder1')
|
||||||
)) {
|
)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user