mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
Also replace variables in subject (#893)
This commit is contained in:
@ -443,7 +443,8 @@ class Invoice extends Model implements HasMedia
|
|||||||
$data['invoice'] = $this->toArray();
|
$data['invoice'] = $this->toArray();
|
||||||
$data['customer'] = $this->customer->toArray();
|
$data['customer'] = $this->customer->toArray();
|
||||||
$data['company'] = Company::find($this->company_id);
|
$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;
|
$data['attach']['data'] = ($this->getEmailAttachmentSetting()) ? $this->getPDFData() : null;
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
@ -635,7 +636,7 @@ class Invoice extends Model implements HasMedia
|
|||||||
return $this->getFormattedString($this->notes);
|
return $this->getFormattedString($this->notes);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getEmailBody($body)
|
public function getEmailString($body)
|
||||||
{
|
{
|
||||||
$values = array_merge($this->getFieldsArray(), $this->getExtraFields());
|
$values = array_merge($this->getFieldsArray(), $this->getExtraFields());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user