Added a ledger listing to the Lease view page, which was otherwise quite empty.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@168 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -107,7 +107,7 @@ class LeasesController extends AppController {
|
||||
array(// Models
|
||||
'LeaseType',
|
||||
'Unit',
|
||||
'Account' => array('Ledger'),
|
||||
'Account' => array('CurrentLedger'),
|
||||
'Customer',
|
||||
),
|
||||
'conditions' => array(array('Lease.id' => $id)),
|
||||
@@ -128,6 +128,10 @@ class LeasesController extends AppController {
|
||||
$deposits = $this->Lease->findSecurityDeposits($lease['Lease']['id']);
|
||||
$outstanding_deposit = $deposits['summary']['balance'];
|
||||
|
||||
// Move the Leder stats into our alias 'CurrentLedger'
|
||||
$lease['Account']['CurrentLedger'] += $lease['Account']['Ledger'];
|
||||
unset($lease['Account']['Ledger']);
|
||||
|
||||
// Prepare to render
|
||||
$title = 'Lease: #' . $lease['Lease']['id'];
|
||||
$this->set(compact('lease', 'title',
|
||||
|
||||
Reference in New Issue
Block a user