mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-20 11:19:16 +00:00
Removed my own validation source in favour of Ardent.
This commit is contained in:
@@ -19,11 +19,16 @@ class ChartController extends BaseController
|
||||
/**
|
||||
* Show home charts.
|
||||
*/
|
||||
public function homeAccount($account = null)
|
||||
public function homeAccount($id = null)
|
||||
{
|
||||
list($start, $end) = tk::getDateRange();
|
||||
$current = clone $start;
|
||||
$return = [];
|
||||
$account = null;
|
||||
|
||||
if(!is_null($id)) {
|
||||
$account = $this->accounts->find($id);
|
||||
}
|
||||
|
||||
if (is_null($account)) {
|
||||
$accounts = $this->accounts->getActiveDefault();
|
||||
@@ -40,14 +45,8 @@ class ChartController extends BaseController
|
||||
$current->addDay();
|
||||
}
|
||||
} else {
|
||||
// do something experimental:
|
||||
$account = $this->accounts->find($account);
|
||||
if (is_null($account)) {
|
||||
return View::make('error')->with('message', 'No account found.');
|
||||
}
|
||||
$return[0] = ['name' => $account->name, 'data' => []];
|
||||
|
||||
|
||||
while ($current <= $end) {
|
||||
|
||||
$return[0]['data'][] = [$current->timestamp * 1000, $account->balance(clone $current)];
|
||||
|
Reference in New Issue
Block a user