Clean up several endpoints with complex code.

This commit is contained in:
James Cole
2024-12-29 18:32:02 +01:00
parent 05f1819f7d
commit 9f25880a59
7 changed files with 198 additions and 305 deletions

View File

@@ -58,7 +58,7 @@ class AccountTransformer extends AbstractTransformer
// get account type:
$fullType = $account->accountType->type;
$accountType = (string) config(sprintf('firefly.shortNamesByFullName.%s', $fullType));
$accountType = (string) config(sprintf( 'firefly.shortNamesByFullName.%s', $fullType));
$liabilityType = (string) config(sprintf('firefly.shortLiabilityNameByFullName.%s', $fullType));
$liabilityType = '' === $liabilityType ? null : strtolower($liabilityType);
$liabilityDirection = $this->repository->getMetaValue($account, 'liability_direction');