From 084272c60ea97f3a835cfccbb3303227d00085e8 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 15 Mar 2015 17:28:46 -0400 Subject: Add cost breakdown for project budget --- app/Controller/Budget.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'app/Controller') 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 @@ -26,6 +26,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 * -- cgit v1.2.3