{% 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.due_date | timeuntil }}

{% else %}

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

{% endif %} {% if invoice.progressible %}

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

Is Progressible: {% 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 #} {% mark_as_paid invoice %}
{% 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 }}

{% if not invoice.is_past_due %}

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

{% else %}

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

{% endif %}

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

{% if invoice.progressible %}

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

{% else %}

Is Progressible: {% 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 #} {% mark_as_paid invoice %}
{% endif %} {% else %}
{% icon "ic:baseline-add-circle-outline" 48 %}

{% trans 'New Invoice' %}

{% endif %}