Refactored some methods surrounding the opening balance of an account.

This commit is contained in:
James Cole
2016-10-10 07:01:14 +02:00
parent 71804af624
commit 7180a40cd8
4 changed files with 47 additions and 85 deletions

View File

@@ -47,28 +47,6 @@ interface AccountRepositoryInterface
*/
public function destroy(Account $account, Account $moveTo): bool;
/**
* Returns the transaction from a journal that is related to a given account. Since a journal generally only contains
* two transactions, this will return one of the two. This method fails horribly when the journal has more than two transactions,
* but luckily it isn't used for such folly.
*
* @param TransactionJournal $journal
* @param Account $account
*
* @return Transaction
* @throws FireflyException
*/
public function getFirstTransaction(TransactionJournal $journal, Account $account): Transaction;
/**
* Returns the date of the very last transaction in this account.
*
* @param Account $account
*
* @return Carbon
*/
public function newestJournalDate(Account $account): Carbon;
/**
* Returns the date of the very first transaction in this account.
*