mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Move findByIban
This commit is contained in:
@@ -62,7 +62,7 @@ class AssetAccountIban extends BasicConverter implements ConverterInterface
|
||||
}
|
||||
|
||||
// not mapped? Still try to find it first:
|
||||
$account = $crud->findByIban($value, [AccountType::ASSET]);
|
||||
$account = $repository->findByIban($value, [AccountType::ASSET]);
|
||||
if (!is_null($account->id)) {
|
||||
Log::debug('Found account by IBAN', ['id' => $account->id]);
|
||||
$this->setCertainty(50);
|
||||
|
@@ -61,7 +61,7 @@ class OpposingAccountIban extends BasicConverter implements ConverterInterface
|
||||
}
|
||||
|
||||
// not mapped? Still try to find it first:
|
||||
$account = $crud->findByIban($value, []);
|
||||
$account = $repository->findByIban($value, []);
|
||||
if (!is_null($account->id)) {
|
||||
Log::debug('Found account by IBAN', ['id' => $account->id]);
|
||||
Log::info(
|
||||
|
@@ -23,6 +23,7 @@ use FireflyIII\Import\Specifics\SpecificInterface;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\ImportJob;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use Illuminate\Http\Request;
|
||||
use League\Csv\Reader;
|
||||
use Log;
|
||||
@@ -177,8 +178,9 @@ class CsvSetup implements SetupInterface
|
||||
*/
|
||||
public function saveImportConfiguration(array $data, FileBag $files): bool
|
||||
{
|
||||
/** @var AccountCrud $repository */
|
||||
$repository = app(AccountCrud::class, [auth()->user()]);
|
||||
/** @var AccountRepositoryInterface $repository */
|
||||
$repository = app(AccountRepositoryInterface::class, [auth()->user()]);
|
||||
|
||||
$importId = $data['csv_import_account'] ?? 0;
|
||||
$account = $repository->find(intval($importId));
|
||||
|
||||
@@ -384,6 +386,10 @@ class CsvSetup implements SetupInterface
|
||||
|
||||
//do something here
|
||||
foreach ($indexes as $index) { // this is simply 1, 2, 3, etc.
|
||||
if (!isset($row[$index])) {
|
||||
// don't really know how to handle this. Just skip, for now.
|
||||
continue;
|
||||
}
|
||||
$value = $row[$index];
|
||||
if (strlen($value) > 0) {
|
||||
|
||||
|
Reference in New Issue
Block a user