?>
<span class="status">&nbsp;</span>
        <?php 
echo $form->error($model, 'student_transaction_religion_id');
?>
	</div>-->

    </div>

<div class="row">
	<div class="row-left">
        <?php 
echo $form->labelEx($model, 'student_transaction_quota_id');
?>
        <?php 
echo $form->dropDownList($model, 'student_transaction_quota_id', Quota::items(), array('empty' => '-----------Select---------', 'tabindex' => 19));
?>
<span class="status">&nbsp;</span>
        <?php 
echo $form->error($model, 'student_transaction_quota_id');
?>
	</div>
	<!--<div class="row-right">
        <?php 
echo $form->labelEx($model, 'student_transaction_category_id');
?>
        <?php 
echo $form->dropDownList($model, 'student_transaction_category_id', Category::items(), array('empty' => '-----------Select---------', 'tabindex' => 20));
?>
<span class="status">&nbsp;</span>
        <?php 
} else {
    echo $form->dropDownList($model, 'fees_academic_term_name_id', array());
}
?>
<span class="status">&nbsp;</span>
		<?php 
echo $form->error($model, 'fees_academic_term_name_id');
?>
	</div>	
	
	<div class="row">
		<?php 
echo $form->labelEx($model, 'fees_quota_id');
?>
	        <?php 
echo $form->dropDownList($model, 'fees_quota_id', Quota::items(), array('empty' => 'Select Quota'));
?>
<span class="status">&nbsp;</span>
		<?php 
echo $form->error($model, 'fees_quota_id');
?>
	</div>

	<div class="row buttons">
		<?php 
echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('class' => 'submit', 'name' => 'generate'));
?>
	</div>

<?php 
$this->endWidget();
echo $form->labelEx($model, 'student_transaction_religion_id');
?>
        		<?php 
echo $form->dropDownList($model, 'student_transaction_religion_id', Religion::items(), array('empty' => 'Select Religion'));
?>
<span class="status">&nbsp;</span>
        		<?php 
echo $form->error($model, 'student_transaction_religion_id');
?>
		</div>
		<div class="row-right">
        		<?php 
echo $form->labelEx($model, 'student_transaction_quota_id');
?>
			<?php 
echo $form->dropDownList($model, 'student_transaction_quota_id', Quota::items(), array('empty' => 'Select Quota'));
?>
<span class="status">&nbsp;</span>
			<?php 
echo $form->error($model, 'student_transaction_quota_id');
?>
		</div>
    	</div>

	<div class="row">
		<div class="row-left">
			<?php 
echo $form->labelEx($model, 'student_transaction_category_id');
?>
			<?php 
echo $form->dropDownList($model, 'student_transaction_category_id', Category::items(), array('empty' => 'Select Category'));
		
	</div>

	<div class="row">
		<?php 
echo CHtml::label('Branch Name', '');
?>
		<?php 
echo CHtml::dropDownList('branch', null, Branch::items(), array('empty' => 'Select Branch', 'tabindex' => 1));
?>

		<?php 
echo CHtml::label('Quota', '');
?>
		<?php 
echo CHtml::dropDownList('quota', null, Quota::items(), array('empty' => 'Select Quota', 'tabindex' => 4));
?>


		
	</div>
	
	<?php 
$org_id = Yii::app()->user->getState('org_id');
$acd = Yii::app()->db->createCommand()->select('*')->from('academic_term')->where('current_sem=1 and academic_term_organization_id=' . $org_id)->queryAll();
$period = array();
$acdterm = CHtml::listData($acd, 'academic_term_id', 'academic_term_name');
if (!empty($acdterm)) {
    $pe_data = AcademicTermPeriod::model()->findByPk($acd[0]['academic_term_period_id']);
    $period[$pe_data->academic_terms_period_id] = $pe_data->academic_term_period;
}