/** * Creates a new model. * If creation is successful, the browser will be redirected to the 'view' page. */ public function actionCreate() { $model = new NominalRoll(); // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); if (isset($_POST['NominalRoll'])) { $model->attributes = $_POST['NominalRoll']; $model->sewa_sent = $_POST['NominalRoll']['sewa_sent']; $model->created_on = new CDbExpression('NOW()'); $model->sewa_not_sent_reason = $_POST['NominalRoll']['sewa_not_sent_reason']; if ($model->save()) { $this->redirect(array('update', 'id' => $model->nominal_roll_id)); } } $this->render('create', array('model' => $model)); }