mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Update API and transaction components.
This commit is contained in:
@@ -249,22 +249,4 @@ trait ModelInformation
|
||||
{
|
||||
return TransactionType::OPENING_BALANCE === $journal->transactionType->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if journal is split.
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function isSplitJournal(TransactionJournal $journal): bool // validate objects
|
||||
{
|
||||
/** @var JournalRepositoryInterface $repository */
|
||||
$repository = app(JournalRepositoryInterface::class);
|
||||
$repository->setUser($journal->user);
|
||||
$count = $repository->countTransactions($journal);
|
||||
|
||||
return $count > 2;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user