Made progress adapting the receipt code onto the latest db changes.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@387 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -5,6 +5,25 @@ class TenderType extends AppModel {
|
||||
'Tender',
|
||||
);
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* function: accountID
|
||||
* - Returns the intended account ID for receipt of the given tender
|
||||
*/
|
||||
function accountID($id) {
|
||||
$this->cacheQueries = true;
|
||||
$item = $this->find('first', array
|
||||
('contain' => false,
|
||||
'conditions' => array('TenderType.id' => $id),
|
||||
));
|
||||
$this->cacheQueries = false;
|
||||
//pr(compact('id', 'item'));
|
||||
return $item['TenderType']['account_id'];
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
@@ -21,12 +40,6 @@ class TenderType extends AppModel {
|
||||
);
|
||||
$this->cacheQueries = false;
|
||||
|
||||
/* // Rearrange to be of the form (id => name) */
|
||||
/* $rel_accounts = array(); */
|
||||
/* foreach ($accounts AS $acct) { */
|
||||
/* $rel_accounts[$acct['Account']['id']] = $acct['Account']['name']; */
|
||||
/* } */
|
||||
|
||||
return $accounts;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user