Mark accounts that are overspend

That means that accounts with spending in the current greater than the
average spending
This commit is contained in:
2019-10-06 18:38:28 +02:00
parent fa30215768
commit 1fb4c8fc98
3 changed files with 11 additions and 2 deletions

View File

@@ -1,3 +1,7 @@
v23 -> v24:
- Mark accounts that are overspend, meaning their spending in the current period is greater than the average spending of
that account
v22 -> v23: v22 -> v23:
- Make table headers sticky if the table scrolls - Make table headers sticky if the table scrolls

View File

@@ -28,7 +28,11 @@
} }
tr:hover { tr:hover {
background-color: lightgrey; background-color: lightgrey;
}
.overspend {
color: #ff6666;
} }
@media only screen and (max-width: 450px) { @media only screen and (max-width: 450px) {

View File

@@ -77,7 +77,8 @@
<td th:text="${#numbers.formatDecimal(acc.currentBalance/100D, 1, 'DEFAULT', 2, 'DEFAULT') + currencySymbol}"/> <td th:text="${#numbers.formatDecimal(acc.currentBalance/100D, 1, 'DEFAULT', 2, 'DEFAULT') + currencySymbol}"/>
<td class="hideable-column" <td class="hideable-column"
th:if="${acc.spendingCurrentExpensePeriod != null}" th:if="${acc.spendingCurrentExpensePeriod != null}"
th:text="${#numbers.formatDecimal(acc.spendingCurrentExpensePeriod/100D, 1, 'DEFAULT', 2, 'DEFAULT') + currencySymbol}"/> th:text="${#numbers.formatDecimal(acc.spendingCurrentExpensePeriod/100D, 1, 'DEFAULT', 2, 'DEFAULT') + currencySymbol}"
th:classappend="${acc.spendingCurrentExpensePeriod > acc.averageSpendingExpensePeriod} ? overspend"/>
<td class="hideable-column" <td class="hideable-column"
th:if="${acc.averageSpendingExpensePeriod != null}" th:if="${acc.averageSpendingExpensePeriod != null}"
th:text="${#numbers.formatDecimal(acc.averageSpendingExpensePeriod/100D, 1, 'DEFAULT', 2, 'DEFAULT') + currencySymbol}"/> th:text="${#numbers.formatDecimal(acc.averageSpendingExpensePeriod/100D, 1, 'DEFAULT', 2, 'DEFAULT') + currencySymbol}"/>