89 lines
3.2 KiB
PHP
89 lines
3.2 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
echo '<div class="unit-size view">' . "\n";
|
|
|
|
/**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
* UnitSize Detail Main Section
|
|
*/
|
|
|
|
$unit_type = $size['UnitType'];
|
|
$unit_size = $size['UnitSize'];
|
|
|
|
$rows = array();
|
|
$rows[] = array('Name', $unit_size['name']);
|
|
$rows[] = array('Type', $unit_type['name']);
|
|
$rows[] = array('Width', $unit_size['width'] . ' Feet');
|
|
$rows[] = array('Depth', $unit_size['depth'] . ' Feet');
|
|
if (!empty($unit_size['height']))
|
|
$rows[] = array('Height', $unit_size['height'] . ' Feet');
|
|
if (!empty($unit_size['sqft']))
|
|
$rows[] = array('Area', ($unit_size['sqft'] . ' Square Feet'
|
|
. ' ('. FormatHelper::currency($unit_size['rent'] / $unit_size['sqft'])
|
|
. ' / Square Foot)'));
|
|
if (!empty($unit_size['cuft']))
|
|
$rows[] = array('Volume', ($unit_size['cuft'] . ' Cubic Feet'
|
|
. ' ('. FormatHelper::currency($unit_size['rent'] / $unit_size['cuft'])
|
|
. ' / Cubic Foot)'));
|
|
$rows[] = array('Deposit', FormatHelper::currency($unit_size['deposit']));
|
|
$rows[] = array('Rent', FormatHelper::currency($unit_size['rent']));
|
|
$rows[] = array('Comment', $unit_size['comment']);
|
|
|
|
echo $this->element('table',
|
|
array('class' => 'item unit_size detail',
|
|
'caption' => 'Unit Size Detail',
|
|
'rows' => $rows,
|
|
'column_class' => array('field', 'value')));
|
|
|
|
|
|
/**********************************************************************
|
|
* UnitSize Info Box
|
|
*/
|
|
|
|
echo '<div class="infobox">' . "\n";
|
|
$rows = array();
|
|
$rows[] = array($unit_size['name'] . ' Units:', $stats['all']);
|
|
$rows[] = array('Unavailable:', $stats['unavailable']);
|
|
$rows[] = array('Vacant:', $stats['vacant']);
|
|
$rows[] = array('Occupied:', $stats['occupied']);
|
|
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";
|
|
|
|
|
|
/**********************************************************************
|
|
* Ledger Entries
|
|
*/
|
|
|
|
echo $this->element('units', array
|
|
(// Grid configuration
|
|
'config' => array
|
|
('caption' => $unit_size['name'] . " Units",
|
|
'filter' => array('unit_size_id' => $unit_size['id']),
|
|
'include' => array('Deposit', 'Comment'),
|
|
'exclude' => array('Size', 'Area', 'Balance'),
|
|
)));
|
|
|
|
|
|
/* End "detail supporting" div */
|
|
echo '</div>' . "\n";
|
|
|
|
/* End page div */
|
|
echo '</div>' . "\n";
|