/**
  * Retrieves a list of models based on the current search/filter conditions.
  * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
  */
 public function search()
 {
     // Warning: Please modify the following code to remove attributes that
     // should not be searched.
     $criteria = new CDbCriteria();
     $acdm_terms = AcademicTerm::model()->findAll('current_sem=1');
     $data = array();
     foreach ($acdm_terms as $list) {
         $data[] = $list['academic_term_id'];
     }
     $criteria->addInCondition('t.academic_name_id', $data, 'OR');
     $criteria->with = array('rel_batch_academic_period_id', 'rel_batch_academic_id', 'rel_division');
     $criteria->compare('rel_division.division_code', $this->division_code, true);
     //
     $criteria->compare('rel_batch_academic_period_id.academic_term_period', $this->academic_term_period, true);
     $criteria->compare('rel_batch_academic_id.academic_term_name', $this->academic_term_name, true);
     $criteria->compare('batch_id', $this->batch_id);
     $criteria->compare('batch_organization_id', $this->batch_organization_id);
     $criteria->compare('batch_created_by', $this->batch_created_by);
     $criteria->compare('batch_creation_date', $this->batch_creation_date, true);
     $criteria->compare('batch_code', $this->batch_code);
     $criteria->compare('t.branch_id', $this->branch_id);
     $criteria->compare('div_id', $this->div_id);
     $criteria->compare('academic_period_id', $this->academic_period_id);
     $criteria->compare('academic_name_id', $this->academic_name_id);
     $batch_data = new CActiveDataProvider(get_class($this), array('criteria' => $criteria));
     $_SESSION['batch_records'] = $batch_data;
     return $batch_data;
 }
 /**
  * Retrieves a list of models based on the current search/filter conditions.
  * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
  */
 public function search()
 {
     // Warning: Please modify the following code to remove attributes that
     // should not be searched.
     $acdm_terms = AcademicTerm::model()->findAll('current_sem=1');
     //print_r($acdm_terms);exit;
     $data = array();
     foreach ($acdm_terms as $list) {
         $data[] = $list['academic_term_id'];
     }
     $criteria = new CDbCriteria();
     $criteria->select = array('distinct(student_fees_master_student_transaction_id), fees_master_table_id, student_info.student_enroll_no,student_info.student_roll_no,student_info.student_enroll_no,student_info.student_first_name,fees_master.fees_master_name');
     $criteria->join = 'LEFT JOIN student_info ON (student_info.student_info_transaction_id = t.student_fees_master_student_transaction_id) LEFT JOIN fees_master ON (fees_master.fees_master_id = t.fees_master_table_id) ';
     $criteria->addInCondition('fees_master.fees_academic_term_name_id', $data, 'OR');
     $criteria->compare('student_fees_master_id', $this->student_fees_master_id);
     $criteria->compare('student_fees_master_student_transaction_id', $this->student_fees_master_student_transaction_id);
     $criteria->compare('student_info.student_first_name', $this->student_first_name, true);
     $criteria->compare('student_info.student_enroll_no', $this->student_enroll_no, true);
     $criteria->compare('student_info.student_roll_no', $this->student_roll_no, true);
     $criteria->compare('fees_master_table_id', $this->fees_master_table_id);
     $criteria->compare('fees_master.fees_master_name', $this->fees_master_name, true);
     $criteria->compare('student_fees_master_details_id', $this->student_fees_master_details_id);
     $criteria->compare('fees_details_amount', $this->fees_details_amount);
     $criteria->compare('student_fees_master_org_id', $this->student_fees_master_org_id);
     $criteria->compare('student_fees_master_created_by', $this->student_fees_master_created_by);
     $criteria->compare('student_fees_master_creation_date', $this->student_fees_master_creation_date, true);
     $dp = new CActiveDataProvider($this, array('criteria' => $criteria, 'sort' => array('defaultOrder' => 'student_fees_master_id DESC')));
     $dp->setTotalItemCount(count($this->findAll($criteria)));
     return $dp;
 }
 /**
  * Retrieves a list of models based on the current search/filter conditions.
  * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
  */
 public function search()
 {
     // Warning: Please modify the following code to remove attributes that
     // should not be searched.
     $acdm_terms = AcademicTerm::model()->findAll('current_sem=1');
     $data = array();
     foreach ($acdm_terms as $list) {
         $data[] = $list['academic_term_id'];
     }
     $criteria = new CDbCriteria();
     $criteria->with = array('Rel_Stud_Info', 'Rel_Status', 'Rel_Division', 'Rel_language', 'Rel_user');
     $criteria->addInCondition('student_academic_term_name_id', $data, 'OR');
     $criteria->addNotInCondition('student_transaction_detain_student_flag', array('1', '2'));
     $criteria->compare('student_transaction_id', $this->student_transaction_id);
     $criteria->compare('student_transaction_detain_student_flag', $this->student_transaction_detain_student_flag);
     $criteria->compare('student_transaction_user_id', $this->student_transaction_user_id);
     $criteria->compare('student_transaction_student_id', $this->student_transaction_student_id);
     $criteria->compare('student_transaction_branch_id', $this->student_transaction_branch_id, true);
     $criteria->compare('student_transaction_category_id', $this->student_transaction_category_id);
     $criteria->compare('student_transaction_organization_id', $this->student_transaction_organization_id);
     $criteria->compare('student_transaction_student_address_id', $this->student_transaction_student_address_id);
     $criteria->compare('student_transaction_nationality_id', $this->student_transaction_nationality_id);
     $criteria->compare('student_transaction_quota_id', $this->student_transaction_quota_id);
     $criteria->compare('student_transaction_religion_id', $this->student_transaction_religion_id);
     $criteria->compare('student_transaction_shift_id', $this->student_transaction_shift_id);
     $criteria->compare('student_transaction_languages_known_id', $this->student_transaction_languages_known_id);
     $criteria->compare('student_transaction_student_photos_id', $this->student_transaction_student_photos_id);
     $criteria->compare('student_transaction_division_id', $this->student_transaction_division_id);
     $criteria->compare('student_transaction_batch_id', $this->student_transaction_batch_id);
     $criteria->compare('student_academic_term_period_tran_id', $this->student_academic_term_period_tran_id);
     $criteria->compare('student_academic_term_name_id', $this->student_academic_term_name_id);
     $criteria->compare('Rel_user.user_organization_email_id', $this->user_organization_email_id, true);
     //$criteria->compare('Rel_Branch.branch_name',$this->branch_name,true);
     $criteria->compare('Rel_Stud_Info.student_first_name', $this->student_first_name, true);
     $criteria->compare('Rel_Stud_Info.student_living_status', $this->student_living_status, true);
     $criteria->compare('Rel_Stud_Info.student_enroll_no', $this->student_enroll_no, true);
     $criteria->compare('Rel_Stud_Info.student_roll_no', $this->student_roll_no, true);
     $criteria->compare('Rel_Stud_Info.student_middle_name', $this->student_middle_name, true);
     $criteria->compare('Rel_Stud_Info.student_last_name', $this->student_last_name, true);
     $criteria->compare('Rel_Stud_Info.student_dtod_regular_status', $this->student_dtod_regular_status, true);
     $criteria->compare('Rel_Division.division_name', $this->division_name, true);
     $criteria->compare('Rel_Status.status_name', $this->status_name, true);
     $criteria->compare('Rel_Stud_Info.student_mobile_no', $this->student_mobile_no, true);
     $criteria->compare('Rel_Stud_Info.student_email_id_1', $this->student_email_id_1, true);
     $stud_data = new CActiveDataProvider($this, array('criteria' => $criteria, 'sort' => array('defaultOrder' => 'student_transaction_id DESC')));
     $_SESSION['Student_records'] = $stud_data;
     return $stud_data;
 }
	public function actiongetAllStud()
        {
           // $data=  AcademicTerm::model()->findAll('academic_term_period_id=:academic_term_period_id',
		// array(':academic_term_period_id'=>(int) $_REQUEST['StudentTransaction']['student_academic_term_period_tran_id']));

		$data=  AcademicTerm::model()->findAll();
                  
        $data=CHtml::listData($data,'academic_term_id','academic_term_name');
	echo "<option value=''>Select Semester</option>";
  
          foreach($data as $value=>$name)
            {
                echo CHtml::tag('option',
                        array('value'=>$value),CHtml::encode('Sem-'.$name),true);
            }
        }
 /**
  * Retrieves a list of models based on the current search/filter conditions.
  * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
  */
 public function search()
 {
     // Warning: Please modify the following code to remove attributes that
     // should not be searched.
     $criteria = new CDbCriteria();
     $acdm_terms = AcademicTerm::model()->findAll('current_sem=1');
     $data = array();
     foreach ($acdm_terms as $list) {
         $data[] = $list['academic_term_id'];
     }
     $criteria->addInCondition('academic_name_id', $data, 'OR');
     $criteria->compare('division_id', $this->division_id);
     $criteria->compare('division_name', $this->division_name, true);
     $criteria->compare('division_organization_id', $this->division_organization_id);
     $criteria->compare('division_created_by', $this->division_created_by);
     $criteria->compare('division_creation_date', $this->division_creation_date, true);
     $criteria->compare('branch_id', $this->branch_id, true);
     $criteria->compare('academic_period_id', $this->academic_period_id);
     $criteria->compare('academic_name_id', $this->academic_name_id);
     $criteria->compare('division_code', $this->division_code);
     $division_data = new CActiveDataProvider(get_class($this), array('criteria' => $criteria, 'sort' => array('attributes' => array('branch_name' => array('asc' => 'Rel_Branch.branch_name', 'desc' => 'Rel_Branch.branch_name DESC'), '*'))));
     $_SESSION['division_data'] = $division_data;
     return $division_data;
 }
