2023-12-11 17:59:14 +01:00
|
|
|
<!--/*-->
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
SPDX-FileCopyrightText: 2023 swt23w23
|
|
|
|
<!--*/-->
|
2023-11-05 16:11:36 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html xmlns:th="http://www.thymeleaf.org"
|
|
|
|
xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
|
2023-11-13 20:09:39 +01:00
|
|
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
|
|
|
layout:decorate="~{layout.html(title='Inventar')}">
|
2023-11-05 16:11:36 +01:00
|
|
|
<body>
|
2023-11-15 17:27:04 +01:00
|
|
|
<div layout:fragment="content">
|
|
|
|
<table class="table">
|
2023-11-13 20:09:39 +01:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Produktname</th>
|
|
|
|
<th>Menge</th>
|
|
|
|
<th>Einkaufspreis</th>
|
|
|
|
<th>UVP</th>
|
2023-12-07 18:35:52 +01:00
|
|
|
<th>Buchungstypen</th>
|
2023-11-13 20:09:39 +01:00
|
|
|
<th>Gesamtwert</th>
|
2023-12-05 12:17:22 +01:00
|
|
|
<th></th>
|
2023-11-13 20:09:39 +01:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr th:each="item : ${inventory}">
|
|
|
|
<td th:text="${item.product.name}"></td>
|
|
|
|
<td th:text="${item.quantity}"></td>
|
|
|
|
<td th:text="${item.product.wholesalePrice}"></td>
|
2023-11-29 17:13:07 +01:00
|
|
|
<td th:if="${item.product.getClass().getSimpleName() == 'Consumable' && item.product.promotionPrice.isPresent()}"><del th:text="${item.product.retailPrice}"></del> <span th:text="${item.product.promotionPrice.get()}"></span></td>
|
|
|
|
<td th:if="${item.product.getClass().getSimpleName() != 'Consumable' || item.product.promotionPrice.isEmpty()}" th:text="${item.product.price}"></td>
|
2023-12-07 18:35:52 +01:00
|
|
|
<td style="width: 20%;">
|
|
|
|
<div class="d-inline-flex flex-wrap gap-1 flex-column flex-xxl-row">
|
|
|
|
<span class="badge bg-secondary" th:each="orderType : ${T(catering.inventory.InventoryMutateForm).orderTypesFromCategories(item.product.categories)}" th:text="${orderType.toHumanReadable()}"/>
|
|
|
|
</div>
|
|
|
|
</td>
|
2023-11-13 20:09:39 +01:00
|
|
|
<td th:text="${item.product.wholesalePrice.multiply(item.quantity.getAmount())}"></td>
|
2023-11-15 17:27:04 +01:00
|
|
|
<td>
|
2023-12-07 18:09:00 +01:00
|
|
|
<div class="d-inline-flex flex-wrap gap-1 flex-column flex-xxl-row">
|
|
|
|
<a th:href="@{/inventory/edit/{id}(id=${item.product.id},type=${item.product.getClass().getSimpleName()})}"><button class="btn btn-warning">Bearbeiten</button></a>
|
|
|
|
<a th:href="@{/inventory/delete/{id}(id=${item.product.id})}"><button class="btn btn-danger">Entfernen</button></a>
|
|
|
|
</div>
|
2023-11-15 17:27:04 +01:00
|
|
|
</td>
|
2023-11-13 20:09:39 +01:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2023-11-29 17:13:07 +01:00
|
|
|
<a href="/inventory/add?type=Consumable"><button class="btn btn-primary">Verbrauchsmaterial hinzufügen</button></a>
|
|
|
|
<a href="/inventory/add?type=Rentable"><button class="btn btn-primary">Leihmaterial hinzufügen</button></a>
|
2023-11-15 17:27:04 +01:00
|
|
|
</div>
|
2023-11-05 16:11:36 +01:00
|
|
|
</body>
|
|
|
|
</html>
|