Templates
A template decides what an invoice or quote looks like. Click Templates in the sidebar to open the list. The installer adds two: Invoice (ID 1) and Quote (ID 2).

Which template is used
- New invoices use the Default invoice template and new quotes the Default quote template from the Options.
- You can choose another template for one invoice on its Details tab.
Make a copy before you change a template: select it and click Duplicate templates. Keep the original as a fallback.
Edit a template
The template editor needs the CodeMirror editor plugin. If it is disabled, JoomInvoice asks you to enable it in the plugin manager.
| Field or tab | What it is |
|---|---|
| Name | The name in the template lists. |
| Company logo | Click Select to upload a JPG, PNG, GIF or SVG file. It is saved in media/com_joominvoice/. Show it with <img src="/{company_logo}" width="200">. |
| Online version | The HTML of the invoice page on your site. |
| PDF version | The HTML of the PDF. Leave it empty to use the online version. |
| E-mail version | The HTML of the email body. Leave it empty to use the online version. |
| Styles for PDF and email | CSS for the PDF and email versions. |
Placeholders
Placeholders in curly braces are replaced by the invoice data. Click Available tokens in the editor to see the full list. The most used ones:
| Placeholder | Shows |
|---|---|
{invoice_num} |
Invoice or quote number |
{invoice_date}, {invoice_duedate} |
Date and due date |
{status} |
Status label |
{external_ref} |
Source ref. of the invoice |
{notes} |
Notes for the client |
{to_name}, {to_company}, {to_address}, {to_zipcode}, {to_city}, {to_state}, {to_country}, {to_email}, {to_phone}, {to_vatid} |
Recipient |
{from_name}, {from_address}, {from_num}, {from_email}, {from_phone}, {from_url} |
Your company |
{subtotal}, {discount}, {total} |
Subtotal, invoice discount and total |
{subtotal_items}, {subtotal_items_no_discount}, {subtotal_items_less_total_discount}, {total_items_tax}, {total_items_discount} |
Totals of the lines |
{total_payments}, {amount_outstanding} |
Amount paid and amount still to pay |
{num_payments_received}, {num_pending_payments} |
Number of paid and unpaid payments |
{paynow_button} |
A Pay now button for the first unpaid payment |
{payment_qr}, {invoice_qr} |
QR codes for the payment page and the online invoice, see PDF |
{invoice_link} |
Link to the invoice for logged-in clients |
{invoice_unlogged_link} |
Link with the secret code, for clients without an account |
{accept_button}, {reject_button} |
Quote buttons, see Quotes |
{company_logo} |
Address of the logo image |
Placeholders the template does not know are removed from the output.
Repeating blocks
Some parts repeat for each line, tax or payment. They sit between paired markers in the HTML. Do not delete the markers, or the block stops working.
| Markers | Repeats for | Placeholders inside |
|---|---|---|
<!--ITEMS--> ... <!--/ITEMS--> |
Each line | {sku}, {name}, {desc}, {long_desc}, {value}, {amount} (quantity), {discount}, {tax}, {tax_name}, {item_tax_value}, {item_with_tax}, {item_subtotal_no_discount}, {item_subtotal}, {item_total} |
<!--TAXES--> ... <!--/TAXES--> |
Each tax applied to the whole invoice | {name}, {tax_value}, {value} |
<!--GROUPED_TAXES--> ... <!--/GROUPED_TAXES--> |
Line taxes, grouped by tax and rate | {name}, {tax_value}, {calculated_on_amount}, {value} |
<!--GROUPED_TAXES_TOTAL--> ... <!--/GROUPED_TAXES_TOTAL--> |
Line taxes, one total per tax | {name}, {value} |
<!--PAYMENTS--> ... <!--/PAYMENTS--> |
Each paid payment | {payment_datetime}, {description}, {payment_status}, {amount} |
<!--PAYMENTS2--> ... <!--/PAYMENTS2--> |
Each unpaid payment | {duedate}, {description}, {payment_status}, {payment_link}, {amount} |
You only need the tax blocks that match how you charge tax. See Taxes.
Translatable labels
Write [[KEY]] to put a translated label in the template, for example [[INVOICE_NUM]], [[BILL_TO]] or [[TOTAL]]. JoomInvoice looks the key up in the language of the invoice, set on its Details tab. English, French and Spanish labels are included.
To add your own label, add a line such as MY_TERMS="Payment within 14 days" with System > Language Overrides, once for Site and once for Administrator so that emails and PDFs made in the administrator use it too. Then write [[MY_TERMS]] in the template.
Tips
- Keep the PDF version simple: tables for layout, inline styles, and fixed widths on images and columns. See PDF.
- Test with PDF and Send on a test invoice after each change.
- Show editor for template editing in the Options turns on Joomla's WYSIWYG editor for templates. The plain code editor is safer, because a WYSIWYG editor can change the HTML and remove the markers.