diff --git a/htdocs/expedition/expedition.class.php b/htdocs/expedition/expedition.class.php index d6bf50f6460..3db650d7232 100644 --- a/htdocs/expedition/expedition.class.php +++ b/htdocs/expedition/expedition.class.php @@ -430,6 +430,7 @@ class Expedition $module_file_name = DOL_DOCUMENT_ROOT."/expedition/mods/pdf/pdf_expedition_".EXPEDITION_ADDON_PDF.".modules.php"; $mod = "pdf_expedition_".EXPEDITION_ADDON_PDF; + $this->fetch_commande(); require_once $module_file_name; diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 69a6ac586f6..a338d2b9d6d 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -1,6 +1,7 @@ * Copyright (C) 2005 Laurent Destailleur + * Copyright (C) 2005 Simon TOSSER * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -109,6 +110,10 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes') } } +/* + * Générer ou regénérer le PDF + */ + if ($_GET["action"] == 'pdf') { $expedition = new Expedition($db); @@ -537,6 +542,11 @@ else } $db->free($resql); } + //Barre d'action + print '
'; + //Build PDF + print ''.$langs->trans('BuildPDF').''; + print '

'; /* * Documents générés