Nowhere near complete, but must snapshot prior to my Boston trip.

git-svn-id: file:///svn-source/pmgr/branches/statements_20090623@184 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-24 17:16:39 +00:00
parent 8cb45ad1d6
commit 6baa7fa6e6
13 changed files with 225 additions and 231 deletions

View File

@@ -82,26 +82,13 @@ class Account extends AppModel {
/**************************************************************************
**************************************************************************
**************************************************************************
* function: accountNameToID
* - Returns the ID of the named account
* function: Account IDs
* - Returns the ID of the desired account
*/
function accountNameToID($name) {
$this->cacheQueries = true;
$account = $this->find('first', array
('recursive' => -1,
'conditions' => compact('name'),
));
$this->cacheQueries = false;
return $account['Account']['id'];
}
function securityDepositAccountID() { return $this->accountNameToID('Security Deposit'); }
function rentAccountID() { return $this->accountNameToID('Rent'); }
function accountReceivableAccountID() { return $this->accountNameToID('A/R'); }
function invoiceAccountID() { return $this->accountReceivableAccountID(); }
function receiptAccountID() { return $this->accountReceivableAccountID(); }
//function invoiceAccountID() { return $this->accountNameToID('Invoice'); }
//function receiptAccountID() { return $this->accountNameToID('Receipt'); }
function securityDepositAccountID() { return $this->nameToID('Security Deposit'); }
function rentAccountID() { return $this->nameToID('Rent'); }
function accountReceivableAccountID() { return $this->nameToID('A/R'); }
/**************************************************************************