{% extends "base.html" %} {% from "_macros.html" import money, pdf_lang_picker %} {% block title %}{{ inv.invoice_no }}{% endblock %} {% block body_data %}data-page-type="invoice" data-page-id="{{ inv.id }}" data-page-label="{{ inv.invoice_no }}" data-page-sub="{{ inv.customer_name_snapshot }}"{% endblock %} {% block breadcrumb %}

Rechnungen / {{ inv.invoice_no }}

{% endblock %} {% block heading %}{{ inv.invoice_no }} · {{ inv.customer_name_snapshot }}{% endblock %} {% block topbar_actions %} {{ STATUS_LABELS.get(inv.status, inv.status) }} {% if inv.kind == 'storno' %}STORNO{% endif %} {% if inv.is_locked %} 🔒 gesperrt {% endif %} Per Mail senden {{ pdf_lang_picker('invoices', inv.id, inv.lang or 'de') }}
PDF / E-Rechnung ▾
{% endblock %} {% block content %} {% include "_workflow_stepper.html" %}

Stammdaten

Rechnungsempfänger

{{ inv.customer_name_snapshot }}

{{ inv.customer_country_iso_snapshot or '—' }} {% if inv.customer_vat_id_snapshot %}· {{ inv.customer_vat_id_snapshot }}{% endif %}

Belegdaten

Datum: {{ inv.issue_date }}

{% if inv.service_date and inv.service_date != inv.issue_date %}

Leistungsdatum: {{ inv.service_date }}

{% endif %}

Fällig: {{ inv.due_date or '—' }}

{% if inv.order_no %}

Auftrag: {{ inv.order_no }}

{% endif %}

Format: {{ inv.preferred_invoice_format }}

{% if inv.notes %}

Notiz

{{ inv.notes }}

{% endif %}

Positionen

{% for ln in lines %} {% endfor %} {% if inv.vat_amount %} {% endif %} {% if inv.paid_amount %} {% endif %}
# Beschreibung Menge Einh. Einzelpr. Rabatt USt Netto
{{ ln.line_no }}
{{ ln.description }}
{% if ln.item_ident %}
{{ ln.item_ident }}
{% endif %}
{{ "%.0f"|format(ln.qty) if ln.qty == ln.qty|int else "%.2f"|format(ln.qty) }} {{ ln.unit }} {{ money(ln.unit_price) }} {{ "%.0f"|format(ln.discount_pct) if ln.discount_pct else '—' }}{% if ln.discount_pct %} %{% endif %} {% if ln.vat_kind == 'eu_b2b_reverse' %}RC {% elif ln.vat_kind == 'export' %}Export {% else %}{{ "%.0f"|format(ln.vat_rate) }} %{% endif %} {{ money(ln.line_total_net) }}
Zwischensumme netto {{ money(inv.subtotal_net) }}
USt {{ money(inv.vat_amount) }}
Rechnungsbetrag {{ money(inv.total_gross) }} {{ inv.currency }}
bereits gezahlt −{{ money(inv.paid_amount) }}
Offener Betrag {{ money((inv.total_gross or 0) - (inv.paid_amount or 0)) }} {{ inv.currency }}

Status

{{ STATUS_LABELS.get(inv.status, inv.status) }}

Erstellt: {{ inv.created_at[:16] }}
{% if inv.sent_at %}Versendet: {{ inv.sent_at[:16] }}
{% endif %} {% if inv.paid_at %}Bezahlt: {{ inv.paid_at[:16] }}{% endif %}
{% if inv.kind != 'storno' and inv.status != 'cancelled' %}

Zahlung erfassen

Skonto + Zahlung zusammen müssen Brutto erreichen, damit als „Bezahlt" gilt. ·

{% endif %} {% if payments %}

Zahlungseingänge

{% for p in payments %}
{{ p.paid_at }} · {{ p.method }} {% if p.reference %} · {{ p.reference }}{% endif %}
{{ money(p.amount) }} {% if p.skonto_amount and p.skonto_amount > 0 %}
+ {{ money(p.skonto_amount) }} Skonto {% endif %}
{% endfor %}
{% endif %} {% if inv.kind != 'storno' and inv.status != 'cancelled' %}

Storno

{% endif %} {% if dunning_history %}

Mahnungs-Historie

{% for d in dunning_history %}
Stufe {{ d.level }}

{{ d.sent_at[:16] }}

{% if d.recipient %}

an {{ d.recipient }}

{% endif %} {% if d.note %}

{{ d.note }}

{% endif %}
{% endfor %}
{% endif %} {% set open_amt = (inv.total_gross or 0) - (inv.paid_amount or 0) %} {% set today_iso = '2026-04-29' %} {% if inv.kind != 'storno' and open_amt > 0 and inv.due_date and inv.due_date < today_iso %}

Mahnen

{% set next_lvl = ((inv.dunning_level or 0) + 1) %} {% if next_lvl > 3 %}{% set next_lvl = 3 %}{% endif %} {% if next_lvl == 1 %}Zahlungserinnerung senden {% elif next_lvl == 2 %}1. Mahnung senden {% else %}Letzte Mahnung senden{% endif %} PDF nur (Briefpost)
{% endif %} {% if audit %}

Audit-Log

GoBD-Nachweis

{% for a in audit %}
{{ a.action }}

{{ a.created_at[:16] }}

{% if a.user_name %}

{{ a.user_name }}

{% endif %} {% if a.note %}

{{ a.note }}

{% endif %}
{% endfor %}
{% endif %}
{% endblock %}