<?php use yii\helpers\Html; use app\modules\fees\models\FeesCollectCategory; /* @var $this yii\web\View */ /* @var $model app\modules\fees\models\FeesCategoryDetails */ $this->title = 'Add Fees Category Detail'; $this->params['breadcrumbs'][] = ['label' => 'Fees', 'url' => ['default/index']]; $this->params['breadcrumbs'][] = ['label' => 'Manage Fees Categories', 'url' => ['fees-collect-category/index']]; $this->params['breadcrumbs'][] = ['label' => FeesCollectCategory::findOne($_REQUEST['fcc_id'])->fees_collect_name, 'url' => ['fees-collect-category/view', 'id' => $_REQUEST['fcc_id']]]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="col-xs-12"> <div class="col-lg-4 col-sm-8 col-xs-12 no-padding"><h3 class="box-title"><i class="fa fa-plus"></i> Add Fees Category Detail</h3></div> </div> <div class="fees-category-details-create"> <?php echo $this->render('_form', ['model' => $model]); ?> </div>
/** * Display Fees category wise & student wise fees receipt. * @param integer $sid, $fcid * @return mixed */ public function actionPrintCommonReceipt($sid, $fcid) { $model = new FeesPaymentTransaction(); $stuData = \app\modules\student\models\StuMaster::findOne($sid); $FccModel = \app\modules\fees\models\FeesCollectCategory::findOne($fcid); $title = "Receipt of " . $stuData->stuMasterStuInfo->name . ' : ' . Yii::$app->dateformatter->getDateDisplay(date('Y-m-d')); $html = $this->renderPartial('print-common-receipt', ['model' => $model, 'stuData' => $stuData, 'FccModel' => $FccModel, 'title' => $title]); $imgSrc = Yii::$app->urlManager->createAbsoluteUrl('site/loadimage'); $mpdf = new mPDF('utf-8', 'A4', 0, '', 15, 15, 25, 16, 4, 9, 'P'); $mpdf->WriteHTML('<watermarkimage src=' . $imgSrc . ' alpha="0.33" size="50,30"/>'); $mpdf->showWatermarkImage = true; $mpdf->WriteHTML($html); $mpdf->Output($title . '.pdf', "I"); }