mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-20 00:20:03 +00:00
Removed references to components.
This commit is contained in:
@@ -236,9 +236,9 @@ class Budget implements CUD, CommonDatabaseCalls, BudgetInterface
|
||||
{
|
||||
return \LimitRepetition::
|
||||
leftJoin('budget_limits', 'limit_repetitions.budget_limit_id', '=', 'budget_limits.id')->leftJoin(
|
||||
'components', 'budget_limits.component_id', '=', 'components.id'
|
||||
'budgets', 'budget_limits.budget_id', '=', 'budgets.id'
|
||||
)->where('limit_repetitions.startdate', $date->format('Y-m-d'))->where(
|
||||
'components.id', $budget->id
|
||||
'budgets.id', $budget->id
|
||||
)->first(['limit_repetitions.*']);
|
||||
}
|
||||
|
||||
@@ -254,10 +254,10 @@ class Budget implements CUD, CommonDatabaseCalls, BudgetInterface
|
||||
return $this->getUser()->transactionjournals()->whereNotIn(
|
||||
'transaction_journals.id', function ($query) use ($start, $end) {
|
||||
$query->select('transaction_journals.id')->from('transaction_journals')->leftJoin(
|
||||
'component_transaction_journal', 'component_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id'
|
||||
)->leftJoin('components', 'components.id', '=', 'component_transaction_journal.component_id')->where(
|
||||
'budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id'
|
||||
)->leftJoin('budgets', 'budgets.id', '=', 'budget_transaction_journal.budget_id')->where(
|
||||
'transaction_journals.date', '>=', $start->format('Y-m-d')
|
||||
)->where('transaction_journals.date', '<=', $end->format('Y-m-d'))->where('components.class', 'Budget');
|
||||
)->where('transaction_journals.date', '<=', $end->format('Y-m-d'));
|
||||
}
|
||||
)->before($end)->after($start)->lessThan(0)->transactionTypes(['Withdrawal'])->get();
|
||||
}
|
||||
|
||||
@@ -117,6 +117,7 @@ class TransactionJournal implements TransactionJournalInterface, CUD, CommonData
|
||||
\Log::error($model->getErrors()->all());
|
||||
throw new FireflyException('store() transaction journal failed, but it should not!');
|
||||
}
|
||||
throw new NotImplementedException('Still have to fix the budget/category change to components.');
|
||||
$model->save();
|
||||
|
||||
/*
|
||||
@@ -147,6 +148,7 @@ class TransactionJournal implements TransactionJournalInterface, CUD, CommonData
|
||||
/*
|
||||
* Update the budget and the category.
|
||||
*/
|
||||
|
||||
$components = [];
|
||||
if (isset($data['budget_id']) && intval($data['budget_id']) > 0) {
|
||||
/** @var \FireflyIII\Database\Budget\Budget $budgetRepository */
|
||||
|
||||
Reference in New Issue
Block a user