<th>Amount(Rs.)</th>
	  	</tr>
<?php 
        $student_fees = StudentFeesMaster::model()->findAll('fees_master_table_id = :fees_master_id AND student_fees_master_student_transaction_id = :student_id', array(':fees_master_id' => $data['fees_payment_master_id'], ':student_id' => $data['fees_student_id']));
        $i = 1;
        $total_fees_amount = 0;
        foreach ($student_fees as $list) {
            ?>
		<tr id="purticular">
		<td class="sr-number"><?php 
            echo $i;
            ?>
            	<td id="purticular">
			<?php 
            if (!empty($list)) {
                echo FeesDetailsMaster::model()->findByPk($list->student_fees_master_details_id)->fees_details_master_name;
                ?>
				</td>
          			<td><?php 
                echo $list->fees_details_amount;
                $i++;
            }
            ?>
</td>
			  	</tr>
	
	<?php 
            $total_fees_amount += $list->fees_details_amount;
        }
        ?>
         
?>
	        <?php 
echo $form->dropDownList($model, 'fees_master_id', FeesMaster::items(), array('empty' => 'Select one of the following...'));
?>
		<?php 
echo $form->error($model, 'fees_master_id');
?>
	</div>
-->

	<div class="row">
		<?php 
echo $form->labelEx($fees_details, 'fees_details_name');
?>
		<?php 
echo FeesDetailsMaster::model()->findByPk($fees_details->fees_details_name)->fees_details_master_name;
//echo $form->textField($fees_details,'fees_details_name',array('size'=>40,'maxlength'=>40));
?>
<span class="status">&nbsp;</span>
		<?php 
echo $form->error($fees_details, 'fees_details_name');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($fees_details, 'fees_details_amount');
?>
		<?php 
echo $form->textField($fees_details, 'fees_details_amount', array('size' => 6, 'maxlength' => 6));
?>
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = FeesDetailsMaster::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
<h1>Add Fees Category</h1>
<div class="form">

<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'fees-master-form', 'enableAjaxValidation' => true, 'clientOptions' => array('validateOnSubmit' => true), 'htmlOptions' => array('enctype' => 'multipart/form-data')));
?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php 
//echo $form->errorSummary($model);
$org_id = Yii::app()->user->getState('org_id');
$branch_array = Branch::model()->findAll(array('condition' => 'branch_organization_id =' . $org_id));
$quota_array = Quota::model()->findAll(array('condition' => 'quota_organization_id=' . $org_id));
$fees_details = FeesDetailsMaster::model()->findAll(array('condition' => 'organization_id=' . $org_id));
?>
	
	<div class="row fees-branch-list">
	<?php 
echo $form->labelEx($model, 'fees_branch_id');
?>
	<?php 
foreach ($branch_array as $b) {
    echo "<div class='row'>";
    echo $form->checkBox($model, 'fees_branch_id[]', array('value' => $b['branch_id'], 'uncheckValue' => null));
    echo "&nbsp;" . $b['branch_name'];
    ?>
		</div>
<?php 
}