Пример #1
0
 protected function initWhereConditions() {
     parent::initWhereConditions();
     if ($this->type != null) {
         $this->selectBuilder->where->add('t.'.Pap_Db_Table_Transactions::R_TYPE, '=', $this->type);
     }
     if ($this->commissionTypeId != null) {
         $this->selectBuilder->where->add('t.'.Pap_Db_Table_Transactions::COMMISSIONTYPEID, '=', $this->commissionTypeId);
     }
     if ($this->tier == null) {
         $this->selectBuilder->where->add('t.'.Pap_Db_Table_Transactions::TIER, '=', '1');
     } else {
         if ($this->tier != self::ALL_TIERS) {
             $this->selectBuilder->where->add('t.'.Pap_Db_Table_Transactions::TIER, '=', $this->tier);
         }
     }
     if ($this->params->isStatusDefined()) {
         $this->selectBuilder->where->add('t.'.Pap_Db_Table_Transactions::R_STATUS, 'IN', explode(',', $this->params->getStatus()));
     }
 }