<?php

namespace modules\custom\models;

use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use modules\custom\models\Tasksbe;

/**
 * tasksbeSearch represents the model behind the search form about `\modules\custom\models\Tasksbe`.
 */
class TasksbeSearch extends tasksbe
{
    /**
     * @inheritdoc
     */
    public function rules() : array
    {
        return [
            [['id', 'welder', 'travelstarttime', 'travelfinishtime', 'shiftlength', 'contact', 'contactno', 'location', 'createdby', 'createdon', 'noofwelds', 'contactemail', 'noofshifts', 'comments', 'shift', 'noofteams', 'jobstatus', 'billingstatus', 'details', 'day', 'welderemail', 'manageremail', 'jobtype', 'weldtype', 'postcode', 'googletime', 'googledistance', 'railgrade', 'railsection', 'contact2', 'contactemail2', 'contactno2', 'contact3', 'contactemail3', 'contactno3', 'contact4', 'contactemail4', 'contactno4', 'contact5', 'contactemail5', 'contactno5', 'journey', 'fileenquiry', 'fileorder', 'filetef', 'filedocs', 'filequotation', 'updatedby', 'files', 'teftitle', 'tefdata', 'ordertitle', 'orderdata', 'enquirytitle', 'enquirydata', 'quotetitle', 'quotedata', 'customerpono', 'tracktrolley', 'sdate', 'edate', 'accesspoint', 'railwear', 'railtrack', 'railclosure', 'process', 'fuelgas', 'portion', 'mould', 'wpsno', 'notes', 'railsupport', 'railsupport2', 'railsupport3', 'railwear2', 'railwear3', 'railtrack2', 'railtrack3', 'weld', 'weld2', 'weld3', 'railsection2', 'railsection3', 'railgrade2', 'railgrade3', 'noofwelds1', 'noofwelds2', 'noofwelds3', 'weldprocess1', 'weldprocess2', 'weldprocess3', 'notes2', 'notes3', 'jnotes', 'fuelgas2', 'fuelgas3', 'elr', 'depot', 'totalshiftlengthw', 'created_by', 'updated_by', 'contact6', 'contactemail6', 'contactno6', 'contact7', 'contactemail7', 'contactno7', 'contact8', 'contactemail8', 'contactno8', 'contact9', 'contactemail9', 'contactno9', 'contact10', 'contactemail10', 'contactno10'], 'safe'],
            [['starttime', 'finishtime', 'company', 'assistant', 'jobno', 'prevjobno', 'cjobno', 'created_at', 'updated_at', '_id', 'created_by2', 'updated_by2', 'weekno', 'totalshiftlengthi', 'deleted', 'deleted_at'], 'integer'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function scenarios()
    {
        // bypass scenarios() implementation in the parent class
        return Model::scenarios();
    }

    /**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
    public function search($params) {
        $query = tasksbe::find()
        ->where(['or', ['!=','status','deleted'], ['is', 'status', null]])
        ->andWhere(['jobtype' => 'Task']);
	
        // 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;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'starttime' => $this->starttime,
            'finishtime' => $this->finishtime,
            'company' => $this->company,
            'assistant' => $this->assistant,
            'createdon' => $this->createdon,
            'jobno' => $this->jobno,
            'prevjobno' => $this->prevjobno,
            'cjobno' => $this->cjobno,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
            '_id' => $this->_id,
            'created_by2' => $this->created_by2,
            'updated_by2' => $this->updated_by2,
            'weekno' => $this->weekno,
            'sdate' => $this->sdate,
            'edate' => $this->edate,
            'totalshiftlengthi' => $this->totalshiftlengthi,
            'deleted' => $this->deleted,
            'deleted_at' => $this->deleted_at,
        ]);

        $query->andFilterWhere(['like', 'id', $this->id])
            ->andFilterWhere(['like', 'welder', $this->welder])
            ->andFilterWhere(['like', 'travelstarttime', $this->travelstarttime])
            ->andFilterWhere(['like', 'travelfinishtime', $this->travelfinishtime])
            ->andFilterWhere(['like', 'shiftlength', $this->shiftlength])
            ->andFilterWhere(['like', 'contact', $this->contact])
            ->andFilterWhere(['like', 'contactno', $this->contactno])
            ->andFilterWhere(['like', 'location', $this->location])
            ->andFilterWhere(['like', 'createdby', $this->createdby])
            ->andFilterWhere(['like', 'noofwelds', $this->noofwelds])
            ->andFilterWhere(['like', 'contactemail', $this->contactemail])
            ->andFilterWhere(['like', 'noofshifts', $this->noofshifts])
            ->andFilterWhere(['like', 'comments', $this->comments])
            ->andFilterWhere(['like', 'shift', $this->shift])
            ->andFilterWhere(['like', 'noofteams', $this->noofteams])
            ->andFilterWhere(['like', 'jobstatus', $this->jobstatus])
            ->andFilterWhere(['like', 'billingstatus', $this->billingstatus])
            ->andFilterWhere(['like', 'details', $this->details])
            ->andFilterWhere(['like', 'day', $this->day])
            ->andFilterWhere(['like', 'welderemail', $this->welderemail])
            ->andFilterWhere(['like', 'manageremail', $this->manageremail])
            ->andFilterWhere(['like', 'jobtype', $this->jobtype])
            ->andFilterWhere(['like', 'weldtype', $this->weldtype])
            ->andFilterWhere(['like', 'postcode', $this->postcode])
            ->andFilterWhere(['like', 'googletime', $this->googletime])
            ->andFilterWhere(['like', 'googledistance', $this->googledistance])
            ->andFilterWhere(['like', 'railgrade', $this->railgrade])
            ->andFilterWhere(['like', 'railsection', $this->railsection])
            ->andFilterWhere(['like', 'contact2', $this->contact2])
            ->andFilterWhere(['like', 'contactemail2', $this->contactemail2])
            ->andFilterWhere(['like', 'contactno2', $this->contactno2])
            ->andFilterWhere(['like', 'contact3', $this->contact3])
            ->andFilterWhere(['like', 'contactemail3', $this->contactemail3])
            ->andFilterWhere(['like', 'contactno3', $this->contactno3])
            ->andFilterWhere(['like', 'contact4', $this->contact4])
            ->andFilterWhere(['like', 'contactemail4', $this->contactemail4])
            ->andFilterWhere(['like', 'contactno4', $this->contactno4])
            ->andFilterWhere(['like', 'contact5', $this->contact5])
            ->andFilterWhere(['like', 'contactemail5', $this->contactemail5])
            ->andFilterWhere(['like', 'contactno5', $this->contactno5])
            ->andFilterWhere(['like', 'journey', $this->journey])
            ->andFilterWhere(['like', 'fileenquiry', $this->fileenquiry])
            ->andFilterWhere(['like', 'fileorder', $this->fileorder])
            ->andFilterWhere(['like', 'filetef', $this->filetef])
            ->andFilterWhere(['like', 'filedocs', $this->filedocs])
            ->andFilterWhere(['like', 'filequotation', $this->filequotation])
            ->andFilterWhere(['like', 'updatedby', $this->updatedby])
            ->andFilterWhere(['like', 'files', $this->files])
            ->andFilterWhere(['like', 'teftitle', $this->teftitle])
            ->andFilterWhere(['like', 'tefdata', $this->tefdata])
            ->andFilterWhere(['like', 'ordertitle', $this->ordertitle])
            ->andFilterWhere(['like', 'orderdata', $this->orderdata])
            ->andFilterWhere(['like', 'enquirytitle', $this->enquirytitle])
            ->andFilterWhere(['like', 'enquirydata', $this->enquirydata])
            ->andFilterWhere(['like', 'quotetitle', $this->quotetitle])
            ->andFilterWhere(['like', 'quotedata', $this->quotedata])
            ->andFilterWhere(['like', 'customerpono', $this->customerpono])
            ->andFilterWhere(['like', 'tracktrolley', $this->tracktrolley])
            ->andFilterWhere(['like', 'accesspoint', $this->accesspoint])
            ->andFilterWhere(['like', 'railwear', $this->railwear])
            ->andFilterWhere(['like', 'railtrack', $this->railtrack])
            ->andFilterWhere(['like', 'railclosure', $this->railclosure])
            ->andFilterWhere(['like', 'process', $this->process])
            ->andFilterWhere(['like', 'fuelgas', $this->fuelgas])
            ->andFilterWhere(['like', 'portion', $this->portion])
            ->andFilterWhere(['like', 'mould', $this->mould])
            ->andFilterWhere(['like', 'wpsno', $this->wpsno])
            ->andFilterWhere(['like', 'notes', $this->notes])
            ->andFilterWhere(['like', 'railsupport', $this->railsupport])
            ->andFilterWhere(['like', 'railsupport2', $this->railsupport2])
            ->andFilterWhere(['like', 'railsupport3', $this->railsupport3])
            ->andFilterWhere(['like', 'railwear2', $this->railwear2])
            ->andFilterWhere(['like', 'railwear3', $this->railwear3])
            ->andFilterWhere(['like', 'railtrack2', $this->railtrack2])
            ->andFilterWhere(['like', 'railtrack3', $this->railtrack3])
            ->andFilterWhere(['like', 'weld', $this->weld])
            ->andFilterWhere(['like', 'weld2', $this->weld2])
            ->andFilterWhere(['like', 'weld3', $this->weld3])
            ->andFilterWhere(['like', 'railsection2', $this->railsection2])
            ->andFilterWhere(['like', 'railsection3', $this->railsection3])
            ->andFilterWhere(['like', 'railgrade2', $this->railgrade2])
            ->andFilterWhere(['like', 'railgrade3', $this->railgrade3])
            ->andFilterWhere(['like', 'noofwelds1', $this->noofwelds1])
            ->andFilterWhere(['like', 'noofwelds2', $this->noofwelds2])
            ->andFilterWhere(['like', 'noofwelds3', $this->noofwelds3])
            ->andFilterWhere(['like', 'weldprocess1', $this->weldprocess1])
            ->andFilterWhere(['like', 'weldprocess2', $this->weldprocess2])
            ->andFilterWhere(['like', 'weldprocess3', $this->weldprocess3])
            ->andFilterWhere(['like', 'notes2', $this->notes2])
            ->andFilterWhere(['like', 'notes3', $this->notes3])
            ->andFilterWhere(['like', 'jnotes', $this->jnotes])
            ->andFilterWhere(['like', 'fuelgas2', $this->fuelgas2])
            ->andFilterWhere(['like', 'fuelgas3', $this->fuelgas3])
            ->andFilterWhere(['like', 'elr', $this->elr])
            ->andFilterWhere(['like', 'depot', $this->depot])
            ->andFilterWhere(['like', 'totalshiftlengthw', $this->totalshiftlengthw])
            ->andFilterWhere(['like', 'created_by', $this->created_by])
            ->andFilterWhere(['like', 'updated_by', $this->updated_by])
            ->andFilterWhere(['like', 'contact6', $this->contact6])
            ->andFilterWhere(['like', 'contactemail6', $this->contactemail6])
            ->andFilterWhere(['like', 'contactno6', $this->contactno6])
            ->andFilterWhere(['like', 'contact7', $this->contact7])
            ->andFilterWhere(['like', 'contactemail7', $this->contactemail7])
            ->andFilterWhere(['like', 'contactno7', $this->contactno7])
            ->andFilterWhere(['like', 'contact8', $this->contact8])
            ->andFilterWhere(['like', 'contactemail8', $this->contactemail8])
            ->andFilterWhere(['like', 'contactno8', $this->contactno8])
            ->andFilterWhere(['like', 'contact9', $this->contact9])
            ->andFilterWhere(['like', 'contactemail9', $this->contactemail9])
            ->andFilterWhere(['like', 'contactno9', $this->contactno9])
            ->andFilterWhere(['like', 'contact10', $this->contact10])
            ->andFilterWhere(['like', 'contactemail10', $this->contactemail10])
            ->andFilterWhere(['like', 'contactno10', $this->contactno10]);

        return $dataProvider;
    }
    
    public function Myoverduesearch($params) {
        
        $query = tasksbe::find()
        ->where(['<', 'starttime', strtotime('now')])
        ->andwhere(['or', ['!=','status','deleted'], ['is','status',null] ])
        ->andWhere(['in', 'welder', Yii::$app->user->identity->username])
		->andWhere(['jobtype' => 'Task']);
		
       
        // 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;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'starttime' => $this->starttime,
            'finishtime' => $this->finishtime,
            'company' => $this->company,
            'assistant' => $this->assistant,
            'createdon' => $this->createdon,
            'jobno' => $this->jobno,
            'prevjobno' => $this->prevjobno,
            'cjobno' => $this->cjobno,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
            '_id' => $this->_id,
            'created_by2' => $this->created_by2,
            'updated_by2' => $this->updated_by2,
            'weekno' => $this->weekno,
            'sdate' => $this->sdate,
            'edate' => $this->edate,
            'totalshiftlengthi' => $this->totalshiftlengthi,
            'deleted' => $this->deleted,
            'deleted_at' => $this->deleted_at,
        ]);

        $query->andFilterWhere(['like', 'id', $this->id])
            ->andFilterWhere(['like', 'welder', $this->welder])
            ->andFilterWhere(['like', 'travelstarttime', $this->travelstarttime])
            ->andFilterWhere(['like', 'travelfinishtime', $this->travelfinishtime])
            ->andFilterWhere(['like', 'shiftlength', $this->shiftlength])
            ->andFilterWhere(['like', 'contact', $this->contact])
            ->andFilterWhere(['like', 'contactno', $this->contactno])
            ->andFilterWhere(['like', 'location', $this->location])
            ->andFilterWhere(['like', 'createdby', $this->createdby])
            ->andFilterWhere(['like', 'noofwelds', $this->noofwelds])
            ->andFilterWhere(['like', 'contactemail', $this->contactemail])
            ->andFilterWhere(['like', 'noofshifts', $this->noofshifts])
            ->andFilterWhere(['like', 'comments', $this->comments])
            ->andFilterWhere(['like', 'shift', $this->shift])
            ->andFilterWhere(['like', 'noofteams', $this->noofteams])
            ->andFilterWhere(['like', 'jobstatus', $this->jobstatus])
            ->andFilterWhere(['like', 'billingstatus', $this->billingstatus])
            ->andFilterWhere(['like', 'details', $this->details])
            ->andFilterWhere(['like', 'day', $this->day])
            ->andFilterWhere(['like', 'welderemail', $this->welderemail])
            ->andFilterWhere(['like', 'manageremail', $this->manageremail])
            ->andFilterWhere(['like', 'jobtype', $this->jobtype])
            ->andFilterWhere(['like', 'weldtype', $this->weldtype])
            ->andFilterWhere(['like', 'postcode', $this->postcode])
            ->andFilterWhere(['like', 'googletime', $this->googletime])
            ->andFilterWhere(['like', 'googledistance', $this->googledistance])
            ->andFilterWhere(['like', 'railgrade', $this->railgrade])
            ->andFilterWhere(['like', 'railsection', $this->railsection])
            ->andFilterWhere(['like', 'contact2', $this->contact2])
            ->andFilterWhere(['like', 'contactemail2', $this->contactemail2])
            ->andFilterWhere(['like', 'contactno2', $this->contactno2])
            ->andFilterWhere(['like', 'contact3', $this->contact3])
            ->andFilterWhere(['like', 'contactemail3', $this->contactemail3])
            ->andFilterWhere(['like', 'contactno3', $this->contactno3])
            ->andFilterWhere(['like', 'contact4', $this->contact4])
            ->andFilterWhere(['like', 'contactemail4', $this->contactemail4])
            ->andFilterWhere(['like', 'contactno4', $this->contactno4])
            ->andFilterWhere(['like', 'contact5', $this->contact5])
            ->andFilterWhere(['like', 'contactemail5', $this->contactemail5])
            ->andFilterWhere(['like', 'contactno5', $this->contactno5])
            ->andFilterWhere(['like', 'journey', $this->journey])
            ->andFilterWhere(['like', 'fileenquiry', $this->fileenquiry])
            ->andFilterWhere(['like', 'fileorder', $this->fileorder])
            ->andFilterWhere(['like', 'filetef', $this->filetef])
            ->andFilterWhere(['like', 'filedocs', $this->filedocs])
            ->andFilterWhere(['like', 'filequotation', $this->filequotation])
            ->andFilterWhere(['like', 'updatedby', $this->updatedby])
            ->andFilterWhere(['like', 'files', $this->files])
            ->andFilterWhere(['like', 'teftitle', $this->teftitle])
            ->andFilterWhere(['like', 'tefdata', $this->tefdata])
            ->andFilterWhere(['like', 'ordertitle', $this->ordertitle])
            ->andFilterWhere(['like', 'orderdata', $this->orderdata])
            ->andFilterWhere(['like', 'enquirytitle', $this->enquirytitle])
            ->andFilterWhere(['like', 'enquirydata', $this->enquirydata])
            ->andFilterWhere(['like', 'quotetitle', $this->quotetitle])
            ->andFilterWhere(['like', 'quotedata', $this->quotedata])
            ->andFilterWhere(['like', 'customerpono', $this->customerpono])
            ->andFilterWhere(['like', 'tracktrolley', $this->tracktrolley])
            ->andFilterWhere(['like', 'accesspoint', $this->accesspoint])
            ->andFilterWhere(['like', 'railwear', $this->railwear])
            ->andFilterWhere(['like', 'railtrack', $this->railtrack])
            ->andFilterWhere(['like', 'railclosure', $this->railclosure])
            ->andFilterWhere(['like', 'process', $this->process])
            ->andFilterWhere(['like', 'fuelgas', $this->fuelgas])
            ->andFilterWhere(['like', 'portion', $this->portion])
            ->andFilterWhere(['like', 'mould', $this->mould])
            ->andFilterWhere(['like', 'wpsno', $this->wpsno])
            ->andFilterWhere(['like', 'notes', $this->notes])
            ->andFilterWhere(['like', 'railsupport', $this->railsupport])
            ->andFilterWhere(['like', 'railsupport2', $this->railsupport2])
            ->andFilterWhere(['like', 'railsupport3', $this->railsupport3])
            ->andFilterWhere(['like', 'railwear2', $this->railwear2])
            ->andFilterWhere(['like', 'railwear3', $this->railwear3])
            ->andFilterWhere(['like', 'railtrack2', $this->railtrack2])
            ->andFilterWhere(['like', 'railtrack3', $this->railtrack3])
            ->andFilterWhere(['like', 'weld', $this->weld])
            ->andFilterWhere(['like', 'weld2', $this->weld2])
            ->andFilterWhere(['like', 'weld3', $this->weld3])
            ->andFilterWhere(['like', 'railsection2', $this->railsection2])
            ->andFilterWhere(['like', 'railsection3', $this->railsection3])
            ->andFilterWhere(['like', 'railgrade2', $this->railgrade2])
            ->andFilterWhere(['like', 'railgrade3', $this->railgrade3])
            ->andFilterWhere(['like', 'noofwelds1', $this->noofwelds1])
            ->andFilterWhere(['like', 'noofwelds2', $this->noofwelds2])
            ->andFilterWhere(['like', 'noofwelds3', $this->noofwelds3])
            ->andFilterWhere(['like', 'weldprocess1', $this->weldprocess1])
            ->andFilterWhere(['like', 'weldprocess2', $this->weldprocess2])
            ->andFilterWhere(['like', 'weldprocess3', $this->weldprocess3])
            ->andFilterWhere(['like', 'notes2', $this->notes2])
            ->andFilterWhere(['like', 'notes3', $this->notes3])
            ->andFilterWhere(['like', 'jnotes', $this->jnotes])
            ->andFilterWhere(['like', 'fuelgas2', $this->fuelgas2])
            ->andFilterWhere(['like', 'fuelgas3', $this->fuelgas3])
            ->andFilterWhere(['like', 'elr', $this->elr])
            ->andFilterWhere(['like', 'depot', $this->depot])
            ->andFilterWhere(['like', 'totalshiftlengthw', $this->totalshiftlengthw])
            ->andFilterWhere(['like', 'created_by', $this->created_by])
            ->andFilterWhere(['like', 'updated_by', $this->updated_by])
            ->andFilterWhere(['like', 'contact6', $this->contact6])
            ->andFilterWhere(['like', 'contactemail6', $this->contactemail6])
            ->andFilterWhere(['like', 'contactno6', $this->contactno6])
            ->andFilterWhere(['like', 'contact7', $this->contact7])
            ->andFilterWhere(['like', 'contactemail7', $this->contactemail7])
            ->andFilterWhere(['like', 'contactno7', $this->contactno7])
            ->andFilterWhere(['like', 'contact8', $this->contact8])
            ->andFilterWhere(['like', 'contactemail8', $this->contactemail8])
            ->andFilterWhere(['like', 'contactno8', $this->contactno8])
            ->andFilterWhere(['like', 'contact9', $this->contact9])
            ->andFilterWhere(['like', 'contactemail9', $this->contactemail9])
            ->andFilterWhere(['like', 'contactno9', $this->contactno9])
            ->andFilterWhere(['like', 'contact10', $this->contact10])
            ->andFilterWhere(['like', 'contactemail10', $this->contactemail10])
            ->andFilterWhere(['like', 'contactno10', $this->contactno10]);

        return $dataProvider;
    }
    public function myduetodaysearch($params) {
        
        $query = tasksbe::find()
        ->where(['between', 'starttime', strtotime('today'), strtotime('tomorrow')])
        ->andwhere(['!=','status','deleted'])
        ->andWhere(['in', 'welder', Yii::$app->user->identity->username])
		->andWhere(['jobtype' => 'Task']);
		
       
        // 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;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'starttime' => $this->starttime,
            'finishtime' => $this->finishtime,
            'company' => $this->company,
            'assistant' => $this->assistant,
            'createdon' => $this->createdon,
            'jobno' => $this->jobno,
            'prevjobno' => $this->prevjobno,
            'cjobno' => $this->cjobno,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
            '_id' => $this->_id,
            'created_by2' => $this->created_by2,
            'updated_by2' => $this->updated_by2,
            'weekno' => $this->weekno,
            'sdate' => $this->sdate,
            'edate' => $this->edate,
            'totalshiftlengthi' => $this->totalshiftlengthi,
            'deleted' => $this->deleted,
            'deleted_at' => $this->deleted_at,
        ]);

        $query->andFilterWhere(['like', 'id', $this->id])
            ->andFilterWhere(['like', 'welder', $this->welder])
            ->andFilterWhere(['like', 'travelstarttime', $this->travelstarttime])
            ->andFilterWhere(['like', 'travelfinishtime', $this->travelfinishtime])
            ->andFilterWhere(['like', 'shiftlength', $this->shiftlength])
            ->andFilterWhere(['like', 'contact', $this->contact])
            ->andFilterWhere(['like', 'contactno', $this->contactno])
            ->andFilterWhere(['like', 'location', $this->location])
            ->andFilterWhere(['like', 'createdby', $this->createdby])
            ->andFilterWhere(['like', 'noofwelds', $this->noofwelds])
            ->andFilterWhere(['like', 'contactemail', $this->contactemail])
            ->andFilterWhere(['like', 'noofshifts', $this->noofshifts])
            ->andFilterWhere(['like', 'comments', $this->comments])
            ->andFilterWhere(['like', 'shift', $this->shift])
            ->andFilterWhere(['like', 'noofteams', $this->noofteams])
            ->andFilterWhere(['like', 'jobstatus', $this->jobstatus])
            ->andFilterWhere(['like', 'billingstatus', $this->billingstatus])
            ->andFilterWhere(['like', 'details', $this->details])
            ->andFilterWhere(['like', 'day', $this->day])
            ->andFilterWhere(['like', 'welderemail', $this->welderemail])
            ->andFilterWhere(['like', 'manageremail', $this->manageremail])
            ->andFilterWhere(['like', 'jobtype', $this->jobtype])
            ->andFilterWhere(['like', 'weldtype', $this->weldtype])
            ->andFilterWhere(['like', 'postcode', $this->postcode])
            ->andFilterWhere(['like', 'googletime', $this->googletime])
            ->andFilterWhere(['like', 'googledistance', $this->googledistance])
            ->andFilterWhere(['like', 'railgrade', $this->railgrade])
            ->andFilterWhere(['like', 'railsection', $this->railsection])
            ->andFilterWhere(['like', 'contact2', $this->contact2])
            ->andFilterWhere(['like', 'contactemail2', $this->contactemail2])
            ->andFilterWhere(['like', 'contactno2', $this->contactno2])
            ->andFilterWhere(['like', 'contact3', $this->contact3])
            ->andFilterWhere(['like', 'contactemail3', $this->contactemail3])
            ->andFilterWhere(['like', 'contactno3', $this->contactno3])
            ->andFilterWhere(['like', 'contact4', $this->contact4])
            ->andFilterWhere(['like', 'contactemail4', $this->contactemail4])
            ->andFilterWhere(['like', 'contactno4', $this->contactno4])
            ->andFilterWhere(['like', 'contact5', $this->contact5])
            ->andFilterWhere(['like', 'contactemail5', $this->contactemail5])
            ->andFilterWhere(['like', 'contactno5', $this->contactno5])
            ->andFilterWhere(['like', 'journey', $this->journey])
            ->andFilterWhere(['like', 'fileenquiry', $this->fileenquiry])
            ->andFilterWhere(['like', 'fileorder', $this->fileorder])
            ->andFilterWhere(['like', 'filetef', $this->filetef])
            ->andFilterWhere(['like', 'filedocs', $this->filedocs])
            ->andFilterWhere(['like', 'filequotation', $this->filequotation])
            ->andFilterWhere(['like', 'updatedby', $this->updatedby])
            ->andFilterWhere(['like', 'files', $this->files])
            ->andFilterWhere(['like', 'teftitle', $this->teftitle])
            ->andFilterWhere(['like', 'tefdata', $this->tefdata])
            ->andFilterWhere(['like', 'ordertitle', $this->ordertitle])
            ->andFilterWhere(['like', 'orderdata', $this->orderdata])
            ->andFilterWhere(['like', 'enquirytitle', $this->enquirytitle])
            ->andFilterWhere(['like', 'enquirydata', $this->enquirydata])
            ->andFilterWhere(['like', 'quotetitle', $this->quotetitle])
            ->andFilterWhere(['like', 'quotedata', $this->quotedata])
            ->andFilterWhere(['like', 'customerpono', $this->customerpono])
            ->andFilterWhere(['like', 'tracktrolley', $this->tracktrolley])
            ->andFilterWhere(['like', 'accesspoint', $this->accesspoint])
            ->andFilterWhere(['like', 'railwear', $this->railwear])
            ->andFilterWhere(['like', 'railtrack', $this->railtrack])
            ->andFilterWhere(['like', 'railclosure', $this->railclosure])
            ->andFilterWhere(['like', 'process', $this->process])
            ->andFilterWhere(['like', 'fuelgas', $this->fuelgas])
            ->andFilterWhere(['like', 'portion', $this->portion])
            ->andFilterWhere(['like', 'mould', $this->mould])
            ->andFilterWhere(['like', 'wpsno', $this->wpsno])
            ->andFilterWhere(['like', 'notes', $this->notes])
            ->andFilterWhere(['like', 'railsupport', $this->railsupport])
            ->andFilterWhere(['like', 'railsupport2', $this->railsupport2])
            ->andFilterWhere(['like', 'railsupport3', $this->railsupport3])
            ->andFilterWhere(['like', 'railwear2', $this->railwear2])
            ->andFilterWhere(['like', 'railwear3', $this->railwear3])
            ->andFilterWhere(['like', 'railtrack2', $this->railtrack2])
            ->andFilterWhere(['like', 'railtrack3', $this->railtrack3])
            ->andFilterWhere(['like', 'weld', $this->weld])
            ->andFilterWhere(['like', 'weld2', $this->weld2])
            ->andFilterWhere(['like', 'weld3', $this->weld3])
            ->andFilterWhere(['like', 'railsection2', $this->railsection2])
            ->andFilterWhere(['like', 'railsection3', $this->railsection3])
            ->andFilterWhere(['like', 'railgrade2', $this->railgrade2])
            ->andFilterWhere(['like', 'railgrade3', $this->railgrade3])
            ->andFilterWhere(['like', 'noofwelds1', $this->noofwelds1])
            ->andFilterWhere(['like', 'noofwelds2', $this->noofwelds2])
            ->andFilterWhere(['like', 'noofwelds3', $this->noofwelds3])
            ->andFilterWhere(['like', 'weldprocess1', $this->weldprocess1])
            ->andFilterWhere(['like', 'weldprocess2', $this->weldprocess2])
            ->andFilterWhere(['like', 'weldprocess3', $this->weldprocess3])
            ->andFilterWhere(['like', 'notes2', $this->notes2])
            ->andFilterWhere(['like', 'notes3', $this->notes3])
            ->andFilterWhere(['like', 'jnotes', $this->jnotes])
            ->andFilterWhere(['like', 'fuelgas2', $this->fuelgas2])
            ->andFilterWhere(['like', 'fuelgas3', $this->fuelgas3])
            ->andFilterWhere(['like', 'elr', $this->elr])
            ->andFilterWhere(['like', 'depot', $this->depot])
            ->andFilterWhere(['like', 'totalshiftlengthw', $this->totalshiftlengthw])
            ->andFilterWhere(['like', 'created_by', $this->created_by])
            ->andFilterWhere(['like', 'updated_by', $this->updated_by])
            ->andFilterWhere(['like', 'contact6', $this->contact6])
            ->andFilterWhere(['like', 'contactemail6', $this->contactemail6])
            ->andFilterWhere(['like', 'contactno6', $this->contactno6])
            ->andFilterWhere(['like', 'contact7', $this->contact7])
            ->andFilterWhere(['like', 'contactemail7', $this->contactemail7])
            ->andFilterWhere(['like', 'contactno7', $this->contactno7])
            ->andFilterWhere(['like', 'contact8', $this->contact8])
            ->andFilterWhere(['like', 'contactemail8', $this->contactemail8])
            ->andFilterWhere(['like', 'contactno8', $this->contactno8])
            ->andFilterWhere(['like', 'contact9', $this->contact9])
            ->andFilterWhere(['like', 'contactemail9', $this->contactemail9])
            ->andFilterWhere(['like', 'contactno9', $this->contactno9])
            ->andFilterWhere(['like', 'contact10', $this->contact10])
            ->andFilterWhere(['like', 'contactemail10', $this->contactemail10])
            ->andFilterWhere(['like', 'contactno10', $this->contactno10]);

        return $dataProvider;
    }    public function Mytasks($params) {
        
        $query = tasksbe::find()
        ->where(['!=','status','deleted'])
        ->andWhere(['in', 'welder', Yii::$app->user->identity->username])
		->andWhere(['jobtype' => 'Task']);
		
        // 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;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'starttime' => $this->starttime,
            'finishtime' => $this->finishtime,
            'company' => $this->company,
            'assistant' => $this->assistant,
            'createdon' => $this->createdon,
            'jobno' => $this->jobno,
            'prevjobno' => $this->prevjobno,
            'cjobno' => $this->cjobno,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
            '_id' => $this->_id,
            'created_by2' => $this->created_by2,
            'updated_by2' => $this->updated_by2,
            'weekno' => $this->weekno,
            'sdate' => $this->sdate,
            'edate' => $this->edate,
            'totalshiftlengthi' => $this->totalshiftlengthi,
            'deleted' => $this->deleted,
            'deleted_at' => $this->deleted_at,
        ]);

        $query->andFilterWhere(['like', 'id', $this->id])
            ->andFilterWhere(['like', 'welder', $this->welder])
            ->andFilterWhere(['like', 'travelstarttime', $this->travelstarttime])
            ->andFilterWhere(['like', 'travelfinishtime', $this->travelfinishtime])
            ->andFilterWhere(['like', 'shiftlength', $this->shiftlength])
            ->andFilterWhere(['like', 'contact', $this->contact])
            ->andFilterWhere(['like', 'contactno', $this->contactno])
            ->andFilterWhere(['like', 'location', $this->location])
            ->andFilterWhere(['like', 'createdby', $this->createdby])
            ->andFilterWhere(['like', 'noofwelds', $this->noofwelds])
            ->andFilterWhere(['like', 'contactemail', $this->contactemail])
            ->andFilterWhere(['like', 'noofshifts', $this->noofshifts])
            ->andFilterWhere(['like', 'comments', $this->comments])
            ->andFilterWhere(['like', 'shift', $this->shift])
            ->andFilterWhere(['like', 'noofteams', $this->noofteams])
            ->andFilterWhere(['like', 'jobstatus', $this->jobstatus])
            ->andFilterWhere(['like', 'billingstatus', $this->billingstatus])
            ->andFilterWhere(['like', 'details', $this->details])
            ->andFilterWhere(['like', 'day', $this->day])
            ->andFilterWhere(['like', 'welderemail', $this->welderemail])
            ->andFilterWhere(['like', 'manageremail', $this->manageremail])
            ->andFilterWhere(['like', 'jobtype', $this->jobtype])
            ->andFilterWhere(['like', 'weldtype', $this->weldtype])
            ->andFilterWhere(['like', 'postcode', $this->postcode])
            ->andFilterWhere(['like', 'googletime', $this->googletime])
            ->andFilterWhere(['like', 'googledistance', $this->googledistance])
            ->andFilterWhere(['like', 'railgrade', $this->railgrade])
            ->andFilterWhere(['like', 'railsection', $this->railsection])
            ->andFilterWhere(['like', 'contact2', $this->contact2])
            ->andFilterWhere(['like', 'contactemail2', $this->contactemail2])
            ->andFilterWhere(['like', 'contactno2', $this->contactno2])
            ->andFilterWhere(['like', 'contact3', $this->contact3])
            ->andFilterWhere(['like', 'contactemail3', $this->contactemail3])
            ->andFilterWhere(['like', 'contactno3', $this->contactno3])
            ->andFilterWhere(['like', 'contact4', $this->contact4])
            ->andFilterWhere(['like', 'contactemail4', $this->contactemail4])
            ->andFilterWhere(['like', 'contactno4', $this->contactno4])
            ->andFilterWhere(['like', 'contact5', $this->contact5])
            ->andFilterWhere(['like', 'contactemail5', $this->contactemail5])
            ->andFilterWhere(['like', 'contactno5', $this->contactno5])
            ->andFilterWhere(['like', 'journey', $this->journey])
            ->andFilterWhere(['like', 'fileenquiry', $this->fileenquiry])
            ->andFilterWhere(['like', 'fileorder', $this->fileorder])
            ->andFilterWhere(['like', 'filetef', $this->filetef])
            ->andFilterWhere(['like', 'filedocs', $this->filedocs])
            ->andFilterWhere(['like', 'filequotation', $this->filequotation])
            ->andFilterWhere(['like', 'updatedby', $this->updatedby])
            ->andFilterWhere(['like', 'files', $this->files])
            ->andFilterWhere(['like', 'teftitle', $this->teftitle])
            ->andFilterWhere(['like', 'tefdata', $this->tefdata])
            ->andFilterWhere(['like', 'ordertitle', $this->ordertitle])
            ->andFilterWhere(['like', 'orderdata', $this->orderdata])
            ->andFilterWhere(['like', 'enquirytitle', $this->enquirytitle])
            ->andFilterWhere(['like', 'enquirydata', $this->enquirydata])
            ->andFilterWhere(['like', 'quotetitle', $this->quotetitle])
            ->andFilterWhere(['like', 'quotedata', $this->quotedata])
            ->andFilterWhere(['like', 'customerpono', $this->customerpono])
            ->andFilterWhere(['like', 'tracktrolley', $this->tracktrolley])
            ->andFilterWhere(['like', 'accesspoint', $this->accesspoint])
            ->andFilterWhere(['like', 'railwear', $this->railwear])
            ->andFilterWhere(['like', 'railtrack', $this->railtrack])
            ->andFilterWhere(['like', 'railclosure', $this->railclosure])
            ->andFilterWhere(['like', 'process', $this->process])
            ->andFilterWhere(['like', 'fuelgas', $this->fuelgas])
            ->andFilterWhere(['like', 'portion', $this->portion])
            ->andFilterWhere(['like', 'mould', $this->mould])
            ->andFilterWhere(['like', 'wpsno', $this->wpsno])
            ->andFilterWhere(['like', 'notes', $this->notes])
            ->andFilterWhere(['like', 'railsupport', $this->railsupport])
            ->andFilterWhere(['like', 'railsupport2', $this->railsupport2])
            ->andFilterWhere(['like', 'railsupport3', $this->railsupport3])
            ->andFilterWhere(['like', 'railwear2', $this->railwear2])
            ->andFilterWhere(['like', 'railwear3', $this->railwear3])
            ->andFilterWhere(['like', 'railtrack2', $this->railtrack2])
            ->andFilterWhere(['like', 'railtrack3', $this->railtrack3])
            ->andFilterWhere(['like', 'weld', $this->weld])
            ->andFilterWhere(['like', 'weld2', $this->weld2])
            ->andFilterWhere(['like', 'weld3', $this->weld3])
            ->andFilterWhere(['like', 'railsection2', $this->railsection2])
            ->andFilterWhere(['like', 'railsection3', $this->railsection3])
            ->andFilterWhere(['like', 'railgrade2', $this->railgrade2])
            ->andFilterWhere(['like', 'railgrade3', $this->railgrade3])
            ->andFilterWhere(['like', 'noofwelds1', $this->noofwelds1])
            ->andFilterWhere(['like', 'noofwelds2', $this->noofwelds2])
            ->andFilterWhere(['like', 'noofwelds3', $this->noofwelds3])
            ->andFilterWhere(['like', 'weldprocess1', $this->weldprocess1])
            ->andFilterWhere(['like', 'weldprocess2', $this->weldprocess2])
            ->andFilterWhere(['like', 'weldprocess3', $this->weldprocess3])
            ->andFilterWhere(['like', 'notes2', $this->notes2])
            ->andFilterWhere(['like', 'notes3', $this->notes3])
            ->andFilterWhere(['like', 'jnotes', $this->jnotes])
            ->andFilterWhere(['like', 'fuelgas2', $this->fuelgas2])
            ->andFilterWhere(['like', 'fuelgas3', $this->fuelgas3])
            ->andFilterWhere(['like', 'elr', $this->elr])
            ->andFilterWhere(['like', 'depot', $this->depot])
            ->andFilterWhere(['like', 'totalshiftlengthw', $this->totalshiftlengthw])
            ->andFilterWhere(['like', 'created_by', $this->created_by])
            ->andFilterWhere(['like', 'updated_by', $this->updated_by])
            ->andFilterWhere(['like', 'contact6', $this->contact6])
            ->andFilterWhere(['like', 'contactemail6', $this->contactemail6])
            ->andFilterWhere(['like', 'contactno6', $this->contactno6])
            ->andFilterWhere(['like', 'contact7', $this->contact7])
            ->andFilterWhere(['like', 'contactemail7', $this->contactemail7])
            ->andFilterWhere(['like', 'contactno7', $this->contactno7])
            ->andFilterWhere(['like', 'contact8', $this->contact8])
            ->andFilterWhere(['like', 'contactemail8', $this->contactemail8])
            ->andFilterWhere(['like', 'contactno8', $this->contactno8])
            ->andFilterWhere(['like', 'contact9', $this->contact9])
            ->andFilterWhere(['like', 'contactemail9', $this->contactemail9])
            ->andFilterWhere(['like', 'contactno9', $this->contactno9])
            ->andFilterWhere(['like', 'contact10', $this->contact10])
            ->andFilterWhere(['like', 'contactemail10', $this->contactemail10])
            ->andFilterWhere(['like', 'contactno10', $this->contactno10]);

        return $dataProvider;
    }
    public function deleted($params)
    {
        $query = tasksbe::find()
        ->where(['=','status','deleted']);

        // 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;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'starttime' => $this->starttime,
            'finishtime' => $this->finishtime,
            'company' => $this->company,
            'assistant' => $this->assistant,
            'createdon' => $this->createdon,
            'jobno' => $this->jobno,
            'prevjobno' => $this->prevjobno,
            'cjobno' => $this->cjobno,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
            '_id' => $this->_id,
            'created_by2' => $this->created_by2,
            'updated_by2' => $this->updated_by2,
            'weekno' => $this->weekno,
            'sdate' => $this->sdate,
            'edate' => $this->edate,
            'totalshiftlengthi' => $this->totalshiftlengthi,
            'deleted' => $this->deleted,
            'deleted_at' => $this->deleted_at,
        ]);

        $query->andFilterWhere(['like', 'id', $this->id])
            ->andFilterWhere(['like', 'welder', $this->welder])
            ->andFilterWhere(['like', 'travelstarttime', $this->travelstarttime])
            ->andFilterWhere(['like', 'travelfinishtime', $this->travelfinishtime])
            ->andFilterWhere(['like', 'shiftlength', $this->shiftlength])
            ->andFilterWhere(['like', 'contact', $this->contact])
            ->andFilterWhere(['like', 'contactno', $this->contactno])
            ->andFilterWhere(['like', 'location', $this->location])
            ->andFilterWhere(['like', 'createdby', $this->createdby])
            ->andFilterWhere(['like', 'noofwelds', $this->noofwelds])
            ->andFilterWhere(['like', 'contactemail', $this->contactemail])
            ->andFilterWhere(['like', 'noofshifts', $this->noofshifts])
            ->andFilterWhere(['like', 'comments', $this->comments])
            ->andFilterWhere(['like', 'shift', $this->shift])
            ->andFilterWhere(['like', 'noofteams', $this->noofteams])
            ->andFilterWhere(['like', 'jobstatus', $this->jobstatus])
            ->andFilterWhere(['like', 'billingstatus', $this->billingstatus])
            ->andFilterWhere(['like', 'details', $this->details])
            ->andFilterWhere(['like', 'day', $this->day])
            ->andFilterWhere(['like', 'welderemail', $this->welderemail])
            ->andFilterWhere(['like', 'manageremail', $this->manageremail])
            ->andFilterWhere(['like', 'jobtype', $this->jobtype])
            ->andFilterWhere(['like', 'weldtype', $this->weldtype])
            ->andFilterWhere(['like', 'postcode', $this->postcode])
            ->andFilterWhere(['like', 'googletime', $this->googletime])
            ->andFilterWhere(['like', 'googledistance', $this->googledistance])
            ->andFilterWhere(['like', 'railgrade', $this->railgrade])
            ->andFilterWhere(['like', 'railsection', $this->railsection])
            ->andFilterWhere(['like', 'contact2', $this->contact2])
            ->andFilterWhere(['like', 'contactemail2', $this->contactemail2])
            ->andFilterWhere(['like', 'contactno2', $this->contactno2])
            ->andFilterWhere(['like', 'contact3', $this->contact3])
            ->andFilterWhere(['like', 'contactemail3', $this->contactemail3])
            ->andFilterWhere(['like', 'contactno3', $this->contactno3])
            ->andFilterWhere(['like', 'contact4', $this->contact4])
            ->andFilterWhere(['like', 'contactemail4', $this->contactemail4])
            ->andFilterWhere(['like', 'contactno4', $this->contactno4])
            ->andFilterWhere(['like', 'contact5', $this->contact5])
            ->andFilterWhere(['like', 'contactemail5', $this->contactemail5])
            ->andFilterWhere(['like', 'contactno5', $this->contactno5])
            ->andFilterWhere(['like', 'journey', $this->journey])
            ->andFilterWhere(['like', 'fileenquiry', $this->fileenquiry])
            ->andFilterWhere(['like', 'fileorder', $this->fileorder])
            ->andFilterWhere(['like', 'filetef', $this->filetef])
            ->andFilterWhere(['like', 'filedocs', $this->filedocs])
            ->andFilterWhere(['like', 'filequotation', $this->filequotation])
            ->andFilterWhere(['like', 'updatedby', $this->updatedby])
            ->andFilterWhere(['like', 'files', $this->files])
            ->andFilterWhere(['like', 'teftitle', $this->teftitle])
            ->andFilterWhere(['like', 'tefdata', $this->tefdata])
            ->andFilterWhere(['like', 'ordertitle', $this->ordertitle])
            ->andFilterWhere(['like', 'orderdata', $this->orderdata])
            ->andFilterWhere(['like', 'enquirytitle', $this->enquirytitle])
            ->andFilterWhere(['like', 'enquirydata', $this->enquirydata])
            ->andFilterWhere(['like', 'quotetitle', $this->quotetitle])
            ->andFilterWhere(['like', 'quotedata', $this->quotedata])
            ->andFilterWhere(['like', 'customerpono', $this->customerpono])
            ->andFilterWhere(['like', 'tracktrolley', $this->tracktrolley])
            ->andFilterWhere(['like', 'accesspoint', $this->accesspoint])
            ->andFilterWhere(['like', 'railwear', $this->railwear])
            ->andFilterWhere(['like', 'railtrack', $this->railtrack])
            ->andFilterWhere(['like', 'railclosure', $this->railclosure])
            ->andFilterWhere(['like', 'process', $this->process])
            ->andFilterWhere(['like', 'fuelgas', $this->fuelgas])
            ->andFilterWhere(['like', 'portion', $this->portion])
            ->andFilterWhere(['like', 'mould', $this->mould])
            ->andFilterWhere(['like', 'wpsno', $this->wpsno])
            ->andFilterWhere(['like', 'notes', $this->notes])
            ->andFilterWhere(['like', 'railsupport', $this->railsupport])
            ->andFilterWhere(['like', 'railsupport2', $this->railsupport2])
            ->andFilterWhere(['like', 'railsupport3', $this->railsupport3])
            ->andFilterWhere(['like', 'railwear2', $this->railwear2])
            ->andFilterWhere(['like', 'railwear3', $this->railwear3])
            ->andFilterWhere(['like', 'railtrack2', $this->railtrack2])
            ->andFilterWhere(['like', 'railtrack3', $this->railtrack3])
            ->andFilterWhere(['like', 'weld', $this->weld])
            ->andFilterWhere(['like', 'weld2', $this->weld2])
            ->andFilterWhere(['like', 'weld3', $this->weld3])
            ->andFilterWhere(['like', 'railsection2', $this->railsection2])
            ->andFilterWhere(['like', 'railsection3', $this->railsection3])
            ->andFilterWhere(['like', 'railgrade2', $this->railgrade2])
            ->andFilterWhere(['like', 'railgrade3', $this->railgrade3])
            ->andFilterWhere(['like', 'noofwelds1', $this->noofwelds1])
            ->andFilterWhere(['like', 'noofwelds2', $this->noofwelds2])
            ->andFilterWhere(['like', 'noofwelds3', $this->noofwelds3])
            ->andFilterWhere(['like', 'weldprocess1', $this->weldprocess1])
            ->andFilterWhere(['like', 'weldprocess2', $this->weldprocess2])
            ->andFilterWhere(['like', 'weldprocess3', $this->weldprocess3])
            ->andFilterWhere(['like', 'notes2', $this->notes2])
            ->andFilterWhere(['like', 'notes3', $this->notes3])
            ->andFilterWhere(['like', 'jnotes', $this->jnotes])
            ->andFilterWhere(['like', 'fuelgas2', $this->fuelgas2])
            ->andFilterWhere(['like', 'fuelgas3', $this->fuelgas3])
            ->andFilterWhere(['like', 'elr', $this->elr])
            ->andFilterWhere(['like', 'depot', $this->depot])
            ->andFilterWhere(['like', 'totalshiftlengthw', $this->totalshiftlengthw])
            ->andFilterWhere(['like', 'created_by', $this->created_by])
            ->andFilterWhere(['like', 'updated_by', $this->updated_by])
            ->andFilterWhere(['like', 'contact6', $this->contact6])
            ->andFilterWhere(['like', 'contactemail6', $this->contactemail6])
            ->andFilterWhere(['like', 'contactno6', $this->contactno6])
            ->andFilterWhere(['like', 'contact7', $this->contact7])
            ->andFilterWhere(['like', 'contactemail7', $this->contactemail7])
            ->andFilterWhere(['like', 'contactno7', $this->contactno7])
            ->andFilterWhere(['like', 'contact8', $this->contact8])
            ->andFilterWhere(['like', 'contactemail8', $this->contactemail8])
            ->andFilterWhere(['like', 'contactno8', $this->contactno8])
            ->andFilterWhere(['like', 'contact9', $this->contact9])
            ->andFilterWhere(['like', 'contactemail9', $this->contactemail9])
            ->andFilterWhere(['like', 'contactno9', $this->contactno9])
            ->andFilterWhere(['like', 'contact10', $this->contact10])
            ->andFilterWhere(['like', 'contactemail10', $this->contactemail10])
            ->andFilterWhere(['like', 'contactno10', $this->contactno10]);

        return $dataProvider;
    }
}