<?php

$this->breadcrumbs = array('Chart Report');
echo CHtml::link('GO BACK', Yii::app()->createUrl('attendence/ChartReport'));
?>

<?php 
$acdm_name = AcademicTerm::model()->findAll(array('condition' => 'academic_term_period_id=' . $acdm_period . ' and  academic_term_organization_id=' . Yii::app()->user->getState('org_id')));
//print_r($acdm_name);
//exit;
$branch = Attendence::model()->findAll(array('select' => 'branch_id', 'condition' => 'sem_id=' . $acdm_period . ' and attendence_organization_id=' . Yii::app()->user->getState('org_id'), 'distinct' => true));
$m = 1;
if ($branch) {
    ?>

<table class="table_data" align=center border="1" style="width:960px; font-size:12px;">
	
<th colspan="11" style="font-size: 18px; color: rgb(255, 255, 255);">
		Attendance Chart Table


        </th>	
<tr class="table_header">
<th>Branch Name\Semester</th>
<?php 
    foreach ($acdm_name as $ac) {
        ?>

<th>
<?php 
        echo "Sem-" . $ac['academic_term_name'];
<th>Bank Name</th>
<th>Cheque No</th>
<th>Receipt No</th>
<th>Amount</th>
</tr>


<?php 
    foreach ($var as $list) {
        $stud_data = StudentTransaction::model()->findByPk($list['fees_student_id']);
        echo '<tr><td>' . $i . '</td>';
        echo '<td>' . StudentInfo::model()->findByPk($stud_data->student_transaction_student_id)->student_enroll_no . '</td>';
        echo '<td>' . StudentInfo::model()->findByPk($stud_data->student_transaction_student_id)->student_roll_no . '</td>';
        echo '<td>' . StudentInfo::model()->findByPk($stud_data->student_transaction_student_id)->student_first_name . ' ' . StudentInfo::model()->findByPk($stud_data->student_transaction_student_id)->student_middle_name . ' ' . StudentInfo::model()->findByPk($stud_data->student_transaction_student_id)->student_last_name . '</td>';
        echo '<td>' . Branch::model()->findByPk($stud_data->student_transaction_branch_id)->branch_name . '</td>';
        echo '<td>' . AcademicTerm::model()->findByPk($stud_data->student_academic_term_name_id)->academic_term_name . '</td>';
        echo '<td>' . AcademicTermPeriod::model()->findByPk($stud_data->student_academic_term_period_tran_id)->academic_term_period . '</td>';
        echo '<td>' . Division::model()->findByPk($stud_data->student_transaction_division_id)->division_name . '</td>';
        echo '<td>' . $list['fees_received_date'] . '</td>';
        $rec_no = FeesReceipt::model()->findByPk($list['fees_receipt_id'])->fees_receipt_number;
        if ($list['fees_payment_method_id'] == '1') {
            $cash_id = $list['fees_payment_cash_cheque_id'];
            $amunt = FeesPaymentCash::model()->findByPk($cash_id)->fees_payment_cash_amount;
            $final_total += $amunt;
            $type = "Cash";
            echo '<td>' . $type . '</td>';
            echo '<td>-</td>';
            echo '<td>-</td>';
            echo '<td>' . $rec_no . '</td>';
            echo '<td>' . $amunt . '</td>';
        } else {
 /**
  * Updates a particular model.
  * If update is successful, the browser will be redirected to the 'view' page.
  * @param integer $id the ID of the model to be updated
  */
 public function actionUpdate($id)
 {
     $model = $this->loadModel($id);
     // Uncomment the following line if AJAX validation is needed
     $this->performAjaxValidation($model);
     if (isset($_POST['Division'])) {
         $model->attributes = $_POST['Division'];
         $model->division_code = '';
         $divname = $model->division_name;
         $branch_code = Branch::model()->findByPk($model->branch_id)->branch_alias;
         $acdm_name = AcademicTerm::model()->findByPk($model->academic_name_id)->academic_term_name;
         $concatdivname = $divname . '-' . $branch_code . '-' . $acdm_name;
         $model->division_code = $concatdivname;
         if ($model->save()) {
             $this->redirect(array('admin'));
         }
         //$this->redirect(array('view','id'=>$model->division_id));
     }
     $this->render('update', array('model' => $model));
 }
	}
	table tr:nth-child(odd) { /*(odd) or (2n 1)*/
		background: white;
	}
	th{text-align:left;font-weight:normal;color:#990a10;width:110px;border:0.4px solid #74b9f0;height:24px;}
	.title{color:seagreen;}
	td{border:0.4px solid #74b9f0;height:24px;}
	.label{text-align:left;font-weight:normal;color:#990a10;width:110px;height:24px;}
	
	
	
</style>
<?php
$StudentInfo = StudentInfo::model()->findByPk($student_transaction[0]->student_transaction_student_id);
$AcademicTermPeriod = AcademicTermPeriod::model()->findByPk($student_transaction[0]->academic_term_period_id);
$AcademicTerm = AcademicTerm::model()->findByPk($student_transaction[0]->academic_term_id);
if($student_transaction[0]->student_transaction_nationality_id != null)
$Nationality = Nationality::model()->findByPk($student_transaction[0]->student_transaction_nationality_id);
else
$Nationality = new Nationality;
$Batch = Batch::model()->findByPk($student_transaction[0]->student_transaction_batch_id);
$Course = Course::model()->findByPk($student_transaction[0]->course_id);
if($student_transaction[0]->student_transaction_languages_known_id != null)
$LanguagesKnown = LanguagesKnown::model()->findByPk($student_transaction[0]->student_transaction_languages_known_id);
if($student_transaction[0]->student_transaction_student_address_id != null)
$StudentAddress = StudentAddress::model()->findByPk($student_transaction[0]->student_transaction_student_address_id);
else
$StudentAddress = new StudentAddress;
if($student_transaction[0]->student_transaction_parent_id != null || $student_transaction[0]->student_transaction_parent_id != 0)
$parent = ParentLogin::model()->findByPk($student_transaction[0]->student_transaction_parent_id);
else
			$payType='';
		 if($details['fees_payment'] == 1)
			  $payType='Credit';
		 if($details['fees_payment'] == 2) 
			$payType='Outstanding';
		 if($details['fees_payment'] == 3)
			  $payType='Advance';
		if(!empty($assignFees[0]['student_fees_master_sem_id']))
		{
			if($paid_amount==0)
			{
				$myclass = $paid_amount == 0 ? 'red' : 'black';
				echo "<b style=color:$myclass>".'Sem-'.AcademicTerm::model()->findByPk($assignFees[0]['student_fees_master_sem_id'])->academic_term_name.'  '.$paid_amount.' (Not Paid)'."</b></br>";	
			}
			else	
	     		 echo 'Sem-'.AcademicTerm::model()->findByPk($assignFees[0]['student_fees_master_sem_id'])->academic_term_name.'  '.$paid_amount.' ('.$payType.')'."</br>";
		}
		else
			echo '-';
		$paidAmt+=$paid_amount;
		}	
		echo "</td>";		
     		}
     	        else
	        {
		   echo '<td>-</td>';
	        }
          }	 
  	echo '<td>'.$paidAmt.'</td>';	
     }   // student loop
}   //branch loop
 foreach ($fees_student as $data) {
     //$stud_trans = StudentTransaction::model()->findByPk($data['fees_student_id']);
     if (!empty($branch1)) {
         if (!empty($div)) {
             $stud_trans = StudentTransaction::model()->findByAttributes(array('student_transaction_id' => $data['fees_student_id'], 'student_transaction_branch_id' => $branch1, 'student_transaction_division_id' => $div));
         } else {
             $stud_trans = StudentTransaction::model()->findByAttributes(array('student_transaction_id' => $data['fees_student_id'], 'student_transaction_branch_id' => $branch1));
         }
     } else {
         $stud_trans = StudentTransaction::model()->findByPk($data['fees_student_id']);
     }
     if (empty($stud_trans)) {
         continue;
     }
     $stud_model = StudentInfo::model()->findByAttributes(array('student_id' => $stud_trans['student_transaction_student_id']));
     $sem_name = AcademicTerm::model()->findByPk($data['fees_academic_term_id']);
     $branch = Branch::model()->findByPk($stud_trans['student_transaction_branch_id']);
     $acd_term = AcademicTermPeriod::model()->findByPk($data['fees_academic_period_id']);
     $field1 = '-';
     $field2 = '-';
     $field3 = '-';
     $field4 = '-';
     $field5 = 'CASH';
     if ($data['fees_payment_method_id'] == 1) {
         $cash_amt = FeesPaymentCash::model()->findByPk($data['fees_payment_cash_cheque_id']);
         $amount = $cash_amt->fees_payment_cash_amount;
     } else {
         $cash_amt = FeesPaymentCheque::model()->findByPk($data['fees_payment_cash_cheque_id']);
         $amount = $cash_amt->fees_payment_cheque_amount;
         $field1 = $cash_amt->fees_payment_cheque_number;
         $date = date_create($cash_amt->fees_payment_cheque_date);
 filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
writing-mode: lr-tb;
 width:100%;
 overflow:inherit;
    }
</style>
<?php 
if(isset($div_id))
{
 
$month_value = $month;
$div_model = Division::model()->findByPk($div_id);
$num = cal_days_in_month(CAL_GREGORIAN, $month_value, date('Y')); 
$colspan=$num+7;
$branch_model=Branch::model()->findByPk($branch_id);
 $acd_model = AcademicTerm::model()->findByPk($sem);
$sub = SubjectMaster::model()->findByPk($selsub);
?>
<?php
 $org = Organization::model()->findAll();
 $org_data=$org[0];

echo '<table border="2" > ';
	echo "<tr align=center> <th  colspan = 15 style=text-align:left;> ".CHtml::image(Yii::app()->controller->createUrl('/site/loadImage', array('id'=>$org_data->organization_id)),'No Image',array('width'=>80,'height'=>55,'style'=>'float:left;margin-left:200px;')) ."
	 <big> <b>".$org_data->organization_name ."</big><br>". $org_data->address_line1." ".$org_data->address_line2."</br>"  . City::model()->findBypk($org_data->city)->city_name.", ".State::model()->findBypk($org_data->state)->state_name.", ".Country::model()->findBypk($org_data->country)->name."." ." </th> <br>	 </tr>";
?>

<?php //echo "<td colspan=$colspan>";
echo "<tr><th colspan=20><h3> Branch  of ".$branch_model->branch_name." Students of Semester-".$acd_model->academic_term_name." , Subject-".$sub->subject_master_name ."  In Month - ". date("F", mktime(0,0,0,$month)) ." Attendence Report</h3></th> </tr>";

		{?>
			<tr class="<?php echo $class;?>">
				<td><?php echo ++$i;?></td>
				<td><?php echo AcademicTermPeriod::model()->findByPk($if_detain['academic_term_period_id'])->academic_term_period; ?></td>
				<td><?php echo "Sem-".AcademicTerm::model()->findByPk($if_detain['sem'])->academic_term_name; ?></td>
				<td>Detain</td>
			</tr>
		<?php $m++; $st="Rejoin/Regular";
		}
		$if_stud_arch = StudentArchiveTable::model()->findByAttributes(array('student_archive_stud_tran_id'=>$stud_trans[0]['student_transaction_id'],'student_archive_ac_t_n_id'=>$data['academic_term_id']));
		if($if_stud_arch)
		{?>
			<tr class="<?php echo $class;?>">
				<td><?php echo ++$i;?></td>
				<td><?php echo AcademicTermPeriod::model()->findByPk($if_stud_arch['student_archive_ac_t_p_id'])->academic_term_period; ?></td>
				<td><?php echo "Sem-".AcademicTerm::model()->findByPk($if_stud_arch['student_archive_ac_t_n_id'])->academic_term_name; ?></td>
				<td><?php echo $st;?></td>
			</tr>
				
		<?php $m++; }
	
	}
	

?>

</table>

<?php } ?>
<?php
/*   $stud_inf_id = $stud_trans[0]['student_id'];
	array('label'=>'List StudentFeesMaster', 'url'=>array('index')),
	array('label'=>'Create StudentFeesMaster', 'url'=>array('create')),
	array('label'=>'View StudentFeesMaster', 'url'=>array('view', 'id'=>$model->student_fees_master_id)),
	array('label'=>'Manage StudentFeesMaster', 'url'=>array('admin')),
);*/
?>

<h1>Edit Student Fees  <?php 
//echo $model->student_fees_master_id;
?>
</h1></br>
<?php 
$stud_info = StudentInfo::model()->findByAttributes(array('student_info_transaction_id' => $model->student_fees_master_student_transaction_id));
$stud_tran_info = StudentTransaction::model()->findByPk($model->student_fees_master_student_transaction_id);
$academic_period = AcademicTermPeriod::model()->findByPk($stud_tran_info->student_academic_term_period_tran_id)->academic_term_period;
$semester = AcademicTerm::model()->findByPk($stud_tran_info->student_academic_term_name_id)->academic_term_name;
?>
<table  border="2px" id="twoColThinTable">
<tr class="row">
	<td class="col1">Name </td>
	<td class="col2"><?php 
echo $stud_info->student_first_name . ' ' . $stud_info->student_middle_name . ' ' . $stud_info->student_last_name;
?>
</td>
</tr>	

<tr class="row">	
	<td class="col1">Enrollment No. </td> 
	<td class="col2"><?php 
echo $stud_info->student_enroll_no;
?>
<?php

$this->breadcrumbs = array('Division Report');
?>


<?php 
echo CHtml::link('GO BACK', Yii::app()->createUrl('/student/attendence/attendencedivisionreport'));
$m = 1;
if ($subject) {
    $this->menu[] = array('label' => '', 'url' => array('attendencedivisionreport', 'pdf' => 'pdf', 'div_id' => $div_id), 'linkOptions' => array('class' => 'export-pdf', 'title' => 'Export to PDF', 'target' => '_blank'));
    $this->menu[] = array('label' => '', 'url' => array('attendencedivisionreport', 'excel' => 'excel', 'div_id' => $div_id), 'linkOptions' => array('class' => 'export-excel', 'title' => 'Export to Excel', 'target' => '_blank'));
    $div_model = Division::model()->findByPk($div_id);
    $acd_model = AcademicTerm::model()->findByPk($div_model->academic_name_id);
    ?>
<table  border="2px" id="twoColThinTable">
<tr class="row">	
	<td class="col1">Division </td> 
	<td class="col2"><?php 
    echo $div_model->division_code;
    ?>
</td>
</tr>	
<tr class="row">
	<td class="col1">Semester </td> 
	<td class="col2"> <?php 
    echo $acd_model->academic_term_name;
    ?>
</td>
</tr>
	<tr class="row">	
Exemple #16
0
<?php
$this->breadcrumbs=array(
	'Chart Report',
);


?>

<?php 
	
	$acdm_name=AcademicTerm::model()->findAll(array('condition'=>'academic_term_period_id='.$acdm_period));
	//print_r($acdm_name);
	//exit;

		$branch = Attendence::model()->findAll(array(
    				'select'=>'branch_id',
				'condition'=>'sem_id='.$acdm_period,
 				'distinct'=>true,
							));
$m=1;	
if($branch)
{
?>

<div class="portlet box yellow" style="width:100%;margin-top:20px;">
    <i class="icon-reorder"></i>
    <div class="portlet-title"><span class="box-title"> Student Attendance Chart wise Report</span>
    	<div class="operation">
	  <?php echo CHtml::link('Back', array('/student/attendence/ChartReport'), array('class'=>'btnback'));?>	
	  
	</div>
Exemple #17
0
  width: 100%;
}
th {
    padding: 10px;
}
td {
  height: 39px;
  padding: 9px;
}
'); 

$current_date = date('Y-m-d');
$criteria = new CDbCriteria;
	$criteria->condition = 'current_sem = 1';

	$semname = AcademicTerm::model()->findAll($criteria);

	$data = CHtml::listData($semname,'academic_term_id','academic_term_id');
	$stud_model=StudentTransaction::model()->findByPk(Yii::app()->user->getState('stud_id'));
	$check_sem = in_array($stud_model->student_academic_term_name_id, $data);
	$timetableid=0;
        $check_timetable=TimeTableDetail::model()->findAllByAttributes(
	array(
	     'acdm_name_id' => $stud_model->student_academic_term_name_id,
	     'division_id' => $stud_model->student_transaction_division_id,
	     'lecture_date'=>$current_date,
   ),'proxy_status <> :status', array(':status'=>1));

if($check_timetable) {?>
<div class="wob wob-in-top-threshold wob-0-degrees read-only" style="height: 444px; width: 525px; z-index: 1;">
<div class="timeline textstream widget news-stream google-news vertical">
     $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' => $f->fees_payment_master_id, ':student_id' => $f->fees_student_id));
     //print_r($student_fees);  exit;
     foreach ($student_fees as $fees_data) {
         $total += $fees_data->fees_details_amount;
     }
     $payable = $total;
     //$payable = FeesMaster::model()->findByPk($f->fees_payment_master_id)->fees_master_total;
     $payable1 = $payable;
     //$out = $payable - $var;
 }
 $out = $payable - $var;
 $ch_num = FeesPaymentCheque::model()->findByPk($f->fees_payment_cash_cheque_id)->fees_payment_cheque_number;
 echo "<tr class=" . $class . ">";
 echo "<td>" . $i . "</td>";
 echo "<td>" . AcademicTermPeriod::model()->findByPk($f->fees_academic_period_id)->academic_term_period . "</td>";
 echo "<td>" . AcademicTerm::model()->findByPk($f->fees_academic_term_id)->academic_term_name . "</td>";
 echo "<td>" . FeesPaymentMethod::model()->findByPk($f->fees_payment_method_id)->fees_payment_method_name . "</td>";
 //echo "<td>".FeesMaster::model()->findByPk($f->fees_payment_master_id)->fees_master_total."</td>";
 echo "<td>" . $payable1 . "</td>";
 $chqmodel = FeesPaymentCheque::model()->findByPk($f->fees_payment_cash_cheque_id);
 echo "<td>" . $chqmodel->fees_payment_cheque_amount . "</td>";
 //$var += FeesPaymentCheque::model()->findByPk($f->fees_payment_cash_cheque_id)->fees_payment_cheque_amount;
 $bank_model = BankMaster::model()->findByPk($chqmodel->fees_payment_cheque_bank);
 $bank_name = $bank_model->bank_short_name;
 $bank_branch = $bank_model->bank_short_name;
 $date = $f->fees_received_date;
 $new_date = date("d-m-Y", strtotime($date));
 echo "<td>" . $new_date . "</td>";
 echo "<td>" . $bank_name . "</td>";
 echo "<td>" . $bank_branch . "</td>";
 echo "<td>" . $ch_num . "</td>";
    protected function renderContent()
    {
        $day = array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
        if (Yii::app()->user->getState('stud_id')) {
            $date = date('Y-m-d');
            $ts = strtotime($date);
            $week_number = date('W', $ts);
            $year = date('Y');
            for ($day1 = 1; $day1 < 7; $day1++) {
                $alldate[] = date('d-m-Y', strtotime($year . "W" . $week_number . $day1));
            }
            $criteria = new CDbCriteria();
            //$criteria->select = 'academic_term_id'; // select fields which you want in output
            $criteria->condition = 'current_sem = 1 AND academic_term_organization_id = ' . Yii::app()->user->getState('org_id');
            $semname = AcademicTerm::model()->findAll($criteria);
            $data = CHtml::listData($semname, 'academic_term_id', 'academic_term_id');
            $stud_model = StudentTransaction::model()->findByPk(Yii::app()->user->getState('stud_id'));
            $check_sem = in_array($stud_model->student_academic_term_name_id, $data);
            //var_dump($check_sem); exit;
            $timetableid = 0;
            if (!$check_sem) {
                echo "<h3 align=center style=color:red>Sorry, No timetable available for this student.</h3>";
            } else {
                $check_timetable = TimeTableDetail::model()->findByAttributes(array('acdm_name_id' => $stud_model->student_academic_term_name_id, 'division_id' => $stud_model->student_transaction_division_id));
                if (empty($check_timetable)) {
                    echo "<h3 align=center style=color:red>Sorry, No timetable available for this student.</h3>";
                } else {
                    $timetableid = $check_timetable->timetable_id;
                    $model = TimeTable::model()->findByPk($timetableid);
                    $nooflec = $model->No_of_Lec;
                    $sum = $nooflec;
                    $lec_duration = LecDuration::model()->findAllByAttributes(array(), $condition = 'timetable_id = :table_id ', $params = array(':table_id' => $timetableid));
                    $lec = array();
                    foreach ($lec_duration as $l) {
                        $lec[] = $l['duration'];
                    }
                    $createdate = date_create($model->creation_date);
                    $starti = 1;
                    if ($model->zero_lec == 1) {
                        $starti = 0;
                    }
                    $time = $model->clg_start_time;
                    $time = date('H:i A', strtotime($time));
                    $timestamp = strtotime($time);
                    $time = date('g:i A', $timestamp);
                    ?>

			<table id="time-table-struc" bgcolor="#CBE7ED"  border="2" style= width:auto;font-size:8px;border-collapse:collapse; height:auto;"  align="center">
			<th  align=center>
				Day/Time
			</th>

<?php 
                    $i = 0;
                    while ($i < 6) {
                        echo "<th>" . $day[$i] . "</br>(" . $alldate[$i] . ")</th>";
                        $i++;
                    }
                    $break = "";
                    $l = 0;
                    $count = array(1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0);
                    for ($i = $starti; $i <= $nooflec; $i++) {
                        $days = count($day);
                        echo "<tr>";
                        $duration = NoOfBreakTable::model()->findByAttributes(array('timetable_id' => $timetableid, 'after_lec_break' => $i));
                        $dur = $duration['duration'];
                        if ($dur) {
                            $dur1 = date('i', strtotime($dur));
                        }
                        if ($break) {
                            echo "<td style=width:100px;>" . $time . "-</br>" . date('g:i A', strtotime($time) + $dur1 * 60) . "</td><td colspan=7 align=center><font color='green'><b>Break</b></font></td></tr>";
                            $break = "";
                            $timestamp = strtotime($time) + $dur1 * 60;
                            $time = date('g:i A', $timestamp);
                            $i--;
                            continue;
                        } else {
                            echo "<td style=width:100px;>" . $time . "-</br>" . date('g:i A', strtotime($time) + 60 * $lec[$l]) . "</td>";
                            $timestamp = strtotime($time) + 60 * $lec[$l];
                            $l++;
                            $time = date('g:i A', $timestamp);
                        }
                        for ($j = 1; $j <= $days; ++$j) {
                            $subname = "";
                            $room = "";
                            $faculty = "";
                            $batch = "";
                            if ($count[$j] > 0) {
                                $count[$j]--;
                                continue;
                            }
                            $result = TimeTableDetail::model()->findAllByAttributes(array(), $condition = 'timetable_id = :table_id AND day = :day AND lec = :lec AND division_id = :div_id AND lecture_date = :lecdate and proxy_status <> :proxy_status', $params = array(':table_id' => $timetableid, ':day' => $j, ':lec' => $i, ':div_id' => $stud_model->student_transaction_division_id, ':lecdate' => date('Y-m-d', strtotime($alldate[$j - 1])), ':proxy_status' => 2));
                            $break = NoOfBreakTable::model()->findAllByAttributes(array(), $condition = 'timetable_id = :table_id  AND after_lec_break = :lec', $params = array(':table_id' => $timetableid, ':lec' => $i));
                            if ($result) {
                                foreach ($result as $list) {
                                    if ($list['lect_hour'] > 1) {
                                        $count[$j] = $list['lect_hour'] - 1;
                                    }
                                    echo "<td rowspan=" . $list['lect_hour'] . " align=center style=background:#C0CCCC; width:100px;>";
                                    break;
                                }
                                foreach ($result as $check) {
                                    if ($check->batch_id != 0) {
                                        $batch = "(" . Batch::model()->findByPk($check->batch_id)->batch_name . ")";
                                    }
                                    $subname = SubjectMaster::model()->findByPk($check->subject_id)->subject_master_alias;
                                    $room = "(" . RoomDetailsMaster::model()->findByPk($check->room_id)->room_name . ")";
                                    $faculty = "(" . EmployeeInfo::model()->findByAttributes(array('employee_info_transaction_id' => $check->faculty_emp_id))->employee_name_alias . ")";
                                    if ($batch) {
                                        echo "</br>" . $subname . "</br>" . $batch . "</br>" . $room . "</br>" . $faculty;
                                    } else {
                                        echo "</br>" . $subname . "</br>" . $room . "</br>" . $faculty;
                                    }
                                }
                                echo "</td>";
                            } else {
                                echo "<td style=width:100px;>" . $subname . "</br>" . $batch . "</br>" . $room . "</br>" . $faculty . "</td>";
                            }
                        }
                        echo "</tr>";
                    }
                    echo "</table>";
                    ?>
<h5>Proxy details</h5>

<table id="time-table-struc" style="font-size:10px;">
<tr>
<th>Sr. No.</th>
<th>Employee Name</th>
<th>Proxy Employee Name</th>
<th>Subject</th>
<th>Lecture No.</th>
<th>Date</th>
</tr>
<?php 
                    $proxy_data = TimeTableDetail::model()->findAllByAttributes(array(), $condition = 'timetable_id = :timetable_id and division_id = :div_id and lecture_date >= :start and lecture_date< :end and proxy_status = :proxy order by lec', $params = array(':timetable_id' => $timetableid, ':div_id' => $stud_model->student_transaction_division_id, ':start' => date('Y-m-d', strtotime($alldate[0])), ':end' => date('Y-m-d', strtotime($alldate[5])), ':proxy' => 1));
                    $n = 0;
                    foreach ($proxy_data as $list) {
                        $result = TimeTableDetail::model()->findByPk($list->proxy_id);
                        ?>

<tr>
<td><?php 
                        echo ++$n;
                        ?>
</td>
<td><?php 
                        echo EmployeeInfo::model()->findByAttributes(array('employee_info_transaction_id' => $list->faculty_emp_id))->employee_first_name;
                        ?>
</td>
<td><?php 
                        echo EmployeeInfo::model()->findByAttributes(array('employee_info_transaction_id' => $result->faculty_emp_id))->employee_first_name;
                        ?>
</td>
<td><?php 
                        echo SubjectMaster::model()->findByPk($result->subject_id)->subject_master_alias;
                        ?>
</td>
<td><?php 
                        echo $result->lec;
                        ?>
</td>
<td><?php 
                        echo date('d-m-Y', strtotime($result->lecture_date));
                        ?>
</td>
</tr>
<?php 
                    }
                    ?>
</table>
<?php 
                }
                //ELSE END
            }
        } else {
            if (Yii::app()->user->getState('emp_id')) {
                $timetableid = 0;
                $date = date('Y-m-d');
                $ts = strtotime($date);
                $week_number = date('W', $ts);
                $alldate[0] = 'No';
                $year = date('Y');
                for ($day2 = 1; $day2 < 7; $day2++) {
                    $alldate[$day2] = date('d-m-Y', strtotime($year . "W" . $week_number . $day2));
                }
                $semname = AcademicTerm::model()->findAllByAttributes(array(), $condition = 'current_sem = :current_sem and academic_term_organization_id=:org_id', $params = array(':current_sem' => 1, ':org_id' => Yii::app()->user->getState('org_id')));
                foreach ($semname as $s) {
                    $semid = $s['academic_term_id'];
                    $check = TimeTableDetail::model()->findByAttributes(array('acdm_name_id' => $semid, 'faculty_emp_id' => Yii::app()->user->getState('emp_id')));
                    if ($check) {
                        $timetableid = $check['timetable_id'];
                        break;
                    }
                }
                if (!empty($timetableid)) {
                    $day = array(" ", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
                    $model = TimeTable::model()->findByPk($timetableid);
                    $nooflec = $model->No_of_Lec;
                    $sum = $nooflec;
                    $lec_duration = LecDuration::model()->findAllByAttributes(array(), $condition = 'timetable_id = :table_id ', $params = array(':table_id' => $timetableid));
                    $lec = array();
                    foreach ($lec_duration as $l) {
                        $lec[] = $l['duration'];
                    }
                    $starti = 1;
                    if ($model->zero_lec == 1) {
                        $starti = 0;
                    }
                    $time = $model->clg_start_time;
                    $time = date('H:i A', strtotime($time));
                    $createdate = date_create($model->creation_date);
                    ?>

			<table id="time-table-struc" bgcolor="#CBE7ED" border="2" style="width:auto;font-size:9px;border-collapse:collapse; height:auto;" >
			<th>
				Day/Time
			</th>

			<?php 
                    $i = 0;
                    while ($i < 7) {
                        echo "<th style='font-size:8px'>" . $day[$i] . "</br>(" . $alldate[$i] . ")</th>";
                        $i++;
                    }
                    $l = 0;
                    $break = "";
                    $dur1 = 0;
                    $count = array(1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0);
                    for ($i = $starti; $i <= $nooflec; $i++) {
                        $days = count($day);
                        echo "<tr>";
                        $duration = NoOfBreakTable::model()->findByAttributes(array('timetable_id' => $timetableid, 'after_lec_break' => $i));
                        if ($duration) {
                            $dur = $duration['duration'];
                            $dur1 = date('i', strtotime($dur));
                        }
                        if ($break) {
                            echo "<td style=width:100px;>" . $time . "-</br>" . date('g:i A', strtotime($time) + $dur1 * 60) . "</td><td colspan=7 align=center ><font color='green'><b>Break</b></font></td></tr>";
                            $break = "";
                            $timestamp = strtotime($time) + $dur1 * 60;
                            $time = date('g:i A', $timestamp);
                            $i--;
                            continue;
                        } else {
                            echo "<td style=width:100px;>" . $time . "-</br>" . date('g:i A', strtotime($time) + 60 * $lec[$l]) . "</td><td style=width:25px;><b>" . $i . "</b></td>";
                            $timestamp = strtotime($time) + 60 * $lec[$l];
                            $l++;
                            $time = date('g:i A', $timestamp);
                        }
                        for ($j = 1; $j <= $days - 1; ++$j) {
                            $subname = "";
                            $room = "";
                            $faculty = "";
                            $batch = "";
                            if ($count[$j] > 0) {
                                $count[$j]--;
                                continue;
                            }
                            $result = TimeTableDetail::model()->findAllByAttributes(array(), $condition = 'day = :day AND lec = :lec AND faculty_emp_id = :emp_id AND timetable_id=:table_id AND lecture_date =:lecdate and proxy_status <> :status', $params = array(':table_id' => $timetableid, ':day' => $j, ':lec' => $i, ':emp_id' => Yii::app()->user->getState('emp_id'), ':lecdate' => date('Y-m-d', strtotime($alldate[$j])), ':status' => 2));
                            $break = NoOfBreakTable::model()->findAllByAttributes(array(), $condition = 'after_lec_break = :lec AND timetable_id=:table_id', $params = array(':table_id' => $timetableid, ':lec' => $i));
                            if ($result) {
                                foreach ($result as $list) {
                                    if ($list['lect_hour'] > 1) {
                                        $count[$j] = $list['lect_hour'] - 1;
                                    }
                                    echo "<td rowspan=" . $list['lect_hour'] . " align=center style=background:#C0CCCC; border-color:black; width:150px;>";
                                    break;
                                }
                                foreach ($result as $check) {
                                    if ($check->batch_id != 0) {
                                        $batch = "(" . Batch::model()->findByPk($check->batch_id)->batch_name . ")";
                                    }
                                    $subname = SubjectMaster::model()->findByPk($check->subject_id)->subject_master_alias;
                                    $room = "(" . RoomDetailsMaster::model()->findByPk($check->room_id)->room_name . ")";
                                    $div = Division::model()->findByPk($check->division_id)->division_code;
                                    //$faculty="(".EmployeeInfo::model()->findByPk($check->faculty_emp_id)->employee_name_alias.")";
                                    if ($batch) {
                                        echo $subname . "</br>" . $batch . "</br>" . $room;
                                    } else {
                                        echo $subname . "</br>" . "(" . $div . ")" . "</br>" . $room;
                                    }
                                }
                                echo "</td>";
                            } else {
                                echo "<td style=width:150px;>" . $subname . "</br>" . $batch . "</br>" . $room . "</td>";
                            }
                        }
                        //for j end
                        echo "</tr>";
                    }
                    //for i end
                    echo "</table>";
                    ?>
<h5>Proxy Lectures</h5>

<table id="time-table-struc" border="1" style="font-size:10px;">
<tr>
<th>Sr. No.</th>
<th>Employee Name</th>
<th>Division</th>
<th>Subject</th>
<th>Room</th>
<th>Lecture No.</th>
<th>Date</th>
</tr>
<?php 
                    $proxy_data = TimeTableDetail::model()->findAllByAttributes(array(), $condition = 'timetable_id = :timetable_id and proxy_employee_id = :emp_id and lecture_date >= :start and lecture_date< :end and proxy_status = :proxy order by lec', $params = array(':timetable_id' => $timetableid, ':emp_id' => Yii::app()->user->getState('emp_id'), ':start' => date('Y-m-d', strtotime($alldate[0])), ':end' => date('Y-m-d', strtotime($alldate[5])), ':proxy' => 1));
                    $n = 0;
                    foreach ($proxy_data as $list) {
                        $result = TimeTableDetail::model()->findByPk($list->proxy_id);
                        ?>

<tr>
<td><?php 
                        echo ++$n;
                        ?>
</td>
<td><?php 
                        echo EmployeeInfo::model()->findByAttributes(array('employee_info_transaction_id' => $list->faculty_emp_id))->employee_first_name;
                        ?>
</td>
<td><?php 
                        echo Division::model()->findByPk($result->division_id)->division_code;
                        ?>
</td>
<td><?php 
                        echo SubjectMaster::model()->findByPk($result->subject_id)->subject_master_alias;
                        ?>
</td>
<td><?php 
                        echo RoomDetailsMaster::model()->findByPk($result->room_id)->room_name;
                        ?>
</td>
<td><?php 
                        echo $result->lec;
                        ?>
</td>
<td><?php 
                        echo date('d-m-Y', strtotime($result->lecture_date));
                        ?>
</td>
</tr>
<?php 
                    }
                    ?>
</table>		

<?php 
                } else {
                    echo "<h3 align=center style=color:red>Sorry, No timetable available.</h3>";
                }
            }
        }
    }
	  </tr>
<?php    
		$i=1;
		$course_fees=$course->course_fees;
		$totalcollection=count($student_data)*$course_fees;
		$total_paid=0;
		$total_out=0;
		foreach($student_data as $stu_details)
		{
	  	 echo '<tr align="center">';
	         echo '<td>'.$i.'</td>';
	         echo '<td>'.$stu_details['student_roll_no'].'</td>';
	         echo '<td>'.$stu_details['student_first_name']." ".$stu_details['student_middle_name']." ".$stu_details['student_last_name'].'</td>';
		echo '<td>'.AcademicTermPeriod::model()->findByPk($stu_details['academic_term_period_id'])->academic_term_period.'</td>';
		echo '<td>'.Course::model()->findByPk($stu_details['course_id'])->course_name.'</td>';
		echo '<td>'.AcademicTerm::model()->findByPk($stu_details['academic_term_id'])->academic_term_name.'</td>';
		echo '<td>'.Batch::model()->findByPk($stu_details['student_transaction_batch_id'])->batch_name.'</td>';
	         echo '<td>'.$course_fees.'</td>';
		 $paidfees_tmp = Yii::app()->db->createCommand()
			    ->select('sum(fees_payment_amount) as paidfees')
			    ->from('fees_payment_transaction')
			    ->where('fees_payment_student_id = '.$stu_details['student_transaction_id'])
			    ->queryRow();
		$paidfees = array_filter($paidfees_tmp);
		if(!empty($paidfees))
			$stu_paidfees = $paidfees['paidfees'];
		else
			$stu_paidfees = 0;
		
	         echo '<td>'.$stu_paidfees.'</td>';
		 $out_fees=$course_fees-$stu_paidfees;
		</div>
		<div class="contentinfo">
		
		<?php 
        foreach ($selected_list as $key => $value) {
            if ($key == 'quota_name') {
                $field_value = Quota::model()->findByPk($stud['student_transaction_quota_id'])->quota_name;
            } else {
                if ($key == 'branch_name') {
                    $field_value = Branch::model()->findByPk($stud['student_transaction_branch_id'])->branch_name;
                } else {
                    if ($key == 'division_code') {
                        $field_value = Division::model()->findByPk($stud['student_transaction_division_id'])->{$key};
                    } else {
                        if ($key == 'sem') {
                            $field_value = AcademicTerm::model()->findByPk($stud['student_academic_term_name_id'])->academic_term_name;
                        } else {
                            if ($key == 'student_first_name') {
                                $lname = $StudentInfo->student_last_name;
                                $fname = $StudentInfo->student_first_name;
                                $mname = $StudentInfo->student_middle_name;
                                $label = $value;
                                $field_value = $lname . " " . $fname . " " . $mname;
                            } else {
                                $field_value = $stud[$key];
                            }
                        }
                    }
                }
            }
            ?>
		      <?php 
            echo StudentInfo::model()->findByPk($v['student_transaction_student_id'])->student_last_name;
            ?>
		
		</td>
		
		<td>
		      <?php 
            echo AcademicTermPeriod::model()->findByPk($v['student_academic_term_period_tran_id'])->academic_term_period;
            ?>
		
		</td>
		<td>
		      <?php 
            if (isset($v['student_academic_term_name_id'])) {
                echo "Sem-" . AcademicTerm::model()->findByPk($v['student_academic_term_name_id'])->academic_term_name;
            } else {
                echo "N/A";
            }
            ?>
		
		</td>
	
		<td>
		      <?php 
            echo StudentStatusMaster::model()->findByPk($v['student_transaction_detain_student_flag'])->status_name;
            ?>
		
		</td>
		<td>
		      <?php 
Exemple #23
0
$this->breadcrumbs = array('Fees Collection');
?>

<h1>Student Fees Collection</h1>

<div class="operation">
<?php 
echo CHtml::link('Back', array('admin'), array('class' => 'btnback'));
?>
</div>

<div class="portlet box blue">
 <div class="portlet-title">Student List
 </div>
<?php 
$dataProvider = $stud_model->search();
if (Yii::app()->user->getState("pageSize", @$_GET["pageSize"])) {
    $pageSize = Yii::app()->user->getState("pageSize", @$_GET["pageSize"]);
} else {
    $pageSize = Yii::app()->params['pageSize'];
}
$dataProvider->getPagination()->setPageSize($pageSize);
?>


<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'student-transaction-grid', 'dataProvider' => $dataProvider, 'filter' => $stud_model, 'ajaxUpdate' => false, 'columns' => array(array('header' => 'SI No', 'class' => 'IndexColumn'), array('name' => 'student_enroll_no', 'value' => '$data->Rel_Stud_Info->student_enroll_no'), array('name' => 'student_first_name', 'value' => '$data->Rel_Stud_Info->student_first_name'), array('name' => 'student_last_name', 'value' => '$data->Rel_Stud_Info->student_last_name'), array('name' => 'student_academic_term_period_tran_id', 'value' => 'AcademicTermPeriod::model()->findByPk($data->student_academic_term_period_tran_id)->academic_term_period'), array('name' => 'student_academic_term_name_id', 'value' => 'isset($data->student_academic_term_name_id) ? AcademicTerm::model()->findByPk($data->student_academic_term_name_id)->academic_term_name :  "N/A" ', 'filter' => CHtml::listData(AcademicTerm::model()->findAll(array('condition' => 'current_sem=1')), 'academic_term_id', 'academic_term_name')), array('name' => 'status_name', 'value' => '$data->Rel_Status->status_name'), array('class' => 'MyCButtonColumn', 'template' => '{Add Fees}', 'buttons' => array('Add Fees' => array('label' => 'Take Fees', 'url' => 'Yii::app()->createUrl("student/studentPaidFeesDetails/create", array("id"=>$data->student_transaction_id))', 'imageUrl' => Yii::app()->baseUrl . '/images/add.jpeg', 'options' => array('class' => 'fees'))))), 'pager' => array('class' => 'AjaxList', 'maxButtonCount' => $stud_model->count(), 'header' => '')));
?>
</div>
 public function previousfeesdata()
 {
     // Warning: Please modify the following code to remove attributes that
     // should not be searched.
     $criteria = new CDbCriteria();
     $criteria->with = array('Rel_fees_branch');
     $acdm_terms = AcademicTerm::model()->findAll('current_sem<>1');
     $data = array();
     foreach ($acdm_terms as $list) {
         $data[] = $list['academic_term_id'];
     }
     $criteria->addInCondition('fees_academic_term_name_id', $data, 'OR');
     $criteria->compare('fees_master_id', $this->fees_master_id);
     $criteria->compare('fees_master_name', $this->fees_master_name, true);
     $criteria->compare('fees_master_created_by', $this->fees_master_created_by);
     $criteria->compare('fees_master_created_date', $this->fees_master_created_date, true);
     $criteria->compare('fees_master_tally_id', $this->fees_master_tally_id);
     $criteria->compare('fees_organization_id', $this->fees_organization_id);
     $criteria->compare('fees_branch_id', $this->fees_branch_id);
     $criteria->compare('fees_academic_term_id', $this->fees_academic_term_id);
     $criteria->compare('fees_academic_term_name_id', $this->fees_academic_term_name_id);
     $criteria->compare('fees_quota_id', $this->fees_quota_id);
     $criteria->compare('Rel_fees_branch.branch_name', $this->branch_name, true);
     //$criteria->compare('Rel_fees_quota.quota_name',$this->quota_name,true);
     $data = new CActiveDataProvider($this, array('criteria' => $criteria));
     $_SESSION['fees_master'] = $data;
     return $data;
 }
 public function actiongetSmsAcademicterm()
 {
     //$data=  AcademicTerm::model()->findAll('academic_term_period_id=:academic_term_period_id',
     //array(':academic_term_period_id'=>(int) $_REQUEST['StudentSmsEmailDetails']['academic_period_id']));
     $org_id = Yii::app()->user->getState('org_id');
     $data = AcademicTerm::model()->findAll('academic_term_period_id=:academic_term_period_id and academic_term_organization_id = :org_id and current_sem= :current_sem', array(':academic_term_period_id' => (int) $_REQUEST['StudentSmsEmailDetails']['academic_period_id'], ':current_sem' => 1, ':org_id' => $org_id));
     $data = CHtml::listData($data, 'academic_term_id', 'academic_term_name');
     echo "<option value=''>All Current Sem</option>";
     foreach ($data as $value => $name) {
         echo CHtml::tag('option', array('value' => $value), CHtml::encode("Sem-" . $name), true);
     }
 }
Exemple #26
0
		array('name' => 'student_middle_name',
	              'value' => '$data->Rel_Stud_Info->student_middle_name',
                     ),

		array('name' => 'student_last_name',
	              'value' => '$data->Rel_Stud_Info->student_last_name',
                     ),
		array('name'=>'student_archive_ac_t_p_id',
			'value'=>'AcademicTermPeriod::model()->findByPk($data->student_archive_ac_t_p_id)->academic_term_period',
			'filter' =>CHtml::listData(AcademicTermPeriod::model()->findAll(), 'academic_terms_period_id','academic_term_period'),

		), 
 
		array('name'=>'student_archive_ac_t_n_id',
			'value'=>'AcademicTerm::model()->findByPk($data->	student_archive_ac_t_n_id)->academic_term_name',
			'filter' =>CHtml::listData(AcademicTerm::model()->findAll(), 'academic_term_id','academic_term_name','academicTermPeriod.academic_term_period'),

		), 

		array('name' => 'status_name',
		      'value' => '$data->Rel_Status->status_name',
                ),
		
		array('name'=>'student_archive_branch_id',
			'value'=>'Branch::model()->findByPk($data->student_archive_branch_id)->branch_name',
			'filter' =>CHtml::listData(Branch::model()->findAll(), 'branch_id','branch_name'),

		), 
	),
	'pager'=>array(
		'class'=>'AjaxList',
	<?php 
echo $form->dropDownList($model, 'student_academic_term_period_tran_id', AcademicTermPeriod::items(), array('prompt' => '-----------Select-----------', 'tabindex' => 9, 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('dependent/getStudItemName'), 'update' => '#StudentTransaction_student_academic_term_name_id')));
?>
<span class="status">&nbsp;</span>
        <?php 
echo $form->error($model, 'student_academic_term_period_tran_id');
?>
	</div>
	<div class="row-right">
		<?php 
echo $form->labelEx($model, 'student_academic_term_name_id');
?>
		<?php 
$term = "Sem-" . $model->academic_term_name;
if (isset($model->student_academic_term_name_id)) {
    echo $form->dropDownList($model, 'student_academic_term_name_id', CHtml::listData(AcademicTerm::model()->findAll(array('condition' => 'academic_term_period_id=' . $model->student_academic_term_period_tran_id)), 'academic_term_id', 'academic_term_name'));
} else {
    echo $form->dropDownList($model, 'student_academic_term_name_id', array('prompt' => '-----------Select-----------'), array('tabindex' => 10));
}
?>
<span class="status">&nbsp;</span>
		<?php 
echo $form->error($model, 'student_academic_term_name_id');
?>
	</div>	


</div>
	
<div class="row">
 $i = 1;
 $m = 1;
 //print_r($stud_data); exit;
 foreach ($stud_data as $t => $sd) {
     //echo $sd['student_transaction_quota_id'];
     if ($m % 2 == 0) {
         $class = "odd";
     } else {
         $class = "even";
     }
     echo "<tr class=" . $class . ">";
     echo "<td>" . $i . "</td>";
     foreach ($selected_list as $s) {
         if ($s == 'sem') {
             if ($sd['student_academic_term_name_id'] != 0) {
                 echo "<td>" . AcademicTerm::model()->findByPk($sd['student_academic_term_name_id'])->academic_term_name . "</td>";
             } else {
                 echo "<td><i>Not Set</i></td>";
             }
         } else {
             if ($s == 'student_address_c_line1') {
                 echo "<td>" . StudentAddress::model()->findByPk($sd['student_transaction_student_address_id'])->student_address_c_line1 . " " . StudentAddress::model()->findByPk($sd['student_transaction_student_address_id'])->student_address_c_line2 . "</td>";
             } else {
                 if ($s == 'city') {
                     $add = StudentAddress::model()->findByPk($sd['student_transaction_student_address_id']);
                     if ($add->student_address_c_city != 0) {
                         echo "<td>" . City::model()->findByPk($add->student_address_c_city)->city_name . "</td>";
                     } else {
                         echo "<td style='text-align:center;'><i>Not Set</i></td>";
                     }
                 } else {
    echo CHtml::link('GO BACK', array('student/studentTransaction/studentcertificate','id'=>$_REQUEST['studid']),array('class'=>'btnback'));
}
foreach($studModel as $list) {
$stud_info = StudentInfo::model()->findByAttributes(array('student_info_transaction_id'=>$list['student_transaction_id']));	
if($stud_info)
{
	$trans = StudentTransaction::model()->findByPk($stud_info->student_info_transaction_id); 
	$titl = "<b>".$stud_info->title."</b>";
	$name = "<b>".$stud_info->student_first_name." ".$stud_info->student_middle_name." ".$stud_info->student_last_name."</b>"; 
	$smobile = "<b>".$stud_info->student_mobile_no."</b>";
	$pmobile = "<b>".$stud_info->student_guardian_mobile."</b>";

	$branch_model=Branch::model()->findByPk($trans->student_transaction_branch_id);
	$en_no = "<b>".$stud_info->student_enroll_no."</b>";
	$branch = "<b>".$branch_model->branch_name."</b>";
	$sem = "<b>Sem-".AcademicTerm::model()->findByPk($trans->student_academic_term_name_id)->academic_term_name."</b>";
        if($trans->student_transaction_division_id != 0)
	$div = "<b>".Division::model()->findByPk($trans->student_transaction_division_id)->division_name."</b>";
	else
	$div = '-';
	$photos=StudentPhotos::model()->findByPk($trans->student_transaction_student_photos_id)->student_photos_path;
	$photo=CHtml::image(Yii::app()->request->baseUrl.'/college_data/stud_images/'.$photos,'image',array('width'=>120,'height'=>140,'class'=>'photo','style'=>'padding-right:0px;','border'=>1));
	$gender = "<b>".$stud_info->student_gender."</b>";
	$cdate = "<b>".date('d/m/Y')."</b>";
	if($trans->student_transaction_category_id !=0)
		$category = "<b>".Category::model()->findByPk($trans->student_transaction_category_id)->category_name."</b>";
	else 
		$category = "<b>not set</b>";
	$lin1 = "<b>not set</b>";
	$lin2 = "<b>not set</b>";
	$ct = "<b>not set</b>";
		<td>
			<?php 
    echo Branch::model()->findByPk($i['fees_branch_id'])->branch_name;
    ?>
		</td>

		<td>
			<?php 
    echo AcademicTermPeriod::model()->findByPk($i['fees_academic_term_id'])->academic_term_period;
    ?>
		</td>

		<td>
			<?php 
    echo AcademicTerm::model()->findByPk($i['fees_academic_term_name_id'])->academic_term_name;
    ?>
		</td>
		<td>
			<?php 
    echo Quota::model()->findByPk($i['fees_quota_id'])->quota_name;
    ?>
		</td>
		<td>

		<u>
			<?php 
    echo CHtml::link($numStud[$j], array('feesPaymentTransaction/total', 'branch_id' => $i['fees_branch_id'], 'acm_id' => $i['fees_academic_term_id'], 'acm_name_id' => $i['fees_academic_term_name_id'], 'quota' => $i['fees_quota_id']));
    ?>
</u>
		</td>