@@ -126,9 +126,17 @@ class CommandeautoController extends BackendController { | |||
->orderBy('order ASC') | |||
->all(); | |||
if($model->load(Yii::$app->request->post()) && $model->validate() && $model->save()) | |||
if($model->load(Yii::$app->request->post()) && $model->validate()) | |||
{ | |||
$this->redirect(['commandeauto/index']) ; | |||
if(!strlen($model->date_fin)){ | |||
$model->date_fin = null ; | |||
} | |||
if($model->save()) | |||
{ | |||
$this->redirect(['commandeauto/index']) ; | |||
} | |||
} | |||
return $this->render('update',[ |