/** * Creates a new model. * If creation is successful, the browser will be redirected to the 'view' page. */ public function actionCreate() { $model = new MiscellaneousFeesPaymentTransaction(); // Uncomment the following line if AJAX validation is needed $this->performAjaxValidation($model); if (isset($_POST['MiscellaneousFeesPaymentTransaction'])) { $model->attributes = $_POST['MiscellaneousFeesPaymentTransaction']; $model->student_fees_id = $_REQUEST['id']; $model->miscellaneous_fees_payment_transaction_organization_id = Yii::app()->user->getState('org_id'); if ($model->save()) { $this->redirect(array('view', 'id' => $model->miscellaneous_trans_id)); } //$this->redirect(array('miscellaneousFeesPaymentTransaction/madmin')); } $cash_model = new MiscellaneousFeesPaymentCash('mysearch'); $cash_model->unsetAttributes(); // clear any default values if (isset($_GET['MiscellaneousFeesPaymentCash'])) { $cash_model->attributes = $_GET['MiscellaneousFeesPaymentCash']; } $cheque_model = new MiscellaneousFeesPaymentCheque('mysearch'); $cheque_model->unsetAttributes(); // clear any default values if (isset($_GET['MiscellaneousFeesPaymentCheque'])) { $cheque_model->attributes = $_GET['MiscellaneousFeesPaymentCheque']; } $this->render('create', array('model' => $model, 'cash_model' => $cash_model, 'cheque_model' => $cheque_model)); }
/** * Manages all models. */ public function actionAdmin() { $model = new MiscellaneousFeesPaymentCash('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['MiscellaneousFeesPaymentCash'])) { $model->attributes = $_GET['MiscellaneousFeesPaymentCash']; } $this->render('admin', array('model' => $model)); }