{% extends "portal_base.html" %} {% set active = 'dashboard' %} {% block title %}Übersicht{% endblock %} {% block breadcrumb %}
Kunden-Portal · Übersicht
{% endblock %} {% block heading %}Willkommen, {{ customer.contact_name or customer.name }}{% endblock %} {% block content %} {% if request.query_params.get('sent') %}Hier sehen Sie Ihre aktuellen Aufträge, offenen Rechnungen und können neue Anfragen stellen.
{# ---------- KPI-Reihe (gleiche Optik wie Admin-Dashboard) ---------- #}{{ orders|length }} Auftrag{% if orders|length != 1 %}{% endif %} · neueste zuerst
| Auftrag | Datum | Status | Liefertermin | Betrag |
|---|---|---|---|---|
|
{{ o.order_no }}
{% if o.customer_reference %} Ihre Nr: {{ o.customer_reference }} {% endif %}
|
{{ o.order_date }} | {% set sc = 'amber' %} {% if o.status in ['delivered','completed'] %}{% set sc = 'emerald' %}{% endif %} {% if o.status == 'cancelled' %}{% set sc = 'red' %}{% endif %} {% if o.status in ['in_production','released'] %}{% set sc = 'blue' %}{% endif %} {{ o.status }} | {{ o.due_date or '—' }} | {{ "{:,.2f}".format(o.total_gross or 0).replace(",","X").replace(".",",").replace("X",".") }} {{ o.currency or 'EUR' }} |
{{ invoices|length }} Rechnung{% if invoices|length != 1 %}en{% endif %}
| Rechnung | Datum | Fällig | Status | Brutto | Offen | |
|---|---|---|---|---|---|---|
| {{ i.invoice_no }} | {{ i.issue_date }} | {{ i.due_date or '—' }} | {% set sc = 'blue' %} {% if i.status == 'paid' %}{% set sc = 'emerald' %}{% endif %} {% if i.status == 'cancelled' %}{% set sc = 'neutral' %}{% endif %} {% if i.status == 'sent' %}{% set sc = 'amber' %}{% endif %} {{ i.status }} | {{ "{:,.2f}".format(i.total_gross or 0).replace(",","X").replace(".",",").replace("X",".") }} | {% set open_amt = (i.total_gross or 0) - (i.paid_amount or 0) %} {% if i.status != 'paid' and open_amt > 0 %} {{ "{:,.2f}".format(open_amt).replace(",","X").replace(".",",").replace("X",".") }} {% else %}—{% endif %} |