diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-03-15 17:28:46 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-03-15 17:28:46 -0400 |
commit | 084272c60ea97f3a835cfccbb3303227d00085e8 (patch) | |
tree | 3fd327baac937018a40c85f29efe05b9ba1e5cc9 /app/Controller | |
parent | 253996901a10918e3207d46839cdfdc90d200e72 (diff) |
Add cost breakdown for project budget
Diffstat (limited to 'app/Controller')
-rw-r--r-- | app/Controller/Budget.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app/Controller/Budget.php b/app/Controller/Budget.php index 01090550..b8279f19 100644 --- a/app/Controller/Budget.php +++ b/app/Controller/Budget.php @@ -27,6 +27,30 @@ class Budget extends Base } /** + * Cost breakdown by users/subtasks/tasks + * + * @access public + */ + public function breakdown() + { + $project = $this->getProject(); + + $paginator = $this->paginator + ->setUrl('budget', 'breakdown', array('project_id' => $project['id'])) + ->setMax(30) + ->setOrder('start') + ->setDirection('DESC') + ->setQuery($this->budget->getBreakdown($project['id'])) + ->calculate(); + + $this->response->html($this->projectLayout('budget/breakdown', array( + 'paginator' => $paginator, + 'project' => $project, + 'title' => t('Budget') + ))); + } + + /** * Create budget lines * * @access public |