Changed the list of payment types to be dynamically generated. This works OK, but the list is longer than is probably useful, and more importantly, some of these types need to be associated with a lease, such as a security deposit. Not sure how I'll handle that.

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@289 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-09 09:20:04 +00:00
parent 0c8035b402
commit e15f053c5c
3 changed files with 53 additions and 44 deletions

View File

@@ -85,6 +85,25 @@ class Account extends AppModel {
}
/**************************************************************************
**************************************************************************
**************************************************************************
* function: name
* - Returns the name of this account
*/
function name($id) {
$this->cacheQueries = true;
$account = $this->find('first', array
('recursive' => -1,
'fields' => array('name'),
'conditions' => array(array('Account.id' => $id)),
));
$this->cacheQueries = false;
return $account['Account']['name'];
}
/**************************************************************************
**************************************************************************
**************************************************************************