diff --git a/app/Helpers/Csv/Converter/AssetAccountIban.php b/app/Helpers/Csv/Converter/AssetAccountIban.php index e10ceb344f..959e93a1de 100644 --- a/app/Helpers/Csv/Converter/AssetAccountIban.php +++ b/app/Helpers/Csv/Converter/AssetAccountIban.php @@ -32,7 +32,7 @@ class AssetAccountIban extends BasicConverter implements ConverterInterface if (is_null($account)) { // create it if doesn't exist. - $account = Account::firstOrCreateEncrypted( // TODO use repository + $account = Account::firstOrCreateEncrypted( // See issue #180 [ 'name' => $this->value, 'iban' => $this->value, diff --git a/app/Helpers/Csv/Converter/AssetAccountName.php b/app/Helpers/Csv/Converter/AssetAccountName.php index 14eb37d1c3..888cfb8faf 100644 --- a/app/Helpers/Csv/Converter/AssetAccountName.php +++ b/app/Helpers/Csv/Converter/AssetAccountName.php @@ -36,7 +36,7 @@ class AssetAccountName extends BasicConverter implements ConverterInterface } // create it if doesnt exist. - $account = Account::firstOrCreateEncrypted( // TODO use repository + $account = Account::firstOrCreateEncrypted( // See issue #180 [ 'name' => $this->value, 'iban' => '', diff --git a/app/Helpers/Csv/Converter/AssetAccountNumber.php b/app/Helpers/Csv/Converter/AssetAccountNumber.php index b66ee6a7f4..803fc9763f 100644 --- a/app/Helpers/Csv/Converter/AssetAccountNumber.php +++ b/app/Helpers/Csv/Converter/AssetAccountNumber.php @@ -48,7 +48,7 @@ class AssetAccountNumber extends BasicConverter implements ConverterInterface 'name' => $this->value, 'accountType' => 'asset', 'virtualBalance' => 0, - 'virtualBalanceCurrency' => 1, // TODO hard coded. + 'virtualBalanceCurrency' => 1, // hard coded. 'active' => true, 'user' => Auth::user()->id, 'iban' => null, @@ -56,7 +56,7 @@ class AssetAccountNumber extends BasicConverter implements ConverterInterface 'accountRole' => null, 'openingBalance' => 0, 'openingBalanceDate' => new Carbon, - 'openingBalanceCurrency' => 1, // TODO hard coded. + 'openingBalanceCurrency' => 1, // hard coded. ]; diff --git a/app/Helpers/Csv/Converter/BudgetName.php b/app/Helpers/Csv/Converter/BudgetName.php index e2a017d483..db7961d2be 100644 --- a/app/Helpers/Csv/Converter/BudgetName.php +++ b/app/Helpers/Csv/Converter/BudgetName.php @@ -22,7 +22,7 @@ class BudgetName extends BasicConverter implements ConverterInterface if (isset($this->mapped[$this->index][$this->value])) { $budget = Auth::user()->budgets()->find($this->mapped[$this->index][$this->value]); } else { - $budget = Budget::firstOrCreateEncrypted( // TODO use repository + $budget = Budget::firstOrCreateEncrypted( // See issue #180 [ 'name' => $this->value, 'user_id' => Auth::user()->id, diff --git a/app/Helpers/Csv/Converter/CategoryName.php b/app/Helpers/Csv/Converter/CategoryName.php index 0f1fcc9ccb..c7d7b27aca 100644 --- a/app/Helpers/Csv/Converter/CategoryName.php +++ b/app/Helpers/Csv/Converter/CategoryName.php @@ -22,7 +22,7 @@ class CategoryName extends BasicConverter implements ConverterInterface if (isset($this->mapped[$this->index][$this->value])) { $category = Auth::user()->categories()->find($this->mapped[$this->index][$this->value]); } else { - $category = Category::firstOrCreateEncrypted( // TODO use repository + $category = Category::firstOrCreateEncrypted( // See issue #180 [ 'name' => $this->value, 'user_id' => Auth::user()->id, diff --git a/app/Helpers/Csv/Converter/TagsComma.php b/app/Helpers/Csv/Converter/TagsComma.php index fe1550036a..02ac2bc14a 100644 --- a/app/Helpers/Csv/Converter/TagsComma.php +++ b/app/Helpers/Csv/Converter/TagsComma.php @@ -23,7 +23,7 @@ class TagsComma extends BasicConverter implements ConverterInterface $strings = explode(',', $this->value); foreach ($strings as $string) { - $tag = Tag::firstOrCreateEncrypted( // TODO use repository + $tag = Tag::firstOrCreateEncrypted( // See issue #180 [ 'tag' => $string, 'tagMode' => 'nothing', diff --git a/app/Helpers/Csv/Converter/TagsSpace.php b/app/Helpers/Csv/Converter/TagsSpace.php index d371073679..c0e7b5c4f8 100644 --- a/app/Helpers/Csv/Converter/TagsSpace.php +++ b/app/Helpers/Csv/Converter/TagsSpace.php @@ -23,7 +23,7 @@ class TagsSpace extends BasicConverter implements ConverterInterface $strings = explode(' ', $this->value); foreach ($strings as $string) { - $tag = Tag::firstOrCreateEncrypted( // TODO use repository + $tag = Tag::firstOrCreateEncrypted( // See issue #180 [ 'tag' => $string, 'tagMode' => 'nothing', diff --git a/app/Helpers/Csv/PostProcessing/AssetAccount.php b/app/Helpers/Csv/PostProcessing/AssetAccount.php index a6a8e043c2..e7439bfb7a 100644 --- a/app/Helpers/Csv/PostProcessing/AssetAccount.php +++ b/app/Helpers/Csv/PostProcessing/AssetAccount.php @@ -154,9 +154,9 @@ class AssetAccount implements PostProcessorInterface $name = $this->data['asset-account-name'] ?? ''; $iban = $this->data['asset-account-iban'] ?? ''; - // create if not exists: // TODO should be through repository. + // create if not exists: // See issue #180 $name = strlen($name) > 0 ? $name : $iban; - $account = Account::firstOrCreateEncrypted( // TODO use repository + $account = Account::firstOrCreateEncrypted( [ 'user_id' => Auth::user()->id, 'account_type_id' => $accountType->id, @@ -211,7 +211,8 @@ class AssetAccount implements PostProcessorInterface return $entry; } } - // create if not exists: // TODO use repository + // create if not exists: + // See issue #180 $account = Account::firstOrCreateEncrypted( [ 'user_id' => Auth::user()->id, @@ -249,7 +250,7 @@ class AssetAccount implements PostProcessorInterface 'name' => $accountNumber, 'accountType' => 'asset', 'virtualBalance' => 0, - 'virtualBalanceCurrency' => 1, // TODO hard coded. + 'virtualBalanceCurrency' => 1, // hard coded. 'active' => true, 'user' => Auth::user()->id, 'iban' => null, @@ -257,7 +258,7 @@ class AssetAccount implements PostProcessorInterface 'accountRole' => null, 'openingBalance' => 0, 'openingBalanceDate' => new Carbon, - 'openingBalanceCurrency' => 1, // TODO hard coded. + 'openingBalanceCurrency' => 1, // hard coded. ]; $account = $repository->store($accountData); diff --git a/app/Helpers/Csv/PostProcessing/OpposingAccount.php b/app/Helpers/Csv/PostProcessing/OpposingAccount.php index 969289a636..0bc038bba3 100644 --- a/app/Helpers/Csv/PostProcessing/OpposingAccount.php +++ b/app/Helpers/Csv/PostProcessing/OpposingAccount.php @@ -125,7 +125,7 @@ class OpposingAccount implements PostProcessorInterface // create if not exists: $name = is_string($this->data['opposing-account-name']) && strlen($this->data['opposing-account-name']) > 0 ? $this->data['opposing-account-name'] : $this->data['opposing-account-iban']; - $account = Account::firstOrCreateEncrypted( // TODO use repository + $account = Account::firstOrCreateEncrypted( // See issue #180 [ 'user_id' => Auth::user()->id, 'account_type_id' => $accountType->id, @@ -195,7 +195,7 @@ class OpposingAccount implements PostProcessorInterface } } // create if not exists: - $account = Account::firstOrCreateEncrypted( // TODO use repository + $account = Account::firstOrCreateEncrypted( // See issue #180 [ 'user_id' => Auth::user()->id, 'account_type_id' => $accountType->id,