mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Complete accounts and bills end point.
This commit is contained in:
@@ -386,6 +386,16 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
return $journal->date->format('Y-m-d');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Account $account
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getPiggyBanks(Account $account): Collection
|
||||
{
|
||||
return $account->piggyBanks()->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Account $account
|
||||
*
|
||||
@@ -416,6 +426,18 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
return $account;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Account $account
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isAsset(Account $account): bool
|
||||
{
|
||||
$type = $account->accountType->type;
|
||||
|
||||
return AccountType::ASSET === $type || AccountType::DEFAULT === $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Account $account
|
||||
*
|
||||
|
Reference in New Issue
Block a user