# Accounting Templates {#accounting-templates}


Customize invoice, estimate, and receipt document templates.


## Overview {#overview}


Accounting templates let you customize the layout and branding of:

- Invoices
- Estimates / quotes
- Payment receipts


## Template System {#template-system}


Templates use **MJML** for email-safe HTML and **Handlebars** for data interpolation.


### MJML Template {#mjml-template}


```xml
<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-text>Invoice #{{invoiceNumber}}</mj-text>
        <mj-text>Date: {{invoiceDate}}</mj-text>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>
```


### Handlebars Variables {#handlebars-variables}


| Variable               | Description         |
| ---------------------- | ------------------- |
| `{{invoiceNumber}}`    | Invoice number      |
| `{{invoiceDate}}`      | Invoice date        |
| `{{dueDate}}`          | Payment due date    |
| `{{fromOrganization}}` | Sender organization |
| `{{toContact}}`        | Recipient contact   |
| `{{invoiceItems}}`     | Line items array    |
| `{{totalValue}}`       | Total amount        |
| `{{tax}}`              | Tax amount          |
| `{{discount}}`         | Discount applied    |


## Template Management {#template-management}


1. Go to **Settings** → **Accounting** → **Templates**
2. Select template type (Invoice/Estimate/Receipt)
3. Edit the MJML/Handlebars template
4. Preview with sample data
5. Save


## Related Pages {#related-pages}


- [Accounting Template Endpoints](https://sourcey-gauzy.pages.dev/api/accounting-template-endpoints/index.md) — API
- [Email Templates](https://sourcey-gauzy.pages.dev/features/email-templates/index.md) — email template system
- [Invoicing](https://sourcey-gauzy.pages.dev/features/invoicing/index.md) — invoicing feature
