From 8b6ff1f42c7d49da548ef6f84eb2f3caec0cf9d0 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 27 Nov 2016 13:41:19 +0100 Subject: [PATCH] Scenario test pour PDF_Operation Task #9 - PDF_Operation : ajout des options --- include/class/class_pdf_operation.php | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/include/class/class_pdf_operation.php b/include/class/class_pdf_operation.php index 20bb79dbd..d19a5ee92 100644 --- a/include/class/class_pdf_operation.php +++ b/include/class/class_pdf_operation.php @@ -20,7 +20,7 @@ // Copyright Author Dany De Bontridder dany@alchimerys.be(2003-2016) -/* * * +/** * @file * Detail Operation ACC + ANC , it will use Acc_Operation and Anc_Operation * @@ -36,8 +36,8 @@ class PDF_Operation extends PDF { private $acc_detail; //!< Acc_Operation object private $jr_id; //!< jrn.jr_id operation -// private $pdf; - + private $pdf; + var $cn; function __construct($p_cn, $pjr_id) { $this->cn = $p_cn; $this->jr_id = $pjr_id; @@ -445,5 +445,19 @@ class PDF_Operation extends PDF { // if option contains EXTEND add document name + comment + action name // if options contains ANC export ANC plan table } - + function get_pdf() { + return $this->pdf; + } + /** + * @brief export the PDF to a file and returns the filename + * @retun String filename + */ + function get_pdf_filename() { + $file_name=$_ENV['TMP']."/"."acc_op".$this->acc_detail->det->jr_internal.".pdf"; + $this->pdf->Output($file_name, "F"); + return $file_name; + } + function download_pdf() { + $this->pdf->Output("acc_op".$this->acc_detail->det->jr_internal.".pdf"); + } }