{% extends "documents/base_document.html" %} {% load humanize %} {% block doc_title %}Invoice {{ invoice.invoice_number }}{% endblock %} {% block doc_type %}SALES INVOICE{% endblock %} {% block doc_number %}{{ invoice.invoice_number }}{% endblock %} {% block doc_dates %}
Date: {{ invoice.invoice_date|date:"F j, Y" }}
{% if invoice.due_date %}
Due: {{ invoice.due_date|date:"F j, Y" }}
{% else %}
Due: {{ invoice.get_payment_terms_display }}
{% endif %} {% endblock %} {% block order_details %} Sales Order #: {{ invoice.order.order_number }}
{% if invoice.order.customer_po_number %}Customer PO #: {{ invoice.order.customer_po_number }}
{% endif %} Terms: {{ invoice.get_payment_terms_display }}
{% if shipping_method %}Ship Via: {{ shipping_method }}{% endif %} {% endblock %} {% block totals_extra %}
Amount Paid ${{ totals.amount_paid|floatformat:2|intcomma }}
Balance Due ${{ totals.balance_due|floatformat:2|intcomma }}
{% endblock %} {% block status_banner %} {% if invoice.status == 'paid' %}
PAID IN FULL {% if invoice.paid_date %}— {{ invoice.paid_date|date:"F j, Y" }}{% if payment_method %} via {{ payment_method }}{% endif %}{% endif %}
{% elif invoice.status == 'partial' %}
PARTIALLY PAID — ${{ totals.balance_due|floatformat:2|intcomma }} REMAINING
{% elif invoice.status == 'overdue' %}
PAST DUE — ${{ totals.balance_due|floatformat:2|intcomma }} OUTSTANDING
{% elif invoice.status == 'sent' or invoice.status == 'viewed' %}
OPEN — ${{ totals.balance_due|floatformat:2|intcomma }} DUE
{% elif invoice.status == 'void' %}
VOID
{% elif invoice.status == 'cancelled' %}
CANCELED
{% elif invoice.status == 'draft' %}
DRAFT
{% endif %} {% endblock %} {% block payment_section %} {% if pay_url and invoice.balance_due > 0 %}
Pay Online
Choose ACH or credit card (3% convenience fee) at:
{{ pay_url }}
{% endif %} {% if invoice.payment_instructions and invoice.balance_due > 0 %}
Payment Instructions
{{ invoice.payment_instructions }}
{% endif %} {% endblock %}