Пример #1
0
 public function actionStudentProfilePdf($sid)
 {
     $nationality = $stuAdd = [];
     $stuMaster = StuMaster::findOne($sid);
     $stuDocs = StuDocs::find()->where(['stu_docs_stu_master_id' => $sid])->join('join', 'document_category dc', 'dc.doc_category_id = stu_docs_category_id AND dc.is_status <> 2')->all();
     $stuInfo = StuInfo::find()->where(['stu_info_stu_master_id' => $sid])->one();
     $stuCourse = Courses::findOne($stuMaster->stu_master_course_id);
     $stuBatch = Batches::findOne($stuMaster->stu_master_batch_id);
     $stuSection = Section::findOne($stuMaster->stu_master_section_id);
     $stuGuard = StuGuardians::findAll(['guardia_stu_master_id' => $sid]);
     $sDocs = new StuDocs();
     if ($stuMaster->stu_master_nationality_id !== null) {
         $nationality = Nationality::findOne($stuMaster->stu_master_nationality_id)->nationality_name;
     }
     if ($stuMaster->stu_master_stu_address_id !== null) {
         $stuAdd = StuAddress::findOne($stuMaster->stu_master_stu_address_id);
     }
     $html = $this->renderPartial('/stu-master/stuprofilepdf', ['stuDocs' => $stuDocs, 'stuMaster' => $stuMaster, 'stuInfo' => $stuInfo, 'nationality' => $nationality, 'stuBatch' => $stuBatch, 'stuCourse' => $stuCourse, 'stuSection' => $stuSection, 'stuAdd' => $stuAdd, 'stuGuard' => $stuGuard, 'sDocs' => $sDocs]);
     $fName = $stuInfo->stu_first_name . "_" . $stuInfo->stu_last_name . "_" . date('Ymd-His');
     return Yii::$app->pdf->exportData(Yii::t('report', 'Student Report'), $fName, $html);
 }
Пример #2
0
?>
<div class="grid-view">
<?php 
if (!empty($stuData)) {
    echo '<table class="table table-striped">';
    echo '<tr>';
    echo '<th class="text-center">' . Yii::t('fees', 'SI No.') . '</th>';
    echo '<th>' . Yii::t('fees', 'Student No') . '</th>';
    echo '<th>' . Yii::t('fees', 'Student Name') . '</th>';
    echo '<th>' . Yii::t('fees', 'Total Collection') . '</th>';
    echo '<th>' . Yii::t('fees', 'Paid Amount') . '</th>';
    echo '<th>' . Yii::t('fees', 'Unpaid Amount') . '</th>';
    echo '</tr>';
    $sr = 1;
    foreach ($stuData as $key => $value) {
        $stuDetails = \app\modules\student\models\StuMaster::findOne($value);
        echo '<tr>';
        echo '<td class="text-center">' . $sr++ . '</td>';
        echo '<td>' . (!empty($stuDetails->stuMasterStuInfo->stu_unique_id) ? $stuDetails->stuMasterStuInfo->stu_unique_id : "(Not Set)") . '</td>';
        echo '<td>' . $stuDetails->stuMasterStuInfo->name . '</td>';
        echo '<td>' . $totalAmount . '</td>';
        $payFees = $FptModel->getStuTotalPayFees($value, $FccModel->fees_collect_category_id);
        echo '<td>' . (!empty($payFees) ? $payFees : "0") . '</td>';
        echo '<td>' . ($actualCollect = $totalAmount - $payFees . '</td>');
        echo '</tr>';
        $gTotalAmount += $totalAmount;
        $gpayFees += $payFees;
        $gActualCollect += $actualCollect;
    }
    echo '<tr class="bg-aqua"><th colspan="3" class="text-right">' . Yii::t('fees', 'GRAND TOTAL') . ' </th>';
    echo '<th>' . $gTotalAmount . '</th>';
Пример #3
0
 /**
  * @return fees unpaid/paid amount for individual student based on current active category
  */
 public static function getUnpaidTotal($sid)
 {
     $stuData = \app\modules\student\models\StuMaster::findOne($sid);
     $collectTotal = (new \yii\db\Query())->from('fees_collect_category fcc')->join('JOIN', 'fees_category_details fcd', 'fcc.fees_collect_category_id = fcd.fees_details_category_id')->where(['fcc.is_status' => 0, 'fcd.is_status' => 0, 'fcc.fees_collect_batch_id' => $stuData->stu_master_batch_id])->sum('fcd.fees_details_amount');
     $paidTotal = (new \yii\db\Query())->from('fees_payment_transaction fpt')->join('JOIN', 'fees_collect_category fcc', 'fcc.fees_collect_category_id = fpt.fees_pay_tran_collect_id')->where(['fcc.is_status' => 0, 'fpt.is_status' => 0, 'fcc.fees_collect_batch_id' => $stuData->stu_master_batch_id, 'fpt.fees_pay_tran_stu_id' => $sid])->sum('fpt.fees_pay_tran_amount');
     return ['paidFees' => $paidTotal, 'unPaidFees' => $collectTotal - $paidTotal];
 }
Пример #4
0
 /**
  * Finds the StuMaster model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return StuMaster the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = StuMaster::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
 /**
  * Display Individual Student Fees Data.
  * If student is login, the fees data display based on student login id other wise request id.
  * @param integer $sid
  * @return mixed
  */
 public function actionStuFeesData()
 {
     if (Yii::$app->session->get('stu_id')) {
         $sid = Yii::$app->session->get('stu_id');
     } else {
         if (!empty($_REQUEST['sid'])) {
             $sid = $_REQUEST['sid'];
         } else {
             throw new \yii\web\BadRequestHttpException("Missing required parameters: sid");
         }
     }
     $model = new FeesPaymentTransaction();
     $stuData = \app\modules\student\models\StuMaster::findOne($sid);
     $FccModel = new \app\modules\fees\models\FeesCollectCategory();
     return $this->render('stu-fees-data', ['model' => $model, 'stuData' => $stuData, 'FccModel' => $FccModel]);
 }