Lots of todo's [skip ci]

This commit is contained in:
James Cole
2016-03-02 13:51:56 +01:00
parent 500243b0b3
commit 9b69a6addd
18 changed files with 25 additions and 25 deletions

View File

@@ -211,7 +211,7 @@ class AccountRepository implements AccountRepositoryInterface
$offset = ($page - 1) * 50;
$query = Auth::user()
->transactionJournals()
->withRelevantData()
->withRelevantData() // TODO firefly will crash here.
->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('transactions.account_id', $account->id)
->orderBy('transaction_journals.date', 'DESC')

View File

@@ -414,7 +414,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
public function getJournals(Budget $budget, LimitRepetition $repetition = null, int $take = 50)
{
$offset = intval(Input::get('page')) > 0 ? intval(Input::get('page')) * $take : 0;
$setQuery = $budget->transactionjournals()->withRelevantData()->take($take)->offset($offset)
$setQuery = $budget->transactionjournals()->withRelevantData()->take($take)->offset($offset) // TODO firefly will crash here.
->orderBy('transaction_journals.date', 'DESC')
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC');

View File

@@ -129,8 +129,8 @@ class TagRepository implements TagRepositoryInterface
/** @var TransactionJournal $journal */
foreach ($journals as $journal) {
if ($journal->destination_account->id == $account->id) {
$amount = bcadd($amount, $journal->amount);
if ($journal->destination_account->id == $account->id) { // TODO TransactionJournal cannot deliver "destination_account"
$amount = bcadd($amount, $journal->amount); // TODO TransactionJournal cannot deliver "amount".
}
}
}
@@ -376,10 +376,10 @@ class TagRepository implements TagRepositoryInterface
foreach ($tag->transactionjournals as $check) {
// $checkAccount is the source_account for a withdrawal
// $checkAccount is the destination_account for a deposit
if ($check->isWithdrawal() && $check->source_account->id != $journal->destination_account->id) {
if ($check->isWithdrawal() && $check->source_account->id != $journal->destination_account->id) { // TODO TransactionJournal cannot deliver "source_account"
$match = false;
}
if ($check->isDeposit() && $check->destination_account->id != $journal->destination_account->id) {
if ($check->isDeposit() && $check->destination_account->id != $journal->destination_account->id) { // TODO TransactionJournal cannot deliver "destination_account"
$match = false;
}