Moved paid-through from the detail box, which is semi-static information, to the info box, which holds data that changes with time (i.e. the so called pertinent information).

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@549 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-13 22:09:27 +00:00
parent 94e300a129
commit fc292e3366
3 changed files with 16 additions and 4 deletions

View File

@@ -453,13 +453,16 @@ class LeasesController extends AppController {
('first', ('first',
array('contain' => array('contain' =>
array(// Models array(// Models
'LeaseType', 'LeaseType(id,name)',
'Unit', 'Unit(id,name)',
'Customer', 'Customer(id,name)',
), ),
'fields' => array('Lease.*', $this->Lease->delinquentField()),
'conditions' => array(array('Lease.id' => $id)), 'conditions' => array(array('Lease.id' => $id)),
) )
); );
$lease['Lease'] += $lease[0];
unset($lease[0]);
// Figure out the outstanding balances for this lease // Figure out the outstanding balances for this lease
$outstanding_balance = $this->Lease->balance($id); $outstanding_balance = $this->Lease->balance($id);

View File

@@ -39,7 +39,6 @@ $rows[] = array('Notice Received', FormatHelper::date($lease['notice_received_d
$rows[] = array('Closed', FormatHelper::date($lease['close_date'], true)); $rows[] = array('Closed', FormatHelper::date($lease['close_date'], true));
$rows[] = array('Deposit', FormatHelper::currency($lease['deposit'])); $rows[] = array('Deposit', FormatHelper::currency($lease['deposit']));
$rows[] = array('Rent', FormatHelper::currency($lease['rent'])); $rows[] = array('Rent', FormatHelper::currency($lease['rent']));
$rows[] = array('Paid Through', FormatHelper::date($lease['paid_through'], true));
$rows[] = array('Comment', $lease['comment']); $rows[] = array('Comment', $lease['comment']);
@@ -58,6 +57,9 @@ echo '<div class="infobox">' . "\n";
$rows = array(); $rows = array();
$rows[] = array('Security Deposit:', FormatHelper::currency($outstandingDeposit)); $rows[] = array('Security Deposit:', FormatHelper::currency($outstandingDeposit));
$rows[] = array('Balance Owed:', FormatHelper::currency($outstandingBalance)); $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', echo $this->element('table',
array('class' => 'summary', array('class' => 'summary',
'rows' => $rows, 'rows' => $rows,

View File

@@ -32,6 +32,13 @@ div.item.list { margin-bottom: 1.5em; }
table.item.list { margin-bottom: 1.5em; } table.item.list { margin-bottom: 1.5em; }
/************************************************************
************************************************************
* Date formats
*/
span.fmt-age.delinquent { color: #f00; }
/************************************************************ /************************************************************
************************************************************ ************************************************************
* Cell configuration * Cell configuration