mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 14:12:15 +00:00
Lots of todo's [skip ci]
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user