mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fixes #694
This commit is contained in:
@@ -181,11 +181,18 @@ class ImportBill
|
||||
Log::debug('Finding a mapped bill based on', $array);
|
||||
|
||||
$search = intval($array['mapped']);
|
||||
$account = $this->repository->find($search);
|
||||
$bill = $this->repository->find($search);
|
||||
|
||||
Log::debug(sprintf('Found bill! #%d ("%s"). Return it', $account->id, $account->name));
|
||||
if (is_null($bill->id)) {
|
||||
Log::error(sprintf('There is no bill with id #%d. Invalid mapping will be ignored!', $search));
|
||||
|
||||
return $account;
|
||||
return new Bill;
|
||||
}
|
||||
|
||||
|
||||
Log::debug(sprintf('Found bill! #%d ("%s"). Return it', $bill->id, $bill->name));
|
||||
|
||||
return $bill;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user