diff --git a/src/de/willuhn/jameica/hbci/forecast/ForecastCreator.java b/src/de/willuhn/jameica/hbci/forecast/ForecastCreator.java index 498c0cbe4..1ab6bb25e 100644 --- a/src/de/willuhn/jameica/hbci/forecast/ForecastCreator.java +++ b/src/de/willuhn/jameica/hbci/forecast/ForecastCreator.java @@ -23,6 +23,8 @@ import de.willuhn.jameica.hbci.HBCI; import de.willuhn.jameica.hbci.gui.filter.KontoFilter; import de.willuhn.jameica.hbci.messaging.SaldoLimitsMessage; +import de.willuhn.jameica.hbci.report.balance.AccountBalanceProvider; +import de.willuhn.jameica.hbci.report.balance.AccountBalanceService; import de.willuhn.jameica.hbci.rmi.Konto; import de.willuhn.jameica.hbci.server.KontoUtil; import de.willuhn.jameica.hbci.server.Value; @@ -327,8 +329,14 @@ public static List create(Konto k, Date to) throws RemoteException //////////////////////////////////////////////////////////////////////////// // Schritt 2: Start-Saldo ermitteln double startSaldo = 0.0d; - if (k != null) - startSaldo = k.getNumUmsaetze() > 0 ? KontoUtil.getAnfangsSaldo(k,from) : k.getSaldo(); + if (k != null) { + final BeanService bs = Application.getBootLoader().getBootable(BeanService.class); + final AccountBalanceService balanceService = bs.get(AccountBalanceService.class); + AccountBalanceProvider balanceProvider = balanceService.getBalanceProviderForAccount(k); + List balance = balanceProvider.getBalanceData(k, from, from); // Saldo für heute + startSaldo = balance.get(0).getValue(); + } + // ////////////////////////////////////////////////////////////////////////////