Fixed a bug in storing date changes for the opening balance of an account

This commit is contained in:
Robert Horlings 2016-01-22 15:44:23 +01:00
parent f5a21f64c0
commit f6b7bd5b44

View File

@ -554,7 +554,8 @@ class AccountRepository implements AccountRepositoryInterface
protected function updateInitialBalance(Account $account, TransactionJournal $journal, array $data)
{
$journal->date = $data['openingBalanceDate'];
$journal->save();
/** @var Transaction $transaction */
foreach ($journal->transactions()->get() as $transaction) {
if ($account->id == $transaction->account_id) {