swt23w23/src/main/resources/templates/invoice.html
Simon Bruder bac025fd0a
Make project REUSE compliant
This finally makes the licensing under AGPL-3.0-or-later explicit after
I got the okay from the kickstart source owners.

This also checks the REUSE compliance in a pre commit hook, and
therefore also in CI.
2023-12-11 17:59:14 +01:00

54 lines
2 KiB
HTML

<!--/*-->
SPDX-License-Identifier: AGPL-3.0-or-later
SPDX-FileCopyrightText: 2023 swt23w23
<!--*/-->
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout.html(title='Rechnung')}">
<body>
<div layout:fragment="content" class="invoice">
<div>
<h3 class="mb-2">Eventtyp</h3>
<p th:text="${order.getOrderType().toHumanReadable()}"></p>
</div>
<div>
<h3 class="mb-2">Dauer</h3>
<p th:text="'Von: ' + ${order.getFormattedStart()}"></p>
<p th:text="'Bis: ' + ${order.getFormattedFinish()}"></p>
</div>
<h3>Produkte</h3>
<table class="table">
<thead>
<tr>
<th scope="col">Beschreibung</th>
<th scope="col">Einzelpreis/Basispreis</th>
<th scope="col">Menge</th>
<th scope="col">Gesamtpreis</th>
</tr>
</thead>
<tbody class="table-group-divider">
<tr th:each="orderLine : ${order.getOrderLines()}">
<td th:text="${orderLine.getProductName()}"></td>
<td th:text="${orderLine.getPrice().getNumber().doubleValueExact() + ' €'}"></td>
<td th:text="${orderLine.getQuantity()}"></td>
<td th:text="${orderLine.getPrice().multiply(orderLine.getQuantity().getAmount()).getNumber().doubleValueExact() + order.getChargeLines(orderLine).getTotal().getNumber().doubleValueExact() + ' €'}"></td>
</tr>
<tr th:each="chargeLine : ${order.getChargeLines()}">
<td th:text="${staffCharges.get(chargeLine).getName()}"></td>
<td th:text="${chargeLine.getPrice().getNumber().doubleValueExact() + ' €'}"></td>
<td>1</td>
<td th:text="${chargeLine.getPrice().getNumber().doubleValueExact() + ' €'}"></td>
</tr>
</tbody>
</table>
<div class="text-end">
<h3>Gesamtpreis</h3>
<p th:text="${order.getTotal().getNumber().doubleValue() + ' €'}"></p>
</div>
<button class="btn btn-primary d-print-none" onclick="print()">Drucken</button>
</div>
</body>
</html>