From 9eb19258255a7154b01b655525ee37aec6d5293d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Apr 2016 11:12:49 +0200 Subject: [PATCH] FIX No need to ask doc template when only one is defined --- htdocs/expedition/card.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index b3b889f7822..2e15e926ce4 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -712,13 +712,16 @@ if ($action == 'create') } // Document model - print "".$langs->trans("Model").""; - print ''; include_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php'; $liste = ModelePdfExpedition::liste_modeles($db); - print $form->selectarray('model', $liste, $conf->global->EXPEDITION_ADDON_PDF); - print "\n"; - + if (count($liste) > 1) + { + print "".$langs->trans("Model").""; + print ''; + print $form->selectarray('model', $liste, $conf->global->EXPEDITION_ADDON_PDF); + print "\n"; + } + print ""; dol_fiche_end();