mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-17 11:59:05 +00:00
More work done for the transaction controller.
This commit is contained in:
@@ -327,6 +327,38 @@ class TransactionJournal implements TransactionJournalInterface, CUD, CommonData
|
||||
return $this->getUser()->transactionjournals()->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Some objects.
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getTransfers()
|
||||
{
|
||||
return $this->getUser()->transactionjournals()->withRelevantData()->transactionTypes(['Transfer'])->get(['transaction_journals.*']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Some objects.
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getDeposits()
|
||||
{
|
||||
return $this->getUser()->transactionjournals()->withRelevantData()->transactionTypes(['Deposit'])->get(['transaction_journals.*']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Some objects.
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getWithdrawals()
|
||||
{
|
||||
return $this->getUser()->transactionjournals()->withRelevantData()->transactionTypes(['Withdrawal'])->get(['transaction_journals.*']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Finds an account type using one of the "$what"'s: expense, asset, revenue, opening, etc.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user