2025-10-02 12:20:11 +02:00
|
|
|
|
<!DOCTYPE html>
|
2025-09-11 16:01:32 +02:00
|
|
|
|
<!-- templates/index.html -->
|
2025-09-17 20:26:44 +02:00
|
|
|
|
{% extends "base.html" %}
|
2025-09-17 16:35:11 +02:00
|
|
|
|
|
2025-10-02 12:20:11 +02:00
|
|
|
|
{% block title %}Kostenrechner – studio einszwovier{% endblock %}
|
2025-09-17 16:35:11 +02:00
|
|
|
|
|
2025-09-17 20:26:44 +02:00
|
|
|
|
{% block content %}
|
|
|
|
|
|
<div class="container">
|
|
|
|
|
|
<h1>Kostenrechner für Drucke</h1>
|
2025-09-11 16:01:32 +02:00
|
|
|
|
|
2025-10-07 17:48:55 +02:00
|
|
|
|
<div class="info-box">
|
|
|
|
|
|
<p>
|
|
|
|
|
|
<strong>So funktioniert's:</strong> Lade dein PDF hoch, um eine Kostenschätzung zu erhalten.
|
|
|
|
|
|
Du kannst beliebige PDFs hochladen, um die Kosten zu berechnen.
|
|
|
|
|
|
</p>
|
|
|
|
|
|
<p>
|
|
|
|
|
|
<strong>Wichtig:</strong> Schicke den Auftrag nur ab, wenn du die Datei wirklich drucken lassen möchtest!
|
|
|
|
|
|
Für reine Kostenschätzung reicht es, die Berechnung anzusehen, ohne den Auftrag zu senden.
|
|
|
|
|
|
</p>
|
|
|
|
|
|
<p>
|
|
|
|
|
|
<strong>Alternative:</strong> Du kannst uns deine Datei und Infos auch per E-Mail schicken:
|
|
|
|
|
|
<a href="mailto:einszwovier@gvb-gymnasium.de">einszwovier@gvb-gymnasium.de</a>
|
|
|
|
|
|
</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="pricing-card">
|
|
|
|
|
|
<h2>📊 Aktuelle Preise</h2>
|
|
|
|
|
|
<div class="price-grid">
|
|
|
|
|
|
<div class="price-item bw">
|
|
|
|
|
|
<span class="price-label">Schwarz/Weiß</span>
|
|
|
|
|
|
<span class="price-value">{{ rate_black if rate_black else 'RATE_PER_M2_BLACK' }} €/m²</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="price-item color">
|
|
|
|
|
|
<span class="price-label">Farbe</span>
|
|
|
|
|
|
<span class="price-value">{{ rate_color if rate_color else 'RATE_PER_M2_COLOR' }} €/m²</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p class="pricing-note">💡 Die Preise decken nur Materialkosten(Tinte & Papier) – kein Gewinn!</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-09-11 16:01:32 +02:00
|
|
|
|
{% if error %}
|
2025-09-17 16:35:11 +02:00
|
|
|
|
<p class="error">{{ error }}</p>
|
2025-09-11 16:01:32 +02:00
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
<form action="/upload" method="post" enctype="multipart/form-data">
|
2025-09-17 20:26:44 +02:00
|
|
|
|
<input type="file" name="file" accept="application/pdf" required />
|
|
|
|
|
|
<button type="submit">Hochladen & Berechnen</button>
|
2025-09-11 16:01:32 +02:00
|
|
|
|
</form>
|
|
|
|
|
|
|
2025-09-17 16:35:11 +02:00
|
|
|
|
{% if result %}
|
2025-09-17 20:26:44 +02:00
|
|
|
|
<h2>Ergebnisse für {{ result.filename }}</h2>
|
2025-09-17 16:35:11 +02:00
|
|
|
|
|
|
|
|
|
|
<table>
|
2025-09-17 20:26:44 +02:00
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<th>Seite</th>
|
|
|
|
|
|
<th>Breite (m)</th>
|
|
|
|
|
|
<th>Höhe (m)</th>
|
|
|
|
|
|
<th>Fläche (m²)</th>
|
|
|
|
|
|
<th>Tinten %</th>
|
|
|
|
|
|
<th>Typ</th>
|
|
|
|
|
|
<th>Kosten (€)</th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
{% for page in result.pages %}
|
|
|
|
|
|
<tr class="{{ 'color' if page.is_color else 'black' }}">
|
|
|
|
|
|
<td>{{ page.page }}</td>
|
|
|
|
|
|
<td>{{ "%.3f"|format(page.width_m) }}</td>
|
|
|
|
|
|
<td>{{ "%.3f"|format(page.height_m) }}</td>
|
|
|
|
|
|
<td>{{ "%.4f"|format(page.area_m2) }}</td>
|
|
|
|
|
|
<td>{{ "%.1f"|format(page.ink_pct) if page.ink_pct is not none else '-' }}</td>
|
|
|
|
|
|
<td>{{ 'Farbe' if page.is_color else 'S/W' }}</td>
|
|
|
|
|
|
<td>{{ "%.2f"|format(page.cost) }}</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
<tfoot>
|
|
|
|
|
|
<tr class="totals">
|
|
|
|
|
|
<td colspan="3">Summe S/W</td>
|
|
|
|
|
|
<td>{{ "%.4f"|format(result.total_area_black) }}</td>
|
|
|
|
|
|
<td colspan="2"></td>
|
|
|
|
|
|
<td>{{ "%.2f"|format(result.total_cost_black) }}</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr class="totals">
|
|
|
|
|
|
<td colspan="3">Summe Farbe</td>
|
|
|
|
|
|
<td>{{ "%.4f"|format(result.total_area_color) }}</td>
|
|
|
|
|
|
<td colspan="2"></td>
|
|
|
|
|
|
<td>{{ "%.2f"|format(result.total_cost_color) }}</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr class="totals">
|
|
|
|
|
|
<td colspan="6">Gesamtsumme</td>
|
|
|
|
|
|
<td>{{ "%.2f"|format(result.grand_total) }}</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</tfoot>
|
2025-09-17 16:35:11 +02:00
|
|
|
|
</table>
|
|
|
|
|
|
{% endif %}
|
2025-09-17 20:26:44 +02:00
|
|
|
|
</div>
|
2025-10-02 12:20:11 +02:00
|
|
|
|
{% endblock %}
|