{{ merchant.name or "Merchant" }}

{% if merchant.email %}

{{ merchant.email }}

{% endif %} {% if merchant.phone %}

{{ merchant.phone }}

{% endif %}
{{ invoice.invoice_literal or invoice.invoice_id }}
{{ invoice.status_text or "Invoice" }}

Bill To

{% if customer %} {% if customer.business_legal_name %}

{{ customer.business_legal_name }}

{% elif customer.first_name or customer.last_name %}

{{ (customer.first_name or "") ~ " " ~ (customer.last_name or "") }}

{% endif %} {% if customer.email %}

{{ customer.email }}

{% endif %} {% if customer.phone %}

{{ customer.phone }}

{% endif %} {% else %}

{% endif %}

Invoice Details

Invoice #: {{ invoice.invoice_literal or "—" }}

{% if invoice.reference %}

Ref: {{ invoice.reference }}

{% endif %}
Issue Date
{% if invoice.billing_date %}{{ invoice.billing_date.strftime("%B %d, %Y") }}{% else %}—{% endif %}
Due Date
{% if invoice.due_date %}{{ invoice.due_date.strftime("%B %d, %Y") }}{% else %}—{% endif %}
Amount Due
${{ "%.2f"|format(invoice.amount or 0) }}
{% for item in line_items %} {% else %} {% endfor %}
Description Qty Unit Price Tax Total
{{ item.title or "Item" }} {% if item.description %}
{{ item.description }} {% endif %}
{{ item.quantity or 1 }} ${{ "%.2f"|format((item.unit_price or 0)) }} {% if item.tax %}${{ "%.2f"|format(item.tax) }}{% else %}—{% endif %} ${{ "%.2f"|format((item.unit_price or 0) * (item.quantity or 1)) }}
No line items
{% set subtotal = namespace(value=0) %} {% for item in line_items %} {% set subtotal.value = subtotal.value + (item.unit_price or 0) * (item.quantity or 1) %} {% endfor %} {% if invoice.tax_fee and invoice.tax_fee > 0 %} {% endif %} {% if invoice.shipping_fee and invoice.shipping_fee > 0 %} {% endif %} {% if invoice.discount and invoice.discount > 0 %} {% endif %} {% if invoice.surcharge and invoice.surcharge > 0 %} {% endif %} {% if invoice.paid_amount and invoice.paid_amount > 0 %} {% endif %}
Subtotal ${{ "%.2f"|format(subtotal.value) }}
Tax ${{ "%.2f"|format(invoice.tax_fee) }}
Shipping ${{ "%.2f"|format(invoice.shipping_fee) }}
Discount -${{ "%.2f"|format(invoice.discount) }}
Surcharge ${{ "%.2f"|format(invoice.surcharge) }}
TOTAL ${{ "%.2f"|format(invoice.amount or 0) }}
Paid -${{ "%.2f"|format(invoice.paid_amount) }}
Balance Due ${{ "%.2f"|format([invoice.amount - invoice.paid_amount, 0]|max) }}
{% if invoice.comments %}

Notes

{{ invoice.comments }}

{% endif %}