/**
  * Creates a new Withholding model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $model = new Withholding();
     if ($model->load(Yii::$app->request->post())) {
         $selectSchool = ArrayHelper::map(Scholar::find()->where(['scholar_id' => $model->scholar_scholar_id])->all(), 'school_school_id', 'school_school_id');
         $schoolID = array_values($selectSchool)[0];
         $model->scholar_school_school_id = $schoolID;
         $selectArea = ArrayHelper::map(Scholar::find()->where(['scholar_id' => $model->scholar_scholar_id])->all(), 'allowance_allowance_area', 'allowance_allowance_area');
         $area = array_values($selectArea)[0];
         $model->scholar_allowance_allowance_area = $area;
         $model->save();
         return $this->redirect(['view', 'id' => $model->withholding_id]);
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }