Added Monthly Charges report. Also, added a new area to the menu specifically for reports.
git-svn-id: file:///svn-source/pmgr/branches/v0.3_work/site@958 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -31,10 +31,6 @@ class UnitsController extends AppController {
|
||||
$this->addSideMenuLink('All',
|
||||
array('controller' => 'units', 'action' => 'all'), null,
|
||||
'CONTROLLER');
|
||||
if ($this->admin())
|
||||
$this->addSideMenuLink('Overview',
|
||||
array('controller' => 'units', 'action' => 'overview'), null,
|
||||
'CONTROLLER');
|
||||
}
|
||||
|
||||
|
||||
@@ -244,7 +240,6 @@ class UnitsController extends AppController {
|
||||
'group' => array('UnitType.id', 'Unit.status'),
|
||||
'order' => array('UnitType.name', 'Unit.status')
|
||||
));
|
||||
//pr($result);
|
||||
|
||||
$overview = array('types' => array(), 'count' => 0, 'rents' => 0);
|
||||
foreach ($result AS $row) {
|
||||
@@ -283,7 +278,9 @@ class UnitsController extends AppController {
|
||||
$type['phys_pct'] = $type['count'] / $overview['count'];
|
||||
$type['econ_pct'] = $type['rents'] / $overview['rents'];
|
||||
}
|
||||
//pr($overview);
|
||||
|
||||
// Enable the Reports menu section
|
||||
$this->sideMenuAreaActivate('REPORT');
|
||||
|
||||
// Prepare to render.
|
||||
$this->set('title', 'Unit Overview');
|
||||
|
||||
Reference in New Issue
Block a user