From 052b80485536d5229bc97f90100fe73ced3f6fbb Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 27 Apr 2017 07:44:35 +0200 Subject: [PATCH] Fixed a bug where the opening balance could not be stored. --- CHANGELOG.md | 4 ++++ app/Repositories/Account/AccountRepository.php | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 249b91764f..b5e32e6bac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [4.4.2] - 2017-04-27 +### Fixed +Fixed a bug where the opening balance could not be stored. + ## [4.4.1] - 2017-04-27 ### Added diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 5d25d31fcc..a9e74aa9ef 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -625,9 +625,7 @@ class AccountRepository implements AccountRepositoryInterface */ protected function validOpeningBalanceData(array $data): bool { - if (isset($data['openingBalance']) - && isset($data['openingBalanceDate']) - && isset($data['openingBalanceCurrency']) + if (isset($data['openingBalance']) && isset($data['openingBalanceDate']) && bccomp(strval($data['openingBalance']), '0') !== 0 ) { Log::debug('Array has valid opening balance data.');