Primarly a cleanup checkin, although a couple minor bugfixes were included as well.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@82 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -77,10 +77,6 @@ class Lease extends AppModel {
|
||||
'conditions' => array(array('id' => $id)),
|
||||
));
|
||||
|
||||
/* $sd_account_id = $this->Account->securityDepositAccountID(); */
|
||||
/* $sd_ledger_ids = $this->Account->ledgers($sd_account_id); */
|
||||
/* $cond = conditionEntryAsCreditOrDebit($sd_ledger_ids); */
|
||||
|
||||
$entries = $this->Account->findLedgerEntriesRelatedToAccount
|
||||
($lease['Lease']['account_id'],
|
||||
$this->Account->securityDepositAccountID(),
|
||||
@@ -95,63 +91,6 @@ class Lease extends AppModel {
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* function: findSecurityDeposits
|
||||
* - Returns an array of security deposit entries
|
||||
*/
|
||||
function findAccountDeposits($id, $link = null) {
|
||||
pr(array_merge(array('function' => 'Lease::findSecurityDeposits',
|
||||
'checkpoint' => 'begin'),
|
||||
compact('id', 'link')));
|
||||
$lease = $this->find('first', array
|
||||
('recursive' => -1,
|
||||
'fields' => array('account_id'),
|
||||
'conditions' => array(array('id' => $id)),
|
||||
));
|
||||
pr(array_merge(array('function' => 'Lease::findSecurityDeposits',
|
||||
'checkpoint' => 'get-lease'),
|
||||
compact('lease')));
|
||||
|
||||
$deposits = $this->Account->findSecurityDeposits($lease['Lease']['account_id'], $link);
|
||||
pr(array_merge(array('function' => 'Lease::findSecurityDeposits',
|
||||
'checkpoint' => 'return'),
|
||||
compact('deposits')));
|
||||
return $deposits;
|
||||
//return $this->Account->findSecurityDeposits($lease['Lease']['account_id'], $link);
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* function: findSecurityDeposits
|
||||
* - Returns an array of security deposit entries
|
||||
*/
|
||||
function qqfindSecurityDeposits($id, $link = null) {
|
||||
pr(array_merge(array('function' => 'Lease::findSecurityDeposits',
|
||||
'checkpoint' => 'begin'),
|
||||
compact('id', 'link')));
|
||||
$lease = $this->find('first', array
|
||||
('recursive' => -1,
|
||||
'fields' => array('account_id'),
|
||||
'conditions' => array(array('id' => $id)),
|
||||
));
|
||||
pr(array_merge(array('function' => 'Lease::findSecurityDeposits',
|
||||
'checkpoint' => 'get-lease'),
|
||||
compact('lease')));
|
||||
|
||||
return $this->Account->findAccountRelatedEntries($id, $relaccount, $link);
|
||||
$deposits = $this->Account->findSecurityDeposits($lease['Lease']['account_id'], $link);
|
||||
pr(array_merge(array('function' => 'Lease::findSecurityDeposits',
|
||||
'checkpoint' => 'return'),
|
||||
compact('deposits')));
|
||||
return $deposits;
|
||||
//return $this->Account->findSecurityDeposits($lease['Lease']['account_id'], $link);
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user