From 00a1eb6b3d0d0897f930cfd8b7b1a3910dd5ce85 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 16 Jun 2010 22:24:55 +0000 Subject: [PATCH] Fix: Ship button available only if module shipping is enabled --- htdocs/commande/fiche.php | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 37533ed67e8..5a2cbbda924 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -2107,27 +2107,30 @@ else } // Ship - if ($commande->statut > 0 && $commande->statut < 3 && $commande->getNbOfProductsLines() > 0) + if ($conf->expedition->enabled) { - if ($user->rights->expedition->creer) + if ($commande->statut > 0 && $commande->statut < 3 && $commande->getNbOfProductsLines() > 0) { - // Chargement des permissions - $error = $user->load_entrepots(); - if (sizeof($user->entrepots) === 1) + if ($user->rights->expedition->creer) { - print ''; - print $langs->trans('ShipProduct').''; + // Chargement des permissions + $error = $user->load_entrepots(); + if (sizeof($user->entrepots) === 1) + { + print ''; + print $langs->trans('ShipProduct').''; + } + else + { + print ''.$langs->trans('ShipProduct').''; + } } else { - print ''.$langs->trans('ShipProduct').''; + print ''.$langs->trans('ShipProduct').''; } } - else - { - print ''.$langs->trans('ShipProduct').''; - } } // Close