Fixed persisting of contracts

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
Jim Martens 2017-04-26 15:19:59 +02:00
parent f19acc875f
commit 0648382c86
1 changed files with 2 additions and 1 deletions

View File

@ -575,6 +575,7 @@ public class Main {
long duration = endDate.getTime() - startDate.getTime();
tenancyContract.setDuration(Duration.ofMillis(duration));
tenancyContract.setAdditionalCost(FormUtil.readInt("Additional Costs"));
_orm.persist(tenancyContract);
} else {
boolean housesAvailable = printListOfHouses();
if (!housesAvailable) {
@ -586,8 +587,8 @@ public class Main {
purchaseContract.setHouse(FormUtil.readInt("House ID"));
purchaseContract.setNoOfInstallments(FormUtil.readInt("No of Installments"));
purchaseContract.setInterestRate(FormUtil.readInt("Interest Rate"));
_orm.persist(purchaseContract);
}
_orm.persist(contract);
}
/**