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']; } /************************************************************************** ************************************************************************** ************************************************************************** * function: paymentTypes * - Returns an array of types that can be used for payments */ function paymentTypes($extra = null) { $this->cacheQueries = true; $accounts = $this->find('all', array ('contain' => false, 'order' => array('name'), ) + (isset($extra) ? $extra : array()) ); $this->cacheQueries = false; return $accounts; } /************************************************************************** ************************************************************************** ************************************************************************** * function: defaultPaymentTypes * - Returns an array of types that can be used for payments */ function defaultPaymentType() { return $this->nameToID('Check'); } } ?>