I am only just getting around to setting up email for my sales invoices and I’m sorry if this question has been answered many times before…
I have seen that I can put {{reference}} in the template title and body but I would also like to be able put in the invoice date, total amount and invoice due date. Something like
Please find attached sales invoice number {{reference}} dated {{issue date}} for£{{invoice total}} due for payment on or before {{due date}}
I have spent the last hour searching the forum and can’t find the answer. Can someone point me in the right direction please.
In general, you need to look at the code for a theme to see how variables are named. Many variables, however, are arrays (including the totals variable). So you need to identify which element of the array is to be displayed. And that can change, depending on tax codes, tax inclusivity/exclusivity, discounts offered, rounding options, partial payments received, etc. In my opinion, the effort of adding such obvious information, already available on the invoice itself, is not worth it. Your customer’s accounting department is not going to consider information from the email. They will look at the invoice itself.
Thanks @Mark I found @Sharpdrivetek’s post and with a bit of fiddling around I now have the following working. I am not sure how show the HTML code for LTbrGT = break without it activating in this message so I have typed |break| instead.
Greetings {{ recipient.name }} |break| |break|
Please find attached {{business.name}} invoice number {{reference}} dated
{% for field in fields %}{% if field.label == ‘Invoice date’ %}{{ field.text }}{% endif %}{% endfor %}.
|break| |break|
The Invoice value is
{% for total in table.totals %}{% if total.label == ‘Total’ %}{{ total.text }}{% endif %}{% endfor %}
and is due for payment on or before
{% for field in fields %}{% if field.label == ‘Due date’ %}{{ field.text }}{% endif %}{% endfor %}.
|break| |break|
Thank you |break| |break|
Alan |break|
-----------------------------|break|
Alan Budden|break|
MyEmailAddress|break|
MyTelNumber|break|
----------------------------- |break|
and I have just notice that LTbGT LT/bGT switch bold on and off
The Invoice value is
{% for total in table.totals %}{% if total.label == ‘Total’ %}<b>{{ total.text }}</b>
{% endif %}{% endfor %}
and is due for payment on or before <b> {{ fields[“Due date”] }}</b>. <br><br>
Thank you <br><br>
Alan <br>
----------------------------- <br>
Me <br>
MyEmailAddress <br>
MyTelNumber <br>
----------------------------- <br>