mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-04 21:23:36 +00:00
Clean up repository.
This commit is contained in:
@@ -4,6 +4,7 @@ namespace FireflyIII\Helpers\Csv\PostProcessing;
|
||||
|
||||
use Auth;
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Crud\Account\AccountCrudInterface;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
@@ -230,6 +231,9 @@ class AssetAccount implements PostProcessorInterface
|
||||
*/
|
||||
private function parseAccountNumberString()
|
||||
{
|
||||
/** @var AccountCrudInterface $crud */
|
||||
$crud = app(AccountCrudInterface::class);
|
||||
|
||||
$accountNumber = $this->data['asset-account-number'] ?? '';
|
||||
$accountType = $this->getAccountType();
|
||||
$accounts = Auth::user()->accounts()->with(['accountmeta'])->where('account_type_id', $accountType->id)->get();
|
||||
@@ -258,7 +262,7 @@ class AssetAccount implements PostProcessorInterface
|
||||
'openingBalanceDate' => new Carbon,
|
||||
'openingBalanceCurrency' => 1, // hard coded.
|
||||
];
|
||||
$account = $repository->store($accountData);
|
||||
$account = $crud->store($accountData);
|
||||
|
||||
return $account;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user