mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-03 12:47:17 -06:00
Expenses only [skip ci]
This commit is contained in:
parent
512ce15973
commit
f64616748c
@ -122,6 +122,8 @@ class CategoryController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This chart will only show expenses.
|
||||
*
|
||||
* @param GChart $chart
|
||||
* @param CategoryRepositoryInterface $repository
|
||||
* @param $year
|
||||
|
@ -177,7 +177,7 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
// always ignore transfers between accounts!
|
||||
$sum = floatval(
|
||||
$category->transactionjournals()
|
||||
->transactionTypes(['Withdrawal', 'Deposit'])
|
||||
->transactionTypes(['Withdrawal'])
|
||||
->before($end)->after($start)->lessThan(0)->sum('amount')
|
||||
) * -1;
|
||||
|
||||
@ -187,7 +187,7 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
$sum = $category->transactionjournals()
|
||||
->before($end)
|
||||
->after($start)
|
||||
->transactionTypes(['Withdrawal', 'Deposit'])
|
||||
->transactionTypes(['Withdrawal'])
|
||||
->lessThan(0)
|
||||
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
|
||||
->leftJoin(
|
||||
|
Loading…
Reference in New Issue
Block a user