Skip to content

Commit

Permalink
Round price on 2 decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
JoepdeJong committed Jun 26, 2023
1 parent 6618a73 commit e00651f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/resources/templates/mail/order.html
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ <h3>Receipt</h3>
T.U.E.S.DAY
</td>
<td class="white-header"
th:text="'€' + ${orderProduct.getPrice()}"
th:text="'€ ' + ${#numbers.formatDecimal(orderProduct.getPrice(), 1, 'POINT', 2, 'COMMA')}"
style="font-family: Arial, sans-serif;color: #5e5e5e;font-size: 16px;text-align: left;border-collapse: collapse;background-color: #f3f3f3;padding: 5px;">
</td>
<td class="white-header"
Expand All @@ -428,7 +428,7 @@ <h3>Receipt</h3>
Total
</td>
<td class="grey-header"
th:text="'€' + ${order.getAmount()}"
th:text="'€ ' + ${#numbers.formatDecimal(order.getAmount(), 1, 'POINT', 2, 'COMMA')}"
style="font-family: Arial, sans-serif;color: #5e5e5e;font-size: 16px;text-align: left;border-collapse: collapse;background-color: #dedede;padding: 5px;font-weight: bold;">
</td>
<td colspan="2"
Expand All @@ -442,7 +442,7 @@ <h3>Receipt</h3>
<td th:text="${entry.key.getPercentage()}"
style="font-family: Arial, sans-serif;color: #5e5e5e;font-size: 16px;text-align: left;border-collapse: collapse;padding: 5px;font-weight: bold;">
</td>
<td th:text="'€' + ${entry.value}"
<td th:text="'€ ' + ${#numbers.formatDecimal(entry.value, 1, 'POINT', 2, 'COMMA')}"
style="font-family: Arial, sans-serif;color: #5e5e5e;font-size: 16px;text-align: left;border-collapse: collapse;padding: 5px;">
</td>
</tr>
Expand Down

0 comments on commit e00651f

Please sign in to comment.