Skip to content

Commit

Permalink
feat(financial entry): include deleted entities on enriched document
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Aug 10, 2024
1 parent 832ba63 commit ec7981b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Controllers/FinancialEntryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ protected static function enrichResponseDocument(array $initial_document): array
if (count($linked_modifiers) > 0) {
$modifiers = model(ModifierModel::class)
->whereIn("id", array_unique($linked_modifiers))
->withDeleted()
->findAll();
}

Expand All @@ -107,6 +108,7 @@ protected static function enrichResponseDocument(array $initial_document): array
if (count($linked_accounts) > 0) {
$accounts = model(AccountModel::class)
->whereIn("id", array_unique($linked_accounts))
->withDeleted()
->findAll();
}
$enriched_document["accounts"] = $accounts;
Expand All @@ -121,6 +123,7 @@ protected static function enrichResponseDocument(array $initial_document): array
if (count($linked_currencies) > 0) {
$currencies = model(CurrencyModel::class)
->whereIn("id", array_unique($linked_currencies))
->withDeleted()
->findAll();
}
$enriched_document["currencies"] = $currencies;
Expand Down

0 comments on commit ec7981b

Please sign in to comment.