public function actionCreate($kdpo)
 {
     $model = new Purchaseorder();
     $qq = Purchaseorder::find()->where(['KD_PO' => $kdpo])->count();
     if ($qq == 0) {
         return $this->redirect([' ']);
     }
     if ($kdpo == '') {
         return $this->redirect([' ']);
     }
     if ($kdpo == null) {
         return $this->redirect([' ']);
     }
     $que = Requestorder::find()->where('STATUS <> 3 and STATUS <> 0')->all();
     $searchModel = new RequestorderSearch();
     $dataProvider = $searchModel->caripo(Yii::$app->request->queryParams);
     $podet = Purchasedetail::find()->where(['KD_PO' => $kdpo])->andWhere('STATUS <> 3')->all();
     $quer = Purchaseorder::find()->where(['KD_PO' => $kdpo])->one();
     return $this->render('create', ['model' => $model, 'que' => $que, 'quer' => $quer, 'podet' => $podet, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
 /**
  * Lists all Requestorder models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new RequestorderSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }