Add "id:xxx" search

This commit is contained in:
James Cole
2021-01-20 18:41:31 +01:00
parent 8efc1df385
commit 8918c3ed12
4 changed files with 28 additions and 0 deletions

View File

@@ -255,6 +255,20 @@ class GroupCollector implements GroupCollectorInterface
return $this;
}
/**
* Limit the result to a set of specific transaction groups.
*
* @param array $groupIds
*
* @return GroupCollectorInterface
*/
public function setIds(array $groupIds): GroupCollectorInterface {
$this->query->whereIn('transaction_groups.id', $groupIds);
return $this;
}
/**
* Limit the number of returned entries.
*

View File

@@ -240,6 +240,15 @@ interface GroupCollectorInterface
*/
public function setJournalIds(array $journalIds): GroupCollectorInterface;
/**
* Limit the result to a set of specific transaction groups.
*
* @param array $groupIds
*
* @return GroupCollectorInterface
*/
public function setIds(array $groupIds): GroupCollectorInterface;
/**
* Limit the number of returned entries.
*

View File

@@ -332,6 +332,10 @@ class OperatorQuerySearch implements SearchInterface
$parts = explode(',', $value);
$this->collector->setJournalIds($parts);
break;
case 'id':
$parts = explode(',', $value);
$this->collector->setIds($parts);
break;
case 'destination_account_starts':
$this->searchAccount($value, 2, 1);
break;