' . "\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(array('Name', $unit['name']),
array('Status', $unit['status']),
array('Size', $unit_size['name']),
array('Deposit', FormatHelper::currency($unit['deposit'])),
array('Rent', FormatHelper::currency($unit['rent'])),
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 '
' . "\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 '
' . "\n";
/**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
* Supporting Elements Section
*/
echo '' . "\n";
/**********************************************************************
* Lease History
*/
echo $this->element('leases', array
('config' => array
('caption' => 'Lease History',
'rows' => $leases,
)));
/**********************************************************************
* Current Customer Lease Account History
*/
if (isset($current_lease['id'])) {
echo $this->element('ledger_entries', array
(// Element configuration
'ar_account' => true,
'lease_id' => $current_lease['id'],
// Grid configuration
'config' => array
(
'caption' =>
('Current Lease Account ('
. $current_lease['Customer']['name']
. ')'),
),
));
}
/* End "detail supporting" div */
echo '
' . "\n";
/* End page div */
echo '' . "\n";