mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 20:11:22 +00:00
Update code, work to pass filters. [skip ci]
This commit is contained in:
@@ -13,17 +13,19 @@ class ChartController extends BaseController
|
||||
|
||||
protected $_accounts;
|
||||
protected $_journals;
|
||||
protected $_tk;
|
||||
protected $_preferences;
|
||||
|
||||
/**
|
||||
* @param ARI $accounts
|
||||
* @param TJRI $journals
|
||||
*/
|
||||
public function __construct(ARI $accounts, TJRI $journals, PHI $preferences)
|
||||
public function __construct(ARI $accounts, TJRI $journals, PHI $preferences, tk $toolkit)
|
||||
{
|
||||
$this->_accounts = $accounts;
|
||||
$this->_journals = $journals;
|
||||
$this->_preferences = $preferences;
|
||||
$this->_tk = $toolkit;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -33,7 +35,7 @@ class ChartController extends BaseController
|
||||
*/
|
||||
public function homeAccount($accountId = null)
|
||||
{
|
||||
list($start, $end) = tk::getDateRange();
|
||||
list($start, $end) = $this->_tk->getDateRange();
|
||||
$current = clone $start;
|
||||
$return = [];
|
||||
$account = null;
|
||||
@@ -134,7 +136,7 @@ class ChartController extends BaseController
|
||||
|
||||
public function homeCategories()
|
||||
{
|
||||
list($start, $end) = tk::getDateRange();
|
||||
list($start, $end) =$this->_tk->getDateRange();
|
||||
$account = null;
|
||||
$result = [];
|
||||
// grab all transaction journals in this period:
|
||||
|
||||
Reference in New Issue
Block a user