mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-22 06:23:12 -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 GChart $chart
|
||||||
* @param CategoryRepositoryInterface $repository
|
* @param CategoryRepositoryInterface $repository
|
||||||
* @param $year
|
* @param $year
|
||||||
|
@ -177,7 +177,7 @@ class CategoryRepository implements CategoryRepositoryInterface
|
|||||||
// always ignore transfers between accounts!
|
// always ignore transfers between accounts!
|
||||||
$sum = floatval(
|
$sum = floatval(
|
||||||
$category->transactionjournals()
|
$category->transactionjournals()
|
||||||
->transactionTypes(['Withdrawal', 'Deposit'])
|
->transactionTypes(['Withdrawal'])
|
||||||
->before($end)->after($start)->lessThan(0)->sum('amount')
|
->before($end)->after($start)->lessThan(0)->sum('amount')
|
||||||
) * -1;
|
) * -1;
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ class CategoryRepository implements CategoryRepositoryInterface
|
|||||||
$sum = $category->transactionjournals()
|
$sum = $category->transactionjournals()
|
||||||
->before($end)
|
->before($end)
|
||||||
->after($start)
|
->after($start)
|
||||||
->transactionTypes(['Withdrawal', 'Deposit'])
|
->transactionTypes(['Withdrawal'])
|
||||||
->lessThan(0)
|
->lessThan(0)
|
||||||
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
|
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
|
||||||
->leftJoin(
|
->leftJoin(
|
||||||
|
Loading…
Reference in New Issue
Block a user