Skip to content

Firefly III: a personal finances manager

Restore todo's

James Coled28326cc8904
diff --git a/app/Api/V1/Requests/Data/Bulk/MoveTransactionsRequest.php b/app/Api/V1/Requests/Data/Bulk/MoveTransactionsRequest.php
index 30afe54219..cc98320f34 100644
--- a/app/Api/V1/Requests/Data/Bulk/MoveTransactionsRequest.php
+++ b/app/Api/V1/Requests/Data/Bulk/MoveTransactionsRequest.php
@@ -63,7 +63,7 @@ class MoveTransactionsRequest extends FormRequest
* Configure the validator instance with special rules for after the basic validation rules.
*
* @param Validator $validator
- * See reference nr. 74
+ * TODO this is duplicate.
*
* @return void
*/
diff --git a/app/Api/V1/Requests/Models/BudgetLimit/UpdateRequest.php b/app/Api/V1/Requests/Models/BudgetLimit/UpdateRequest.php
index abc6936abc..7abc1fe432 100644
--- a/app/Api/V1/Requests/Models/BudgetLimit/UpdateRequest.php
+++ b/app/Api/V1/Requests/Models/BudgetLimit/UpdateRequest.php
@@ -76,7 +76,7 @@ class UpdateRequest extends FormRequest
* Configure the validator instance with special rules for after the basic validation rules.
*
* @param Validator $validator
- * See reference nr. 72
+ * TODO duplicate code
*
* @return void
*/
diff --git a/app/Api/V1/Requests/Models/Tag/UpdateRequest.php b/app/Api/V1/Requests/Models/Tag/UpdateRequest.php
index 4fc11e9a32..c303d76307 100644
--- a/app/Api/V1/Requests/Models/Tag/UpdateRequest.php
+++ b/app/Api/V1/Requests/Models/Tag/UpdateRequest.php
@@ -65,7 +65,7 @@ class UpdateRequest extends FormRequest
public function rules(): array
{
$tag = $this->route()->parameter('tagOrId');
- // See reference nr. 73
+ // TODO check if uniqueObjectForUser is obsolete
$rules = [
'tag' => 'min:1|uniqueObjectForUser:tags,tag,' . $tag->id,
'description' => 'min:1|nullable',
diff --git a/app/Api/V1/Requests/Models/Transaction/StoreRequest.php b/app/Api/V1/Requests/Models/Transaction/StoreRequest.php
index b1306b8454..0fa7e692af 100644
--- a/app/Api/V1/Requests/Models/Transaction/StoreRequest.php
+++ b/app/Api/V1/Requests/Models/Transaction/StoreRequest.php
@@ -61,7 +61,7 @@ class StoreRequest extends FormRequest
'fire_webhooks' => $this->boolean('fire_webhooks', true),
'transactions' => $this->getTransactionData(),
];
- // See reference nr. 71
+ // TODO include location and ability to process it.
}
/**
diff --git a/app/Generator/Report/Budget/MonthReportGenerator.php b/app/Generator/Report/Budget/MonthReportGenerator.php
index 278bd4a7c7..7d16209785 100644
--- a/app/Generator/Report/Budget/MonthReportGenerator.php
+++ b/app/Generator/Report/Budget/MonthReportGenerator.php
@@ -34,7 +34,7 @@ use Throwable;
/**
* Class MonthReportGenerator.
- * See reference nr. 19
+ * TODO include info about tags.
*
* @codeCoverageIgnore
*/
diff --git a/app/Generator/Report/Category/MonthReportGenerator.php b/app/Generator/Report/Category/MonthReportGenerator.php
index 252757409e..89f7ee92a7 100644
--- a/app/Generator/Report/Category/MonthReportGenerator.php
+++ b/app/Generator/Report/Category/MonthReportGenerator.php
@@ -35,7 +35,7 @@ use Throwable;
/**
* Class MonthReportGenerator.
- * See reference nr. 18
+ * TODO include info about tags
*
* @codeCoverageIgnore
*/
diff --git a/app/Http/Controllers/Account/IndexController.php b/app/Http/Controllers/Account/IndexController.php
index 2a23f4ee2a..b482200a51 100644
--- a/app/Http/Controllers/Account/IndexController.php
+++ b/app/Http/Controllers/Account/IndexController.php
@@ -169,7 +169,7 @@ class IndexController extends Controller
$accounts->each(
function (Account $account) use ($activities, $startBalances, $endBalances) {
- // See reference nr. 68
+ // TODO lots of queries in this block of code.
$account->lastActivityDate = $this->isInArrayDate($activities, $account->id);
$account->startBalance = $this->isInArray($startBalances, $account->id);
$account->endBalance = $this->isInArray($endBalances, $account->id);
diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.php
index 9e90abf404..c32c8a0ac5 100644
--- a/app/Http/Controllers/Chart/AccountController.php
+++ b/app/Http/Controllers/Chart/AccountController.php
@@ -518,7 +518,7 @@ class AccountController extends Controller
/**
* Shows the balances for a given set of dates and accounts.
*
- * See reference nr. 55
+ * TODO this chart is not multi currency aware.
*
* @param Collection $accounts
*
diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php
index ffe0194b98..3fe07457c5 100644
--- a/app/Http/Controllers/Chart/CategoryController.php
+++ b/app/Http/Controllers/Chart/CategoryController.php
@@ -65,7 +65,7 @@ class CategoryController extends Controller
/**
* Show an overview for a category for all time, per month/week/year.
- * See reference nr. 59
+ * TODO test method, for category refactor.
*
* @param Category $category
*
@@ -116,7 +116,7 @@ class CategoryController extends Controller
/**
* Shows the category chart on the front page.
- * See reference nr. 60
+ * TODO test method for category refactor.
*
* @return JsonResponse
*/
@@ -143,7 +143,7 @@ class CategoryController extends Controller
/**
* Chart report.
- * See reference nr. 61
+ * TODO test method for category refactor.
*
* @param Category $category
* @param Collection $accounts
@@ -259,7 +259,7 @@ class CategoryController extends Controller
/**
* Chart for period for transactions without a category.
- * See reference nr. 62
+ * TODO test me.
*
* @param Collection $accounts
* @param Carbon $start
@@ -286,7 +286,7 @@ class CategoryController extends Controller
/**
* Chart for a specific period.
- * See reference nr. 63
+ * TODO test me, for category refactor.
*
* @param Category $category
* @param Carbon $date
diff --git a/app/Http/Controllers/Chart/CategoryReportController.php b/app/Http/Controllers/Chart/CategoryReportController.php
index 84a73c343d..1f16d0f265 100644
--- a/app/Http/Controllers/Chart/CategoryReportController.php
+++ b/app/Http/Controllers/Chart/CategoryReportController.php
@@ -318,7 +318,7 @@ class CategoryReportController extends Controller
}
/**
- * See reference nr. 57
+ * TODO duplicate function
*
* @param Carbon $start
* @param Carbon $end
diff --git a/app/Http/Controllers/Chart/DoubleReportController.php b/app/Http/Controllers/Chart/DoubleReportController.php
index b1f7fa6a08..072ed7471b 100644
--- a/app/Http/Controllers/Chart/DoubleReportController.php
+++ b/app/Http/Controllers/Chart/DoubleReportController.php
@@ -249,7 +249,7 @@ class DoubleReportController extends Controller
}
/**
- * See reference nr. 51
+ * TODO duplicate function
*
* @param Collection $accounts
* @param int $id
@@ -274,7 +274,7 @@ class DoubleReportController extends Controller
}
/**
- * See reference nr. 52
+ * TODO duplicate function
*
* @param Carbon $start
* @param Carbon $end
diff --git a/app/Http/Controllers/Chart/ExpenseReportController.php b/app/Http/Controllers/Chart/ExpenseReportController.php
index 3a30860805..4ee879e09f 100644
--- a/app/Http/Controllers/Chart/ExpenseReportController.php
+++ b/app/Http/Controllers/Chart/ExpenseReportController.php
@@ -70,7 +70,7 @@ class ExpenseReportController extends Controller
/**
* Main chart that shows income and expense for a combination of expense/revenue accounts.
*
- * See reference nr. 58
+ * TODO this chart is not multi currency aware.
*
* @param Collection $accounts
* @param Collection $expense
diff --git a/app/Http/Controllers/Chart/PiggyBankController.php b/app/Http/Controllers/Chart/PiggyBankController.php
index 7efc12d07a..44c45a5fc4 100644
--- a/app/Http/Controllers/Chart/PiggyBankController.php
+++ b/app/Http/Controllers/Chart/PiggyBankController.php
@@ -58,7 +58,7 @@ class PiggyBankController extends Controller
/**
* Shows the piggy bank history.
*
- * See reference nr. 53
+ * TODO this chart is not multi currency aware.
*
* @param PiggyBankRepositoryInterface $repository
* @param PiggyBank $piggyBank
diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php
index 9d8950bd24..ed66a56852 100644
--- a/app/Http/Controllers/Chart/ReportController.php
+++ b/app/Http/Controllers/Chart/ReportController.php
@@ -104,7 +104,7 @@ class ReportController extends Controller
}
);
- // See reference nr. 56
+ // TODO get liabilities and include those as well?
while ($current < $end) {
// get balances by date, grouped by currency.
diff --git a/app/Http/Controllers/Chart/TagReportController.php b/app/Http/Controllers/Chart/TagReportController.php
index 75a452165a..479d9a2946 100644
--- a/app/Http/Controllers/Chart/TagReportController.php
+++ b/app/Http/Controllers/Chart/TagReportController.php
@@ -323,7 +323,7 @@ class TagReportController extends Controller
}
/**
- * See reference nr. 54
+ * TODO duplicate function
*
* @param Carbon $start
* @param Carbon $end
diff --git a/app/Http/Controllers/PiggyBank/IndexController.php b/app/Http/Controllers/PiggyBank/IndexController.php
index b512b16f3f..b8b33b64a0 100644
--- a/app/Http/Controllers/PiggyBank/IndexController.php
+++ b/app/Http/Controllers/PiggyBank/IndexController.php
@@ -69,7 +69,8 @@ class IndexController extends Controller
/**
* Show overview of all piggy banks.
- * See reference nr. 66
+ *
+ * TODO very complicated function.
*
* @param Request $request
*
diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php
index af76cfd2f2..9bfccfa72a 100644
--- a/app/Http/Controllers/ProfileController.php
+++ b/app/Http/Controllers/ProfileController.php
@@ -531,7 +531,7 @@ class ProfileController extends Controller
}
/**
- * See reference nr. 64
+ * TODO duplicate code.
*
* @param string $mfaCode
*
diff --git a/app/Http/Controllers/Recurring/EditController.php b/app/Http/Controllers/Recurring/EditController.php
index fc75d33572..52a3599d18 100644
--- a/app/Http/Controllers/Recurring/EditController.php
+++ b/app/Http/Controllers/Recurring/EditController.php
@@ -89,7 +89,7 @@ class EditController extends Controller
*/
public function edit(Request $request, Recurrence $recurrence)
{
- // See reference nr. 69
+ // TODO this should be in the repository.
$count = $recurrence->recurrenceTransactions()->count();
if (0 === $count) {
throw new FireflyException('This recurring transaction has no meta-data. You will have to delete it and recreate it. Sorry!');
diff --git a/app/Http/Controllers/Recurring/IndexController.php b/app/Http/Controllers/Recurring/IndexController.php
index aad08bff71..fb980a7010 100644
--- a/app/Http/Controllers/Recurring/IndexController.php
+++ b/app/Http/Controllers/Recurring/IndexController.php
@@ -68,7 +68,7 @@ class IndexController extends Controller
}
/**
- * See reference nr. 70
+ * TODO the notes of a recurrence are pretty pointless at this moment.
* Show all recurring transactions.
*
* @param Request $request
diff --git a/app/Http/Controllers/Report/DoubleController.php b/app/Http/Controllers/Report/DoubleController.php
index 5472e9741b..2262dd1554 100644
--- a/app/Http/Controllers/Report/DoubleController.php
+++ b/app/Http/Controllers/Report/DoubleController.php
@@ -292,7 +292,7 @@ class DoubleController extends Controller
}
/**
- * See reference nr. 67
+ * TODO this method is duplicated.
*
* @param Collection $accounts
* @param int $id
diff --git a/app/Http/Controllers/Rule/EditController.php b/app/Http/Controllers/Rule/EditController.php
index 38efdc9a68..407c5694f3 100644
--- a/app/Http/Controllers/Rule/EditController.php
+++ b/app/Http/Controllers/Rule/EditController.php
@@ -143,7 +143,7 @@ class EditController extends Controller
*/
private function parseFromOperators(array $submittedOperators): array
{
- // See reference nr. 65
+ // TODO this code is duplicate.
$operators = config('search.operators');
$renderedEntries = [];
$triggers = [];
diff --git a/app/Http/Controllers/Transaction/BulkController.php b/app/Http/Controllers/Transaction/BulkController.php
index 413299ad1c..d857813938 100644
--- a/app/Http/Controllers/Transaction/BulkController.php
+++ b/app/Http/Controllers/Transaction/BulkController.php
@@ -68,7 +68,7 @@ class BulkController extends Controller
/**
* Edit a set of journals in bulk.
*
- * See reference nr. 47
+ * TODO user wont be able to tell if the journal is part of a split.
*
* @param array $journals
*
diff --git a/app/Http/Controllers/Transaction/ConvertController.php b/app/Http/Controllers/Transaction/ConvertController.php
index 6fe58158ac..797645a4bb 100644
--- a/app/Http/Controllers/Transaction/ConvertController.php
+++ b/app/Http/Controllers/Transaction/ConvertController.php
@@ -47,7 +47,7 @@ use Log;
/**
* Class ConvertController.
*
- * See reference nr. 49
+ * TODO when converting a split transfer, all sources and destinations must be the same.
*/
class ConvertController extends Controller
{
@@ -346,7 +346,7 @@ class ConvertController extends Controller
throw new FireflyException(sprintf(trans('firefly.convert_invalid_destination'), $journal->id));
}
- // See reference nr. 50
+ // TODO typeOverrule: the account validator may have another opinion on the transaction type.
$update = [
'source_id' => $sourceId,
diff --git a/app/Http/Controllers/Transaction/MassController.php b/app/Http/Controllers/Transaction/MassController.php
index decccf47f3..0e68aecb63 100644
--- a/app/Http/Controllers/Transaction/MassController.php
+++ b/app/Http/Controllers/Transaction/MassController.php
@@ -168,7 +168,7 @@ class MassController extends Controller
{
$journalIds = $request->get('journals');
if (!is_array($journalIds)) {
- // See reference nr. 48
+ // TODO this is a weird error, should be caught.
throw new FireflyException('This is not an array.');
}
$count = 0;
diff --git a/app/Http/Requests/RecurrenceFormRequest.php b/app/Http/Requests/RecurrenceFormRequest.php
index 41e5c010ab..39e9d8a742 100644
--- a/app/Http/Requests/RecurrenceFormRequest.php
+++ b/app/Http/Requests/RecurrenceFormRequest.php
@@ -307,7 +307,7 @@ class RecurrenceFormRequest extends FormRequest
$sourceId = null;
$destinationId = null;
- // See reference nr. 45
+ // TODO typeOverrule: the account validator may have another opinion the transaction type.
switch ($this->convertString('transaction_type')) {
default:
diff --git a/app/Http/Requests/TestRuleFormRequest.php b/app/Http/Requests/TestRuleFormRequest.php
index 5c7b7d920b..d6f681a700 100644
--- a/app/Http/Requests/TestRuleFormRequest.php
+++ b/app/Http/Requests/TestRuleFormRequest.php
@@ -37,7 +37,7 @@ class TestRuleFormRequest extends FormRequest
/**
* Rules for this request.
- * See reference nr. 46
+ * TODO these rules are not valid anymore.
*
* @return array
*/
diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php
index e3b19b6bec..ee887f0227 100644
--- a/app/Models/Configuration.php
+++ b/app/Models/Configuration.php
@@ -70,7 +70,7 @@ class Configuration extends Model
protected $table = 'configuration';
/**
- * See reference nr. 17
+ * TODO can be replaced with native laravel code.
*
* @codeCoverageIgnore
*
diff --git a/app/Repositories/Budget/BudgetLimitRepositoryInterface.php b/app/Repositories/Budget/BudgetLimitRepositoryInterface.php
index 1f93291dde..ec65d2bcfb 100644
--- a/app/Repositories/Budget/BudgetLimitRepositoryInterface.php
+++ b/app/Repositories/Budget/BudgetLimitRepositoryInterface.php
@@ -72,7 +72,7 @@ interface BudgetLimitRepositoryInterface
public function find(Budget $budget, TransactionCurrency $currency, Carbon $start, Carbon $end): ?BudgetLimit;
/**
- * See reference nr. 11
+ * TODO this method is not multi currency aware.
*
* @param Carbon|null $start
* @param Carbon|null $end
diff --git a/app/Repositories/Budget/NoBudgetRepository.php b/app/Repositories/Budget/NoBudgetRepository.php
index 9a0d1df208..c7180525fe 100644
--- a/app/Repositories/Budget/NoBudgetRepository.php
+++ b/app/Repositories/Budget/NoBudgetRepository.php
@@ -147,8 +147,8 @@ class NoBudgetRepository implements NoBudgetRepositoryInterface
/** @noinspection MoreThanThreeArgumentsInspection */
/**
- * See reference nr. 15
- * See reference nr. 16
+ * TODO this method does not include multi currency. It just counts.
+ * TODO this probably also applies to the other "sumExpenses" methods.
*
* @param Carbon $start
* @param Carbon $end
diff --git a/app/Repositories/Budget/OperationsRepository.php b/app/Repositories/Budget/OperationsRepository.php
index d1f20a8b6d..fc91bee765 100644
--- a/app/Repositories/Budget/OperationsRepository.php
+++ b/app/Repositories/Budget/OperationsRepository.php
@@ -240,7 +240,7 @@ class OperationsRepository implements OperationsRepositoryInterface
if ($accounts->count() > 0) {
$collector->setAccounts($accounts);
}
- // See reference nr. 13
+ // TODO possible candidate for "get extracted groups" method.
$set = $collector->getGroups();
$return = [];
$total = [];
@@ -384,7 +384,7 @@ class OperationsRepository implements OperationsRepositoryInterface
/**
* For now, simply refer to whichever repository holds this function.
- * See reference nr. 14
+ * TODO perhaps better in the future.
*
* @param Budget $budget
* @param Carbon|null $start
diff --git a/app/Repositories/Journal/JournalRepositoryInterface.php b/app/Repositories/Journal/JournalRepositoryInterface.php
index 0fe9801237..523ab22637 100644
--- a/app/Repositories/Journal/JournalRepositoryInterface.php
+++ b/app/Repositories/Journal/JournalRepositoryInterface.php
@@ -51,7 +51,6 @@ interface JournalRepositoryInterface
public function destroyJournal(TransactionJournal $journal): void;
/**
- * See reference nr. 1
* Find a specific journal.
*
* @param int $journalId
@@ -126,7 +125,7 @@ interface JournalRepositoryInterface
public function getSourceAccount(TransactionJournal $journal): Account;
/**
- * See reference nr. 5
+ * TODO Maybe to account repository? Do this wen reconcile is API only.
*
* @param int $journalId
*/
diff --git a/app/Services/Internal/Support/AccountServiceTrait.php b/app/Services/Internal/Support/AccountServiceTrait.php
index 23e40c8018..0b8dc83bbc 100644
--- a/app/Services/Internal/Support/AccountServiceTrait.php
+++ b/app/Services/Internal/Support/AccountServiceTrait.php
@@ -100,9 +100,9 @@ trait AccountServiceTrait
}
/**
- * Update meta data for account. Depends on type which fields are valid.
+ * Update metadata for account. Depends on type which fields are valid.
*
- * See reference nr. 97
+ * TODO this method treats expense accounts and liabilities the same way (tries to save interest)
*
* @param Account $account
* @param array $data
@@ -525,7 +525,7 @@ trait AccountServiceTrait
}
/**
- * See reference nr. 99
+ * TODO refactor to "getfirstjournal"
*
* @param TransactionGroup $group
*
@@ -544,7 +544,7 @@ trait AccountServiceTrait
}
/**
- * See reference nr. 98
+ * TODO Rename to getOpposingTransaction
*
* @param TransactionJournal $journal
* @param Account $account
diff --git a/app/Services/Internal/Support/RecurringTransactionTrait.php b/app/Services/Internal/Support/RecurringTransactionTrait.php
index c78e035be8..4eb3cb9c93 100644
--- a/app/Services/Internal/Support/RecurringTransactionTrait.php
+++ b/app/Services/Internal/Support/RecurringTransactionTrait.php
@@ -148,7 +148,7 @@ trait RecurringTransactionTrait
if (array_key_exists('foreign_amount', $array) && '' === (string) $array['foreign_amount']) {
unset($array['foreign_amount']);
}
- // See reference nr. 100
+ // TODO typeOverrule. The account validator may have a different opinion on the type of the transaction.
$transaction = new RecurrenceTransaction(
[
'recurrence_id' => $recurrence->id,
diff --git a/app/Services/Internal/Update/AccountUpdateService.php b/app/Services/Internal/Update/AccountUpdateService.php
index 2adaf3c1da..77f3ef7c38 100644
--- a/app/Services/Internal/Update/AccountUpdateService.php
+++ b/app/Services/Internal/Update/AccountUpdateService.php
@@ -35,7 +35,7 @@ use Log;
/**
* Class AccountUpdateService
- * See reference nr. 90
+ * TODO this service is messy and convoluted.
*/
class AccountUpdateService
{
diff --git a/app/Services/Internal/Update/JournalUpdateService.php b/app/Services/Internal/Update/JournalUpdateService.php
index adb6525aaa..2938ad17b9 100644
--- a/app/Services/Internal/Update/JournalUpdateService.php
+++ b/app/Services/Internal/Update/JournalUpdateService.php
@@ -219,7 +219,7 @@ class JournalUpdateService
$result = $validator->validateSource(['id' => $sourceId]);
Log::debug(sprintf('hasValidSourceAccount(%d, "%s") will return %s', $sourceId, $sourceName, var_export($result, true)));
- // See reference nr. 95
+ // TODO typeoverrule the account validator may have a different opinion on the transaction type.
// validate submitted info:
return $result;
@@ -313,7 +313,7 @@ class JournalUpdateService
$result = $validator->validateDestination(['id' => $destId]);
Log::debug(sprintf('hasValidDestinationAccount(%d, "%s") will return %s', $destId, $destName, var_export($result, true)));
- // See reference nr. 96
+ // TODO typeOverrule: the account validator may have another opinion on the transaction type.
// validate submitted info:
return $result;
diff --git a/app/Services/Internal/Update/RecurrenceUpdateService.php b/app/Services/Internal/Update/RecurrenceUpdateService.php
index f099d2ec09..b4cd593f95 100644
--- a/app/Services/Internal/Update/RecurrenceUpdateService.php
+++ b/app/Services/Internal/Update/RecurrenceUpdateService.php
@@ -49,7 +49,7 @@ class RecurrenceUpdateService
/**
* Updates a recurrence.
*
- * See reference nr. 88
+ * TODO if the user updates the type, the accounts must be validated again.
*
* @param Recurrence $recurrence
* @param array $data
@@ -217,7 +217,7 @@ class RecurrenceUpdateService
}
/**
- * See reference nr. 89
+ * TODO this method is very complex.
*
* @param Recurrence $recurrence
* @param array $transactions
diff --git a/app/Support/Chart/Category/WholePeriodChartGenerator.php b/app/Support/Chart/Category/WholePeriodChartGenerator.php
index 867cb3f337..c82a39cc5d 100644
--- a/app/Support/Chart/Category/WholePeriodChartGenerator.php
+++ b/app/Support/Chart/Category/WholePeriodChartGenerator.php
@@ -115,7 +115,7 @@ class WholePeriodChartGenerator
}
/**
- * See reference nr. 32
+ * TODO this method is duplicated
*
* @param Carbon $start
* @param Carbon $end
diff --git a/app/Support/Export/ExportDataGenerator.php b/app/Support/Export/ExportDataGenerator.php
index 84ed59c54a..ce8a05ea40 100644
--- a/app/Support/Export/ExportDataGenerator.php
+++ b/app/Support/Export/ExportDataGenerator.php
@@ -648,7 +648,7 @@ class ExportDataGenerator
*/
private function exportTransactions(): string
{
- // See reference nr. 41
+ // TODO better place for keys?
$header = ['user_id', 'group_id', 'journal_id', 'created_at', 'updated_at', 'group_title', 'type', 'amount', 'foreign_amount', 'currency_code',
'foreign_currency_code', 'description', 'date', 'source_name', 'source_iban', 'source_type', 'destination_name', 'destination_iban',
'destination_type', 'reconciled', 'category', 'budget', 'bill', 'tags', 'notes',
diff --git a/app/Support/Form/AccountForm.php b/app/Support/Form/AccountForm.php
index 740a2c6896..6f8a0fdb2b 100644
--- a/app/Support/Form/AccountForm.php
+++ b/app/Support/Form/AccountForm.php
@@ -34,8 +34,8 @@ use Throwable;
*
* All form methods that are account related.
*
- * See reference nr. 29
- * See reference nr. 30
+ * TODO describe all methods
+ * TODO optimize repositories and methods.
*/
class AccountForm
{
diff --git a/app/Support/Form/CurrencyForm.php b/app/Support/Form/CurrencyForm.php
index 042478a958..ec64b7441e 100644
--- a/app/Support/Form/CurrencyForm.php
+++ b/app/Support/Form/CurrencyForm.php
@@ -105,7 +105,7 @@ class CurrencyForm
}
/**
- * See reference nr. 23
+ * TODO describe and cleanup.
*
* @param string $name
* @param mixed $value
@@ -119,7 +119,7 @@ class CurrencyForm
}
/**
- * See reference nr. 24
+ * TODO describe and cleanup
*
* @param string $name
* @param string $view
@@ -174,7 +174,7 @@ class CurrencyForm
}
/**
- * See reference nr. 25
+ * TODO cleanup and describe
*
* @param string $name
* @param mixed $value
@@ -199,7 +199,7 @@ class CurrencyForm
}
/**
- * See reference nr. 26
+ * TODO cleanup and describe
*
* @param string $name
* @param mixed $value
diff --git a/app/Support/Form/PiggyBankForm.php b/app/Support/Form/PiggyBankForm.php
index 3d836661be..493505924c 100644
--- a/app/Support/Form/PiggyBankForm.php
+++ b/app/Support/Form/PiggyBankForm.php
@@ -29,14 +29,14 @@ use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
/**
* Class PiggyBankForm
*
- * See reference nr. 27
+ * TODO cleanup and describe.
*/
class PiggyBankForm
{
use FormSupport;
/**
- * See reference nr. 28
+ * TODO cleanup and describe
*
* @param string $name
* @param mixed $value
diff --git a/app/Support/Form/RuleForm.php b/app/Support/Form/RuleForm.php
index 87f0b29ff9..6b30dd269a 100644
--- a/app/Support/Form/RuleForm.php
+++ b/app/Support/Form/RuleForm.php
@@ -30,7 +30,7 @@ use Illuminate\Support\HtmlString;
/**
* Class RuleForm
- * See reference nr. 31
+ * TODO cleanup and describe
*/
class RuleForm
{
diff --git a/app/Support/Http/Controllers/ChartGeneration.php b/app/Support/Http/Controllers/ChartGeneration.php
index 0db3129191..c97e777fe3 100644
--- a/app/Support/Http/Controllers/ChartGeneration.php
+++ b/app/Support/Http/Controllers/ChartGeneration.php
@@ -76,7 +76,7 @@ trait ChartGeneration
$chartData = [];
/** @var Account $account */
foreach ($accounts as $account) {
- // See reference nr. 33
+ // TODO we can use getAccountCurrency instead.
$currency = $repository->find((int) $accountRepos->getMetaValue($account, 'currency_id'));
if (null === $currency) {
$currency = $default;
diff --git a/app/Support/Http/Controllers/ModelInformation.php b/app/Support/Http/Controllers/ModelInformation.php
index 9164a6098f..9209c57667 100644
--- a/app/Support/Http/Controllers/ModelInformation.php
+++ b/app/Support/Http/Controllers/ModelInformation.php
@@ -115,7 +115,7 @@ trait ModelInformation
*/
protected function getTriggersForBill(Bill $bill): array // get info and augument
{
- // See reference nr. 39
+ // TODO duplicate code
$operators = config('search.operators');
$triggers = [];
foreach ($operators as $key => $operator) {
diff --git a/app/Support/Http/Controllers/PeriodOverview.php b/app/Support/Http/Controllers/PeriodOverview.php
index af093ba365..aa43d4ffcc 100644
--- a/app/Support/Http/Controllers/PeriodOverview.php
+++ b/app/Support/Http/Controllers/PeriodOverview.php
@@ -39,7 +39,7 @@ use Log;
/**
* Trait PeriodOverview.
*
- * See reference nr. 36
+ * TODO verify this all works as expected.
*
* - Always request start date and end date.
* - Group expenses, income, etc. under this period.
@@ -399,7 +399,7 @@ trait PeriodOverview
}
/**
- * See reference nr. 37
+ * TODO fix the date.
*
* Show period overview for no category view.
*
diff --git a/app/Support/Http/Controllers/RenderPartialViews.php b/app/Support/Http/Controllers/RenderPartialViews.php
index 8360140fda..4a2f06f087 100644
--- a/app/Support/Http/Controllers/RenderPartialViews.php
+++ b/app/Support/Http/Controllers/RenderPartialViews.php
@@ -298,7 +298,7 @@ trait RenderPartialViews
*/
protected function getCurrentTriggers(Rule $rule): array // get info from object and present.
{
- // See reference nr. 38
+ // TODO duplicated code.
$operators = config('search.operators');
$triggers = [];
foreach ($operators as $key => $operator) {
diff --git a/app/Support/Http/Controllers/RuleManagement.php b/app/Support/Http/Controllers/RuleManagement.php
index a833732101..6c6aa585d2 100644
--- a/app/Support/Http/Controllers/RuleManagement.php
+++ b/app/Support/Http/Controllers/RuleManagement.php
@@ -78,7 +78,7 @@ trait RuleManagement
*/
protected function getPreviousTriggers(Request $request): array
{
- // See reference nr. 34
+ // TODO duplicated code.
$operators = config('search.operators');
$triggers = [];
foreach ($operators as $key => $operator) {
@@ -124,7 +124,7 @@ trait RuleManagement
*/
protected function parseFromOperators(array $submittedOperators): array
{
- // See reference nr. 35
+ // TODO duplicated code.
$operators = config('search.operators');
$renderedEntries = [];
$triggers = [];
diff --git a/app/Support/Preferences.php b/app/Support/Preferences.php
index 8f9a91862f..a7bc86789f 100644
--- a/app/Support/Preferences.php
+++ b/app/Support/Preferences.php
@@ -154,7 +154,7 @@ class Preferences
* @param null $default
*
* @return Preference|null
- * See reference nr. 44
+ * TODO remove me.
* @throws FireflyException
*/
public function getFreshForUser(User $user, string $name, $default = null): ?Preference
diff --git a/app/Support/Twig/AmountFormat.php b/app/Support/Twig/AmountFormat.php
index 5cc326111d..74eac42b39 100644
--- a/app/Support/Twig/AmountFormat.php
+++ b/app/Support/Twig/AmountFormat.php
@@ -93,7 +93,7 @@ class AmountFormat extends AbstractExtension
* Will format the amount by the currency related to the given account.
*
* @return TwigFunction
- * See reference nr. 42
+ * TODO remove me when layout v1 is deprecated.
*/
protected function formatAmountByAccount(): TwigFunction
{
diff --git a/app/Support/Twig/General.php b/app/Support/Twig/General.php
index 5123bce5ba..66e5ca7ae0 100644
--- a/app/Support/Twig/General.php
+++ b/app/Support/Twig/General.php
@@ -377,7 +377,7 @@ class General extends AbstractExtension
/**
* @return TwigFunction
- * See reference nr. 43
+ * TODO remove me when layout v1 is deprecated.
*/
protected function getMetaField(): TwigFunction
{
diff --git a/app/Transformers/AccountTransformer.php b/app/Transformers/AccountTransformer.php
index 61b743fc13..a283365d9c 100644
--- a/app/Transformers/AccountTransformer.php
+++ b/app/Transformers/AccountTransformer.php
@@ -220,7 +220,7 @@ class AccountTransformer extends AbstractTransformer
*
* @return array
*
- * See reference nr. 20
+ * TODO refactor call to get~OpeningBalanceAmount / Date because it is a lot of queries.
*/
private function getOpeningBalance(Account $account, string $accountType): array
{
diff --git a/app/Transformers/TagTransformer.php b/app/Transformers/TagTransformer.php
index b4c09c6560..9f74dc66b4 100644
--- a/app/Transformers/TagTransformer.php
+++ b/app/Transformers/TagTransformer.php
@@ -35,7 +35,7 @@ class TagTransformer extends AbstractTransformer
/**
* Transform a tag.
*
- * See reference nr. 21
+ * TODO add spent, earned, transferred, etc.
*
* @param Tag $tag
*
diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php
index 0decaa505d..92d66a5170 100644
--- a/app/Validation/FireflyValidator.php
+++ b/app/Validation/FireflyValidator.php
@@ -788,8 +788,6 @@ class FireflyValidator extends Validator
* @param mixed $value
* @param mixed $parameters
*
- * See reference nr. 107
- *
* @return bool
*/
public function validateUniquePiggyBankForUser($attribute, $value, $parameters): bool
diff --git a/app/Validation/RecurrenceValidation.php b/app/Validation/RecurrenceValidation.php
index d4400760ee..cc359e592e 100644
--- a/app/Validation/RecurrenceValidation.php
+++ b/app/Validation/RecurrenceValidation.php
@@ -41,7 +41,7 @@ trait RecurrenceValidation
/**
* Validate account information input for recurrences which are being updated.
*
- * See reference nr. 101
+ * TODO Must always trigger when the type of the recurrence changes.
*
* @param Validator $validator
*/
diff --git a/resources/assets/js/components/transactions/AccountSelect.vue b/resources/assets/js/components/transactions/AccountSelect.vue
index ca3705c628..24359c78ea 100644
--- a/resources/assets/js/components/transactions/AccountSelect.vue
+++ b/resources/assets/js/components/transactions/AccountSelect.vue
@@ -199,19 +199,19 @@ export default {
if (this.transactionType.toString() !== '' && this.index > 0) {
if (this.transactionType.toString().toLowerCase() === 'transfer') {
this.inputDisabled = true;
-// See reference nr. 2
+ // TODO needs to copy value from very first input.
return;
}
if (this.transactionType.toString().toLowerCase() === 'withdrawal' && this.inputName.substr(0, 6).toLowerCase() === 'source') {
-// See reference nr. 3
+ // TODO also clear value?
this.inputDisabled = true;
return;
}
if (this.transactionType.toString().toLowerCase() === 'deposit' && this.inputName.substr(0, 11).toLowerCase() === 'destination') {
-// See reference nr. 4
+ // TODO also clear valye?
this.inputDisabled = true;
}
}
@@ -241,7 +241,7 @@ export default {
this.$emit('clear:value')
},
handleEnter: function (e) {
-// See reference nr. 5
+ // TODO feels sloppy. Can be removed.
if (e.keyCode === 13) {
//e.preventDefault();
}
diff --git a/resources/assets/js/components/transactions/Category.vue b/resources/assets/js/components/transactions/Category.vue
index 536c4cac5e..990798f6d7 100644
--- a/resources/assets/js/components/transactions/Category.vue
+++ b/resources/assets/js/components/transactions/Category.vue
@@ -167,7 +167,7 @@ export default {
this.$emit('input', this.name.name);
},
handleEnter: function (e) {
-// See reference nr. 1
+ // TODO feels sloppy
if (e.keyCode === 13) {
//e.preventDefault();
}
diff --git a/resources/assets/js/components/transactions/CustomTransactionFields.vue b/resources/assets/js/components/transactions/CustomTransactionFields.vue
index 31d552407a..e55fcf0014 100644
--- a/resources/assets/js/components/transactions/CustomTransactionFields.vue
+++ b/resources/assets/js/components/transactions/CustomTransactionFields.vue
@@ -96,7 +96,7 @@ export default {
};
},
computed: {
-// See reference nr. 6
+ // TODO this seems to be a pretty weird way of doing it.
dateComponent() {
return 'custom-date';
},
diff --git a/resources/assets/js/components/transactions/TransactionDescription.vue b/resources/assets/js/components/transactions/TransactionDescription.vue
index e33d280a68..b6d7dd7cef 100644
--- a/resources/assets/js/components/transactions/TransactionDescription.vue
+++ b/resources/assets/js/components/transactions/TransactionDescription.vue
@@ -139,7 +139,7 @@ export default {
this.$emit('input', this.$refs.descr.value);
},
handleEnter: function (e) {
-// See reference nr. 7
+ // TODO feels sloppy
if (e.keyCode === 13) {
//e.preventDefault();
diff --git a/resources/views/accounts/reconcile/transactions.twig b/resources/views/accounts/reconcile/transactions.twig
index 04910a6ef7..1a1d0fb7e3 100644
--- a/resources/views/accounts/reconcile/transactions.twig
+++ b/resources/views/accounts/reconcile/transactions.twig
@@ -127,7 +127,7 @@
{% if journal.reconciled %}
<span class="fa fa-check" aria-hidden="true"></span>
{% else %}
-<!-- See reference nr. 1 -->
+ <!--TODO include icon -->
{% endif %}
{% endif %}
diff --git a/resources/views/reports/partials/top-transactions.twig b/resources/views/reports/partials/top-transactions.twig
index 30c62242a7..8d0a835be0 100644
--- a/resources/views/reports/partials/top-transactions.twig
+++ b/resources/views/reports/partials/top-transactions.twig
@@ -16,7 +16,8 @@
<td data-value="{{ transaction.description }}">{{ transaction.description }}</td>
<td data-value="{{ transaction.date.format('Y-m-d') }}">
{{ transaction.date.isoFormat(monthAndDayFormat) }}
- </td><!-- See reference nr. 3 -->
+ </td>
+ <!-- TODO i dont think transactionAmount will work. -->
<td style="text-align: right;" data-value="{{ transaction.amount}}"><span
style="margin-right:5px;">
diff --git a/resources/views/rules/partials/action.twig b/resources/views/rules/partials/action.twig
index bfdca1166c..73a4d21a36 100644
--- a/resources/views/rules/partials/action.twig
+++ b/resources/views/rules/partials/action.twig
@@ -3,7 +3,7 @@
<a href="#" class="btn btn-danger btn-sm remove-action"><span class="fa fa-trash"></span></a>
</td>
<td style="width:30%;">
- {# See reference nr. 2 #}
+ {# TODO error when invalid name #}
<select name="actions[{{ count }}][type]" class="form-control">
{% for key,type in allRuleActions() %}
<option value="{{ key }}" label="{{ type }}" {% if key == oldAction %} selected{% endif %}>{{ type }}</option>
diff --git a/routes/api.php b/routes/api.php
index 3d5cfaa0b7..77d2e83cab 100644
--- a/routes/api.php
+++ b/routes/api.php
@@ -220,10 +220,10 @@ Route::group(
Route::get('tag', ['uses' => 'TagController@tag', 'as' => 'tag']);
Route::get('no-tag', ['uses' => 'TagController@noTag', 'as' => 'no-tag']);
-// See reference nr. 7
-// See reference nr. 8
-// See reference nr. 9
-// See reference nr. 10
+// TODO per object group, perhaps in the future.
+// TODO per recurrence, all transaction created under it.
+// TODO Per currency or as filter?
+// TODO Show user net worth
}
);
// insight in income
@@ -241,10 +241,10 @@ Route::group(
Route::get('tag', ['uses' => 'TagController@tag', 'as' => 'tag']);
Route::get('no-tag', ['uses' => 'TagController@noTag', 'as' => 'no-tag']);
-// See reference nr. 11
-// See reference nr. 12
-// See reference nr. 13
-// See reference nr. 14
+// TODO per object group, maybe in the future
+// TODO Per recurrence, all transactions created under it.
+// TODO per currency or as a filter?
+// TODO show user net worth?
}
);
@@ -261,7 +261,7 @@ Route::group(
Route::get('no-tag', ['uses' => 'TagController@noTag', 'as' => 'no-tag']);
Route::get('total', ['uses' => 'PeriodController@total', 'as' => 'total']);
-// See reference nr. 15
+// TODO Transfers for piggies
}
);
/**
@@ -442,7 +442,6 @@ Route::group(
Route::delete('{recurrence}', ['uses' => 'DestroyController@destroy', 'as' => 'delete']);
Route::get('{recurrence}/transactions', ['uses' => 'ListController@transactions', 'as' => 'transactions']);
-// See reference nr. 16
Route::post('trigger', ['uses' => 'RecurrenceController@trigger', 'as' => 'trigger']);
}
);
@@ -460,9 +459,9 @@ Route::group(
Route::delete('{rule}', ['uses' => 'DestroyController@destroy', 'as' => 'delete']);
Route::get('{rule}/test', ['uses' => 'TriggerController@testRule', 'as' => 'test']);
-// See reference nr. 17
+ // TODO give results back
Route::post('{rule}/trigger', ['uses' => 'TriggerController@triggerRule', 'as' => 'trigger']);
-// See reference nr. 18
+ // TODO rule transactions, rule bills?
}
);
diff --git a/routes/breadcrumbs.php b/routes/breadcrumbs.php
index 988797e8fa..dc609611c8 100644
--- a/routes/breadcrumbs.php
+++ b/routes/breadcrumbs.php
@@ -1135,13 +1135,13 @@ try {
$title = limitStringLength((string) $group->title);
}
if ('opening balance' === $type) {
-// See reference nr. 1
+ // TODO link to account
$breadcrumbs->push($title, route('transactions.show', [$group->id]));
return;
}
if ('reconciliation' === $type) {
-// See reference nr. 2
+ // TODO link to account
$breadcrumbs->push($title, route('transactions.show', [$group->id]));
return;
diff --git a/routes/web.php b/routes/web.php
index 0e5d7c9684..5b7c850d24 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -804,7 +804,7 @@ Route::group(
'as' => 'report-data.category.',],
static function () {
-// See reference nr. 3
+ // TODO three routes still in use?
Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@operations', 'as' => 'operations']);
Route::get('income/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@income', 'as' => 'income']);
Route::get('expenses/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@expenses', 'as' => 'expenses']);
@@ -860,7 +860,7 @@ Route::group(
['middleware' => 'user-full-auth', 'namespace' => 'FireflyIII\Http\Controllers\Report', 'prefix' => 'report-data/budget', 'as' => 'report-data.budget.'],
static function () {
Route::get('general/{accountList}/{start_date}/{end_date}/', ['uses' => 'BudgetController@general', 'as' => 'general']);
-// See reference nr. 4
+ // TODO is route still used?
Route::get('period/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@period', 'as' => 'period']);
Route::get('accounts/{accountList}/{budgetList}/{start_date}/{end_date}', ['uses' => 'BudgetController@accounts', 'as' => 'accounts']);
@@ -971,7 +971,7 @@ Route::group(
static function () {
// show groups:
-// See reference nr. 5
+ // TODO improve these routes
Route::get('{what}/all', ['uses' => 'Transaction\IndexController@indexAll', 'as' => 'index.all'])->where(
['what' => 'withdrawal|deposit|transfers|transfer']
);
@@ -1044,7 +1044,7 @@ Route::group(
static function () {
Route::get('modal/{tj}', ['uses' => 'LinkController@modal', 'as' => 'modal']);
-// See reference nr. 6
+ // TODO improve this route
Route::post('store/{tj}', ['uses' => 'LinkController@store', 'as' => 'store']);
Route::get('delete/{journalLink}', ['uses' => 'LinkController@delete', 'as' => 'delete']);
Route::post('switch', ['uses' => 'LinkController@switchLink', 'as' => 'switch']);