diff --git a/controllers/leases_controller.php b/controllers/leases_controller.php index 241b43b..2eef49a 100644 --- a/controllers/leases_controller.php +++ b/controllers/leases_controller.php @@ -453,13 +453,16 @@ class LeasesController extends AppController { ('first', array('contain' => array(// Models - 'LeaseType', - 'Unit', - 'Customer', + 'LeaseType(id,name)', + 'Unit(id,name)', + 'Customer(id,name)', ), + 'fields' => array('Lease.*', $this->Lease->delinquentField()), 'conditions' => array(array('Lease.id' => $id)), ) ); + $lease['Lease'] += $lease[0]; + unset($lease[0]); // Figure out the outstanding balances for this lease $outstanding_balance = $this->Lease->balance($id); diff --git a/views/leases/view.ctp b/views/leases/view.ctp index f13cea9..b68767c 100644 --- a/views/leases/view.ctp +++ b/views/leases/view.ctp @@ -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('Deposit', FormatHelper::currency($lease['deposit'])); $rows[] = array('Rent', FormatHelper::currency($lease['rent'])); -$rows[] = array('Paid Through', FormatHelper::date($lease['paid_through'], true)); $rows[] = array('Comment', $lease['comment']); @@ -58,6 +57,9 @@ echo '