diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index d6b130749ed..f044af50980 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -53,7 +53,7 @@ $langs->load('orders'); $langs->load('products'); $langs->load("deliveries"); $langs->load('sendings'); -if ($conf->incoterm->enabled) $langs->load('incoterm'); +if (!empty($conf->incoterm->enabled)) $langs->load('incoterm'); if (! empty($conf->margin->enabled)) $langs->load('margins'); @@ -243,7 +243,7 @@ if (empty($reshook)) } // Set incoterm - elseif ($action == 'set_incoterms' && $conf->incoterm->enabled) + elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) { $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); } @@ -1400,7 +1400,7 @@ if ($action == 'create') print ""; // Incoterms - if ($conf->incoterm->enabled) + if (!empty($conf->incoterm->enabled)) { print ''; print ''; @@ -1970,13 +1970,13 @@ if ($action == 'create') } // Incoterms - if ($conf->incoterm->enabled) + if (!empty($conf->incoterm->enabled)) { print ''; print '
'; print $langs->trans('IncotermLabel'); print ''; - if ($user->rights->societe->creer) print ''.img_edit().''; + if ($user->rights->commande->creer) print ''.img_edit().''; else print ' '; print '
'; print ''; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index c9a3e796979..07ba407731c 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -45,7 +45,7 @@ $langs->load("commercial"); $langs->load("bills"); $langs->load("banks"); $langs->load("users"); -if ($conf->incoterm->enabled) $langs->load("incoterm"); +if (!empty($conf->incoterm->enabled)) $langs->load("incoterm"); if (! empty($conf->notification->enabled)) $langs->load("mails"); $mesg=''; $error=0; $errors=array(); @@ -193,7 +193,7 @@ if (empty($reshook)) $object->webservices_key = GETPOST('webservices_key', 'san_alpha'); // Incoterms - if ($conf->incoterm->enabled) + if (!empty($conf->incoterm->enabled)) { $object->fk_incoterms = GETPOST('incoterm_id', 'int'); $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); @@ -522,7 +522,7 @@ if (empty($reshook)) } // Set incoterm - if ($action == 'set_incoterms' && $conf->incoterm->enabled) + if ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) { $object->fetch($socid); $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); @@ -1089,7 +1089,7 @@ else } // Incoterms - if ($conf->incoterm->enabled) + if (!empty($conf->incoterm->enabled)) { print ''; print ''; @@ -1221,7 +1221,7 @@ else $object->webservices_key = GETPOST('webservices_key', 'san_alpha'); //Incoterms - if ($conf->incoterm->enabled) + if (!empty($conf->incoterm->enabled)) { $object->fk_incoterms = GETPOST('incoterm_id', 'int'); $object->location_incoterms = GETPOST('lcoation_incoterms', 'alpha'); @@ -1615,7 +1615,7 @@ else } // Incoterms - if ($conf->incoterm->enabled) + if (!empty($conf->incoterm->enabled)) { print ''; print ''; @@ -2011,7 +2011,7 @@ else } // Incoterms - if ($conf->incoterm->enabled) + if (!empty($conf->incoterm->enabled)) { print ''; print '
';