mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Removed todo comments.
This commit is contained in:
parent
a790838222
commit
2e15f1e2a3
@ -32,7 +32,7 @@ class AssetAccountIban extends BasicConverter implements ConverterInterface
|
|||||||
|
|
||||||
if (is_null($account)) {
|
if (is_null($account)) {
|
||||||
// create it if doesn't exist.
|
// create it if doesn't exist.
|
||||||
$account = Account::firstOrCreateEncrypted( // TODO use repository
|
$account = Account::firstOrCreateEncrypted( // See issue #180
|
||||||
[
|
[
|
||||||
'name' => $this->value,
|
'name' => $this->value,
|
||||||
'iban' => $this->value,
|
'iban' => $this->value,
|
||||||
|
@ -36,7 +36,7 @@ class AssetAccountName extends BasicConverter implements ConverterInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create it if doesnt exist.
|
// create it if doesnt exist.
|
||||||
$account = Account::firstOrCreateEncrypted( // TODO use repository
|
$account = Account::firstOrCreateEncrypted( // See issue #180
|
||||||
[
|
[
|
||||||
'name' => $this->value,
|
'name' => $this->value,
|
||||||
'iban' => '',
|
'iban' => '',
|
||||||
|
@ -48,7 +48,7 @@ class AssetAccountNumber extends BasicConverter implements ConverterInterface
|
|||||||
'name' => $this->value,
|
'name' => $this->value,
|
||||||
'accountType' => 'asset',
|
'accountType' => 'asset',
|
||||||
'virtualBalance' => 0,
|
'virtualBalance' => 0,
|
||||||
'virtualBalanceCurrency' => 1, // TODO hard coded.
|
'virtualBalanceCurrency' => 1, // hard coded.
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'user' => Auth::user()->id,
|
'user' => Auth::user()->id,
|
||||||
'iban' => null,
|
'iban' => null,
|
||||||
@ -56,7 +56,7 @@ class AssetAccountNumber extends BasicConverter implements ConverterInterface
|
|||||||
'accountRole' => null,
|
'accountRole' => null,
|
||||||
'openingBalance' => 0,
|
'openingBalance' => 0,
|
||||||
'openingBalanceDate' => new Carbon,
|
'openingBalanceDate' => new Carbon,
|
||||||
'openingBalanceCurrency' => 1, // TODO hard coded.
|
'openingBalanceCurrency' => 1, // hard coded.
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ class BudgetName extends BasicConverter implements ConverterInterface
|
|||||||
if (isset($this->mapped[$this->index][$this->value])) {
|
if (isset($this->mapped[$this->index][$this->value])) {
|
||||||
$budget = Auth::user()->budgets()->find($this->mapped[$this->index][$this->value]);
|
$budget = Auth::user()->budgets()->find($this->mapped[$this->index][$this->value]);
|
||||||
} else {
|
} else {
|
||||||
$budget = Budget::firstOrCreateEncrypted( // TODO use repository
|
$budget = Budget::firstOrCreateEncrypted( // See issue #180
|
||||||
[
|
[
|
||||||
'name' => $this->value,
|
'name' => $this->value,
|
||||||
'user_id' => Auth::user()->id,
|
'user_id' => Auth::user()->id,
|
||||||
|
@ -22,7 +22,7 @@ class CategoryName extends BasicConverter implements ConverterInterface
|
|||||||
if (isset($this->mapped[$this->index][$this->value])) {
|
if (isset($this->mapped[$this->index][$this->value])) {
|
||||||
$category = Auth::user()->categories()->find($this->mapped[$this->index][$this->value]);
|
$category = Auth::user()->categories()->find($this->mapped[$this->index][$this->value]);
|
||||||
} else {
|
} else {
|
||||||
$category = Category::firstOrCreateEncrypted( // TODO use repository
|
$category = Category::firstOrCreateEncrypted( // See issue #180
|
||||||
[
|
[
|
||||||
'name' => $this->value,
|
'name' => $this->value,
|
||||||
'user_id' => Auth::user()->id,
|
'user_id' => Auth::user()->id,
|
||||||
|
@ -23,7 +23,7 @@ class TagsComma extends BasicConverter implements ConverterInterface
|
|||||||
|
|
||||||
$strings = explode(',', $this->value);
|
$strings = explode(',', $this->value);
|
||||||
foreach ($strings as $string) {
|
foreach ($strings as $string) {
|
||||||
$tag = Tag::firstOrCreateEncrypted( // TODO use repository
|
$tag = Tag::firstOrCreateEncrypted( // See issue #180
|
||||||
[
|
[
|
||||||
'tag' => $string,
|
'tag' => $string,
|
||||||
'tagMode' => 'nothing',
|
'tagMode' => 'nothing',
|
||||||
|
@ -23,7 +23,7 @@ class TagsSpace extends BasicConverter implements ConverterInterface
|
|||||||
|
|
||||||
$strings = explode(' ', $this->value);
|
$strings = explode(' ', $this->value);
|
||||||
foreach ($strings as $string) {
|
foreach ($strings as $string) {
|
||||||
$tag = Tag::firstOrCreateEncrypted( // TODO use repository
|
$tag = Tag::firstOrCreateEncrypted( // See issue #180
|
||||||
[
|
[
|
||||||
'tag' => $string,
|
'tag' => $string,
|
||||||
'tagMode' => 'nothing',
|
'tagMode' => 'nothing',
|
||||||
|
@ -154,9 +154,9 @@ class AssetAccount implements PostProcessorInterface
|
|||||||
$name = $this->data['asset-account-name'] ?? '';
|
$name = $this->data['asset-account-name'] ?? '';
|
||||||
$iban = $this->data['asset-account-iban'] ?? '';
|
$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;
|
$name = strlen($name) > 0 ? $name : $iban;
|
||||||
$account = Account::firstOrCreateEncrypted( // TODO use repository
|
$account = Account::firstOrCreateEncrypted(
|
||||||
[
|
[
|
||||||
'user_id' => Auth::user()->id,
|
'user_id' => Auth::user()->id,
|
||||||
'account_type_id' => $accountType->id,
|
'account_type_id' => $accountType->id,
|
||||||
@ -211,7 +211,8 @@ class AssetAccount implements PostProcessorInterface
|
|||||||
return $entry;
|
return $entry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// create if not exists: // TODO use repository
|
// create if not exists:
|
||||||
|
// See issue #180
|
||||||
$account = Account::firstOrCreateEncrypted(
|
$account = Account::firstOrCreateEncrypted(
|
||||||
[
|
[
|
||||||
'user_id' => Auth::user()->id,
|
'user_id' => Auth::user()->id,
|
||||||
@ -249,7 +250,7 @@ class AssetAccount implements PostProcessorInterface
|
|||||||
'name' => $accountNumber,
|
'name' => $accountNumber,
|
||||||
'accountType' => 'asset',
|
'accountType' => 'asset',
|
||||||
'virtualBalance' => 0,
|
'virtualBalance' => 0,
|
||||||
'virtualBalanceCurrency' => 1, // TODO hard coded.
|
'virtualBalanceCurrency' => 1, // hard coded.
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'user' => Auth::user()->id,
|
'user' => Auth::user()->id,
|
||||||
'iban' => null,
|
'iban' => null,
|
||||||
@ -257,7 +258,7 @@ class AssetAccount implements PostProcessorInterface
|
|||||||
'accountRole' => null,
|
'accountRole' => null,
|
||||||
'openingBalance' => 0,
|
'openingBalance' => 0,
|
||||||
'openingBalanceDate' => new Carbon,
|
'openingBalanceDate' => new Carbon,
|
||||||
'openingBalanceCurrency' => 1, // TODO hard coded.
|
'openingBalanceCurrency' => 1, // hard coded.
|
||||||
];
|
];
|
||||||
$account = $repository->store($accountData);
|
$account = $repository->store($accountData);
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ class OpposingAccount implements PostProcessorInterface
|
|||||||
// create if not exists:
|
// create if not exists:
|
||||||
$name = is_string($this->data['opposing-account-name']) && strlen($this->data['opposing-account-name']) > 0 ? $this->data['opposing-account-name']
|
$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'];
|
: $this->data['opposing-account-iban'];
|
||||||
$account = Account::firstOrCreateEncrypted( // TODO use repository
|
$account = Account::firstOrCreateEncrypted( // See issue #180
|
||||||
[
|
[
|
||||||
'user_id' => Auth::user()->id,
|
'user_id' => Auth::user()->id,
|
||||||
'account_type_id' => $accountType->id,
|
'account_type_id' => $accountType->id,
|
||||||
@ -195,7 +195,7 @@ class OpposingAccount implements PostProcessorInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// create if not exists:
|
// create if not exists:
|
||||||
$account = Account::firstOrCreateEncrypted( // TODO use repository
|
$account = Account::firstOrCreateEncrypted( // See issue #180
|
||||||
[
|
[
|
||||||
'user_id' => Auth::user()->id,
|
'user_id' => Auth::user()->id,
|
||||||
'account_type_id' => $accountType->id,
|
'account_type_id' => $accountType->id,
|
||||||
|
Loading…
Reference in New Issue
Block a user