mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 22:21:42 +00:00
Account search fixed.
This commit is contained in:
@@ -41,31 +41,6 @@ class ClearCategory implements ActionInterface
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all categories
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
* @codeCoverageIgnore
|
||||
* @deprecated
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function act(TransactionJournal $journal): bool
|
||||
{
|
||||
$journal->categories()->detach();
|
||||
$journal->touch();
|
||||
|
||||
// also remove categories from transactions:
|
||||
/** @var Transaction $transaction */
|
||||
foreach ($journal->transactions as $transaction) {
|
||||
$transaction->categories()->detach();
|
||||
}
|
||||
|
||||
Log::debug(sprintf('RuleAction ClearCategory removed all categories from journal %d.', $journal->id));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user