cacheQueries = true; $item = $this->find('first', array ('contain' => false, 'conditions' => array('TenderType.id' => $id), )); $this->cacheQueries = false; return $item['TenderType']['account_id']; } /************************************************************************** ************************************************************************** ************************************************************************** * function: paymentTypes * - Returns an array of types that can be used for payments */ function paymentTypes($query = null) { $this->queryInit($query); $query['order'][] = 'name'; $this->cacheQueries = true; $types = $this->find('all', $query); $this->cacheQueries = false; return $types; } /************************************************************************** ************************************************************************** ************************************************************************** * function: paymentTypes * - Returns an array of types that can be deposited */ function depositTypes($query = null) { $this->queryInit($query); $query['order'][] = 'name'; $query['conditions'][] = array('tillable' => true); $this->cacheQueries = true; $types = $this->find('all', $query); $this->cacheQueries = false; return $types; } /************************************************************************** ************************************************************************** ************************************************************************** * function: defaultPaymentType * - Returns the ID of the default payment type */ function defaultPaymentType() { return $this->nameToID('Check'); } }