mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-02 03:51:18 +00:00
Make sure all the users accounts are included so internal transfers are ignored. [skip ci]
This commit is contained in:
@@ -7,6 +7,7 @@ namespace FireflyIII\Http\Controllers\Chart;
|
|||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Http\Controllers\Controller;
|
use FireflyIII\Http\Controllers\Controller;
|
||||||
use FireflyIII\Models\Category;
|
use FireflyIII\Models\Category;
|
||||||
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface as CRI;
|
use FireflyIII\Repositories\Category\CategoryRepositoryInterface as CRI;
|
||||||
use FireflyIII\Repositories\Category\SingleCategoryRepositoryInterface as SCRI;
|
use FireflyIII\Repositories\Category\SingleCategoryRepositoryInterface as SCRI;
|
||||||
use FireflyIII\Support\CacheProperties;
|
use FireflyIII\Support\CacheProperties;
|
||||||
@@ -153,7 +154,7 @@ class CategoryController extends Controller
|
|||||||
*
|
*
|
||||||
* @return \Symfony\Component\HttpFoundation\Response
|
* @return \Symfony\Component\HttpFoundation\Response
|
||||||
*/
|
*/
|
||||||
public function frontpage(CRI $repository)
|
public function frontpage(CRI $repository, ARI $accountRepository)
|
||||||
{
|
{
|
||||||
|
|
||||||
$start = session('start', Carbon::now()->startOfMonth());
|
$start = session('start', Carbon::now()->startOfMonth());
|
||||||
@@ -170,8 +171,9 @@ class CategoryController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get data for categories (and "no category"):
|
// get data for categories (and "no category"):
|
||||||
$set = $repository->spentForAccountsPerMonth(new Collection, $start, $end);
|
$accounts = $accountRepository->getAccounts(['Default account', 'Asset account', 'Cash account']);
|
||||||
$outside = $repository->sumSpentNoCategory(new Collection, $start, $end);
|
$set = $repository->spentForAccountsPerMonth($accounts, $start, $end);
|
||||||
|
$outside = $repository->sumSpentNoCategory($accounts, $start, $end);
|
||||||
|
|
||||||
// this is a "fake" entry for the "no category" entry.
|
// this is a "fake" entry for the "no category" entry.
|
||||||
$entry = new stdClass();
|
$entry = new stdClass();
|
||||||
|
|||||||
Reference in New Issue
Block a user