noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 79/151: PDF Operation ajout détail opération


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 79/151: PDF Operation ajout détail opération pour GrandLivre ANC , export des pièces avec tampon
Date: Sat, 4 Feb 2017 17:14:29 +0000 (UTC)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 39bb30bcd7699885efb55e5f3f8b6f7d08a95c5c
Author: Dany De Bontridder <address@hidden>
Date:   Sun Nov 27 13:42:42 2016 +0100

    PDF Operation ajout détail opération pour GrandLivre ANC , export des 
pièces avec tampon
---
 include/class/class_document_export.php |   30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/include/class/class_document_export.php 
b/include/class/class_document_export.php
index 89bc9f5..a42979f 100644
--- a/include/class/class_document_export.php
+++ b/include/class/class_document_export.php
@@ -205,11 +205,11 @@ class Document_Export
             }
             // output
             $output = $this->store_convert . '/stamp_' . $file_pdf;
-
+            
             // Concatenate stamp + file
             $stmt = PDFTK . " " . escapeshellarg($this->store_convert . '/' . 
$file_pdf) . ' stamp ' . $this->store_convert .
                     '/stamp.pdf output ' . $output;
-            
+
             passthru($stmt, $status);
             echo $stmt;
             if ($status <> 0)
@@ -221,6 +221,32 @@ class Document_Export
                 $cnt_feedback++;
                 continue;
             }
+            
+            // create the pdf with the detail of operation
+            $detail_operation = new PDF_Operation($cn,$jr_id);
+            $detail_operation->export_pdf(array("acc","anc"));
+
+            // output 2
+            $output2 = $this->store_convert . '/operation_' . $file_pdf;
+            
+            // concatenate detail operation with the output
+            $stmt = PDFTK . " " . $detail_operation->get_pdf_file()." 
".$output. 
+                    ' output ' . $output2;
+
+            passthru($stmt, $status);
+            echo $stmt;
+            if ($status <> 0)
+            {
+
+                $this->feedback[$cnt_feedback]['file'] = $file_pdf;
+                $this->feedback[$cnt_feedback]['message'] = _('Echec Ajout 
detail ');
+                $this->feedback[$cnt_feedback]['error'] = $status;
+                $cnt_feedback++;
+                continue;
+            }
+            // overwrite old with new PDF
+            rename ($output2,$output);
+            
             // Move the PDF into another temp directory 
             $this->move_file($output, 'stamp_' . $file_pdf);
         }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]