add contract

This commit is contained in:
2016-01-25 01:43:19 +01:00
parent fd4d38ab44
commit df14401b28
47 changed files with 2868 additions and 766 deletions

View File

@@ -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.