mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Add and email variables
This commit is contained in:
parent
72db373a41
commit
e8437a9bbd
@ -29,6 +29,14 @@ class InvoicePresenter extends EntityPresenter
|
||||
return $account->formatMoney($invoice->amount, $invoice->client);
|
||||
}
|
||||
|
||||
public function balance()
|
||||
{
|
||||
$invoice = $this->entity;
|
||||
$account = $invoice->account;
|
||||
|
||||
return $account->formatMoney($invoice->balance, $invoice->client);
|
||||
}
|
||||
|
||||
public function requestedAmount()
|
||||
{
|
||||
$invoice = $this->entity;
|
||||
|
@ -55,6 +55,8 @@ class TemplateService
|
||||
'$contact' => $contact->getDisplayName(),
|
||||
'$firstName' => $contact->first_name,
|
||||
'$amount' => $account->formatMoney($data['amount'], $client),
|
||||
'$total' => $invoice->present()->amount,
|
||||
'$balance' => $invoice->present()->balance,
|
||||
'$invoice' => $invoice->invoice_number,
|
||||
'$quote' => $invoice->invoice_number,
|
||||
'$link' => $invitation->getLink(),
|
||||
|
@ -21,6 +21,8 @@
|
||||
'invoiceDate': invoice ? invoice.invoice_date : "{{ $account->formatDate($account->getDateTime()) }}",
|
||||
'client': invoice ? getClientDisplayName(invoice.client) : "{{ trans('texts.client_name') }}",
|
||||
'amount': invoice ? formatMoneyInvoice(parseFloat(invoice.partial) || parseFloat(invoice.balance_amount), invoice) : formatMoneyAccount(100, account),
|
||||
'balance': invoice ? formatMoneyInvoice(parseFloat(invoice.balance), invoice) : formatMoneyAccount(100, account),
|
||||
'total': invoice ? formatMoneyInvoice(parseFloat(invoice.amount), invoice) : formatMoneyAccount(100, account),
|
||||
'contact': invoice ? getContactDisplayName(invoice.client.contacts[0]) : 'Contact Name',
|
||||
'firstName': invoice ? invoice.client.contacts[0].first_name : 'First Name',
|
||||
'invoice': invoice ? invoice.invoice_number : '0001',
|
||||
@ -111,6 +113,8 @@
|
||||
'invoice',
|
||||
'quote',
|
||||
'amount',
|
||||
'total',
|
||||
'balance',
|
||||
'invoiceDate',
|
||||
'dueDate',
|
||||
'documents',
|
||||
|
Loading…
Reference in New Issue
Block a user