From 946c7efab44ee4840e176234246d2e8b9ad4b18e Mon Sep 17 00:00:00 2001 From: Bram Date: Mon, 25 Apr 2022 14:32:21 +0200 Subject: [PATCH] Also replace variables in subject (#893) --- app/Models/Invoice.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index bef7c61c..39cd3165 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -443,7 +443,8 @@ class Invoice extends Model implements HasMedia $data['invoice'] = $this->toArray(); $data['customer'] = $this->customer->toArray(); $data['company'] = Company::find($this->company_id); - $data['body'] = $this->getEmailBody($data['body']); + $data['subject'] = $this->getEmailString($data['subject']); + $data['body'] = $this->getEmailString($data['body']); $data['attach']['data'] = ($this->getEmailAttachmentSetting()) ? $this->getPDFData() : null; return $data; @@ -635,7 +636,7 @@ class Invoice extends Model implements HasMedia return $this->getFormattedString($this->notes); } - public function getEmailBody($body) + public function getEmailString($body) { $values = array_merge($this->getFieldsArray(), $this->getExtraFields());