Stückzahl-Feld: Formular, Rechnungsvorschau, PDF

This commit is contained in:
Erik Thiele
2026-07-02 13:10:29 +02:00
parent f4e806079b
commit 0c62e8aa78
3 changed files with 24 additions and 11 deletions

View File

@@ -115,10 +115,14 @@
<div class="card mb-3">
<div class="card-header"><i class="ti ti-currency-euro me-2"></i>Gewinnmarge</div>
<div class="card-body">
<div class="mb-0">
<div class="mb-3">
<label class="form-label">Gewinnmarge (%)</label>
<input type="number" step="0.5" class="form-control" data-var="gewinnmarge" data-type="number" value="{{ config.gewinnmarge }}">
</div>
<div class="mb-0">
<label class="form-label">Stuckzahl</label>
<input type="number" step="1" min="1" class="form-control" data-var="stueckzahl" data-type="number" value="{{ config.stueckzahl }}">
</div>
</div>
</div>

View File

@@ -64,18 +64,22 @@
<div class="card mb-3">
<div class="card-header"><i class="ti ti-eye me-2"></i>Vorschau</div>
<div class="card-body p-0">
{% set stueckzahl = config.stueckzahl|default(1)|int %}
{% set gesamt_netto = (calc.verkaufspreis * stueckzahl)|round(2) %}
{% set gesamt_mwst = (gesamt_netto * 0.19)|round(2) %}
{% set gesamt_brutto = (gesamt_netto + gesamt_mwst)|round(2) %}
<div class="p-3" style="font-family:'Courier New',Courier,monospace;font-size:13px;line-height:1.8;white-space:pre;overflow-x:auto;background:var(--tblr-bg-surface);">LEISTUNGSBESCHREIBUNG:
{{ '\u2500' * 50 }}
Position: 3D-Druck - {{ config.projektName }}
Menge: 1
Menge: {{ stueckzahl }}
Einzelpreis: {{ "%.2f"|format(calc.verkaufspreis) }} EUR
Gesamt: {{ "%.2f"|format(calc.verkaufspreis) }} EUR
Gesamt: {{ "%.2f"|format(gesamt_netto) }} EUR
{{ '\u2500' * 50 }}
Nettobetrag: {{ "%.2f"|format(calc.verkaufspreis) }} EUR
MwSt. (19%): {{ "%.2f"|format(calc.mwst) }} EUR
Nettobetrag: {{ "%.2f"|format(gesamt_netto) }} EUR
MwSt. (19%): {{ "%.2f"|format(gesamt_mwst) }} EUR
{{ '\u2550' * 50 }}
GESAMTBETRAG: {{ "%.2f"|format(calc.gesamt_brutto) }} EUR
GESAMTBETRAG: {{ "%.2f"|format(gesamt_brutto) }} EUR
Zahlbar innerhalb von 14 Tagen ohne Abzug.
Vielen Dank fur Ihren Auftrag!</div>