@@ -104,8 +104,11 @@ class SubscriptionController extends ProducerBaseController | |||
} | |||
} | |||
if ($model->load($posts) && $model->validate() | |||
&& $model->save()) { | |||
if ($model->load($posts)) { | |||
$model->auto_payment = (int) $posts['auto_payment']; | |||
if($model->validate() && $model->save()) { | |||
$subscription = Subscription::searchOne([ | |||
'id' => $model->id | |||
]); | |||
@@ -117,6 +120,7 @@ class SubscriptionController extends ProducerBaseController | |||
Yii::$app->getSession()->setFlash('success', 'Abonnement ajouté'); | |||
} | |||
} | |||
} | |||
} | |||
/** |