Skip to content

Commit

Permalink
Fix issue in liability credits.
Browse files Browse the repository at this point in the history
  • Loading branch information
JC5 committed Jul 21, 2021
1 parent 33d6584 commit cb759e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/Services/Internal/Support/JournalServiceTrait.php
Expand Up @@ -74,7 +74,7 @@ protected function getAccount(string $transactionType, string $direction, array

// and now try to find it, based on the type of transaction.
$message = 'Based on the fact that the transaction is a %s, the %s account should be in: %s. Direction is %s.';
Log::debug(sprintf($message, $transactionType, $direction, implode(', ', $expectedTypes[$transactionType]), $direction));
Log::debug(sprintf($message, $transactionType, $direction, implode(', ', $expectedTypes[$transactionType] ?? ['UNKNOWN']), $direction));

$result = $this->findAccountById($data, $expectedTypes[$transactionType]);
$result = $this->findAccountByName($result, $data, $expectedTypes[$transactionType]);
Expand Down
1 change: 1 addition & 0 deletions config/firefly.php
Expand Up @@ -658,6 +658,7 @@
TransactionTypeModel::OPENING_BALANCE => [AccountType::INITIAL_BALANCE, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT,
AccountType::MORTGAGE,],
TransactionTypeModel::RECONCILIATION => [AccountType::RECONCILIATION, AccountType::ASSET],
TransactionTypeModel::LIABILITY_CREDIT => [AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE],
// in case no transaction type is known yet, it could be anything.
'none' => [
AccountType::ASSET,
Expand Down

0 comments on commit cb759e5

Please sign in to comment.