Support po number and terms/notes in email templates

This commit is contained in:
Hillel Coren 2018-11-09 09:22:48 +02:00
parent 6a5dcbd60e
commit 2a1ec27d47
2 changed files with 9 additions and 0 deletions

View file

@ -68,6 +68,9 @@ class TemplateService
'$quote' => $invoice->invoice_number,
'$number' => $invoice->invoice_number,
'$partial' => $invoice->present()->partial,
'$poNumber' => $invoice->po_number,
'$terms' => $invoice->terms,
'$notes' => $invoice->public_notes,
'$link' => $invitation->getLink(),
'$password' => $passwordHTML,
'$viewLink' => $invitation->getLink().'$password',

View file

@ -40,6 +40,9 @@
'quote': invoice ? invoice.invoice_number : '0001',
'number': invoice ? invoice.invoice_number : '0001',
'password': passwordHtml,
'poNumber': invoice ? invoice.po_number : '123456',
'terms': invoice ? invoice.terms : "{{ trans('texts.terms') }}",
'notes': invoice ? invoice.public_notes: "{{ trans('texts.notes') }}",
'documents': documentsHtml,
'viewLink': '{{ link_to('#', auth()->user()->account->getBaseUrl() . '/...') }}$password',
'viewButton': viewButton,
@ -120,6 +123,9 @@
'partial',
'invoiceDate',
'dueDate',
'poNumber',
'terms',
'notes',
'documents',
] as $field)
<li>${{ $field }}</li>