git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@542 97e9348a-65ac-dc4b-aefc-98561f571b83
101 lines
3.1 KiB
PHP
101 lines
3.1 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
echo '<div class="unit view">' . "\n";
|
|
|
|
/**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
* Unit Detail Main Section
|
|
*/
|
|
|
|
$leases = $unit['Lease'];
|
|
$current_lease = $unit['CurrentLease'];
|
|
$unit_size = $unit['UnitSize'];
|
|
|
|
if (isset($unit['Unit']))
|
|
$unit = $unit['Unit'];
|
|
|
|
$rows = array();
|
|
$rows[] = array('Name', $unit['name']);
|
|
$rows[] = array('Status', $unit['status']);
|
|
$rows[] = array('Size', $unit_size['name']);
|
|
$rows[] = array('Deposit', FormatHelper::currency($unit['deposit']));
|
|
$rows[] = array('Rent', FormatHelper::currency($unit['rent']));
|
|
$rows[] = array('Comment', $unit['comment']);
|
|
|
|
echo $this->element('table',
|
|
array('class' => 'item unit detail',
|
|
'caption' => 'Unit Info',
|
|
'rows' => $rows,
|
|
'column_class' => array('field', 'value')));
|
|
|
|
|
|
/**********************************************************************
|
|
* Unit 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";
|
|
|
|
|
|
/**********************************************************************
|
|
* Lease History
|
|
*/
|
|
|
|
echo $this->element('leases', array
|
|
(// Grid configuration
|
|
'config' => array
|
|
('caption' => 'Lease History',
|
|
'filter' => array('Unit.id' => $unit['id']),
|
|
'exclude' => array('Unit'),
|
|
)));
|
|
|
|
|
|
/**********************************************************************
|
|
* Current Customer Lease Account History
|
|
*/
|
|
|
|
if (isset($current_lease['id'])) {
|
|
echo $this->element('statement_entries', array
|
|
(// Grid configuration
|
|
'config' => array
|
|
(
|
|
'caption' =>
|
|
('Current Lease Statement ('
|
|
. $current_lease['Customer']['name']
|
|
. ')'),
|
|
'filter' => array('Lease.id' => $current_lease['id']),
|
|
'include' => array('Through'),
|
|
'exclude' => array('Customer', 'Lease', 'Unit'),
|
|
'sort_column' => 'Effective',
|
|
'sort_order' => 'DESC',
|
|
)));
|
|
}
|
|
|
|
|
|
/* End "detail supporting" div */
|
|
echo '</div>' . "\n";
|
|
|
|
/* End page div */
|
|
echo '</div>' . "\n";
|