$conf->global->COMMANDE_SUPPLIER_ADDON_PDF = $value; } // On active le modele $ret = delDocumentModel($value, $type); if ($ret > 0) { $ret = addDocumentModel($value, $type, $label, $scandir); } } else { if ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_NUMBER", $value, 'chaine', 0, '', $conf->entity); } else { if ($action == 'addcat') { $fourn = new Fournisseur($db); $fourn->CreateCategory($user, $_POST["cat"]); } else { if ($action == 'set_SUPPLIER_ORDER_OTHER') { $freetext = GETPOST('SUPPLIER_ORDER_FREE_TEXT'); // No alpha here, we want exact string $doubleapproval = GETPOST('SUPPLIER_ORDER_DOUBLE_APPROVAL', 'alpha'); $doubleapproval = price2num($doubleapproval); $res1 = dolibarr_set_const($db, "SUPPLIER_ORDER_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); $res2 = dolibarr_set_const($db, "SUPPLIER_ORDER_DOUBLE_APPROVAL", $doubleapproval, 'chaine', 0, '', $conf->entity); // TODO We add/delete permission here until permission can have a condition on a global var include_once DOL_DOCUMENT_ROOT . '/core/modules/modFournisseur.class.php'; $newmodule = new modFournisseur($db); // clear default rights array $newmodule->rights = array(); // add new right $r = 0;