Added lease and ledger_entry controllers/views. Minor bugfixes as well.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@85 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
94
site/views/leases/view.ctp
Normal file
94
site/views/leases/view.ctp
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php /* -*- mode:PHP -*- */ ?>
|
||||
|
||||
<div class="lease view">
|
||||
|
||||
<?php
|
||||
; // Editor alignment
|
||||
|
||||
/**********************************************************************
|
||||
**********************************************************************
|
||||
**********************************************************************
|
||||
**********************************************************************
|
||||
* Lease Detail Main Section
|
||||
*/
|
||||
|
||||
$lease_type = $lease['LeaseType'];
|
||||
$customer = $lease['Customer'];
|
||||
$account = $lease['Account'];
|
||||
$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['id'],
|
||||
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'])),
|
||||
array('Move-in Planned', FormatHelper::date($lease['movein_planned_date'])),
|
||||
array('Move-in', (FormatHelper::date($lease['movein_date'])
|
||||
. ' ('
|
||||
. $time->timeAgoInWords($lease['movein_date'],
|
||||
array('end' => '+99 years'))
|
||||
. ')')),
|
||||
array('Move-out', (FormatHelper::date($lease['moveout_date'])
|
||||
. ' ('
|
||||
. $time->timeAgoInWords($lease['moveout_date'],
|
||||
array('end' => '+99 years'))
|
||||
. ')')),
|
||||
array('Move-out Planned', FormatHelper::date($lease['moveout_planned_date'])),
|
||||
array('Notice Given', FormatHelper::date($lease['notice_given_date'])),
|
||||
array('Notice Received', FormatHelper::date($lease['notice_received_date'])),
|
||||
array('Closed', FormatHelper::date($lease['close_date'])),
|
||||
array('Account', $html->link($account['name'],
|
||||
array('controller' => 'accounts',
|
||||
'action' => 'view',
|
||||
$account['id']))),
|
||||
array('Deposit', (FormatHelper::currency($lease['deposit']))),
|
||||
array('Rent', (FormatHelper::currency($lease['amount']))),
|
||||
array('Comment', $lease['comment']));
|
||||
|
||||
|
||||
echo $this->element('table',
|
||||
array('class' => 'item account detail',
|
||||
'caption' => 'Account Detail',
|
||||
'rows' => $rows,
|
||||
'column_class' => array('field', 'value')));
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Account Info Box
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<DIV CLASS="infobox">
|
||||
<DIV CLASS="summary balance">
|
||||
Account Balance: <?php echo FormatHelper::currency($balance); ?>
|
||||
</DIV>
|
||||
</DIV>
|
||||
|
||||
<DIV CLASS="detail supporting">
|
||||
<?php
|
||||
; // Editor alignment
|
||||
|
||||
/**********************************************************************
|
||||
**********************************************************************
|
||||
**********************************************************************
|
||||
**********************************************************************
|
||||
* Supporting Elements Section
|
||||
*/
|
||||
|
||||
|
||||
/* End "detail supporting" DIV */ ?>
|
||||
</DIV>
|
||||
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user