* Taktung: Jedes Gespräch wird für volle =$voiceplan->increment_first?> Gesprächssekunden abgerechnet, darüber hinausgehende Gesprächsdauer in Schritten von =$voiceplan->increment?> Sekunden.
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/application/Voiceplan/VoiceplanController.php b/application/Voiceplan/VoiceplanController.php
index f8aa6df17..54f4e221f 100644
--- a/application/Voiceplan/VoiceplanController.php
+++ b/application/Voiceplan/VoiceplanController.php
@@ -297,4 +297,25 @@ class VoiceplanController extends mfBaseController {
$this->redirect("Voiceplan", "Index");
}
+
+ protected function downloadPdf() {
+ $this->layout()->setTemplate("Voiceplan/export.pdf");
+
+ $voiceplan = new Voiceplan($this->request->id);
+ if(!$voiceplan->id) {
+ $this->layout()->setFlash("Sprachtarif nicht gefunden", "error");
+ $this->redirect("Voiceplan", "Index");
+ }
+
+ $pdf_vars = [
+ "voiceplan" => $voiceplan,
+ ];
+
+ $pdf = new PdfForm("Voiceplan/export.pdf", $pdf_vars);
+ $title = "Xinon Sprachtarif ".$voiceplan->name;
+ $pdf->render("--footer-center '$title Seite [page] / [topage]' --footer-font-name OpenSans --footer-font-size 9");
+ $tvalue = $pdf->getReturnedValues();
+ $pdfname = $tvalue['filename'];
+ $pdf->download($pdfname);
+ }
}
\ No newline at end of file