mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Set text_body cleanly and don't reference existing reference
This commit is contained in:
parent
f09d90aa27
commit
a286d8ae7b
@ -169,7 +169,7 @@ class InvoiceItemSum
|
|||||||
|
|
||||||
private function shouldCalculateTax(): self
|
private function shouldCalculateTax(): self
|
||||||
{
|
{
|
||||||
//
|
|
||||||
if (!$this->invoice->company->calculate_taxes || !$this->invoice->company->account->isFreeHostedClient()) {
|
if (!$this->invoice->company->calculate_taxes || !$this->invoice->company->account->isFreeHostedClient()) {
|
||||||
$this->calc_tax = false;
|
$this->calc_tax = false;
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -180,6 +180,8 @@ class EmailDefaults
|
|||||||
$this->email->email_object->body = EmailTemplateDefaults::getDefaultTemplate($this->email->email_object->email_template_body, $this->locale);
|
$this->email->email_object->body = EmailTemplateDefaults::getDefaultTemplate($this->email->email_object->email_template_body, $this->locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->email->email_object->text_body = strip_tags($this->email->email_object->body);
|
||||||
|
|
||||||
if ($this->template == 'email.template.custom') {
|
if ($this->template == 'email.template.custom') {
|
||||||
$this->email->email_object->body = (str_replace('$body', $this->email->email_object->body, str_replace(["\r","\n"], "", $this->email->email_object->settings->email_style_custom)));
|
$this->email->email_object->body = (str_replace('$body', $this->email->email_object->body, str_replace(["\r","\n"], "", $this->email->email_object->settings->email_style_custom)));
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ class EmailMailable extends Mailable
|
|||||||
view: $this->email_object->html_template,
|
view: $this->email_object->html_template,
|
||||||
text: $this->email_object->text_template,
|
text: $this->email_object->text_template,
|
||||||
with: [
|
with: [
|
||||||
'text_body' => strip_tags($this->email_object->body), //@todo this is a bit hacky here.
|
'text_body' => $this->email_object->text_body, //@todo this is a bit hacky here.
|
||||||
'body' => $this->email_object->body,
|
'body' => $this->email_object->body,
|
||||||
'settings' => $this->email_object->settings,
|
'settings' => $this->email_object->settings,
|
||||||
'whitelabel' => $this->email_object->whitelabel,
|
'whitelabel' => $this->email_object->whitelabel,
|
||||||
|
@ -50,6 +50,8 @@ class EmailObject
|
|||||||
|
|
||||||
public ?string $body = null;
|
public ?string $body = null;
|
||||||
|
|
||||||
|
public string $text_body = '';
|
||||||
|
|
||||||
/** @var array{key: value} $args */
|
/** @var array{key: value} $args */
|
||||||
public array $attachments = [];
|
public array $attachments = [];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user