From 03d068478a205843c8e08a60499b3eb4092baae4 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 27 Jun 2006 11:07:26 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20le=20mod=E8le=20pdf=20=E9tait=20effac=E9?= =?UTF-8?q?=20en=20base=20lorsqu'on=20cliquait=20sur=20le=20bouton=20"G=E9?= =?UTF-8?q?n=E9rer=20=20le=20PDF"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/commande.class.php | 1 + htdocs/commande/fiche.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index e3a816268b6..447ecc79686 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -65,6 +65,7 @@ class Commande extends CommonObject var $date_livraison; // Date livraison souhaitée var $remise_percent; var $remise_absolue; + var $modelpdf; var $lines = array(); diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 13e6dee49d8..f2161fbc322 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -414,9 +414,9 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post // Sauvegarde le dernier modèle choisi pour générer un document $commande = new Commande($db, 0, $_REQUEST['id']); $commande->fetch($_REQUEST['id']); - if ($_REQUEST['model']) + if ($_REQUEST['modelpdf']) { - $modelpdf = $_REQUEST['model']; + $modelpdf = $_REQUEST['modelpdf']; } else { @@ -429,7 +429,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post $outputlangs = new Translate(DOL_DOCUMENT_ROOT ."/langs"); $outputlangs->setDefaultLang($_REQUEST['lang_id']); } - $result=commande_pdf_create($db, $_REQUEST['id'],$_REQUEST['model'],$outputlangs); + $result=commande_pdf_create($db, $_REQUEST['id'],$modelpdf,$outputlangs); if ($result <= 0) { dolibarr_print_error($db,$result);