Method no longer used.

This commit is contained in:
James Cole 2016-01-01 20:05:14 +01:00
parent bb4e2be9eb
commit 64dbb14241
3 changed files with 0 additions and 30 deletions

View File

@ -384,7 +384,6 @@ class ReportHelper implements ReportHelperInterface
$diffLine->setRole(BalanceLine::ROLE_DIFFROLE);
foreach ($accounts as $account) {
//$spent = $this->query->spentNoBudget($account, $start, $end);
$entry = $spentData->filter(
function (TransactionJournal $model) use ($budget, $account) {
return $model->account_id == $account->id && is_null($model->budget_id);

View File

@ -19,26 +19,6 @@ use Illuminate\Support\Collection;
class ReportQuery implements ReportQueryInterface
{
/**
* @param Account $account
* @param Carbon $start
* @param Carbon $end
*
* @return string
*/
public function spentNoBudget(Account $account, 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)
->whereNull('budget_transaction_journal.budget_id')->get(['transaction_journals.*'])->sum('amount');
}
/**
* Returns an array of the amount of money spent in the given accounts (on withdrawals, opening balances and transfers)
* grouped by month like so: "2015-01" => '123.45'

View File

@ -39,15 +39,6 @@ interface ReportQueryInterface
*/
public function expense(Collection $accounts, Carbon $start, Carbon $end);
/**
* @param Account $account
* @param Carbon $start
* @param Carbon $end
*
* @return string
*/
public function spentNoBudget(Account $account, Carbon $start, Carbon $end);
/**
* Returns an array of the amount of money spent in the given accounts (on withdrawals, opening balances and transfers)
* grouped by month like so: "2015-01" => '123.45'