From dbaaa44c760ce8de0c56105f2e61f8f3cf1fb3b7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 13 Apr 2015 13:22:12 +0200 Subject: [PATCH] Fix: link must not be visible if module disabled --- htdocs/fourn/commande/card.php | 20 +++++++++++--------- htdocs/fourn/commande/list.php | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 90505dfa341..3522e3a91b2 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2681,20 +2681,22 @@ elseif (! empty($object->id)) } // Create bill - if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->statut != 9)) // 2 means accepted + if (! empty($conf->facture->enabled)) { - if ($user->rights->fournisseur->facture->creer) + if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->statut != 9)) // 2 means accepted { - print ''.$langs->trans("CreateBill").''; + if ($user->rights->fournisseur->facture->creer) + { + print ''.$langs->trans("CreateBill").''; + } + + //if ($user->rights->fournisseur->commande->creer && $object->statut > 2) + //{ + // print ''.$langs->trans("ClassifyBilled").''; + //} } - - //if ($user->rights->fournisseur->commande->creer && $object->statut > 2) - //{ - // print ''.$langs->trans("ClassifyBilled").''; - //} } - // Create a remote order using WebService only if module is activated if (! empty($conf->syncsupplierwebservices->enabled) && $object->statut >= 2) // 2 means accepted { diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 386caad8134..88cf3a48555 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -316,7 +316,7 @@ if ($resql) print "\n"; print "\n"; - print '
'.img_help(1,'').' '.$langs->trans("ToBillSeveralOrderSelectCustomer", $langs->transnoentitiesnoconv("CreateInvoiceForThisCustomer")).'
'; + if (! empty($conf->facture->enable)) print '
'.img_help(1,'').' '.$langs->trans("ToBillSeveralOrderSelectCustomer", $langs->transnoentitiesnoconv("CreateInvoiceForThisCustomer")).'
'; $db->free($resql); }