changes to the prices
This commit is contained in:
+5
-1
@@ -2195,7 +2195,7 @@ def download_sample():
|
||||
@app.route('/preise', methods=['GET'])
|
||||
def preise():
|
||||
trial_instance = _get_user_trial_instance(session.get("username")) if session.get("username") else None
|
||||
return render_template("preise.html", trial_instance=trial_instance)
|
||||
return render_template("preise.html", trial_instance=trial_instance, booking_prices=BOOKING_PRICE_MAP)
|
||||
|
||||
|
||||
@app.route('/preise/book-option', methods=['POST'])
|
||||
@@ -2433,6 +2433,7 @@ def background_booking_provisioning(
|
||||
"billing_reference": booking_data.get("billing_reference"),
|
||||
"package": booking_request.get("package_label") or booking_request.get("package"),
|
||||
"amount_eur": booking_request.get("amount_eur"),
|
||||
"amount_net_eur": booking_request.get("amount_net_eur") or booking_request.get("amount_eur"),
|
||||
"booking_flow": booking_request.get("booking_flow"),
|
||||
"invoice_id": booking_request.get("invoice_id"),
|
||||
"subdomain": effective_subdomain,
|
||||
@@ -2948,6 +2949,7 @@ def booking_payment():
|
||||
"package_key": package_raw,
|
||||
"package_price": total_price if not is_trial else 0.0,
|
||||
"price": total_price if not is_trial else 0.0,
|
||||
"price_net": total_price if not is_trial else 0.0,
|
||||
"flow": booking_flow,
|
||||
"is_trial": is_trial,
|
||||
"title": flow_config["title"],
|
||||
@@ -3103,6 +3105,7 @@ def booking_payment():
|
||||
"package": package_raw,
|
||||
"package_label": selected_package,
|
||||
"amount_eur": total_price if not is_trial else 0.0,
|
||||
"amount_net_eur": total_price if not is_trial else 0.0,
|
||||
"booking_flow": booking_flow,
|
||||
"booking_data": form_data,
|
||||
"is_trial": is_trial,
|
||||
@@ -3132,6 +3135,7 @@ def booking_payment():
|
||||
"invoice_number": booking_number,
|
||||
"period": date.today().strftime("%m/%Y"),
|
||||
"amount_eur": total_price,
|
||||
"amount_net_eur": total_price,
|
||||
"status": "Offen",
|
||||
"due_date": due_date,
|
||||
"created_at": _utc_now_iso(),
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</select>
|
||||
<input type="text" name="invoice_number" placeholder="Rechnungsnummer (optional, eigener Wert möglich)">
|
||||
<input type="text" name="period" placeholder="Zeitraum (MM/YYYY)" required>
|
||||
<input type="text" name="amount_eur" placeholder="Betrag in EUR" required>
|
||||
<input type="text" name="amount_eur" placeholder="Betrag netto in EUR" required>
|
||||
<input type="text" name="due_date" placeholder="Fälligkeit (YYYY-MM-DD)">
|
||||
|
||||
<!-- NEU: Dropdown für Status beim Erstellen -->
|
||||
@@ -46,7 +46,7 @@
|
||||
<article class="entry">
|
||||
<h3>{{ item.invoice_number }}</h3>
|
||||
<p><strong>Nutzer:</strong> {{ item.username }} | <strong>Zeitraum:</strong> {{ item.period }}</p>
|
||||
<p><strong>Betrag:</strong> {{ '%.2f'|format(item.amount_eur) }} EUR | <strong>Status:</strong> {{ item.status }} | <strong>Fälligkeit:</strong> {{ item.due_date }}</p>
|
||||
<p><strong>Betrag netto:</strong> {{ '%.2f'|format(item.amount_eur) }} EUR | <strong>Status:</strong> {{ item.status }} | <strong>Fälligkeit:</strong> {{ item.due_date }}</p>
|
||||
|
||||
{% if item.source == 'booking_payment' %}
|
||||
<p><strong>Buchung:</strong> {{ item.booking_package_label or item.booking_package }} | <strong>Flow:</strong> {{ item.booking_flow }}</p>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<tr>
|
||||
<td class="font-semibold">{{ invoice.invoice_number }}</td>
|
||||
<td>{{ invoice.period }}</td>
|
||||
<td class="amount-cell">{{ '%.2f'|format(invoice.amount_eur) }} €</td>
|
||||
<td class="amount-cell">{{ '%.2f'|format(invoice.amount_eur) }} € netto</td>
|
||||
<td class="text-muted">{{ invoice.due_date }}</td>
|
||||
<td>
|
||||
{% set status_lower = (invoice.status or '')|lower %}
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
<h2 class="package-card__name">Inventarsystem</h2>
|
||||
</div>
|
||||
<div class="package-card__price">
|
||||
<small>Netto</small><span>350 €</span><small>/ Jahr</small>
|
||||
<small>Netto</small><span>{{ booking_prices['inventarsystem']|int }} €</span><small>/ Jahr</small>
|
||||
</div>
|
||||
</div>
|
||||
<p class="package-card__description">Der stabile Einstieg in die Schulverwaltung mit Inventarverwaltung, Benutzerrechten und Berichten.</p>
|
||||
@@ -202,7 +202,7 @@
|
||||
</ul>
|
||||
<div class="package-card__actions">
|
||||
{% if 'username' in session %}
|
||||
<button class="btn add-to-cart-btn" data-id="inventarsystem" data-name="Inventarsystem" data-price="350" onclick="handleAddToCart(this)">
|
||||
<button class="btn add-to-cart-btn" data-id="inventarsystem" data-name="Inventarsystem" data-price="{{ booking_prices['inventarsystem']|int }}" onclick="handleAddToCart(this)">
|
||||
In den Warenkorb
|
||||
</button>
|
||||
{% else %}
|
||||
@@ -219,7 +219,7 @@
|
||||
<h2 class="package-card__name">Bibliothekssystem</h2>
|
||||
</div>
|
||||
<div class="package-card__price">
|
||||
<small>Netto</small><span>120 €</span><small>/ Jahr</small>
|
||||
<small>Netto</small><span>{{ booking_prices['buecherei']|int }} €</span><small>/ Jahr</small>
|
||||
</div>
|
||||
</div>
|
||||
<p class="package-card__description">Spezialisiertes Modul für Bibliotheken und Medienzentren inkl. Ausleihprozessen und Historie.</p>
|
||||
@@ -230,7 +230,7 @@
|
||||
</ul>
|
||||
<div class="package-card__actions">
|
||||
{% if 'username' in session %}
|
||||
<button class="btn add-to-cart-btn" data-id="buecherei" data-name="Bibliothekssystem" data-price="120" onclick="handleAddToCart(this)">
|
||||
<button class="btn add-to-cart-btn" data-id="buecherei" data-name="Bibliothekssystem" data-price="{{ booking_prices['buecherei']|int }}" onclick="handleAddToCart(this)">
|
||||
In den Warenkorb
|
||||
</button>
|
||||
{% else %}
|
||||
@@ -247,7 +247,7 @@
|
||||
<h2 class="package-card__name">Terminplaner</h2>
|
||||
</div>
|
||||
<div class="package-card__price">
|
||||
<small>Netto</small><span>120 €</span><small>/ Jahr</small>
|
||||
<small>Netto</small><span>{{ booking_prices['terminverwaltung']|int }} €</span><small>/ Jahr</small>
|
||||
</div>
|
||||
</div>
|
||||
<p class="package-card__description">Für flexible Terminplanung entwickelt (z.B. Elternsprechstunden), um Termine hürdenlos online anzubieten.</p>
|
||||
@@ -259,7 +259,7 @@
|
||||
</ul>
|
||||
<div class="package-card__actions">
|
||||
{% if 'username' in session %}
|
||||
<button class="btn add-to-cart-btn" data-id="terminverwaltung" data-name="Terminplaner" data-price="120" onclick="handleAddToCart(this)">
|
||||
<button class="btn add-to-cart-btn" data-id="terminverwaltung" data-name="Terminplaner" data-price="{{ booking_prices['terminverwaltung']|int }}" onclick="handleAddToCart(this)">
|
||||
In den Warenkorb
|
||||
</button>
|
||||
{% else %}
|
||||
@@ -336,8 +336,8 @@
|
||||
<p>Sie sind dabei, ein Einzelmodul in den Warenkorb zu legen. Wussten Sie, dass Inventar- und Bibliothekssystem perfekt zusammenarbeiten?</p>
|
||||
|
||||
<div class="upsell-box">
|
||||
<h4>Das Startpaket (<small>Netto</small> 450 € / Jahr)</h4>
|
||||
<p style="font-size: 0.9rem; margin-bottom: 0;">Beinhaltet das Inventarsystem (regulär 350 €) und das Bibliothekssystem (regulär 120 €). Sie sparen 20 € jährlich!</p>
|
||||
<h4>Das Startpaket (<small>Netto</small> {{ booking_prices['startpaket']|int }} € / Jahr)</h4>
|
||||
<p style="font-size: 0.9rem; margin-bottom: 0;">Beinhaltet das Inventarsystem (regulär {{ booking_prices['inventarsystem']|int }} €) und das Bibliothekssystem (regulär {{ booking_prices['buecherei']|int }} €). Sie sparen {{ (booking_prices['inventarsystem'] + booking_prices['buecherei'] - booking_prices['startpaket'])|int }} € jährlich!</p>
|
||||
</div>
|
||||
|
||||
<div class="custom-modal-actions">
|
||||
@@ -520,7 +520,7 @@
|
||||
// Upsell-Entscheidungen
|
||||
function acceptUpsell() {
|
||||
closeUpsellModal();
|
||||
addItem('startpaket', 'Startpaket (Inventar + Bibliothek)', 490);
|
||||
addItem('startpaket', 'Startpaket (Inventar + Bibliothek)', Number("{{ booking_prices['startpaket']|int }}"));
|
||||
pendingItemForUpsell = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -309,26 +309,26 @@
|
||||
|
||||
<div class="booking-review__grid">
|
||||
|
||||
<!-- ANGEPASSTE PAKET-KARTE MIT BRUTTO/NETTO RECHNUNG -->
|
||||
<!-- Der verbindliche Buchungswert ist der Netto-Betrag. -->
|
||||
<div class="booking-review__card">
|
||||
<span class="booking-review__label">Gewähltes Paket</span>
|
||||
<div class="booking-review__value" style="font-size: 1.1rem;">{{ package }}</div>
|
||||
|
||||
<!-- Hier findet die automatische Berechnung statt -->
|
||||
<!-- Voraussetzung: backend übergibt 'price' als numerische Variable (z.B. 149.00) -->
|
||||
{% if price %}
|
||||
{% if price_net %}
|
||||
<div class="price-breakdown">
|
||||
<div class="price-row">
|
||||
<span>Netto:</span>
|
||||
<span>{{ ("%.2f"|format(price)) | replace('.', ',') }} €</span>
|
||||
<span>Verbindlicher Buchungsbetrag (Netto):</span>
|
||||
<span>{{ ("%.2f"|format(price_net)) | replace('.', ',') }} €</span>
|
||||
</div>
|
||||
<div class="price-row">
|
||||
<span>zzgl. 19% USt:</span>
|
||||
<span>{{ ("%.2f"|format(price * 0.19)) | replace('.', ',') }} €</span>
|
||||
<span>{{ ("%.2f"|format(price_net * 0.19)) | replace('.', ',') }} €</span>
|
||||
</div>
|
||||
<div class="price-row total">
|
||||
<span>Gesamt (Brutto):</span>
|
||||
<span>{{ ("%.2f"|format(price * 1.19)) | replace('.', ',') }} €</span>
|
||||
<span>Brutto (nur Information):</span>
|
||||
<span>{{ ("%.2f"|format(price_net * 1.19)) | replace('.', ',') }} €</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user