';
print '| '.$langs->trans("StockMustBeEnoughForShipment").' | ';
print '';
diff --git a/htdocs/admin/webhook.php b/htdocs/admin/webhook.php
index 9dec7a8eeec..b589eac4079 100644
--- a/htdocs/admin/webhook.php
+++ b/htdocs/admin/webhook.php
@@ -343,7 +343,7 @@ if ($action == 'edit') {
include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
print dolJSToSetRandomPassword($constname, 'generate_token'.$constname);
} elseif ($val['type'] == 'product') {
- if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
+ if (isModEnabled("product") || isModEnabled("service")) {
$selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname);
$form->select_produits($selected, $constname, '', 0);
}
diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php
index 47e6e87a244..e1899b35a56 100644
--- a/htdocs/admin/workflow.php
+++ b/htdocs/admin/workflow.php
@@ -62,7 +62,7 @@ $workflowcodes = array(
'WORKFLOW_PROPAL_AUTOCREATE_ORDER'=>array(
'family'=>'create',
'position'=>10,
- 'enabled'=>(!empty($conf->propal->enabled) && !empty($conf->commande->enabled)),
+ 'enabled'=>(isModEnabled("propal") && !empty($conf->commande->enabled)),
'picto'=>'order'
),
'WORKFLOW_ORDER_AUTOCREATE_INVOICE'=>array(
@@ -84,14 +84,14 @@ $workflowcodes = array(
'WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL'=>array(
'family'=>'classify_proposal',
'position'=>30,
- 'enabled'=>(!empty($conf->propal->enabled) && !empty($conf->commande->enabled)),
+ 'enabled'=>(isModEnabled("propal") && !empty($conf->commande->enabled)),
'picto'=>'propal',
'warning'=>''
),
'WORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL'=>array(
'family'=>'classify_proposal',
'position'=>31,
- 'enabled'=>(!empty($conf->propal->enabled) && isModEnabled('facture')),
+ 'enabled'=>(isModEnabled("propal") && isModEnabled('facture')),
'picto'=>'propal',
'warning'=>''
),
@@ -100,13 +100,13 @@ $workflowcodes = array(
'WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING'=>array( // when shipping validated
'family'=>'classify_order',
'position'=>40,
- 'enabled'=>(!empty($conf->expedition->enabled) && !empty($conf->commande->enabled)),
+ 'enabled'=>(isModEnabled("expedition") && !empty($conf->commande->enabled)),
'picto'=>'order'
),
'WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING_CLOSED'=>array( // when shipping closed
'family'=>'classify_order',
'position'=>41,
- 'enabled'=>(!empty($conf->expedition->enabled) && !empty($conf->commande->enabled)),
+ 'enabled'=>(isModEnabled("expedition") && !empty($conf->commande->enabled)),
'picto'=>'order'
),
'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER'=>array(
@@ -123,7 +123,7 @@ $workflowcodes = array(
'WORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL'=>array(
'family'=>'classify_supplier_proposal',
'position'=>60,
- 'enabled'=>(!empty($conf->supplier_proposal->enabled) && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))),
+ 'enabled'=>(!empty($conf->supplier_proposal->enabled) && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice"))),
'picto'=>'supplier_proposal',
'warning'=>''
),
@@ -132,7 +132,7 @@ $workflowcodes = array(
'WORKFLOW_ORDER_CLASSIFY_RECEIVED_RECEPTION'=>array(
'family'=>'classify_supplier_order',
'position'=>63,
- 'enabled'=>(!empty($conf->global->MAIN_FEATURES_LEVEL) && (!empty($conf->reception->enabled)) && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || empty($conf->supplier_order->enabled))),
+ 'enabled'=>(!empty($conf->global->MAIN_FEATURES_LEVEL) && (isModEnabled("reception")) && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || empty($conf->supplier_order->enabled))),
'picto'=>'supplier_order',
'warning'=>''
),
@@ -140,7 +140,7 @@ $workflowcodes = array(
'WORKFLOW_ORDER_CLASSIFY_RECEIVED_RECEPTION_CLOSED'=>array(
'family'=>'classify_supplier_order',
'position'=>64,
- 'enabled'=>(!empty($conf->global->MAIN_FEATURES_LEVEL) && (!empty($conf->reception->enabled)) && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || empty($conf->supplier_order->enabled))),
+ 'enabled'=>(!empty($conf->global->MAIN_FEATURES_LEVEL) && (isModEnabled("reception")) && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || empty($conf->supplier_order->enabled))),
'picto'=>'supplier_order',
'warning'=>''
),
@@ -148,7 +148,7 @@ $workflowcodes = array(
'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER'=>array(
'family'=>'classify_supplier_order',
'position'=>65,
- 'enabled'=>((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)),
+ 'enabled'=>((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")),
'picto'=>'supplier_order',
'warning'=>''
),
@@ -157,7 +157,7 @@ $workflowcodes = array(
'WORKFLOW_BILL_ON_RECEPTION'=>array(
'family'=>'classify_reception',
'position'=>80,
- 'enabled'=>(!empty($conf->reception->enabled) && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))),
+ 'enabled'=>(isModEnabled("reception") && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice"))),
'picto'=>'reception'
),
@@ -165,7 +165,7 @@ $workflowcodes = array(
'WORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE' => array(
'family' => 'classify_shipping',
'position' => 90,
- 'enabled' => !empty($conf->expedition->enabled) && !empty($conf->facture->enabled),
+ 'enabled' => isModEnabled("expedition") && isModEnabled("facture"),
'picto' => 'shipment'
),
diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php
index 448473003b3..4f8f06ca160 100644
--- a/htdocs/asset/admin/setup.php
+++ b/htdocs/asset/admin/setup.php
@@ -524,7 +524,7 @@ if ($action == 'edit') {
include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
print dolJSToSetRandomPassword($constname, 'generate_token'.$constname);
} elseif ($val['type'] == 'product') {
- if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
+ if (isModEnabled("product") || isModEnabled("service")) {
$selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname);
$form->select_produits($selected, $constname, '', 0);
}
diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php
index d144d95819b..16306e73441 100644
--- a/htdocs/asset/class/asset.class.php
+++ b/htdocs/asset/class/asset.class.php
@@ -1171,10 +1171,10 @@ class Asset extends CommonObject
global $hidedetails, $hidedesc, $hideref;
$outputlangs = $langs;
$newlang = '';
- if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
+ if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
$newlang = GETPOST('lang_id', 'aZ09');
}
- if ($conf->global->MAIN_MULTILANGS && empty($newlang)) {
+ if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) {
$newlang = $this->thirdparty->default_lang;
}
if (!empty($newlang)) {
@@ -1234,10 +1234,10 @@ class Asset extends CommonObject
global $hidedetails, $hidedesc, $hideref;
$outputlangs = $langs;
$newlang = '';
- if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
+ if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
$newlang = GETPOST('lang_id', 'aZ09');
}
- if ($conf->global->MAIN_MULTILANGS && empty($newlang)) {
+ if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) {
$newlang = $this->thirdparty->default_lang;
}
if (!empty($newlang)) {
diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php
index 37db04868cb..3ab2b63ad3f 100644
--- a/htdocs/blockedlog/class/blockedlog.class.php
+++ b/htdocs/blockedlog/class/blockedlog.class.php
@@ -151,7 +151,7 @@ class BlockedLog
}
/* Supplier
- if (!empty($conf->fournisseur->enabled)) {
+ if (isModEnabled("fournisseur")) {
$this->trackedevents['BILL_SUPPLIER_VALIDATE']='BlockedLogSupplierBillValidate';
$this->trackedevents['BILL_SUPPLIER_DELETE']='BlockedLogSupplierBillDelete';
$this->trackedevents['BILL_SUPPLIER_SENTBYMAIL']='BlockedLogSupplierBillSentByEmail'; // Trigger key does not exists, we want just into array to list it as done
@@ -184,7 +184,7 @@ class BlockedLog
$this->trackedevents['MEMBER_SUBSCRIPTION_MODIFY'] = 'logMEMBER_SUBSCRIPTION_MODIFY';
$this->trackedevents['MEMBER_SUBSCRIPTION_DELETE'] = 'logMEMBER_SUBSCRIPTION_DELETE';
}
- if (!empty($conf->banque->enabled)) {
+ if (isModEnabled("banque")) {
$this->trackedevents['PAYMENT_VARIOUS_CREATE'] = 'logPAYMENT_VARIOUS_CREATE';
$this->trackedevents['PAYMENT_VARIOUS_MODIFY'] = 'logPAYMENT_VARIOUS_MODIFY';
$this->trackedevents['PAYMENT_VARIOUS_DELETE'] = 'logPAYMENT_VARIOUS_DELETE';
diff --git a/htdocs/bom/tpl/objectline_create.tpl.php b/htdocs/bom/tpl/objectline_create.tpl.php
index 0a3a3b34e7a..e895d534fac 100644
--- a/htdocs/bom/tpl/objectline_create.tpl.php
+++ b/htdocs/bom/tpl/objectline_create.tpl.php
@@ -87,7 +87,7 @@ $coldisplay++;
print ' | ';
// Predefined product/service
-if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
+if (isModEnabled("product") || isModEnabled("service")) {
if (!empty($conf->global->BOM_SUB_BOM)) {
print $langs->trans("Product");
}
diff --git a/htdocs/categories/admin/categorie.php b/htdocs/categories/admin/categorie.php
index 02e6892b571..f7022477d97 100644
--- a/htdocs/categories/admin/categorie.php
+++ b/htdocs/categories/admin/categorie.php
@@ -67,7 +67,7 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) {
* View
*/
-$help_url = 'EN:Module Categories|FR:Module Catégories|ES:Módulo Categorías';
+$help_url = 'EN:Module Categories|FR:Module Catégories|ES:Módulo Categorías|DE:Modul_Kategorien';
$linkback = ''.$langs->trans("BackToModuleList").'';
llxHeader('', $langs->trans("Categories"), $help_url);
diff --git a/htdocs/categories/admin/categorie_extrafields.php b/htdocs/categories/admin/categorie_extrafields.php
index 7dbf31835ca..2a1879135d6 100644
--- a/htdocs/categories/admin/categorie_extrafields.php
+++ b/htdocs/categories/admin/categorie_extrafields.php
@@ -63,7 +63,7 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
$textobject = $langs->transnoentitiesnoconv("Categories");
-$help_url = 'EN:Module Categories|FR:Module Catégories|ES:Módulo Categorías';
+$help_url = 'EN:Module Categories|FR:Module Catégories|ES:Módulo Categorías|DE:Modul_Kategorien';
llxHeader('', $langs->trans("Categories"), $help_url);
diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php
index 512f25a67e2..69a27c5cff5 100644
--- a/htdocs/categories/traduction.php
+++ b/htdocs/categories/traduction.php
@@ -20,9 +20,9 @@
*/
/**
- * \file htdocs/product/traduction.php
- * \ingroup product
- * \brief Page of translation of products
+ * \file htdocs/categories/traduction.php
+ * \ingroup categories
+ * \brief Page of translation of categories
*/
require '../main.inc.php';
@@ -35,8 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
// Load translation files required by the page
$langs->loadLangs(array('categories', 'languages'));
-$id = GETPOST('id', 'int');
-$label = GETPOST('label', 'alpha');
+$id = GETPOST('id', 'int');
+$label = GETPOST('label', 'alpha');
$action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'alpha');
@@ -56,21 +56,23 @@ if ($result <= 0) {
$type = $object->type;
if (is_numeric($type)) {
- $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
+ $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
}
+
/*
* Actions
*/
+
$error = 0;
-// retour a l'affichage des traduction si annulation
+// return to translation view if cancelled
if ($cancel == $langs->trans("Cancel")) {
$action = '';
}
-// Validation de l'ajout
+// validation of addition
if ($action == 'vadd' &&
$cancel != $langs->trans("Cancel") &&
($user->rights->categorie->creer)) {
@@ -94,7 +96,7 @@ $cancel != $langs->trans("Cancel") &&
}
if (!$error) {
- // update de l'objet
+ // update the object
if ($forcelangprod == $current_lang) {
$object->label = $libelle;
$object->description = dol_htmlcleanlastbr($desc);
@@ -103,7 +105,7 @@ $cancel != $langs->trans("Cancel") &&
$object->multilangs[$forcelangprod]["description"] = dol_htmlcleanlastbr($desc);
}
- // sauvegarde en base
+ // save in base / sauvegarde en base
$res = $object->setMultiLangs($user);
if ($res < 0) {
$error++;
@@ -119,14 +121,14 @@ $cancel != $langs->trans("Cancel") &&
}
}
-// Validation de l'edition
+// validation of the edition
if ($action == 'vedit' &&
$cancel != $langs->trans("Cancel") &&
($user->rights->categorie->creer)) {
$object->fetch($id);
$current_lang = $langs->getDefaultLang();
- foreach ($object->multilangs as $key => $value) { // enregistrement des nouvelles valeurs dans l'objet
+ foreach ($object->multilangs as $key => $value) { // recording of new values in the object
$libelle = GETPOST('libelle-'.$key, 'alpha');
$desc = GETPOST('desc-'.$key);
@@ -164,7 +166,7 @@ $cancel != $langs->trans("Cancel") &&
* View
*/
-$form = new Form($db);
+$form = new Form($db);
$formadmin = new FormAdmin($db);
$formother = new FormOther($db);
@@ -223,10 +225,10 @@ print dol_get_fiche_end();
-
/*
* Action bar
*/
+
print "\n \n";
if ($action == '') {
@@ -243,7 +245,7 @@ print "\n \n";
if ($action == 'edit') {
- //WYSIWYG Editor
+ // WYSIWYG Editor
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
print ' |