mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 01:06:46 +00:00
This commit is contained in:
@@ -226,8 +226,10 @@ trait MetaCollection
|
|||||||
*/
|
*/
|
||||||
public function excludeInternalReference(string $internalReference): GroupCollectorInterface
|
public function excludeInternalReference(string $internalReference): GroupCollectorInterface
|
||||||
{
|
{
|
||||||
$this->joinMetaDataTables();
|
$internalReference = json_encode($internalReference);
|
||||||
|
$internalReference = str_replace('\\', '\\\\', trim($internalReference, '"'));
|
||||||
|
|
||||||
|
$this->joinMetaDataTables();
|
||||||
$this->query->where('journal_meta.name', '=', 'internal_reference');
|
$this->query->where('journal_meta.name', '=', 'internal_reference');
|
||||||
$this->query->where('journal_meta.data', 'NOT LIKE', sprintf('%%%s%%', $internalReference));
|
$this->query->where('journal_meta.data', 'NOT LIKE', sprintf('%%%s%%', $internalReference));
|
||||||
|
|
||||||
@@ -251,6 +253,9 @@ trait MetaCollection
|
|||||||
*/
|
*/
|
||||||
public function externalIdContains(string $externalId): GroupCollectorInterface
|
public function externalIdContains(string $externalId): GroupCollectorInterface
|
||||||
{
|
{
|
||||||
|
$externalId = json_encode($externalId);
|
||||||
|
$externalId = str_replace('\\', '\\\\', trim($externalId, '"'));
|
||||||
|
|
||||||
$this->joinMetaDataTables();
|
$this->joinMetaDataTables();
|
||||||
$this->query->where('journal_meta.name', '=', 'external_id');
|
$this->query->where('journal_meta.name', '=', 'external_id');
|
||||||
$this->query->where('journal_meta.data', 'LIKE', sprintf('%%%s%%', $externalId));
|
$this->query->where('journal_meta.data', 'LIKE', sprintf('%%%s%%', $externalId));
|
||||||
@@ -263,6 +268,9 @@ trait MetaCollection
|
|||||||
*/
|
*/
|
||||||
public function externalIdDoesNotContain(string $externalId): GroupCollectorInterface
|
public function externalIdDoesNotContain(string $externalId): GroupCollectorInterface
|
||||||
{
|
{
|
||||||
|
$externalId = json_encode($externalId);
|
||||||
|
$externalId = str_replace('\\', '\\\\', trim($externalId, '"'));
|
||||||
|
|
||||||
$this->joinMetaDataTables();
|
$this->joinMetaDataTables();
|
||||||
$this->query->where('journal_meta.name', '=', 'external_id');
|
$this->query->where('journal_meta.name', '=', 'external_id');
|
||||||
$this->query->where('journal_meta.data', 'NOT LIKE', sprintf('%%%s%%', $externalId));
|
$this->query->where('journal_meta.data', 'NOT LIKE', sprintf('%%%s%%', $externalId));
|
||||||
@@ -275,6 +283,9 @@ trait MetaCollection
|
|||||||
*/
|
*/
|
||||||
public function externalIdDoesNotEnd(string $externalId): GroupCollectorInterface
|
public function externalIdDoesNotEnd(string $externalId): GroupCollectorInterface
|
||||||
{
|
{
|
||||||
|
$externalId = json_encode($externalId);
|
||||||
|
$externalId = str_replace('\\', '\\\\', trim($externalId, '"'));
|
||||||
|
|
||||||
$this->joinMetaDataTables();
|
$this->joinMetaDataTables();
|
||||||
$this->query->where('journal_meta.name', '=', 'external_id');
|
$this->query->where('journal_meta.name', '=', 'external_id');
|
||||||
$this->query->where('journal_meta.data', 'NOT LIKE', sprintf('%%%s"', $externalId));
|
$this->query->where('journal_meta.data', 'NOT LIKE', sprintf('%%%s"', $externalId));
|
||||||
@@ -287,6 +298,9 @@ trait MetaCollection
|
|||||||
*/
|
*/
|
||||||
public function externalIdDoesNotStart(string $externalId): GroupCollectorInterface
|
public function externalIdDoesNotStart(string $externalId): GroupCollectorInterface
|
||||||
{
|
{
|
||||||
|
$externalId = json_encode($externalId);
|
||||||
|
$externalId = str_replace('\\', '\\\\', trim($externalId, '"'));
|
||||||
|
|
||||||
$this->joinMetaDataTables();
|
$this->joinMetaDataTables();
|
||||||
$this->query->where('journal_meta.name', '=', 'external_id');
|
$this->query->where('journal_meta.name', '=', 'external_id');
|
||||||
$this->query->where('journal_meta.data', 'LIKE', sprintf('"%s%%', $externalId));
|
$this->query->where('journal_meta.data', 'LIKE', sprintf('"%s%%', $externalId));
|
||||||
@@ -299,6 +313,9 @@ trait MetaCollection
|
|||||||
*/
|
*/
|
||||||
public function externalIdEnds(string $externalId): GroupCollectorInterface
|
public function externalIdEnds(string $externalId): GroupCollectorInterface
|
||||||
{
|
{
|
||||||
|
$externalId = json_encode($externalId);
|
||||||
|
$externalId = str_replace('\\', '\\\\', trim($externalId, '"'));
|
||||||
|
|
||||||
$this->joinMetaDataTables();
|
$this->joinMetaDataTables();
|
||||||
$this->query->where('journal_meta.name', '=', 'external_id');
|
$this->query->where('journal_meta.name', '=', 'external_id');
|
||||||
$this->query->where('journal_meta.data', 'LIKE', sprintf('%%%s"', $externalId));
|
$this->query->where('journal_meta.data', 'LIKE', sprintf('%%%s"', $externalId));
|
||||||
@@ -311,6 +328,9 @@ trait MetaCollection
|
|||||||
*/
|
*/
|
||||||
public function externalIdStarts(string $externalId): GroupCollectorInterface
|
public function externalIdStarts(string $externalId): GroupCollectorInterface
|
||||||
{
|
{
|
||||||
|
$externalId = json_encode($externalId);
|
||||||
|
$externalId = str_replace('\\', '\\\\', trim($externalId, '"'));
|
||||||
|
|
||||||
$this->joinMetaDataTables();
|
$this->joinMetaDataTables();
|
||||||
$this->query->where('journal_meta.name', '=', 'external_id');
|
$this->query->where('journal_meta.name', '=', 'external_id');
|
||||||
$this->query->where('journal_meta.data', 'LIKE', sprintf('"%s%%', $externalId));
|
$this->query->where('journal_meta.data', 'LIKE', sprintf('"%s%%', $externalId));
|
||||||
@@ -465,11 +485,16 @@ trait MetaCollection
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
public function internalReferenceContains(string $externalId): GroupCollectorInterface
|
public function internalReferenceContains(string $internalReference): GroupCollectorInterface
|
||||||
{
|
{
|
||||||
|
$internalReference = json_encode($internalReference);
|
||||||
|
$internalReference = str_replace('\\', '\\\\', trim($internalReference, '"'));
|
||||||
|
//var_dump($internalReference);
|
||||||
|
//exit;
|
||||||
|
|
||||||
$this->joinMetaDataTables();
|
$this->joinMetaDataTables();
|
||||||
$this->query->where('journal_meta.name', '=', 'internal_reference');
|
$this->query->where('journal_meta.name', '=', 'internal_reference');
|
||||||
$this->query->where('journal_meta.data', 'LIKE', sprintf('%%%s%%', $externalId));
|
$this->query->where('journal_meta.data', 'LIKE', sprintf('%%%s%%', $internalReference));
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -477,11 +502,14 @@ trait MetaCollection
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
public function internalReferenceDoesNotContain(string $externalId): GroupCollectorInterface
|
public function internalReferenceDoesNotContain(string $internalReference): GroupCollectorInterface
|
||||||
{
|
{
|
||||||
|
$internalReference = json_encode($internalReference);
|
||||||
|
$internalReference = str_replace('\\', '\\\\', trim($internalReference, '"'));
|
||||||
|
|
||||||
$this->joinMetaDataTables();
|
$this->joinMetaDataTables();
|
||||||
$this->query->where('journal_meta.name', '=', 'internal_reference');
|
$this->query->where('journal_meta.name', '=', 'internal_reference');
|
||||||
$this->query->where('journal_meta.data', 'NOT LIKE', sprintf('%%%s%%', $externalId));
|
$this->query->where('journal_meta.data', 'NOT LIKE', sprintf('%%%s%%', $internalReference));
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -489,11 +517,14 @@ trait MetaCollection
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
public function internalReferenceDoesNotEnd(string $externalId): GroupCollectorInterface
|
public function internalReferenceDoesNotEnd(string $internalReference): GroupCollectorInterface
|
||||||
{
|
{
|
||||||
|
$internalReference = json_encode($internalReference);
|
||||||
|
$internalReference = str_replace('\\', '\\\\', trim($internalReference, '"'));
|
||||||
|
|
||||||
$this->joinMetaDataTables();
|
$this->joinMetaDataTables();
|
||||||
$this->query->where('journal_meta.name', '=', 'internal_reference');
|
$this->query->where('journal_meta.name', '=', 'internal_reference');
|
||||||
$this->query->where('journal_meta.data', 'NOT LIKE', sprintf('%%%s"', $externalId));
|
$this->query->where('journal_meta.data', 'NOT LIKE', sprintf('%%%s"', $internalReference));
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -501,11 +532,14 @@ trait MetaCollection
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
public function internalReferenceDoesNotStart(string $externalId): GroupCollectorInterface
|
public function internalReferenceDoesNotStart(string $internalReference): GroupCollectorInterface
|
||||||
{
|
{
|
||||||
|
$internalReference = json_encode($internalReference);
|
||||||
|
$internalReference = str_replace('\\', '\\\\', trim($internalReference, '"'));
|
||||||
|
|
||||||
$this->joinMetaDataTables();
|
$this->joinMetaDataTables();
|
||||||
$this->query->where('journal_meta.name', '=', 'internal_reference');
|
$this->query->where('journal_meta.name', '=', 'internal_reference');
|
||||||
$this->query->where('journal_meta.data', 'LIKE', sprintf('"%s%%', $externalId));
|
$this->query->where('journal_meta.data', 'LIKE', sprintf('"%s%%', $internalReference));
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -513,11 +547,14 @@ trait MetaCollection
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
public function internalReferenceEnds(string $externalId): GroupCollectorInterface
|
public function internalReferenceEnds(string $internalReference): GroupCollectorInterface
|
||||||
{
|
{
|
||||||
|
$internalReference = json_encode($internalReference);
|
||||||
|
$internalReference = str_replace('\\', '\\\\', trim($internalReference, '"'));
|
||||||
|
|
||||||
$this->joinMetaDataTables();
|
$this->joinMetaDataTables();
|
||||||
$this->query->where('journal_meta.name', '=', 'internal_reference');
|
$this->query->where('journal_meta.name', '=', 'internal_reference');
|
||||||
$this->query->where('journal_meta.data', 'LIKE', sprintf('%%%s"', $externalId));
|
$this->query->where('journal_meta.data', 'LIKE', sprintf('%%%s"', $internalReference));
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -525,11 +562,14 @@ trait MetaCollection
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
public function internalReferenceStarts(string $externalId): GroupCollectorInterface
|
public function internalReferenceStarts(string $internalReference): GroupCollectorInterface
|
||||||
{
|
{
|
||||||
|
$internalReference = json_encode($internalReference);
|
||||||
|
$internalReference = str_replace('\\', '\\\\', trim($internalReference, '"'));
|
||||||
|
|
||||||
$this->joinMetaDataTables();
|
$this->joinMetaDataTables();
|
||||||
$this->query->where('journal_meta.name', '=', 'internal_reference');
|
$this->query->where('journal_meta.name', '=', 'internal_reference');
|
||||||
$this->query->where('journal_meta.data', 'LIKE', sprintf('"%s%%', $externalId));
|
$this->query->where('journal_meta.data', 'LIKE', sprintf('"%s%%', $internalReference));
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -796,8 +836,10 @@ trait MetaCollection
|
|||||||
*/
|
*/
|
||||||
public function setInternalReference(string $internalReference): GroupCollectorInterface
|
public function setInternalReference(string $internalReference): GroupCollectorInterface
|
||||||
{
|
{
|
||||||
$this->joinMetaDataTables();
|
$internalReference = json_encode($internalReference);
|
||||||
|
$internalReference = str_replace('\\', '\\\\', trim($internalReference, '"'));
|
||||||
|
|
||||||
|
$this->joinMetaDataTables();
|
||||||
$this->query->where('journal_meta.name', '=', 'internal_reference');
|
$this->query->where('journal_meta.name', '=', 'internal_reference');
|
||||||
$this->query->where('journal_meta.data', 'LIKE', sprintf('%%%s%%', $internalReference));
|
$this->query->where('journal_meta.data', 'LIKE', sprintf('%%%s%%', $internalReference));
|
||||||
|
|
||||||
|
@@ -376,11 +376,11 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* Look for specific external ID's.
|
* Look for specific external ID's.
|
||||||
*
|
*
|
||||||
* @param string $externalId
|
* @param string $internalReference
|
||||||
*
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function excludeInternalReference(string $externalId): GroupCollectorInterface;
|
public function excludeInternalReference(string $internalReference): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Limit the result to NOT a set of specific transaction journals.
|
* Limit the result to NOT a set of specific transaction journals.
|
||||||
@@ -629,46 +629,46 @@ interface GroupCollectorInterface
|
|||||||
public function hasNoAttachments(): GroupCollectorInterface;
|
public function hasNoAttachments(): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $internalReference
|
||||||
*
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function internalReferenceContains(string $externalId): GroupCollectorInterface;
|
public function internalReferenceContains(string $internalReference): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $internalReference
|
||||||
*
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function internalReferenceDoesNotContain(string $externalId): GroupCollectorInterface;
|
public function internalReferenceDoesNotContain(string $internalReference): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $internalReference
|
||||||
*
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function internalReferenceDoesNotEnd(string $externalId): GroupCollectorInterface;
|
public function internalReferenceDoesNotEnd(string $internalReference): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $internalReference
|
||||||
*
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function internalReferenceDoesNotStart(string $externalId): GroupCollectorInterface;
|
public function internalReferenceDoesNotStart(string $internalReference): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $internalReference
|
||||||
*
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function internalReferenceEnds(string $externalId): GroupCollectorInterface;
|
public function internalReferenceEnds(string $internalReference): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $internalReference
|
||||||
*
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function internalReferenceStarts(string $externalId): GroupCollectorInterface;
|
public function internalReferenceStarts(string $internalReference): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Only journals that are reconciled.
|
* Only journals that are reconciled.
|
||||||
@@ -1119,11 +1119,11 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* Look for specific external ID's.
|
* Look for specific external ID's.
|
||||||
*
|
*
|
||||||
* @param string $externalId
|
* @param string $internalReference
|
||||||
*
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function setInternalReference(string $externalId): GroupCollectorInterface;
|
public function setInternalReference(string $internalReference): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Limit the result to a set of specific transaction journals.
|
* Limit the result to a set of specific transaction journals.
|
||||||
|
Reference in New Issue
Block a user