git-svn-id: file:///svn-source/pmgr/branches/single_AR_20090622@182 97e9348a-65ac-dc4b-aefc-98561f571b83
93 lines
3.4 KiB
PHP
93 lines
3.4 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
echo '<div class="lease view">' . "\n";
|
|
|
|
/**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
* Lease Detail Main Section
|
|
*/
|
|
|
|
$lease_type = $lease['LeaseType'];
|
|
$customer = $lease['Customer'];
|
|
$unit = $lease['Unit'];
|
|
|
|
if (isset($lease['Lease']))
|
|
$lease = $lease['Lease'];
|
|
|
|
$rows = array(array('ID', $lease['id']),
|
|
array('Number', $lease['number']),
|
|
array('Lease Type', $lease_type['name']),
|
|
array('Unit', $html->link($unit['name'],
|
|
array('controller' => 'units',
|
|
'action' => 'view',
|
|
$unit['id']))),
|
|
array('Customer', $html->link($customer['name'],
|
|
array('controller' => 'customers',
|
|
'action' => 'view',
|
|
$customer['id']))),
|
|
array('Lease_Date', FormatHelper::date($lease['lease_date'], true)),
|
|
array('Move-in Planned', FormatHelper::date($lease['movein_planned_date'], true)),
|
|
array('Move-in', FormatHelper::date($lease['movein_date'], true)),
|
|
array('Move-out', FormatHelper::date($lease['moveout_date'], true)),
|
|
array('Move-out Planned', FormatHelper::date($lease['moveout_planned_date'], true)),
|
|
array('Notice Given', FormatHelper::date($lease['notice_given_date'], true)),
|
|
array('Notice Received', FormatHelper::date($lease['notice_received_date'], true)),
|
|
array('Closed', FormatHelper::date($lease['close_date'], true)),
|
|
array('Deposit', FormatHelper::currency($lease['deposit'])),
|
|
array('Rent', FormatHelper::currency($lease['amount'])),
|
|
array('Comment', $lease['comment']));
|
|
|
|
|
|
echo $this->element('table',
|
|
array('class' => 'item lease detail',
|
|
'caption' => 'Lease Detail',
|
|
'rows' => $rows,
|
|
'column_class' => array('field', 'value')));
|
|
|
|
|
|
/**********************************************************************
|
|
* Lease 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 Account History
|
|
*/
|
|
|
|
echo $this->element('ledger_entries',
|
|
array('caption' => 'Account',
|
|
'lease_id' => $lease['id'],
|
|
'ar_account' => true,
|
|
));
|
|
|
|
|
|
/* End "detail supporting" div */
|
|
echo '</div>' . "\n";
|
|
|
|
/* End page div */
|
|
echo '</div>' . "\n";
|