From 1cb7d284a547e3a1de94b1206f213a6b73a9c05e Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Wed, 6 May 2015 12:16:36 +0200 Subject: [PATCH] Fix : shipment PDF was not using generation params Conflicts: htdocs/core/modules/expedition/modules_expedition.php htdocs/expedition/fiche.php --- htdocs/core/modules/expedition/modules_expedition.php | 4 ++-- htdocs/expedition/card.php | 2 +- htdocs/expedition/class/expedition.class.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/expedition/modules_expedition.php b/htdocs/core/modules/expedition/modules_expedition.php index d9205503e11..a2437d5001f 100644 --- a/htdocs/core/modules/expedition/modules_expedition.php +++ b/htdocs/core/modules/expedition/modules_expedition.php @@ -152,7 +152,7 @@ abstract class ModelNumRefExpedition * @return int <=0 if KO, >0 if OK * @deprecated Use the new function generateDocument of Expedition class */ -function expedition_pdf_create(DoliDB $db, Expedition $object, $modele, $outputlangs) +function expedition_pdf_create(DoliDB $db, Expedition $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) { - return $object->generateDocument($modele, $outputlangs); + return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 8826c453b6f..db8b236feaa 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -406,7 +406,7 @@ if (empty($reshook)) $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } - $result = $object->generateDocument($object->modelpdf, $outputlangs); + $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db,$result); diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 8a9377b1507..e93dfb2d768 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1645,7 +1645,7 @@ class Expedition extends CommonObject * @param Translate $outputlangs Objet lang a utiliser pour traduction * @return int <=0 if KO, >0 if OK */ - public function generateDocument($modele, $outputlangs) + public function generateDocument($modele, $outputlangs,$hidedetails=0, $hidedesc=0, $hideref=0) { global $conf,$user,$langs; @@ -1668,7 +1668,7 @@ class Expedition extends CommonObject $this->fetch_origin(); - return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, 0, 0, 0); + return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } /**