mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 03:43:07 +00:00
Merge branch 'develop' of github.com:firefly-iii/firefly-iii into develop
This commit is contained in:
@@ -212,6 +212,40 @@ trait MetaCollection
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function withoutExternalUrl(): GroupCollectorInterface
|
||||
{
|
||||
if (false === $this->hasJoinedMetaTables) {
|
||||
$this->hasJoinedMetaTables = true;
|
||||
$this->query->leftJoin('journal_meta', 'transaction_journals.id', '=', 'journal_meta.transaction_journal_id');
|
||||
}
|
||||
$this->query->where(function(Builder $q1) {
|
||||
$q1->where(function(Builder $q2) {
|
||||
$q2->where('journal_meta.name', '=', 'external_url');
|
||||
$q2->whereNull('journal_meta.data');
|
||||
})->orWhereNull('journal_meta.name');
|
||||
});
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function withExternalUrl(): GroupCollectorInterface
|
||||
{
|
||||
if (false === $this->hasJoinedMetaTables) {
|
||||
$this->hasJoinedMetaTables = true;
|
||||
$this->query->leftJoin('journal_meta', 'transaction_journals.id', '=', 'journal_meta.transaction_journal_id');
|
||||
}
|
||||
$this->query->where('journal_meta.name', '=', 'external_url');
|
||||
$this->query->whereNotNull('journal_meta.data');
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
@@ -305,6 +305,20 @@ interface GroupCollectorInterface
|
||||
*/
|
||||
public function setExternalId(string $externalId): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Transactions without an external URL
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function withoutExternalUrl(): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Transactions with an external URL
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function withExternalUrl(): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Limit results to a specific foreign currency.
|
||||
*
|
||||
|
@@ -627,6 +627,15 @@ class OperatorQuerySearch implements SearchInterface
|
||||
$this->collector->setUpdatedAt($updatedAt);
|
||||
break;
|
||||
//
|
||||
// external URL
|
||||
//
|
||||
case 'no_external_url':
|
||||
$this->collector->withoutExternalUrl();
|
||||
break;
|
||||
case 'any_external_url':
|
||||
$this->collector->withExternalUrl();
|
||||
break;
|
||||
//
|
||||
// other fields
|
||||
//
|
||||
case 'external_id':
|
||||
|
Reference in New Issue
Block a user