Bug fixes to get lease security deposit and balance information working.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@396 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -509,7 +509,7 @@ class LeasesController extends AppController {
|
||||
|
||||
// Determine the lease security deposit
|
||||
$deposits = $this->Lease->securityDeposits($lease['Lease']['id']);
|
||||
$outstanding_deposit = $deposits['summary']['Payment']['reconciled'];
|
||||
$outstanding_deposit = $deposits['summary']['balance'];
|
||||
|
||||
// Set up dynamic menu items
|
||||
if (!isset($lease['Lease']['close_date'])) {
|
||||
|
||||
@@ -33,6 +33,10 @@ class Lease extends AppModel {
|
||||
$query['conditions'][] = array('StatementEntry.account_id' => $A->securityDepositAccountID());
|
||||
|
||||
$set = $this->StatementEntry->reconciledSet('CHARGE', $query);
|
||||
|
||||
$set['summary'] = array('total' => $set['summary']['Charge']['total'],
|
||||
'balance' => $set['summary']['Charge']['reconciled'],
|
||||
);
|
||||
//pr(compact('set'));
|
||||
return $set;
|
||||
}
|
||||
@@ -342,7 +346,7 @@ class Lease extends AppModel {
|
||||
if (isset($this->data['Lease']['close_date']))
|
||||
return false;
|
||||
|
||||
$deposits = $this->findSecurityDeposits($id);
|
||||
$deposits = $this->securityDeposits($id);
|
||||
$stats = $this->stats($id);
|
||||
|
||||
// A lease can only be closed if there are no outstanding
|
||||
|
||||
Reference in New Issue
Block a user