protected function buildWhere() {
     parent::buildWhere();
     $whereCondition = new Gpf_SqlBuilder_CompoundWhereCondition();
     $whereCondition->add('r.'.Pap_Db_Table_Transactions::R_TYPE, '=', Pap_Common_Constants::TYPE_SALE);
     $whereCondition->add('r.'.Pap_Db_Table_Transactions::R_TYPE, '=', Pap_Common_Constants::TYPE_ACTION, "OR");
     $this->_selectBuilder->where->addCondition($whereCondition);        
     if ($this->filters->getSize() <= 0 || ($rstatus = $this->filters->getFilterValue('rstatus')) == '') {
         $rstatus = Pap_Common_Constants::STATUS_APPROVED;
     }
     $this->_selectBuilder->where->add('r.'.Pap_Db_Table_Transactions::R_STATUS, 'in', preg_split('/,/', $rstatus));
 }
    protected function buildWhere() {
        parent::buildWhere();
        $this->_selectBuilder->where->add('u.deleted', '=', Gpf::NO);
        $this->_selectBuilder->where->add('u.rtype', '=', Pap_Application::ROLETYPE_AFFILIATE);

        $this->insertRuleToWhereCondition($this->_selectBuilder);
    }