Skip to content
Snippets Groups Projects
Commit 7739d26a authored by Tim Steiner's avatar Tim Steiner
Browse files

Fix a sorting issue on the UCC summary reports (in the ACE section).

parent 5aac3c3f
No related branches found
No related tags found
No related merge requests found
......@@ -96,6 +96,25 @@ class Ucc_ReportsController extends App_Controller_Action
$this->view->data = $this->_getSummaryData($startDate, $endDate, 31);
$this->view->aceData = $this->_getSummaryData($startDate, $endDate, 313);
$this->view->aceData->merge($this->_getSummaryData($startDate, $endDate, 325), TRUE);
$session = new Zend_Session_Namespace(__CLASS__);
$sortBy = $session->sortBy;
if (!Unl_Util::isArray($sortBy)) {
$sortBy = array();
}
if ($this->_getParam('sort')) {
if (($key = array_search($this->_getParam('sort'), $sortBy)) !== FALSE) {
unset($sortBy[$key]);
}
$sortBy[] = $this->_getParam('sort');
}
$session->sortBy = $sortBy;
foreach ($sortBy as $sortKey) {
$this->view->data->orderBy('get' . $sortKey);
$this->view->aceData->orderBy('get' . $sortKey);
}
$this->render('monthly-summary');
}
......@@ -159,23 +178,6 @@ class Ucc_ReportsController extends App_Controller_Action
));
}
$session = new Zend_Session_Namespace(__CLASS__);
$sortBy = $session->sortBy;
if (!Unl_Util::isArray($sortBy)) {
$sortBy = array();
}
if ($this->_getParam('sort')) {
if (($key = array_search($this->_getParam('sort'), $sortBy)) !== FALSE) {
unset($sortBy[$key]);
}
$sortBy[] = $this->_getParam('sort');
}
$session->sortBy = $sortBy;
foreach ($sortBy as $sortKey) {
$data->orderBy('get' . $sortKey);
}
return $data;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment