mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 10:53:37 +00:00
Method no longer used.
This commit is contained in:
@@ -365,8 +365,6 @@ class ReportHelper implements ReportHelperInterface
|
|||||||
if (!is_null($entry->first())) {
|
if (!is_null($entry->first())) {
|
||||||
$spent = $entry->first()->spent;
|
$spent = $entry->first()->spent;
|
||||||
}
|
}
|
||||||
//$spent = $this->query->spentInBudget($account, $budget, $start, $end); // I think shared is irrelevant.
|
|
||||||
|
|
||||||
$balanceEntry->setSpent($spent);
|
$balanceEntry->setSpent($spent);
|
||||||
$line->addBalanceEntry($balanceEntry);
|
$line->addBalanceEntry($balanceEntry);
|
||||||
}
|
}
|
||||||
|
@@ -18,29 +18,6 @@ use Illuminate\Support\Collection;
|
|||||||
*/
|
*/
|
||||||
class ReportQuery implements ReportQueryInterface
|
class ReportQuery implements ReportQueryInterface
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Covers tags
|
|
||||||
*
|
|
||||||
* @param Account $account
|
|
||||||
* @param Budget $budget
|
|
||||||
* @param Carbon $start
|
|
||||||
* @param Carbon $end
|
|
||||||
*
|
|
||||||
* @return float
|
|
||||||
*/
|
|
||||||
public function spentInBudget(Account $account, Budget $budget, Carbon $start, Carbon $end)
|
|
||||||
{
|
|
||||||
|
|
||||||
return Auth::user()->transactionjournals()
|
|
||||||
->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
|
||||||
->leftJoin('budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
|
|
||||||
->transactionTypes([TransactionType::WITHDRAWAL])
|
|
||||||
->where('transactions.account_id', $account->id)
|
|
||||||
->before($end)
|
|
||||||
->after($start)
|
|
||||||
->where('budget_transaction_journal.budget_id', $budget->id)
|
|
||||||
->get(['transaction_journals.*'])->sum('amount');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Account $account
|
* @param Account $account
|
||||||
|
@@ -39,18 +39,6 @@ interface ReportQueryInterface
|
|||||||
*/
|
*/
|
||||||
public function expense(Collection $accounts, Carbon $start, Carbon $end);
|
public function expense(Collection $accounts, Carbon $start, Carbon $end);
|
||||||
|
|
||||||
/**
|
|
||||||
* Covers tags as well.
|
|
||||||
*
|
|
||||||
* @param Account $account
|
|
||||||
* @param Budget $budget
|
|
||||||
* @param Carbon $start
|
|
||||||
* @param Carbon $end
|
|
||||||
*
|
|
||||||
* @return float
|
|
||||||
*/
|
|
||||||
public function spentInBudget(Account $account, Budget $budget, Carbon $start, Carbon $end);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Account $account
|
* @param Account $account
|
||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
|
Reference in New Issue
Block a user