add contract
This commit is contained in:
@@ -34,7 +34,7 @@ class CustomerController extends Controller
|
||||
],
|
||||
'access' => [
|
||||
'class' => \yii\filters\AccessControl::className(),
|
||||
'only' => ['create', 'update','reception'],
|
||||
'only' => ['create', 'update','reception','contract'],
|
||||
'rules' => [
|
||||
// allow authenticated users
|
||||
[
|
||||
@@ -199,6 +199,18 @@ class CustomerController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function actionContract($id){
|
||||
$model = $this->findModel($id);
|
||||
|
||||
$mpdf=new \mPDF('utf-8', 'A4-L');
|
||||
$mpdf->WriteHTML($this->renderPartial('_contract', [
|
||||
'model' => $model,
|
||||
]));
|
||||
$mpdf->Output('szerzodes.pdf', 'D');
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an existing Customer model.
|
||||
* If deletion is successful, the browser will be redirected to the 'index' page.
|
||||
|
||||
Reference in New Issue
Block a user