{% extends "base.html" %} {% block title %}Invoice #{{ invoice.id }} · InvoiceGuard{% endblock %} {% block content %} ← All invoices

Invoice #{{ invoice.id }}

{{ invoice.status }}{% if invoice.paid_late %} · late{% endif %}
Client
{{ invoice.client_name }}{% if invoice.client_email %} {{ invoice.client_email }}{% endif %}
{% if invoice.freelancer_name %}
Freelancer
{{ invoice.freelancer_name }}
{% endif %}
Project
{{ invoice.project_title }}
Kind
{{ invoice.kind }}
Amount
{{ fmt(invoice.amount_cents, invoice.currency) }}
Paid so far
{{ fmt(invoice.paid_cents, invoice.currency) }}
Outstanding
{{ fmt(invoice.outstanding_cents, invoice.currency) }}
Due date
{{ invoice.due_date[:10] if invoice.due_date else "—" }}{% if invoice.days_overdue %} {{ invoice.days_overdue }}d overdue{% endif %}
Sent
{{ invoice.sent_at[:10] if invoice.sent_at else "—" }}
Paid in full on
{{ invoice.paid_at[:10] if invoice.paid_at else "—" }}
Escalation stage
{% if invoice.stage %}{{ stage_display[invoice.stage] }}{% else %}none{% endif %}
{% if invoice.stripe_url and invoice.status in ('sent', 'overdue', 'partially-paid') %}
Payment link
Open Stripe checkout
{% endif %}

Contract & terms

Acknowledged
{% if invoice.contract_ack %}✓ acknowledged{% if invoice.contract_ack_at %} {{ invoice.contract_ack_at[:10] }}{% endif %} {% else %}✗ not acknowledged{% endif %}
Deposit
{{ invoice.deposit_pct }}%
Late fee
{{ invoice.late_fee_pct }}% after {{ invoice.late_fee_grace_days }}-day grace
Accrued late fees
{% if late.fees_cents %}{{ fmt(late.fees_cents, invoice.currency) }} ({{ late.months }} mo @ {{ late.rate_pct }}%/mo, from {{ late.accrual_start }}) {% else %}none accruing{% endif %}
Total with fees
{{ fmt(late.total_cents, invoice.currency) }}
Project value
{{ fmt(invoice.project_amount_cents, invoice.project_currency) }}

Payments

{% if payments %} {% for p in payments %} {% endfor %}
DateAmountMethodNote
{{ p.paid_at[:10] }} {{ fmt(p.amount_cents, invoice.currency) }} {{ p.method }} {{ p.note or "—" }}

Recorded from the CLI (`invoiceguard invoice record-payment {{ invoice.id }} --amount …`), `mark-paid`, or the Stripe webhook.

{% else %}

No payments recorded yet.

{% endif %}

Timeline

{% if timeline %}
    {% for t in timeline %}
  1. {{ t.label }}{{ t.at[:10] if t.at|length > 10 else t.at }}
  2. {% endfor %}
{% else %}

No events yet — this invoice is still a draft.

{% endif %}
{% endblock %}