{% extends "base.html" %} {% block title %}{{ inq.inquiry_no or 'Anfrage' }}{% endblock %} {% block body_data %}data-page-type="inquiry" data-page-id="{{ inq.id }}" data-page-label="{{ inq.inquiry_no or '#'~inq.id }}" data-page-sub="{{ (inq.subject or '')[:40] }}"{% endblock %} {% block breadcrumb %}

Anfragen / {{ inq.inquiry_no or inq.id }}

{% endblock %} {% block heading %}{{ inq.inquiry_no }} · {{ inq.subject }}{% endblock %} {% block topbar_actions %} {{ STATUS_LABELS.get(inq.status, inq.status) }} {% if not inq.created_quote_id %} → Angebot erstellen {% else %} Angebot {{ inq.quote_no or '#'~inq.created_quote_id }} öffnen {% endif %}
{% endblock %} {% block content %} {% include "_workflow_stepper.html" %}

Inhalt

{{ inq.subject }}

{% if inq.body %}
{{ inq.body }}
{% else %}

— kein Anfrage-Text hinterlegt —

{% endif %}
{# ---------- Strukturierte Anfrage-Positionen ---------- #} {% if items %}

Artikel-Anfrage

Strukturiert aus Webformular / E-Mail-Import

{% for it in items %} {% endfor %}
# Beschreibung Artikel-Nr Menge Einh. Notiz
{{ loop.index }} {{ it.description or '—' }} {{ it.item_code or '—' }} {{ it.qty or '—' }} {{ it.unit or 'Stk' }} {{ it.notes or '—' }}
{% endif %} {# ---------- Prozess-Planung ---------- #}

Prozess-Planung

Vor dem Angebot kalkulieren — Preis-Vorschlag wird automatisch berechnet

wird ignoriert wenn Schritt-Detail unten gefüllt ist

{# v1.7+: Material aus DB-Auswahl + Gewicht/Teil → €/Stk auto #}

nur wenn KEIN Material oben gewählt

Häkchen setzen → Zeile erscheint. Pro Schritt: Maschine wählen (übernimmt deren Stundensatz) ODER festen €/Teil-Preis eintragen.

{% for st in process_steps %} {% set sp_active = plan.steps and st.code in plan.steps %} {% set sp_data = (plan.step_pricing or []) | selectattr('code','equalto',st.code) | list | first %} {% endfor %}
Schritt Maschine Min/Teil €/Teil (fix)
{{ st.name }}

Schritt fehlt? + Eigenen Schritt anlegen

Erscheint dann morgens in seiner „Meine Aufgaben"

{# Live-Berechnung im Browser #}

Kalkulation

Stunden gesamt

Stunden-Kosten

Material gesamt

Selbstkosten

Verkaufspreis gesamt

Pro Stück

Stundensatz: {{ default_hourly_rate }} €/h (aus Settings)

{# ---- Inline-Form für eigenen Prozess-Schritt ---- #}

{% if pricing %}Letzte Kalkulation: {{ "%.2f"|format(pricing.suggested_unit_price)|replace(".", ",") }} €/Stk, gesamt {{ "%.2f"|format(pricing.total_price)|replace(".", ",") }} €{% else %}Noch nicht geplant{% endif %}

{# ---------- Zeichnungen / Anhänge ---------- #}

Zeichnungen & Anhänge

Bilder/PDFs vom Kunden — z.B. per E-Mail erhalten

{% if drawings %} {% else %}

Keine Anhänge.

{% endif %}

Status

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

Absender

{% if inq.customer_name %}

{{ inq.customer_name }}

{% if inq.customer_email %}

{{ inq.customer_email }}

{% endif %} {% if inq.customer_phone %}

{{ inq.customer_phone }}

{% endif %} {% if inq.customer_country_iso %}

{{ inq.customer_country_iso }}

{% endif %} {% else %}

{{ inq.customer_name_text or '— unbekannt —' }}

{% if inq.customer_email_text %}

{{ inq.customer_email_text }}

{% endif %} {% if inq.customer_phone_text %}

{{ inq.customer_phone_text }}

{% endif %}

Externer Absender — kein Kundendatensatz

{% endif %}

Metadaten

Eingang: {{ inq.created_at[:16] }}

Quelle: {{ SOURCE_LABELS.get(inq.source, inq.source) }}

{% if inq.assigned_first %}

Bearbeiter: {{ inq.assigned_first }} {{ inq.assigned_last }}

{% endif %}
{# v1.12.2: Drag&Drop für Kunden-Zeichnungen #} {% with attach_entity_type='inquiry', attach_entity_id=inq.id, attach_title='Kunden-Zeichnungen & Anhänge' %} {% include '_attachments_dropzone.html' %} {% endwith %} {% endblock %}