Fix POMs, build vanilla .wars instead of Spring Boot ones

This commit is contained in:
2020-11-17 21:47:14 +01:00
parent 3ef7613e33
commit 13de307d94
5 changed files with 71 additions and 8 deletions

View File

@@ -39,8 +39,8 @@ public class AccountStatisticService {
final List<AccountStatistic> resultList = new ArrayList<>();
long amount = transaction.getAmount();
// Special case: START bookings should not increase 'spendings current period'
if (AccountType.START.equals(fromAccount.getType())) {
// Special case: expense neutral bookings should not increase 'spendings current period'
if (transaction.isExpenseNeutral()) {
amount = 0;
}
@@ -56,8 +56,13 @@ public class AccountStatisticService {
public void revertStatistics(Transaction transaction) {
final Account fromAccount = transaction.getFromAccount();
final Account toAccount = transaction.getToAccount();
final long amount = transaction.getAmount();
final List<AccountStatistic> resultList = new ArrayList<>();
long amount = transaction.getAmount();
// Special case: expense neutral bookings should not decrease 'spendings current period'
if (transaction.isExpenseNeutral()) {
amount = 0;
}
for (final Period period : transaction.getPeriods()) {
resultList.add(calculateInternal(fromAccount, period, amount, true, -1));