mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-20 11:19:16 +00:00
Expenses only [skip ci]
This commit is contained in:
@@ -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(
|
||||||
|
Reference in New Issue
Block a user