{% extends "core/base.html" %} {% block title %}Invoice {{ inv.invoice_no }}{% endblock %} {% block content %}

Invoice {{ inv.invoice_no }} {{ inv.get_status_display }}

{{ inv.vendor.name }} · {{ inv.invoice_date }} (due {{ inv.due_date }}) · PO {{ inv.po.number|default:"none" }} · {{ inv.currency }} {{ inv.subtotal }} + tax {{ inv.tax_total }} = {{ inv.total }} {% if inv.payment_hold %}· payment hold: {{ inv.hold_reason }}{% endif %}

{% csrf_token %}
{% csrf_token %}

PO lines {% if inv.po %}{{ inv.po.number }}{% endif %}

{% for r in po_rows %}
{{ r.pl.line_no }} {{ r.pl.description }}
{{ r.pl.qty|floatformat:"-3" }} {{ r.pl.uom }} @ {{ r.pl.unit_price|floatformat:2 }} · {{ r.pl.get_match_type_display }} {% if r.inv %}
↔ invoice line {{ r.inv.line_no }}{% endif %}
{% empty %}

No PO.

{% endfor %}

Goods receipts

{% for r in grn_rows %}
{{ r.g.grn.number }} {{ r.g.grn.date }}
PO line {{ r.pl.line_no }}: accepted {{ r.g.accepted_qty|floatformat:"-3" }} {{ r.pl.uom }}{% if r.g.rejected_qty %} ({{ r.g.rejected_qty|floatformat:"-3" }} rejected){% endif %} · invoiced {{ r.invoiced|floatformat:"-3" }}{% if r.mine %} (this invoice {{ r.mine|floatformat:"-3" }}){% endif %}
{% empty %}

No receipts.

{% endfor %}

Invoice lines

{% for l in lines %}
{{ l.line_no }} {{ l.description }}{% if l.line_type == "freight" %} charge{% endif %}
{{ l.qty|floatformat:"-3" }} {{ l.uom }} @ {{ l.unit_price|floatformat:2 }} = {{ l.net }} · tax {{ l.tax_amount }}
{% if l.match.po_line %}↔ {{ l.match.po_line }} ({{ l.match.method }}, score {{ l.match.score|floatformat:2 }}) · price {{ l.match.price_var_pct }}% · qty over {{ l.match.qty_over|floatformat:"-3" }} of available {{ l.match.qty_available|floatformat:"-3" }} {% else %}no PO line matched{% endif %} {% for e in l.exceptions.all %}
{{ e.get_type_display }} {{ e.get_state_display }}
{% endfor %} {% if po_lines %}
{% csrf_token %}
{% endif %}
{% endfor %}

Exceptions

{% for e in exceptions %} {% empty %}{% endfor %}
#TypeSeverityDetailAssigneeState
{{ e.pk }}{{ e.get_type_display }}{{ e.severity }}{{ e.detail }}{{ e.get_assignee_role_display }}{{ e.get_state_display }}
No exceptions: matched within tolerance.
{% endblock %}