Files
pmgr/views/units/overview.ctp
abijah 9848a2919e Forgot to add the report views for the last two checkins :-/
git-svn-id: file:///svn-source/pmgr/branches/v0.3_work/site@959 97e9348a-65ac-dc4b-aefc-98561f571b83
2010-03-12 01:31:05 +00:00

129 lines
5.0 KiB
PHP

<?php /* -*- mode:PHP -*- */
echo '<div class="unit overview">' . "\n";
/**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
* Overview Main Section
*/
$rows = array();
$rows[] = array('Total Units', $overview['count']);
$rows[] = array('Gross Scheduled Rent', FormatHelper::currency($overview['rents']));
echo $this->element('table',
array('class' => 'item unit detail',
'caption' => 'Unit Overview',
'rows' => $rows,
'column_class' => array('field', 'value')));
/**********************************************************************
* Unit Overview Info Box
echo '<div class="infobox">' . "\n";
$rows = array();
$rows[] = array('Security Deposit:', FormatHelper::currency($outstandingDeposit));
$rows[] = array('Balance:', FormatHelper::currency($outstandingBalance));
echo $this->element('table',
array('class' => 'summary',
'rows' => $rows,
'column_class' => array('field', 'value'),
'suppress_alternate_rows' => true,
));
echo '</div>' . "\n";
*/
/**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
* Supporting Elements Section
*/
echo '<div CLASS="detail supporting">' . "\n";
/*
foreach ($overview['types'] AS $type) {
$headers = array('Status', 'Count', 'Rent',
'Physical', 'Economic', 'Physical (Facility)', 'Economic (Facility)');
$row_class = array();
$rows = array();
foreach ($type['subs'] AS $sub) {
$row_class[] = array();
$rows[] = array($sub['name'], $sub['count'], FormatHelper::currency($sub['rents']),
FormatHelper::percent($sub['phys_subpct'], 1),
FormatHelper::percent($sub['econ_subpct'], 1),
FormatHelper::percent($sub['phys_totpct'], 1),
FormatHelper::percent($sub['econ_totpct'], 1));
}
$row_class[] = 'grand';
$rows[] = array('Total '.$type['name'], $type['count'], FormatHelper::currency($type['rents']),
FormatHelper::percent(1, 1),
FormatHelper::percent(1, 1),
FormatHelper::percent($type['phys_pct'], 1),
FormatHelper::percent($type['econ_pct'], 1));
echo $this->element('table',
array('class' => 'item unit-overview overview list',
'caption' => $type['name'],
'headers' => $headers,
'rows' => $rows,
'row_class' => $row_class
));
}
*/
$headers = array('Status', 'Count', 'Rent',
'Physical', 'Economic', 'Physical<BR>(Facility)', 'Economic<BR>(Facility)');
$row_class = array();
$rows = array();
foreach ($overview['types'] AS $type) {
$row_class[] = 'subheader';
$rows[] = array($type['name']);
$odd = 1;
foreach ($type['subs'] AS $sub) {
$row_class[] = array('subitem', $odd ? 'oddrow' : 'evenrow');
$rows[] = array($sub['name'], $sub['count'], FormatHelper::currency($sub['rents']),
FormatHelper::percent($sub['phys_subpct'], 1),
FormatHelper::percent($sub['econ_subpct'], 1),
FormatHelper::percent($sub['phys_totpct'], 1),
FormatHelper::percent($sub['econ_totpct'], 1));
$odd = !$odd;
}
$row_class[] = 'grand';
$rows[] = array('Total '.$type['name'], $type['count'], FormatHelper::currency($type['rents']),
FormatHelper::percent(1, 1),
FormatHelper::percent(1, 1),
FormatHelper::percent($type['phys_pct'], 1),
FormatHelper::percent($type['econ_pct'], 1));
}
echo $this->element('table',
array('class' => 'item unit-overview overview list',
'caption' => 'Unit Types',
'headers' => $headers,
'rows' => $rows,
'row_class' => $row_class,
'suppress_alternate_rows' => true
));
?>
<script type="text/javascript"><!--
jQuery(document).ready(function(){
jQuery('table.overview td.subheader').attr('colSpan', 7);
});
--></script>
<?php
/* End "detail supporting" div */
echo '</div>' . "\n";
/* End page div */
echo '</div>' . "\n";