From 13de307d94fac1f2497fdb95dfba75142d8eeb9b Mon Sep 17 00:00:00 2001 From: MK13 Date: Tue, 17 Nov 2020 21:47:14 +0100 Subject: [PATCH] Fix POMs, build vanilla .wars instead of Spring Boot ones --- financer-common/pom.xml | 2 +- financer-server/pom.xml | 32 +++++++++++++++++-- .../service/AccountStatisticService.java | 11 +++++-- financer-web-client/pom.xml | 31 ++++++++++++++++-- .../src/main/resources/static/changelog.txt | 3 ++ 5 files changed, 71 insertions(+), 8 deletions(-) diff --git a/financer-common/pom.xml b/financer-common/pom.xml index 24b16e8..ee861a8 100644 --- a/financer-common/pom.xml +++ b/financer-common/pom.xml @@ -7,7 +7,7 @@ financer-parent de.77zzcx7.financer - 38-SNAPSHOT< + 38-SNAPSHOT financer-common diff --git a/financer-server/pom.xml b/financer-server/pom.xml index ccfdab3..225f36e 100644 --- a/financer-server/pom.xml +++ b/financer-server/pom.xml @@ -6,7 +6,7 @@ de.77zzcx7.financer financer-parent - 38-SNAPSHOT< + 38-SNAPSHOT financer-server @@ -141,7 +141,35 @@ postgres,${deploymentProfile} - ${project.artifactId}-${deploymentProfile}##${parallelDeploymentVersion} + + + + org.springframework.boot + spring-boot-maven-plugin + + true + + + + + maven-war-plugin + + ${deploymentProfile} + + + ${start-class} + true + + + + + diff --git a/financer-server/src/main/java/de/financer/service/AccountStatisticService.java b/financer-server/src/main/java/de/financer/service/AccountStatisticService.java index e0b4622..2b87b97 100644 --- a/financer-server/src/main/java/de/financer/service/AccountStatisticService.java +++ b/financer-server/src/main/java/de/financer/service/AccountStatisticService.java @@ -39,8 +39,8 @@ public class AccountStatisticService { final List 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 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)); diff --git a/financer-web-client/pom.xml b/financer-web-client/pom.xml index 71ef179..7fee54a 100644 --- a/financer-web-client/pom.xml +++ b/financer-web-client/pom.xml @@ -7,7 +7,7 @@ de.77zzcx7.financer financer-parent - 38-SNAPSHOT< + 38-SNAPSHOT financer-web-client @@ -99,7 +99,34 @@ financer - ${finalName}-${deploymentProfile}##${parallelDeploymentVersion} + + + + org.springframework.boot + spring-boot-maven-plugin + + true + + + + + maven-war-plugin + + ${deploymentProfile} + + + true + + + + + diff --git a/financer-web-client/src/main/resources/static/changelog.txt b/financer-web-client/src/main/resources/static/changelog.txt index 3cb523c..046a1d4 100644 --- a/financer-web-client/src/main/resources/static/changelog.txt +++ b/financer-web-client/src/main/resources/static/changelog.txt @@ -1,3 +1,6 @@ +v37 -> v38: +- Non-functional build changes + v36 -> v37: - START bookings are now expense neutral, so they do not increase the 'Expenses current period' counter - START bookings now do not increase 'Spendings current period' as this distorts this counter