Chore: use of else in accountform

This commit is contained in:
James Cole 2023-06-18 06:26:50 +02:00
parent f75e6430b1
commit 25f8acb417
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80

View File

@ -171,13 +171,14 @@ class AccountForm
$role = (string)$repository->getMetaValue($account, 'account_role');
if (in_array($account->accountType->type, $liabilityTypes, true)) {
$role = sprintf('l_%s', $account->accountType->type);
} elseif ('' === $role) {
}
if ('' === $role) {
$role = 'no_account_type';
if (AccountType::EXPENSE === $account->accountType->type) {
$role = 'expense_account';
} elseif (AccountType::REVENUE === $account->accountType->type) {
}
if (AccountType::REVENUE === $account->accountType->type) {
$role = 'revenue_account';
} else {
$role = 'no_account_type';
}
}
$key = (string)trans(sprintf('firefly.opt_group_%s', $role));