Some generic code refactoring.

This commit is contained in:
James Cole
2019-06-21 19:10:02 +02:00
parent fb1af395f9
commit 2d3d7f7720
67 changed files with 920 additions and 603 deletions

View File

@@ -229,7 +229,7 @@ class AccountTransformer extends AbstractTransformer
{
$openingBalance = null;
$openingBalanceDate = null;
if (\in_array($accountType, ['asset', 'liabilities'], true)) {
if (in_array($accountType, ['asset', 'liabilities'], true)) {
$amount = $this->repository->getOpeningBalanceAmount($account);
$openingBalance = null === $amount ? null : round($amount, $decimalPlaces);
$openingBalanceDate = $this->repository->getOpeningBalanceDate($account);