James Cole
2022-09-18 12:23:20 +02:00
parent 67126e46b9
commit 9f95d7a76f
4 changed files with 21 additions and 0 deletions

View File

@@ -832,4 +832,13 @@ class GroupCollector implements GroupCollectorInterface
return $array; return $array;
} }
/**
* @inheritDoc
*/
public function isReconciled(): GroupCollectorInterface
{
$this->query->where('source.reconciled', 1)->where('destination.reconciled', 1);
return $this;
}
} }

View File

@@ -48,6 +48,14 @@ interface GroupCollectorInterface
*/ */
public function amountIs(string $amount): GroupCollectorInterface; public function amountIs(string $amount): GroupCollectorInterface;
/**
* Only journals that are reconciled.
*
* @return GroupCollectorInterface
*/
public function isReconciled(): GroupCollectorInterface;
/** /**
* Get transactions where the amount is less than. * Get transactions where the amount is less than.
* *

View File

@@ -610,6 +610,9 @@ class OperatorQuerySearch implements SearchInterface
case 'any_notes': case 'any_notes':
$this->collector->withAnyNotes(); $this->collector->withAnyNotes();
break; break;
case 'reconciled':
$this->collector->isReconciled();
break;
// //
// amount // amount
// //

View File

@@ -26,6 +26,7 @@ return [
'operators' => [ 'operators' => [
'user_action' => ['alias' => false, 'needs_context' => true,], 'user_action' => ['alias' => false, 'needs_context' => true,],
'account_id' => ['alias' => false, 'needs_context' => true,], 'account_id' => ['alias' => false, 'needs_context' => true,],
'reconciled' => ['alias' => false, 'needs_context' => false,],
'source_account_id' => ['alias' => false, 'needs_context' => true,], 'source_account_id' => ['alias' => false, 'needs_context' => true,],
'destination_account_id' => ['alias' => false, 'needs_context' => true,], 'destination_account_id' => ['alias' => false, 'needs_context' => true,],
'transaction_type' => ['alias' => false, 'needs_context' => true,], 'transaction_type' => ['alias' => false, 'needs_context' => true,],