diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 015e06df36a..dd71918031a 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -1370,7 +1370,7 @@ if ($object->id > 0) { print '
'; } - if ($user->rights->contrat->creer && $object->status == 1) { + if (!empty($user->rights->contrat->creer) && $object->status == 1) { $langs->load("contracts"); print ''; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 265255f6e0a..188ee8c33c8 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9298,7 +9298,8 @@ class Form $retstring = $withoutdiv ? '': '| '; - if ($conf->supplier_proposal->enabled) { + if (!empty($conf->supplier_proposal->enabled)) { // Box proposals $tmp = $object->getOutstandingProposals('supplier'); $outstandingOpened = $tmp['opened']; @@ -428,6 +428,7 @@ if ($object->id > 0) { } if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) { + $warn = ''; $tmp = $object->getOutstandingBills('supplier'); $outstandingOpened = $tmp['opened']; $outstandingTotal = $tmp['total_ht']; @@ -584,7 +585,7 @@ if ($object->id > 0) { */ $proposalstatic = new SupplierProposal($db); - if ($user->rights->supplier_proposal->lire) { + if (!empty($user->rights->supplier_proposal->lire)) { $langs->loadLangs(array("supplier_proposal")); $sql = "SELECT p.rowid, p.ref, p.date_valid as dc, p.fk_statut, p.total_ht, p.total_tva, p.total_ttc"; @@ -831,7 +832,7 @@ if ($object->id > 0) { print ''; } - if ($conf->supplier_proposal->enabled && $user->rights->supplier_proposal->creer) { + if (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->creer)) { $langs->load("supplier_proposal"); if ($object->status == 1) { print ''.$langs->trans("AddSupplierProposal").''; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 6f4a591e567..9c30f75fd0a 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1591,7 +1591,7 @@ if ($action == 'create') { print ' |