common/models/OrderMasterSearch.php
/**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
Creates data provider instance with search query applied
@param array $params


Creates data provider instance with search query applied @param array $params
public function search($params)
    {
        $query = OrderMaster::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            'id' => $this->id,
            'user_id' => $this->user_id,
            'total_amount' => $this->total_amount,
            'tax' => $this->tax,
            'discount_amount' => $this->discount_amount,
            'tax_amount' => $this->tax_amount,
            'shipping_charge' => $this->shipping_charge,
            'net_amount' => $this->net_amount,
            'order_date' => $this->order_date,
            'ship_address_id' => $this->ship_address_id,
            'bill_address_id' => $this->bill_address_id,
            'currency_id' => $this->currency_id,
            'payment_mode' => $this->payment_mode,
            'admin_comment' => $this->admin_comment,
            'payment_status' => $this->payment_status,
            'admin_status' => $this->admin_status,
            'expected_delivery_date' => $this->expected_delivery_date,
            'delivered_date' => $this->delivered_date,
            'doc' => $this->doc,
            'dou' => $this->dou,
            'shipping_status' => $this->shipping_status,
            'status' => $this->status,
            'promotion_id' => $this->promotion_id,
            'promotion_discount' => $this->promotion_discount,
            'return_status' => $this->return_status,
            'return_approve' => $this->return_approve,
            'gift_wrap' => $this->gift_wrap,
        ]);
        $query->andFilterWhere(['like', 'order_id', $this->order_id])
            ->andFilterWhere(['like', 'invoice_no', $this->invoice_no])
            ->andFilterWhere(['like', 'user_comment', $this->user_comment])
            ->andFilterWhere(['like', 'payment_sucess_data', $this->payment_sucess_data])
            ->andFilterWhere(['like', 'payment_ref_number', $this->payment_ref_number])
            ->andFilterWhere(['like', 'cancel_reason', $this->cancel_reason])
            ->andFilterWhere(['like', 'return_reason', $this->return_reason])
            ->andFilterWhere(['like', 'gift_wrap_value', $this->gift_wrap_value]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = OrderMaster :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'id' => $ this -> id , 'user_id' => $ this -> user_id , 'total_amount' => $ this -> total_amount , 'tax' => $ this -> tax , 'discount_amount' => $ this -> discount_amount , 'tax_amount' => $ this -> tax_amount , 'shipping_charge' => $ this -> shipping_charge , 'net_amount' => $ this -> net_amount , 'order_date' => $ this -> order_date , 'ship_address_id' => $ this -> ship_address_id , 'bill_address_id' => $ this -> bill_address_id , 'currency_id' => $ this -> currency_id , 'payment_mode' => $ this -> payment_mode , 'admin_comment' => $ this -> admin_comment , 'payment_status' => $ this -> payment_status , 'admin_status' => $ this -> admin_status , 'expected_delivery_date' => $ this -> expected_delivery_date , 'delivered_date' => $ this -> delivered_date , 'doc' => $ this -> doc , 'dou' => $ this -> dou , 'shipping_status' => $ this -> shipping_status , 'status' => $ this -> status , 'promotion_id' => $ this -> promotion_id , 'promotion_discount' => $ this -> promotion_discount , 'return_status' => $ this -> return_status , 'return_approve' => $ this -> return_approve , 'gift_wrap' => $ this -> gift_wrap , ] ) ; $ query -> andFilterWhere ( [ 'like' , 'order_id' , $ this -> order_id ] ) -> andFilterWhere ( [ 'like' , 'invoice_no' , $ this -> invoice_no ] ) -> andFilterWhere ( [ 'like' , 'user_comment' , $ this -> user_comment ] ) -> andFilterWhere ( [ 'like' , 'payment_sucess_data' , $ this -> payment_sucess_data ] ) -> andFilterWhere ( [ 'like' , 'payment_ref_number' , $ this -> payment_ref_number ] ) -> andFilterWhere ( [ 'like' , 'cancel_reason' , $ this -> cancel_reason ] ) -> andFilterWhere ( [ 'like' , 'return_reason' , $ this -> return_reason ] ) -> andFilterWhere ( [ 'like' , 'gift_wrap_value' , $ this -> gift_wrap_value ] ) ; return $ dataProvider ; }
Creates data provider instance with search query applied
 @param array $params
Creates data provider instance with search query applied @param array $params
// add conditions that should always apply here // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); // grid filtering conditions