Fixed a bug where the opening balance could not be stored.

This commit is contained in:
James Cole 2017-04-27 07:44:35 +02:00
parent 7e2c24b82e
commit 052b804855
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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.');