public function actionPurchaseorderedit($id) { /*$model = PurchaseOrder::findOne($id); $this->layout= $this->CheckSession(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['warehouse/purchaseorderindex', 'id' => $model->ID_PO]); } else { return $this->render('purchase-order/update', [ 'model' => $model, ]); }*/ $model = new PurchaseOrder(); $model->updateStatus($id); return $this->redirect(['warehouse/purchaseorderindex']); }