{# One customer account statement = one printed page. Envelope geometry (window positions in _wrap_document) is field-tuned to the #9 (9x4) double-window envelope. Rendered via frappe.render_template with context key `s` (see ns_app.api.statements.get_statement_data). #} {% set fmt = frappe.utils.fmt_money %}
| Invoice | Date | Due Date | Days Overdue | Aging | Outstanding |
|---|---|---|---|---|---|
| {{ inv.name }}{% if inv.is_late_fee %} late fee{% endif %} | {{ frappe.utils.formatdate(inv.posting_date, "MM-dd-yyyy") }} | {{ frappe.utils.formatdate(inv.due_date, "MM-dd-yyyy") }} | {{ inv.days_overdue if inv.days_overdue else "—" }} | {{ inv.aging_bucket }} | {{ fmt(inv.outstanding_amount, currency=s.currency) }} |
Total Due:{{ fmt(s.total_due, currency=s.currency) }}
| Current | 1–30 | 31–60 | 61–90 | 90+ |
|---|---|---|---|---|
| {{ fmt(s.aging["Current"], currency=s.currency) }} | {{ fmt(s.aging["1-30"], currency=s.currency) }} | {{ fmt(s.aging["31-60"], currency=s.currency) }} | {{ fmt(s.aging["61-90"], currency=s.currency) }} | {{ fmt(s.aging["90+"], currency=s.currency) }} |