From 052b80485536d5229bc97f90100fe73ced3f6fbb Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 27 Apr 2017 07:44:35 +0200 Subject: [PATCH 1/2] 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.'); From 7fbf359efd2b64ce9ddcedd0c893879f9b0b27fd Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 27 Apr 2017 07:45:15 +0200 Subject: [PATCH 2/2] New version [skip ci] --- config/firefly.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/firefly.php b/config/firefly.php index 6633c412d3..068fbf8516 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -23,7 +23,7 @@ return [ 'is_demo_site' => false, ], 'encryption' => (is_null(env('USE_ENCRYPTION')) || env('USE_ENCRYPTION') === true), - 'version' => '4.4.1', + 'version' => '4.4.2', 'maxUploadSize' => 5242880, 'allowedMimes' => ['image/png', 'image/jpeg', 'application/pdf'], 'list_length' => 10,