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
2 changed files with 5 additions and 3 deletions

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