{% extends "contracts/base.html" %}{% load rr %}{% block title %}{{ contract.number }}{% endblock %}
{% block content %}
{{ contract.number }} {{ contract.customer }} · {{ contract.customer.get_region_display }}
{{ contract.description }} · {{ contract.start|date:"Y-m-d" }} → {{ contract.end|date:"Y-m-d" }} · {{ contract.currency }}{% if contract.parent %} · separate contract from {{ contract.parent.number }}{% endif %}
Modify contract
Billed to date{{ billed|money }}
Recognised to date{{ recognized|money }}
{% if net >= 0 %}Contract asset{% else %}Contract liability{% endif %}{{ net_abs|money }}
As of{{ asof|date:"Y-m-d" }}
{% if chart %}
Cumulative billing vs revenue
Billing Revenue — gap above the revenue line is deferred revenue, below it is a contract asset.
{% endif %}
Performance obligations & allocation
| PO | Description | Pattern | Term | Stated | SSP | SSP basis | Recognised before prospective mod | Allocated (total) |
{% for po in obligations %}| {{ po.key }} | {{ po.name }} | {{ po.get_pattern_display }} | {{ po.start|date:"Y-m-d" }} → {{ po.end|date:"Y-m-d" }} |
{{ po.allocation.stated_price|money }} | {{ po.allocation.ssp|money }} | {{ po.allocation.ssp_source }} | {{ po.allocation.recognized_before_mod|money }} | {{ po.allocation.allocated|money }} |
{% endfor %}
Lines
| Line | Product | Qty | Unit price | Amount | Term | PO | Added by |
{% for l in lines %}| {{ l.key }} | {{ l.product.name }} | {{ l.quantity|floatformat:-2 }} | {{ l.unit_price|money }} | {{ l.amount|money }} | {{ l.start|date:"Y-m-d" }} → {{ l.end|date:"Y-m-d" }} | {{ l.po_group }} | {% if l.modification %}mod {{ l.modification.effective_date|date:"Y-m-d" }}{% endif %} |
{% endfor %}
{% if contract.discount %}Contract discount: {{ contract.discount|money }}
{% endif %}
Revenue schedule
{% for year, ms in years.items %}
{{ year }}
{% endfor %}
{% if mods %}Modifications
| Effective | Description | Treatment | Suggested | Consideration change | Catch-up | Reasoning |
{% for m in mods %}| {{ m.effective_date|date:"Y-m-d" }} | {{ m.description }}{% if m.new_contract %} → {{ m.new_contract.number }}{% endif %} | {{ m.get_kind_display }} | {{ m.get_suggested_kind_display }} | {{ m.consideration_change|money }} | {{ m.impact.catch_up|money }} | {{ m.reasoning }} |
{% endfor %}
{% endif %}
Invoices
| Number | Date | Amount | Memo |
{% for i in invoices %}| {{ i.number }} | {{ i.date|date:"Y-m-d" }} | {{ i.amount|money }} | {{ i.memo }} |
{% empty %}| No invoices |
{% endfor %}
Variable consideration
| Name | As of | Method | Scenarios | Estimate | Included (constrained) | PO |
{% for v in vc %}| {{ v.name }} | {{ v.as_of|date:"Y-m-d" }} | {{ v.get_method_display }} | {% for s in v.scenarios %}{{ s.0 }} @ {{ s.1 }}{% if not forloop.last %}, {% endif %}{% endfor %} | {{ v.estimate|money }} | {{ v.constrained|money }} | {{ v.target_po|default:"all" }} |
{% empty %}| None |
{% endfor %}
{% if has_usage %}
Usage
| Line | Date | Quantity |
{% for u in usage %}| L{{ u.line_id }} | {{ u.date|date:"Y-m-d" }} | {{ u.quantity|floatformat:-2 }} |
{% endfor %}
{% endif %}
{% if has_milestone %}
Milestones / % complete
| Line | Date | Milestone | % complete | Cost to date | Est. total cost |
{% for m in milestones %}| L{{ m.line_id }} | {{ m.date|date:"Y-m-d" }} | {{ m.name }} | {% widthratio m.progress 1 100 %}% | {{ m.cost_to_date|money }} | {{ m.estimated_total_cost|money }} |
{% endfor %}
{% endif %}
{% endblock %}