public function actionHapusro($kd)
 {
     $model = Salesorder::find()->where(['KD_RO' => $kd])->one();
     $model->STATUS = 3;
     $model->save();
     $model = Sodetail::find()->where(['KD_RO' => $kd])->one();
     $model->STATUS = 3;
     $model->save();
     return Yii::$app->getResponse()->redirect(['/purchasing/sales-order/index']);
 }
 public function loadModeldetail($id)
 {
     $model = Sodetail::model()->findByPk((int) $id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }