This commit is contained in:
James Cole
2020-08-26 20:18:27 +02:00
parent c985683ee3
commit cd156d6991
7 changed files with 91 additions and 50 deletions

View File

@@ -347,6 +347,21 @@ class OperatorQuerySearch implements SearchInterface
}
break;
//
// cash account
//
case 'source_is_cash':
$account = $this->getCashAccount();
$this->collector->setSourceAccounts(new Collection([$account]));
break;
case 'destination_is_cash':
$account = $this->getCashAccount();
$this->collector->setDestinationAccounts(new Collection([$account]));
break;
case 'account_is_cash':
$account = $this->getCashAccount();
$this->collector->setAccounts(new Collection([$account]));
break;
//
// description
//
case 'description_starts':
@@ -713,4 +728,12 @@ class OperatorQuerySearch implements SearchInterface
{
$this->limit = $limit;
}
/**
* @return Account
*/
private function getCashAccount(): Account
{
return $this->accountRepository->getCashAccount();
}
}