diff --git a/models/OrderSearch.php b/models/OrderSearch.php index d618c08..f7238cd 100755 --- a/models/OrderSearch.php +++ b/models/OrderSearch.php @@ -76,8 +76,8 @@ $dataProvider = new ActiveDataProvider( [ - 'query' => $query, - 'sort' => [ 'defaultOrder' => [ 'id' => SORT_DESC ] ], + 'query' => $query, + 'sort' => [ 'defaultOrder' => [ 'id' => SORT_DESC ] ], 'pagination' => [ 'pageSize' => 50, ], @@ -94,7 +94,7 @@ return $dataProvider; } - if (!empty( $this->sku )) { + if (!empty($this->sku)) { $query->innerJoinWith('products.productVariant') ->andWhere( [ @@ -126,9 +126,17 @@ ); $query->andFilterWhere( [ - 'like', - 'phone', - $this->phone, + 'or', + [ + 'like', + 'phone', + $this->phone, + ], + [ + 'like', + 'phone2', + $this->phone, + ], ] ); $query->andFilterWhere( @@ -169,7 +177,7 @@ 'delivery' => $this->delivery, ] ); - if (!empty( $this->date_range )) { + if (!empty($this->date_range)) { $this->date_from = strtotime(explode('to', $this->date_range)[ 0 ]); $this->date_to = strtotime(explode('to', $this->date_range)[ 1 ]); -- libgit2 0.21.4