{% load django_ledger %} {% load i18n %} {% if not create_invoice %} {% if style == 'dashboard' %}

{% icon "bi:cash-stack" 16 %} {% trans 'Invoice' %}

{{ invoice.customer.customer_name }}

{{ invoice.customer.address_1 }}

{% if not invoice.is_past_due %}

Due in: {{ invoice.date_due | timeuntil }}

{% else %}

Past Due: {{ invoice.date_due | timesince }} ago

{% endif %} {% if invoice.accrue %}

Accrue: {% icon 'ant-design:check-circle-filled' 24 %} {% else %}

Accrue: {% icon 'maki:roadblock-11' 24 %} {% endif %}

Owed to You: {% currency_symbol %}{{ invoice.get_amount_open | currency_format }}

Amount Paid: {% currency_symbol %}{{ invoice.amount_paid | currency_format }}

Progressed: {{ invoice.get_progress | percentage }}


{{ invoice.get_progress | percentage }} {# MARK AS PAID MODAL #} {# {% modal_action invoice 'get' entity_slug %}#}
{% elif style == 'invoice-detail' %}

{% icon 'uil:bill' 36 %} {% trans 'Invoice Info' %}

{% if invoice.paid %}

Is Paid {% icon 'ant-design:check-circle-filled' 48 %}

Amount Paid: {% currency_symbol %}{{ invoice.amount_paid | currency_format }}

{% else %}

Invoice Amount: {% currency_symbol %}{{ invoice.amount_due | currency_format }}

Invoice Status: {{ invoice.get_invoice_status_display }}

{% if not invoice.is_past_due %}

Due in: {{ invoice.date_due | timeuntil }}

{% else %}

Past Due: {{ invoice.date_due | timesince }} ago

{% endif %}

Owed to You: {% currency_symbol %}{{ invoice.get_amount_open | currency_format }}

{% if invoice.accrue %}

Accrue: {% icon 'ant-design:check-circle-filled' 24 %}

{% else %}

Accrue: {% icon 'maki:roadblock-11' 24 %}

{% endif %}

Amount Paid: {% currency_symbol %}{{ invoice.amount_paid | currency_format }}

Progressed: {{ invoice.get_progress_percent }}%


{{ invoice.get_progress | percentage }} {% endif %} {# MARK AS PAID MODAL #} {# {% modal_action invoice 'get' entity_slug %}#}
{% endif %} {% else %}
{% icon "ic:baseline-add-circle-outline" 48 %}

{% trans 'New Invoice' %}

{% endif %}