mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-19 21:04:36 +02:00
Fix wrong price calculation on invoice
This commit is contained in:
parent
580489d216
commit
fbe8ce6953
|
@ -25,21 +25,24 @@ SPDX-FileCopyrightText: 2023-2024 swt23w23
|
||||||
<th scope="col">Beschreibung</th>
|
<th scope="col">Beschreibung</th>
|
||||||
<th scope="col">Einzelpreis/Basispreis</th>
|
<th scope="col">Einzelpreis/Basispreis</th>
|
||||||
<th scope="col">Menge</th>
|
<th scope="col">Menge</th>
|
||||||
|
<th scope="col">Mietpreis</th>
|
||||||
<th scope="col">Gesamtpreis</th>
|
<th scope="col">Gesamtpreis</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="table-group-divider">
|
<tbody class="table-group-divider">
|
||||||
<tr th:each="orderLine : ${order.getOrderLines()}">
|
<tr th:each="orderLine : ${order.getOrderLines()}">
|
||||||
<td th:text="${orderLine.getProductName()}"></td>
|
<td th:text="${orderLine.getProductName()}"></td>
|
||||||
<td th:text="${orderLine.getPrice()}"></td>
|
<td th:text="${orderLine.getPrice().divide(orderLine.getQuantity().getAmount())}"></td>
|
||||||
<td th:text="${orderLine.getQuantity()}"></td>
|
<td th:text="${orderLine.getQuantity()}"></td>
|
||||||
<td th:text="${orderLine.getPrice().multiply(orderLine.getQuantity().getAmount()).add(order.getChargeLines(orderLine).getTotal())}"></td>
|
<td th:text="${order.getChargeLines(orderLine).getTotal()}"></td>
|
||||||
|
<td th:text="${orderLine.getPrice().add(order.getChargeLines(orderLine).getTotal())}"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr th:each="chargeLine : ${order.getChargeLines()}">
|
<tr th:each="chargeLine : ${order.getChargeLines()}">
|
||||||
<td th:text="${staffCharges.get(chargeLine).getName()}"></td>
|
<td th:text="${staffCharges.get(chargeLine).getName()}"></td>
|
||||||
<td th:text="${chargeLine.getPrice()}"></td>
|
<td>-</td>
|
||||||
<td>1</td>
|
<td>1</td>
|
||||||
<td th:text="${chargeLine.getPrice()}"></td>
|
<td th:text="${chargeLine.getPrice()}"></td>
|
||||||
|
<td th:text="${chargeLine.getPrice()}"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in a new issue