mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 18:41:20 +00:00
Each CSV converter can set the certainty of their conversion.
This commit is contained in:
@@ -40,7 +40,7 @@ class CurrencyCode extends BasicConverter implements ConverterInterface
|
||||
$currency = $repository->find(intval($this->mapping[$value]));
|
||||
if (!is_null($currency->id)) {
|
||||
Log::debug('Found currency by ID', ['id' => $currency->id]);
|
||||
|
||||
$this->setCertainty(100);
|
||||
return $currency;
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ class CurrencyCode extends BasicConverter implements ConverterInterface
|
||||
$currency = $repository->findByCode($value);
|
||||
if (!is_null($currency->id)) {
|
||||
Log::debug('Found currency by code', ['id' => $currency->id]);
|
||||
|
||||
$this->setCertainty(100);
|
||||
return $currency;
|
||||
}
|
||||
$currency = $repository->store(
|
||||
@@ -59,6 +59,7 @@ class CurrencyCode extends BasicConverter implements ConverterInterface
|
||||
'symbol' => $value,
|
||||
]
|
||||
);
|
||||
$this->setCertainty(100);
|
||||
|
||||
return $currency;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user