а б*я понял. в OrdersSearch надо было поковыряться)))))
вот тут:
public function search($params)
{
$query = Orders::find();
// add conditions that should always apply here
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to return any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$manageer_id = 5;
// grid filtering conditions
$query->andFilterWhere([
'id' => $this->id,
'currency_id' => $this->currency_id,
'said_weight' => $this->said_weight,
'fact_weight' => $this->fact_weight,
'pay_type' => $this->pay_type,
'dostavka_price' => $this->dostavka_price,
'pre_pay' => $this->pre_pay,
'post_pay' => $this->post_pay,
'post_pay_days' => $this->post_pay_days,
'international' => $this->international,
]);
$query->andFilterWhere(['like', 'sender_address', $this->sender_address])
->andFilterWhere(['like', 'reciever_address', $this->reciever_address])
->andFilterWhere(['like', 'sender_phone', $this->sender_phone]);
return $dataProvider;
}
}
на этой строке:
$query = Orders::find();
можно сразу написать условие отбора
$query = Orders::find()->where(['id' => 555, 'active' => 1]);