Files
pmgr/views/leases/view.ctp
abijah cc12d5ff93 Merge in from pre_0.1 branch
git-svn-id: file:///svn-source/pmgr/trunk/site@847 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-09-15 02:38:28 +00:00

118 lines
4.3 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();
$rows[] = array('Number', $lease['number']);
$rows[] = array('Lease Type', $lease_type['name']);
$rows[] = array('Unit', $html->link($unit['name'],
array('controller' => 'units',
'action' => 'view',
$unit['id'])));
$rows[] = array('Customer', $html->link($customer['name'],
array('controller' => 'customers',
'action' => 'view',
$customer['id'])));
$rows[] = array('Lease_Date', FormatHelper::date($lease['lease_date'], true));
$rows[] = array('Move-in Planned', FormatHelper::date($lease['movein_planned_date'], true));
$rows[] = array('Move-in', FormatHelper::date($lease['movein_date'], true));
$rows[] = array('Move-out', FormatHelper::date($lease['moveout_date'], true));
$rows[] = array('Move-out Planned', FormatHelper::date($lease['moveout_planned_date'], true));
$rows[] = array('Notice Given', FormatHelper::date($lease['notice_given_date'], true));
$rows[] = array('Notice Received', FormatHelper::date($lease['notice_received_date'], true));
$rows[] = array('Closed', FormatHelper::date($lease['close_date'], true));
$rows[] = array('Deposit', FormatHelper::currency($lease['deposit']));
$rows[] = array('Rent', FormatHelper::currency($lease['rent']));
$rows[] = 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 Owed:', FormatHelper::currency($outstandingBalance));
$rows[] = array('Paid Through:', FormatHelper::date($lease['paid_through_date'], false));
if ($lease['delinquent'])
$rows[] = array('Delinquent:', FormatHelper::age($lease['paid_through_date'], 'delinquent'));
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('statement_entries', array
(// Grid configuration
'config' => array
('caption' => 'Lease Statement',
'filter' => array('Lease.id' => $lease['id']),
'include' => array('Through'),
'exclude' => array('Customer', 'Lease', 'Unit'),
)));
/**********************************************************************
* Receipt History
*/
echo $this->element('ledger_entries', array
(// Grid configuration
'config' => array
('caption' => 'Customer Receipts',
'filter' => array('Customer.id' => $customer['id'],
'Transaction.type' => 'RECEIPT',
'Tender.id !=' => null,
//'Account.id !=' => '-AR-'
),
'include' => array('Transaction'),
'exclude' => array('Entry', 'Account', 'Cr/Dr'),
)));
/* End "detail supporting" div */
echo '</div>' . "\n";
/* End page div */
echo '</div>' . "\n";