mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-03 03:00:14 +00:00
Fix various code.
This commit is contained in:
@@ -719,10 +719,10 @@ class OperatorQuerySearch implements SearchInterface
|
||||
//
|
||||
case 'currency_is':
|
||||
$currency = $this->findCurrency($value);
|
||||
if (null !== $currency) {
|
||||
if ($currency instanceof TransactionCurrency) {
|
||||
$this->collector->setCurrency($currency);
|
||||
}
|
||||
if (null === $currency) {
|
||||
if (!$currency instanceof TransactionCurrency) {
|
||||
$this->collector->findNothing();
|
||||
}
|
||||
|
||||
@@ -730,10 +730,10 @@ class OperatorQuerySearch implements SearchInterface
|
||||
|
||||
case '-currency_is':
|
||||
$currency = $this->findCurrency($value);
|
||||
if (null !== $currency) {
|
||||
if ($currency instanceof TransactionCurrency) {
|
||||
$this->collector->excludeCurrency($currency);
|
||||
}
|
||||
if (null === $currency) {
|
||||
if (!$currency instanceof TransactionCurrency) {
|
||||
$this->collector->findNothing();
|
||||
}
|
||||
|
||||
@@ -741,10 +741,10 @@ class OperatorQuerySearch implements SearchInterface
|
||||
|
||||
case 'foreign_currency_is':
|
||||
$currency = $this->findCurrency($value);
|
||||
if (null !== $currency) {
|
||||
if ($currency instanceof TransactionCurrency) {
|
||||
$this->collector->setForeignCurrency($currency);
|
||||
}
|
||||
if (null === $currency) {
|
||||
if (!$currency instanceof TransactionCurrency) {
|
||||
$this->collector->findNothing();
|
||||
}
|
||||
|
||||
@@ -752,10 +752,10 @@ class OperatorQuerySearch implements SearchInterface
|
||||
|
||||
case '-foreign_currency_is':
|
||||
$currency = $this->findCurrency($value);
|
||||
if (null !== $currency) {
|
||||
if ($currency instanceof TransactionCurrency) {
|
||||
$this->collector->excludeForeignCurrency($currency);
|
||||
}
|
||||
if (null === $currency) {
|
||||
if (!$currency instanceof TransactionCurrency) {
|
||||
$this->collector->findNothing();
|
||||
}
|
||||
|
||||
@@ -2109,7 +2109,7 @@ class OperatorQuerySearch implements SearchInterface
|
||||
}
|
||||
$result = $this->currencyRepository->findByCode($value);
|
||||
if (null === $result) {
|
||||
$result = $this->currencyRepository->findByName($value);
|
||||
return $this->currencyRepository->findByName($value);
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
Reference in New Issue
Block a user