Restore todo's

This commit is contained in:
James Cole
2022-10-30 11:43:17 +01:00
parent e3181e90df
commit d28326cc89
64 changed files with 102 additions and 104 deletions

View File

@@ -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);

View File

@@ -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
*

View File

@@ -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

View File

@@ -318,7 +318,7 @@ class CategoryReportController extends Controller
}
/**
* See reference nr. 57
* TODO duplicate function
*
* @param Carbon $start
* @param Carbon $end

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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.

View File

@@ -323,7 +323,7 @@ class TagReportController extends Controller
}
/**
* See reference nr. 54
* TODO duplicate function
*
* @param Carbon $start
* @param Carbon $end

View File

@@ -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
*

View File

@@ -531,7 +531,7 @@ class ProfileController extends Controller
}
/**
* See reference nr. 64
* TODO duplicate code.
*
* @param string $mfaCode
*

View File

@@ -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!');

View File

@@ -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

View File

@@ -292,7 +292,7 @@ class DoubleController extends Controller
}
/**
* See reference nr. 67
* TODO this method is duplicated.
*
* @param Collection $accounts
* @param int $id

View File

@@ -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 = [];

View File

@@ -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
*

View File

@@ -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,

View File

@@ -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;

View File

@@ -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:

View File

@@ -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
*/