2
0
forked from Wavyzz/dolibarr

use isModEnabled

This commit is contained in:
Frédéric France
2022-08-23 20:02:37 +02:00
parent 4bef0f5745
commit 582f6b196e
48 changed files with 81 additions and 81 deletions

View File

@@ -111,7 +111,7 @@ if ($action == 'set_default') {
if (isModEnabled('facture')) { if (isModEnabled('facture')) {
$res4 = dolibarr_set_const($db, 'ADHERENT_VAT_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_VAT_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity); $res4 = dolibarr_set_const($db, 'ADHERENT_VAT_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_VAT_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
$res5 = dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity); $res5 = dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
$res6 = dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity); $res6 = dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
} }
} }
@@ -269,7 +269,7 @@ if (isModEnabled('facture')) {
} }
print "</tr>\n"; print "</tr>\n";
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
print '<tr class="oddeven"><td>'.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS").'</td>'; print '<tr class="oddeven"><td>'.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS").'</td>';
print '<td>'; print '<td>';
$selected = (empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) ? '' : $conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS); $selected = (empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) ? '' : $conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);

View File

@@ -1773,7 +1773,7 @@ class Adherent extends CommonObject
if (!$error) { if (!$error) {
// Add line to draft invoice // Add line to draft invoice
$idprodsubscription = 0; $idprodsubscription = 0;
if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (isModEnabled("product") || !empty($conf->service->enabled))) { if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (isModEnabled("product") || isModEnabled("service"))) {
$idprodsubscription = $conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS; $idprodsubscription = $conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS;
} }

View File

@@ -278,7 +278,7 @@ if ($action == 'edit') {
include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
print dolJSToSetRandomPassword($constname, 'generate_token'.$constname); print dolJSToSetRandomPassword($constname, 'generate_token'.$constname);
} elseif ($val['type'] == 'product') { } elseif ($val['type'] == 'product') {
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
$selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname); $selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname);
$form->select_produits($selected, $constname, '', 0); $form->select_produits($selected, $constname, '', 0);
} }

View File

@@ -62,7 +62,7 @@ $conditions = array(
'NOTE_PUBLIC' => 1, 'NOTE_PUBLIC' => 1,
'NOTE_PRIVATE' => 1, 'NOTE_PRIVATE' => 1,
'SOCIETE' => 1, 'SOCIETE' => 1,
'PRODUCTDESC' => (isModEnabled("product") || !empty($conf->service->enabled)), 'PRODUCTDESC' => (isModEnabled("product") || isModEnabled("service")),
'DETAILS' => (isModEnabled('facture') || isModEnabled("propal") || !empty($conf->commande->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)), 'DETAILS' => (isModEnabled('facture') || isModEnabled("propal") || !empty($conf->commande->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)),
'USERSIGN' => 1, 'USERSIGN' => 1,
'MAILING' => !empty($conf->mailing->enabled), 'MAILING' => !empty($conf->mailing->enabled),

View File

@@ -545,7 +545,7 @@ if ($action == 'edit') {
include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
print dolJSToSetRandomPassword($constname, 'generate_token'.$constname); print dolJSToSetRandomPassword($constname, 'generate_token'.$constname);
} elseif ($val['type'] == 'product') { } elseif ($val['type'] == 'product') {
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
$selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname); $selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname);
$form->select_produits($selected, $constname, '', 0); $form->select_produits($selected, $constname, '', 0);
} }

View File

@@ -343,7 +343,7 @@ if ($action == 'edit') {
include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
print dolJSToSetRandomPassword($constname, 'generate_token'.$constname); print dolJSToSetRandomPassword($constname, 'generate_token'.$constname);
} elseif ($val['type'] == 'product') { } elseif ($val['type'] == 'product') {
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
$selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname); $selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname);
$form->select_produits($selected, $constname, '', 0); $form->select_produits($selected, $constname, '', 0);
} }

View File

@@ -524,7 +524,7 @@ if ($action == 'edit') {
include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
print dolJSToSetRandomPassword($constname, 'generate_token'.$constname); print dolJSToSetRandomPassword($constname, 'generate_token'.$constname);
} elseif ($val['type'] == 'product') { } elseif ($val['type'] == 'product') {
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
$selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname); $selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname);
$form->select_produits($selected, $constname, '', 0); $form->select_produits($selected, $constname, '', 0);
} }

View File

@@ -87,7 +87,7 @@ $coldisplay++;
print '<td class="bordertop nobottom linecoldescription minwidth500imp">'; print '<td class="bordertop nobottom linecoldescription minwidth500imp">';
// Predefined product/service // Predefined product/service
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
if (!empty($conf->global->BOM_SUB_BOM)) { if (!empty($conf->global->BOM_SUB_BOM)) {
print $langs->trans("Product"); print $langs->trans("Product");
} }

View File

@@ -2814,7 +2814,7 @@ if ($action == 'create') {
} }
// Create an intervention // Create an intervention
if (!empty($conf->service->enabled) && !empty($conf->ficheinter->enabled) && $object->statut == Propal::STATUS_SIGNED) { if (isModEnabled("service") && !empty($conf->ficheinter->enabled) && $object->statut == Propal::STATUS_SIGNED) {
if ($usercancreateintervention) { if ($usercancreateintervention) {
$langs->load("interventions"); $langs->load("interventions");
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("AddIntervention").'</a>'; print '<a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("AddIntervention").'</a>';

View File

@@ -62,7 +62,7 @@ class box_produits extends ModeleBoxes
$this->db = $db; $this->db = $db;
$listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
$tmpentry = array('enabled'=>(isModEnabled("product") || !empty($conf->service->enabled)), 'perms'=>(!empty($user->rights->produit->lire) || !empty($user->rights->service->lire)), 'module'=>'product|service'); $tmpentry = array('enabled'=>(isModEnabled("product") || isModEnabled("service")), 'perms'=>(!empty($user->rights->produit->lire) || !empty($user->rights->service->lire)), 'module'=>'product|service');
$showmode = isVisibleToUserType(($user->socid > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal); $showmode = isVisibleToUserType(($user->socid > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal);
$this->hidden = ($showmode != 1); $this->hidden = ($showmode != 1);
} }

View File

@@ -64,7 +64,7 @@ class box_produits_alerte_stock extends ModeleBoxes
$this->db = $db; $this->db = $db;
$listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
$tmpentry = array('enabled'=>((isModEnabled("product") || !empty($conf->service->enabled)) && !empty($conf->stock->enabled)), 'perms'=>!empty($user->rights->stock->lire), 'module'=>'product|service|stock'); $tmpentry = array('enabled'=>((isModEnabled("product") || isModEnabled("service")) && !empty($conf->stock->enabled)), 'perms'=>!empty($user->rights->stock->lire), 'module'=>'product|service|stock');
$showmode = isVisibleToUserType(($user->socid > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal); $showmode = isVisibleToUserType(($user->socid > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal);
$this->hidden = ($showmode != 1); $this->hidden = ($showmode != 1);
} }

View File

@@ -1104,7 +1104,7 @@ class Form
global $langs, $conf; global $langs, $conf;
// If product & services are enabled or both disabled. // If product & services are enabled or both disabled.
if ($forceall == 1 || (empty($forceall) && isModEnabled("product") && !empty($conf->service->enabled)) if ($forceall == 1 || (empty($forceall) && isModEnabled("product") && isModEnabled("service"))
|| (empty($forceall) && empty($conf->product->enabled) && empty($conf->service->enabled))) { || (empty($forceall) && empty($conf->product->enabled) && empty($conf->service->enabled))) {
if (empty($hidetext)) { if (empty($hidetext)) {
print $langs->trans("Type").': '; print $langs->trans("Type").': ';
@@ -1134,7 +1134,7 @@ class Form
print ajax_combobox('select_'.$htmlname); print ajax_combobox('select_'.$htmlname);
//if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); //if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
} }
if ((empty($forceall) && empty($conf->product->enabled) && !empty($conf->service->enabled)) || $forceall == 3) { if ((empty($forceall) && empty($conf->product->enabled) && isModEnabled("service")) || $forceall == 3) {
print $langs->trans("Service"); print $langs->trans("Service");
print '<input type="hidden" name="'.$htmlname.'" value="1">'; print '<input type="hidden" name="'.$htmlname.'" value="1">';
} }
@@ -2278,10 +2278,10 @@ class Form
$ajaxoptions = array(); $ajaxoptions = array();
} }
if (strval($filtertype) === '' && (isModEnabled("product") || !empty($conf->service->enabled))) { if (strval($filtertype) === '' && (isModEnabled("product") || isModEnabled("service"))) {
if (isModEnabled("product") && empty($conf->service->enabled)) { if (isModEnabled("product") && empty($conf->service->enabled)) {
$filtertype = '0'; $filtertype = '0';
} elseif (empty($conf->product->enabled) && !empty($conf->service->enabled)) { } elseif (empty($conf->product->enabled) && isModEnabled("service")) {
$filtertype = '1'; $filtertype = '1';
} }
} }

View File

@@ -80,7 +80,7 @@ class FormBarCode
} }
// We check if barcode is already selected by default // We check if barcode is already selected by default
if (((isModEnabled("product") || !empty($conf->service->enabled)) && $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE == $code_id) || if (((isModEnabled("product") || isModEnabled("service")) && $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE == $code_id) ||
(isModEnabled("societe") && $conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY == $code_id)) { (isModEnabled("societe") && $conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY == $code_id)) {
$disable = 'disabled'; $disable = 'disabled';
} }

View File

@@ -270,7 +270,7 @@ class FormMargin
print '</tr>'; print '</tr>';
} }
if (!empty($conf->service->enabled)) { if (isModEnabled("service")) {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>' . $langs->trans('MarginOnServices') . '</td>'; print '<td>' . $langs->trans('MarginOnServices') . '</td>';
print '<td class="right">' . price($marginInfo['pv_services']) . '</td>'; print '<td class="right">' . price($marginInfo['pv_services']) . '</td>';
@@ -285,7 +285,7 @@ class FormMargin
print '</tr>'; print '</tr>';
} }
if (isModEnabled("product") && !empty($conf->service->enabled)) { if (isModEnabled("product") && isModEnabled("service")) {
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td>' . $langs->trans('TotalMargin') . '</td>'; print '<td>' . $langs->trans('TotalMargin') . '</td>';
print '<td class="right">' . price($marginInfo['pv_total']) . '</td>'; print '<td class="right">' . price($marginInfo['pv_total']) . '</td>';

View File

@@ -851,7 +851,7 @@ class FormSetupItem
} elseif ($this->type == 'securekey') { } elseif ($this->type == 'securekey') {
$out.= $this->generateInputFieldSecureKey(); $out.= $this->generateInputFieldSecureKey();
} elseif ($this->type == 'product') { } elseif ($this->type == 'product') {
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
$selected = (empty($this->fieldValue) ? '' : $this->fieldValue); $selected = (empty($this->fieldValue) ? '' : $this->fieldValue);
$out.= $this->form->select_produits($selected, $this->confKey, '', 0, 0, 1, 2, '', 0, array(), 0, '1', 0, $this->cssClass, 0, '', null, 1); $out.= $this->form->select_produits($selected, $this->confKey, '', 0, 0, 1, 2, '', 0, array(), 0, '1', 0, $this->cssClass, 0, '', null, 1);
} }

View File

@@ -2923,7 +2923,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
} }
if (isModEnabled("product")) { if (isModEnabled("product")) {
$original_file = $conf->product->multidir_output[$entity].'/'.$original_file; $original_file = $conf->product->multidir_output[$entity].'/'.$original_file;
} elseif (!empty($conf->service->enabled)) { } elseif (isModEnabled("service")) {
$original_file = $conf->service->multidir_output[$entity].'/'.$original_file; $original_file = $conf->service->multidir_output[$entity].'/'.$original_file;
} }
} elseif ($modulepart == 'product_batch' || $modulepart == 'produitlot') { } elseif ($modulepart == 'product_batch' || $modulepart == 'produitlot') {

View File

@@ -174,7 +174,7 @@ function product_prepare_head($object)
if (isModEnabled("product") && ($object->type == Product::TYPE_PRODUCT)) { if (isModEnabled("product") && ($object->type == Product::TYPE_PRODUCT)) {
$upload_dir = $conf->product->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref); $upload_dir = $conf->product->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
} }
if (!empty($conf->service->enabled) && ($object->type == Product::TYPE_SERVICE)) { if (isModEnabled("service") && ($object->type == Product::TYPE_SERVICE)) {
$upload_dir = $conf->service->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref); $upload_dir = $conf->service->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
} }
$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
@@ -182,7 +182,7 @@ function product_prepare_head($object)
if (isModEnabled("product") && ($object->type == Product::TYPE_PRODUCT)) { if (isModEnabled("product") && ($object->type == Product::TYPE_PRODUCT)) {
$upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir($object->id, 2, 0, 0, $object, 'product').$object->id.'/photos'; $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir($object->id, 2, 0, 0, $object, 'product').$object->id.'/photos';
} }
if (!empty($conf->service->enabled) && ($object->type == Product::TYPE_SERVICE)) { if (isModEnabled("service") && ($object->type == Product::TYPE_SERVICE)) {
$upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir($object->id, 2, 0, 0, $object, 'product').$object->id.'/photos'; $upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir($object->id, 2, 0, 0, $object, 'product').$object->id.'/photos';
} }
$nbFiles += count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); $nbFiles += count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));

View File

@@ -1368,7 +1368,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
// For the moment, we manage this with hard coded exception // For the moment, we manage this with hard coded exception
//print "Remove box ".$file.'<br>'; //print "Remove box ".$file.'<br>';
if ($file == 'box_graph_product_distribution.php') { if ($file == 'box_graph_product_distribution.php') {
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
dol_syslog("We discard deleting module ".$file." because another module still active requires it."); dol_syslog("We discard deleting module ".$file." because another module still active requires it.");
continue; continue;
} }

View File

@@ -127,7 +127,7 @@ class modCategorie extends DolibarrModules
$this->export_permission[$r] = array(array("categorie", "lire")); $this->export_permission[$r] = array(array("categorie", "lire"));
$typeexample = ""; $typeexample = "";
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
$typeexample .= ($typeexample ? " / " : "")."0=Product-Service"; $typeexample .= ($typeexample ? " / " : "")."0=Product-Service";
} }
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) {

View File

@@ -817,13 +817,13 @@ class pdf_azur extends ModelePDFPropales
if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) {
if (isModEnabled("product")) { if (isModEnabled("product")) {
$filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos"; $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos";
} elseif (!empty($conf->service->enabled)) { } elseif (isModEnabled("service")) {
$filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos"; $filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos";
} }
} else { } else {
if (isModEnabled("product")) { if (isModEnabled("product")) {
$filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product'); $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product');
} elseif (!empty($conf->service->enabled)) { } elseif (isModEnabled("service")) {
$filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product'); $filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product');
} }
} }

View File

@@ -942,13 +942,13 @@ class pdf_cyan extends ModelePDFPropales
if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) {
if (isModEnabled("product")) { if (isModEnabled("product")) {
$filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos"; $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos";
} elseif (!empty($conf->service->enabled)) { } elseif (isModEnabled("service")) {
$filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos"; $filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos";
} }
} else { } else {
if (isModEnabled("product")) { if (isModEnabled("product")) {
$filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product'); $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product');
} elseif (!empty($conf->service->enabled)) { } elseif (isModEnabled("service")) {
$filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product'); $filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product');
} }
} }

View File

@@ -193,7 +193,7 @@ if ($nolinesbefore) {
// Free line // Free line
echo '<span class="prod_entry_mode_free">'; echo '<span class="prod_entry_mode_free">';
// Show radio free line // Show radio free line
if ($forceall >= 0 && (isModEnabled("product") || !empty($conf->service->enabled))) { if ($forceall >= 0 && (isModEnabled("product") || isModEnabled("service"))) {
echo '<label for="prod_entry_mode_free">'; echo '<label for="prod_entry_mode_free">';
echo '<input type="radio" class="prod_entry_mode_free" name="prod_entry_mode" id="prod_entry_mode_free" value="free"'; echo '<input type="radio" class="prod_entry_mode_free" name="prod_entry_mode" id="prod_entry_mode_free" value="free"';
//echo (GETPOST('prod_entry_mode')=='free' ? ' checked' : ((empty($forceall) && (empty($conf->product->enabled) || empty($conf->service->enabled)))?' checked':'') ); //echo (GETPOST('prod_entry_mode')=='free' ? ' checked' : ((empty($forceall) && (empty($conf->product->enabled) || empty($conf->service->enabled)))?' checked':'') );
@@ -219,7 +219,7 @@ if ($nolinesbefore) {
echo '</span>'; echo '</span>';
} }
// Predefined product/service // Predefined product/service
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
if ($forceall >= 0 && $freelines) { if ($forceall >= 0 && $freelines) {
echo '<br><span class="prod_entry_mode_predef paddingtop">'; echo '<br><span class="prod_entry_mode_predef paddingtop">';
} else { } else {
@@ -232,7 +232,7 @@ if ($nolinesbefore) {
if (empty($senderissupplier)) { if (empty($senderissupplier)) {
if (isModEnabled("product") && empty($conf->service->enabled)) { if (isModEnabled("product") && empty($conf->service->enabled)) {
$labelforradio = $langs->trans('PredefinedProductsToSell'); $labelforradio = $langs->trans('PredefinedProductsToSell');
} elseif ((empty($conf->product->enabled) && !empty($conf->service->enabled)) || ($object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS))) { } elseif ((empty($conf->product->enabled) && isModEnabled("service")) || ($object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS))) {
$labelforradio = $langs->trans('PredefinedServicesToSell'); $labelforradio = $langs->trans('PredefinedServicesToSell');
} else { } else {
$labelforradio = $langs->trans('PredefinedProductsAndServicesToSell'); $labelforradio = $langs->trans('PredefinedProductsAndServicesToSell');
@@ -240,7 +240,7 @@ if ($nolinesbefore) {
} else { } else {
if (isModEnabled("product") && empty($conf->service->enabled)) { if (isModEnabled("product") && empty($conf->service->enabled)) {
$labelforradio = $langs->trans('PredefinedProductsToPurchase'); $labelforradio = $langs->trans('PredefinedProductsToPurchase');
} elseif (empty($conf->product->enabled) && !empty($conf->service->enabled)) { } elseif (empty($conf->product->enabled) && isModEnabled("service")) {
$labelforradio = $langs->trans('PredefinedServicesToPurchase'); $labelforradio = $langs->trans('PredefinedServicesToPurchase');
} else { } else {
$labelforradio = $langs->trans('PredefinedProductsAndServicesToPurchase'); $labelforradio = $langs->trans('PredefinedProductsAndServicesToPurchase');
@@ -336,7 +336,7 @@ if ($nolinesbefore) {
print $hookmanager->resPrint; print $hookmanager->resPrint;
} }
} }
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
echo '<br>'; echo '<br>';
if (!empty($conf->variants->enabled)) { if (!empty($conf->variants->enabled)) {
echo '<div id="attributes_box"></div>'; echo '<div id="attributes_box"></div>';
@@ -356,7 +356,7 @@ if ($nolinesbefore) {
$doleditor = new DolEditor('dp_desc', GETPOST('dp_desc', 'restricthtml'), '', (empty($conf->global->MAIN_DOLEDITOR_HEIGHT) ? 100 : $conf->global->MAIN_DOLEDITOR_HEIGHT), $toolbarname, '', false, true, $enabled, $nbrows, '98%'); $doleditor = new DolEditor('dp_desc', GETPOST('dp_desc', 'restricthtml'), '', (empty($conf->global->MAIN_DOLEDITOR_HEIGHT) ? 100 : $conf->global->MAIN_DOLEDITOR_HEIGHT), $toolbarname, '', false, true, $enabled, $nbrows, '98%');
$doleditor->Create(); $doleditor->Create();
// Show autofill date for recurring invoices // Show autofill date for recurring invoices
if (!empty($conf->service->enabled) && ($object->element == 'facturerec' || $object->element == 'invoice_supplier_rec')) { if (isModEnabled("service") && ($object->element == 'facturerec' || $object->element == 'invoice_supplier_rec')) {
echo '<div class="divlinefordates"><br>'; echo '<div class="divlinefordates"><br>';
echo $langs->trans('AutoFillDateFrom').' '; echo $langs->trans('AutoFillDateFrom').' ';
if (!empty($conf->global->INVOICE_REC_DATE_TO_YES)) { if (!empty($conf->global->INVOICE_REC_DATE_TO_YES)) {
@@ -446,7 +446,7 @@ if ($nolinesbefore) {
?> ?>
<td class="nobottom margininfos linecolmargin right"> <td class="nobottom margininfos linecolmargin right">
<!-- For predef product --> <!-- For predef product -->
<?php if (isModEnabled("product") || !empty($conf->service->enabled)) { ?> <?php if (isModEnabled("product") || isModEnabled("service")) { ?>
<select id="fournprice_predef" name="fournprice_predef" class="flat minwidth75imp maxwidth150" style="display: none;"></select> <select id="fournprice_predef" name="fournprice_predef" class="flat minwidth75imp maxwidth150" style="display: none;"></select>
<?php } ?> <?php } ?>
<!-- For free product --> <!-- For free product -->
@@ -471,7 +471,7 @@ if ($nolinesbefore) {
</tr> </tr>
<?php <?php
if ((!empty($conf->service->enabled) || ($object->element == 'contrat')) && $dateSelector && GETPOST('type') != '0') { // We show date field if required if ((isModEnabled("service") || ($object->element == 'contrat')) && $dateSelector && GETPOST('type') != '0') { // We show date field if required
print '<tr id="trlinefordates" class="oddeven">'."\n"; print '<tr id="trlinefordates" class="oddeven">'."\n";
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
print '<td></td>'; print '<td></td>';

View File

@@ -176,7 +176,7 @@ $coldisplay++;
} }
// Show autofill date for recuring invoices // Show autofill date for recuring invoices
if (!empty($conf->service->enabled) && $line->product_type == 1 && ($line->element == 'facturedetrec' || $line->element == 'invoice_supplier_det_rec')) { if (isModEnabled("service") && $line->product_type == 1 && ($line->element == 'facturedetrec' || $line->element == 'invoice_supplier_det_rec')) {
if ($line->element == 'invoice_supplier_det_rec') { if ($line->element == 'invoice_supplier_det_rec') {
$line->date_start_fill = $line->date_start; $line->date_start_fill = $line->date_start;
$line->date_end_fill = $line->date_end; $line->date_end_fill = $line->date_end;
@@ -290,7 +290,7 @@ $coldisplay++;
?> ?>
<td class="margininfos right"> <td class="margininfos right">
<!-- For predef product --> <!-- For predef product -->
<?php if (isModEnabled("product") || !empty($conf->service->enabled)) { ?> <?php if (isModEnabled("product") || isModEnabled("service")) { ?>
<select id="fournprice_predef" name="fournprice_predef" class="flat minwidth75imp right" style="display: none;"></select> <select id="fournprice_predef" name="fournprice_predef" class="flat minwidth75imp right" style="display: none;"></select>
<?php } ?> <?php } ?>
<!-- For free product --> <!-- For free product -->
@@ -330,7 +330,7 @@ $coldisplay++;
</td> </td>
</tr> </tr>
<?php if (!empty($conf->service->enabled) && $line->product_type == 1 && $dateSelector) { ?> <?php if (isModEnabled("service") && $line->product_type == 1 && $dateSelector) { ?>
<tr id="service_duration_area" class="treditedlinefordate"> <tr id="service_duration_area" class="treditedlinefordate">
<?php if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?> <?php if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
<td class="linecolnum center"></td> <td class="linecolnum center"></td>

View File

@@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/sendings.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/sendings.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
} }
if (!empty($conf->expedition_bon->enabled)) { if (!empty($conf->expedition_bon->enabled)) {

View File

@@ -309,9 +309,9 @@ llxHeader($moreheadcss.$moreheadjs, $langs->trans("ECMArea"), '', '', '', '', $m
$rowspan = 0; $rowspan = 0;
$sectionauto = array(); $sectionauto = array();
if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) { if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
$langs->load("products"); $langs->load("products");
$rowspan++; $sectionauto[] = array('position'=>10, 'level'=>1, 'module'=>'product', 'test'=>(isModEnabled("product") || !empty($conf->service->enabled)), 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts")); $rowspan++; $sectionauto[] = array('position'=>10, 'level'=>1, 'module'=>'product', 'test'=>(isModEnabled("product") || isModEnabled("service")), 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts"));
} }
if (isModEnabled("societe")) { if (isModEnabled("societe")) {
$rowspan++; $sectionauto[] = array('position'=>20, 'level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ThirdParties"))); $rowspan++; $sectionauto[] = array('position'=>20, 'level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ThirdParties")));

View File

@@ -113,8 +113,8 @@ $userstatic = new User($db);
// Ajout rubriques automatiques // Ajout rubriques automatiques
$rowspan = 0; $rowspan = 0;
$sectionauto = array(); $sectionauto = array();
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
$langs->load("products"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'product', 'test'=>(isModEnabled("product") || !empty($conf->service->enabled)), 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts")); $langs->load("products"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'product', 'test'=>(isModEnabled("product") || isModEnabled("service")), 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts"));
} }
if (isModEnabled("societe")) { if (isModEnabled("societe")) {
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ThirdParties"))); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ThirdParties")));

View File

@@ -47,7 +47,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php';
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
} }
if (isModEnabled("propal")) { if (isModEnabled("propal")) {

View File

@@ -43,7 +43,7 @@ if (!empty($conf->stock->enabled)) {
if (isModEnabled("propal")) { if (isModEnabled("propal")) {
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
} }
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
} }

View File

@@ -514,7 +514,7 @@ if ($object->id > 0) {
/* /*
* List of products * List of products
*/ */
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
$langs->load("products"); $langs->load("products");
//Query from product/liste.php //Query from product/liste.php
$sql = 'SELECT p.rowid, p.ref, p.label, p.fk_product_type, p.entity, p.tosell as status, p.tobuy as status_buy, p.tobatch as status_batch,'; $sql = 'SELECT p.rowid, p.ref, p.label, p.fk_product_type, p.entity, p.tosell as status, p.tobuy as status_buy, p.tobatch as status_batch,';

View File

@@ -121,7 +121,7 @@ $isInEEC = isInEEC($mysoc);
$arrayfields = array( $arrayfields = array(
'i.ref' => array('label'=>$langs->trans("Ref"), 'checked'=>1), 'i.ref' => array('label'=>$langs->trans("Ref"), 'checked'=>1),
'i.label' => array('label'=>$langs->trans("Label"), 'checked'=>1), 'i.label' => array('label'=>$langs->trans("Label"), 'checked'=>1),
'i.fk_product_type'=>array('label'=>$langs->trans("Type"), 'checked'=>0, 'enabled'=>(!empty($conf->produit->enabled) && !empty($conf->service->enabled))), 'i.fk_product_type'=>array('label'=>$langs->trans("Type"), 'checked'=>0, 'enabled'=>(!empty($conf->produit->enabled) && isModEnabled("service"))),
); );
/* /*
// Extra fields // Extra fields

View File

@@ -2521,7 +2521,7 @@ function printDropdownQuickadd()
"title" => "NewService@products", "title" => "NewService@products",
"name" => "Service@products", "name" => "Service@products",
"picto" => "object_service", "picto" => "object_service",
"activation" => !empty($conf->service->enabled) && $user->hasRight("service", "write"), // vs hooking "activation" => isModEnabled("service") && $user->hasRight("service", "write"), // vs hooking
"position" => 110, "position" => 110,
), ),
array( array(

View File

@@ -138,7 +138,7 @@ if ($id > 0 || !empty($ref)) {
} }
if (isModEnabled("product")) { if (isModEnabled("product")) {
$upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product').dol_sanitizeFileName($object->ref); $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product').dol_sanitizeFileName($object->ref);
} elseif (!empty($conf->service->enabled)) { } elseif (isModEnabled("service")) {
$upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product').dol_sanitizeFileName($object->ref); $upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product').dol_sanitizeFileName($object->ref);
} }
@@ -2298,7 +2298,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<table class="border tableforfield centpercent">'; print '<table class="border tableforfield centpercent">';
// Type // Type
if (isModEnabled("product") && !empty($conf->service->enabled)) { if (isModEnabled("product") && isModEnabled("service")) {
$typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service"); $typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service");
print '<tr><td class="titlefield">'; print '<tr><td class="titlefield">';
print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat) : $langs->trans('Type'); print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat) : $langs->trans('Type');

View File

@@ -231,7 +231,7 @@ if ($id > 0 || !empty($ref)) {
print '<table class="border centpercent tableforfield">'; print '<table class="border centpercent tableforfield">';
// Type // Type
if (isModEnabled("product") && !empty($conf->service->enabled)) { if (isModEnabled("product") && isModEnabled("service")) {
$typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service"); $typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service");
print '<tr><td class="titlefield">'; print '<tr><td class="titlefield">';
print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat) : $langs->trans('Type'); print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat) : $langs->trans('Type');

View File

@@ -81,7 +81,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled("product")) { if (isModEnabled("product")) {
$upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'product'); $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'product');
} elseif (!empty($conf->service->enabled)) { } elseif (isModEnabled("service")) {
$upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'product'); $upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'product');
} }

View File

@@ -397,7 +397,7 @@ if ($id > 0 || $ref) {
print '<table class="border tableforfield centpercent">'; print '<table class="border tableforfield centpercent">';
// Type // Type
if (isModEnabled("product") && !empty($conf->service->enabled)) { if (isModEnabled("product") && isModEnabled("service")) {
$typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service"); $typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service");
print '<tr><td class="">'; print '<tr><td class="">';
print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, 0, $typeformat) : $langs->trans('Type'); print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, 0, $typeformat) : $langs->trans('Type');

View File

@@ -90,7 +90,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // This may be useless due to the global search combo if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // This may be useless due to the global search combo
// Search contract // Search contract
if ((isModEnabled("product") || !empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire)) { if ((isModEnabled("product") || isModEnabled("service")) && ($user->rights->produit->lire || $user->rights->service->lire)) {
$listofsearchfields['search_product'] = array('text'=>'ProductOrService'); $listofsearchfields['search_product'] = array('text'=>'ProductOrService');
} }
@@ -123,7 +123,7 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // This may be
/* /*
* Number of products and/or services * Number of products and/or services
*/ */
if ((isModEnabled("product") || !empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire)) { if ((isModEnabled("product") || isModEnabled("service")) && ($user->rights->produit->lire || $user->rights->service->lire)) {
$prodser = array(); $prodser = array();
$prodser[0][0] = $prodser[0][1] = $prodser[0][2] = $prodser[0][3] = 0; $prodser[0][0] = $prodser[0][1] = $prodser[0][2] = $prodser[0][3] = 0;
$prodser[0]['sell'] = 0; $prodser[0]['sell'] = 0;
@@ -190,7 +190,7 @@ if ((isModEnabled("product") || !empty($conf->service->enabled)) && ($user->righ
$dataseries[] = array($langs->transnoentitiesnoconv("ProductsOnPurchase"), round($SommeB)); $dataseries[] = array($langs->transnoentitiesnoconv("ProductsOnPurchase"), round($SommeB));
$dataseries[] = array($langs->transnoentitiesnoconv("ProductsNotOnSell"), round($SommeC)); $dataseries[] = array($langs->transnoentitiesnoconv("ProductsNotOnSell"), round($SommeC));
} }
if (!empty($conf->service->enabled)) { if (isModEnabled("service")) {
$dataseries[] = array($langs->transnoentitiesnoconv("ServicesOnSale"), round($SommeD)); $dataseries[] = array($langs->transnoentitiesnoconv("ServicesOnSale"), round($SommeD));
$dataseries[] = array($langs->transnoentitiesnoconv("ServicesOnPurchase"), round($SommeE)); $dataseries[] = array($langs->transnoentitiesnoconv("ServicesOnPurchase"), round($SommeE));
$dataseries[] = array($langs->transnoentitiesnoconv("ServicesNotOnSell"), round($SommeF)); $dataseries[] = array($langs->transnoentitiesnoconv("ServicesNotOnSell"), round($SommeF));
@@ -281,7 +281,7 @@ print '</div><div class="fichetwothirdright">';
/* /*
* Latest modified products * Latest modified products
*/ */
if ((isModEnabled("product") || !empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire)) { if ((isModEnabled("product") || isModEnabled("service")) && ($user->rights->produit->lire || $user->rights->service->lire)) {
$max = 15; $max = 15;
$sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.tosell, p.tobuy, p.tobatch, p.fk_price_expression,"; $sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.tosell, p.tobuy, p.tobatch, p.fk_price_expression,";
$sql .= " p.entity,"; $sql .= " p.entity,";
@@ -411,7 +411,7 @@ if (!empty($conf->global->MAIN_SHOW_PRODUCT_ACTIVITY_TRIM)) {
if (isModEnabled("product")) { if (isModEnabled("product")) {
activitytrim(0); activitytrim(0);
} }
if (!empty($conf->service->enabled)) { if (isModEnabled("service")) {
activitytrim(1); activitytrim(1);
} }
} }

View File

@@ -206,9 +206,9 @@ $arrayfields = array(
//'pfp.ref_fourn'=>array('label'=>$langs->trans("RefSupplier"), 'checked'=>1, 'enabled'=>(! empty($conf->barcode->enabled))), //'pfp.ref_fourn'=>array('label'=>$langs->trans("RefSupplier"), 'checked'=>1, 'enabled'=>(! empty($conf->barcode->enabled))),
'thumbnail'=>array('label'=>'Photo', 'checked'=>0, 'position'=>10), 'thumbnail'=>array('label'=>'Photo', 'checked'=>0, 'position'=>10),
'p.label'=>array('label'=>"Label", 'checked'=>1, 'position'=>10), 'p.label'=>array('label'=>"Label", 'checked'=>1, 'position'=>10),
'p.fk_product_type'=>array('label'=>"Type", 'checked'=>0, 'enabled'=>(isModEnabled("product") && !empty($conf->service->enabled)), 'position'=>11), 'p.fk_product_type'=>array('label'=>"Type", 'checked'=>0, 'enabled'=>(isModEnabled("product") && isModEnabled("service")), 'position'=>11),
'p.barcode'=>array('label'=>"Gencod", 'checked'=>1, 'enabled'=>(isModEnabled('barcode')), 'position'=>12), 'p.barcode'=>array('label'=>"Gencod", 'checked'=>1, 'enabled'=>(isModEnabled('barcode')), 'position'=>12),
'p.duration'=>array('label'=>"Duration", 'checked'=>($contextpage != 'productlist'), 'enabled'=>(!empty($conf->service->enabled) && (string) $type == '1'), 'position'=>13), 'p.duration'=>array('label'=>"Duration", 'checked'=>($contextpage != 'productlist'), 'enabled'=>(isModEnabled("service") && (string) $type == '1'), 'position'=>13),
'p.finished'=>array('label'=>"Nature", 'checked'=>0, 'enabled'=>(isModEnabled("product") && $type != '1'), 'position'=>19), 'p.finished'=>array('label'=>"Nature", 'checked'=>0, 'enabled'=>(isModEnabled("product") && $type != '1'), 'position'=>19),
'p.weight'=>array('label'=>'Weight', 'checked'=>0, 'enabled'=>(isModEnabled("product") && $type != '1'), 'position'=>20), 'p.weight'=>array('label'=>'Weight', 'checked'=>0, 'enabled'=>(isModEnabled("product") && $type != '1'), 'position'=>20),
'p.weight_units'=>array('label'=>'WeightUnits', 'checked'=>0, 'enabled'=>(isModEnabled("product") && $type != '1'), 'position'=>21), 'p.weight_units'=>array('label'=>'WeightUnits', 'checked'=>0, 'enabled'=>(isModEnabled("product") && $type != '1'), 'position'=>21),

View File

@@ -887,7 +887,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
$soc->fetch($socid); $soc->fetch($socid);
// Type // Type
if (isModEnabled("product") && !empty($conf->service->enabled)) { if (isModEnabled("product") && isModEnabled("service")) {
$typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service"); $typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service");
print '<tr><td class="">'; print '<tr><td class="">';
print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, 0, $typeformat) : $langs->trans('Type'); print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, 0, $typeformat) : $langs->trans('Type');
@@ -971,7 +971,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
} else { } else {
if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) { // using this option is a bug. kept for backward compatibility if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) { // using this option is a bug. kept for backward compatibility
// Type // Type
if (isModEnabled("product") && !empty($conf->service->enabled)) { if (isModEnabled("product") && isModEnabled("service")) {
$typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service"); $typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service");
print '<tr><td class="">'; print '<tr><td class="">';
print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, 0, $typeformat) : $langs->trans('Type'); print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, 0, $typeformat) : $langs->trans('Type');
@@ -986,7 +986,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
print '</tr>'; print '</tr>';
} else { } else {
// Type // Type
if (isModEnabled("product") && !empty($conf->service->enabled)) { if (isModEnabled("product") && isModEnabled("service")) {
$typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service"); $typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service");
print '<tr><td class="">'; print '<tr><td class="">';
print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, 0, $typeformat) : $langs->trans('Type'); print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, 0, $typeformat) : $langs->trans('Type');

View File

@@ -369,7 +369,7 @@ if ($resql) {
print '<input class="flat" type="text" name="snom" size="8" value="'.$snom.'">'; print '<input class="flat" type="text" name="snom" size="8" value="'.$snom.'">';
print '</td>'; print '</td>';
// Duration // Duration
if (!empty($conf->service->enabled) && $type == 1) { if (isModEnabled("service") && $type == 1) {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '&nbsp;'; print '&nbsp;';
print '</td>'; print '</td>';
@@ -400,7 +400,7 @@ if ($resql) {
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", '', $param, "", $sortfield, $sortorder); print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", '', $param, "", $sortfield, $sortorder);
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", '', $param, "", $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", '', $param, "", $sortfield, $sortorder);
if (!empty($conf->service->enabled) && $type == 1) { if (isModEnabled("service") && $type == 1) {
print_liste_field_titre("Duration", $_SERVER["PHP_SELF"], "p.duration", '', $param, "", $sortfield, $sortorder, 'center '); print_liste_field_titre("Duration", $_SERVER["PHP_SELF"], "p.duration", '', $param, "", $sortfield, $sortorder, 'center ');
} }
print_liste_field_titre("StockLimit", $_SERVER["PHP_SELF"], "p.seuil_stock_alerte", '', $param, "", $sortfield, $sortorder, 'right '); print_liste_field_titre("StockLimit", $_SERVER["PHP_SELF"], "p.seuil_stock_alerte", '', $param, "", $sortfield, $sortorder, 'right ');
@@ -445,7 +445,7 @@ if ($resql) {
print '</td>'; print '</td>';
print '<td>'.$product->label.'</td>'; print '<td>'.$product->label.'</td>';
if (!empty($conf->service->enabled) && $type == 1) { if (isModEnabled("service") && $type == 1) {
print '<td class="center">'; print '<td class="center">';
if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) { if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) {
print $regs[1].' '.$langs->trans("DurationYear"); print $regs[1].' '.$langs->trans("DurationYear");

View File

@@ -511,7 +511,7 @@ print '</td>';
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat" type="text" name="snom" size="8" value="'.$snom.'">'; print '<input class="flat" type="text" name="snom" size="8" value="'.$snom.'">';
print '</td>'; print '</td>';
if (!empty($conf->service->enabled) && $type == 1) { if (isModEnabled("service") && $type == 1) {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '&nbsp;'; print '&nbsp;';
print '</td>'; print '</td>';
@@ -564,7 +564,7 @@ $totalarray['nbfield'] = 0;
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", '', $param, "", $sortfield, $sortorder); print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", '', $param, "", $sortfield, $sortorder);
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", '', $param, "", $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", '', $param, "", $sortfield, $sortorder);
if (!empty($conf->service->enabled) && $type == 1) { if (isModEnabled("service") && $type == 1) {
print_liste_field_titre("Duration", $_SERVER["PHP_SELF"], "p.duration", '', $param, "", $sortfield, $sortorder, 'center '); print_liste_field_titre("Duration", $_SERVER["PHP_SELF"], "p.duration", '', $param, "", $sortfield, $sortorder, 'center ');
} }
print_liste_field_titre("Warehouse", $_SERVER["PHP_SELF"], "e.ref", '', $param, "", $sortfield, $sortorder); print_liste_field_titre("Warehouse", $_SERVER["PHP_SELF"], "e.ref", '', $param, "", $sortfield, $sortorder);
@@ -648,7 +648,7 @@ while ($i < $imaxinloop) {
// Label // Label
print '<td>'.$objp->label.'</td>'; print '<td>'.$objp->label.'</td>';
if (!empty($conf->service->enabled) && $type == 1) { if (isModEnabled("service") && $type == 1) {
print '<td class="center">'; print '<td class="center">';
if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) { if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) {
print $regs[1].' '.$langs->trans("DurationYear"); print $regs[1].' '.$langs->trans("DurationYear");

View File

@@ -622,7 +622,7 @@ if ($id > 0 || $ref) {
print '<table class="border tableforfield centpercent">'; print '<table class="border tableforfield centpercent">';
// Type // Type
if (isModEnabled("product") && !empty($conf->service->enabled)) { if (isModEnabled("product") && isModEnabled("service")) {
$typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service"); $typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service");
print '<tr><td class="">'; print '<tr><td class="">';
print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, 0, $typeformat) : $langs->trans('Type'); print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, 0, $typeformat) : $langs->trans('Type');

View File

@@ -738,7 +738,7 @@ print '<tr class="liste_titre_filter">';
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre"><input class="flat" type="text" name="search_ref" size="8" value="'.dol_escape_htmltag($search_ref).'"></td>'; print '<td class="liste_titre"><input class="flat" type="text" name="search_ref" size="8" value="'.dol_escape_htmltag($search_ref).'"></td>';
print '<td class="liste_titre"><input class="flat" type="text" name="search_label" size="8" value="'.dol_escape_htmltag($search_label).'"></td>'; print '<td class="liste_titre"><input class="flat" type="text" name="search_label" size="8" value="'.dol_escape_htmltag($search_label).'"></td>';
if (!empty($conf->service->enabled) && $type == 1) { if (isModEnabled("service") && $type == 1) {
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
} }
print '<td class="liste_titre right">'.$form->textwithpicto($langs->trans('IncludeEmptyDesiredStock'), $langs->trans('IncludeProductWithUndefinedAlerts')).'&nbsp;<input type="checkbox" id="includeproductswithoutdesiredqty" name="includeproductswithoutdesiredqty" '.(!empty($includeproductswithoutdesiredqtychecked) ? $includeproductswithoutdesiredqtychecked : '').'></td>'; print '<td class="liste_titre right">'.$form->textwithpicto($langs->trans('IncludeEmptyDesiredStock'), $langs->trans('IncludeProductWithUndefinedAlerts')).'&nbsp;<input type="checkbox" id="includeproductswithoutdesiredqty" name="includeproductswithoutdesiredqty" '.(!empty($includeproductswithoutdesiredqtychecked) ? $includeproductswithoutdesiredqtychecked : '').'></td>';
@@ -769,7 +769,7 @@ print '<tr class="liste_titre">';
print_liste_field_titre('<input type="checkbox" onClick="toggle(this)" />', $_SERVER["PHP_SELF"], ''); print_liste_field_titre('<input type="checkbox" onClick="toggle(this)" />', $_SERVER["PHP_SELF"], '');
print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'p.ref', $param, '', '', $sortfield, $sortorder); print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'p.ref', $param, '', '', $sortfield, $sortorder);
print_liste_field_titre('Label', $_SERVER["PHP_SELF"], 'p.label', $param, '', '', $sortfield, $sortorder); print_liste_field_titre('Label', $_SERVER["PHP_SELF"], 'p.label', $param, '', '', $sortfield, $sortorder);
if (!empty($conf->service->enabled) && $type == 1) { if (isModEnabled("service") && $type == 1) {
print_liste_field_titre('Duration', $_SERVER["PHP_SELF"], 'p.duration', $param, '', '', $sortfield, $sortorder, 'center '); print_liste_field_titre('Duration', $_SERVER["PHP_SELF"], 'p.duration', $param, '', '', $sortfield, $sortorder, 'center ');
} }
print_liste_field_titre('DesiredStock', $_SERVER["PHP_SELF"], 'p.desiredstock', $param, '', '', $sortfield, $sortorder, 'right '); print_liste_field_titre('DesiredStock', $_SERVER["PHP_SELF"], 'p.desiredstock', $param, '', '', $sortfield, $sortorder, 'right ');
@@ -899,7 +899,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
print '<input type="hidden" name="desc'.$i.'" value="'.dol_escape_htmltag($objp->description).'">'; // TODO Remove this and make a fetch to get description when creating order instead of a GETPOST print '<input type="hidden" name="desc'.$i.'" value="'.dol_escape_htmltag($objp->description).'">'; // TODO Remove this and make a fetch to get description when creating order instead of a GETPOST
print '</td>'; print '</td>';
if (!empty($conf->service->enabled) && $type == 1) { if (isModEnabled("service") && $type == 1) {
$regs = array(); $regs = array();
if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) { if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) {
$duration = $regs[1].' '.$langs->trans('DurationYear'); $duration = $regs[1].' '.$langs->trans('DurationYear');

View File

@@ -44,7 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php';
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
} }
if (isModEnabled("propal")) { if (isModEnabled("propal")) {

View File

@@ -33,7 +33,7 @@ if (!empty($conf->project->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
} }
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
} }

View File

@@ -263,7 +263,7 @@ print '<input type="number" name="TAKEPOS_NUM_TERMINALS" min="1" value="' . (emp
print "</td></tr>\n"; print "</td></tr>\n";
// Services // Services
if (!empty($conf->service->enabled)) { if (isModEnabled("service")) {
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $langs->trans("CashdeskShowServices"); print $langs->trans("CashdeskShowServices");
print '<td colspan="2">'; print '<td colspan="2">';

View File

@@ -195,7 +195,7 @@ if (!empty($conf->project->enabled)) {
if (!empty($conf->holiday->enabled) || !empty($conf->expensereport->enabled)) { if (!empty($conf->holiday->enabled) || !empty($conf->expensereport->enabled)) {
$tmparray['hrm/index.php?mainmenu=hrm&leftmenu='] = 'HRMArea'; // TODO Complete list with first level of menus $tmparray['hrm/index.php?mainmenu=hrm&leftmenu='] = 'HRMArea'; // TODO Complete list with first level of menus
} }
if (isModEnabled("product") || !empty($conf->service->enabled)) { if (isModEnabled("product") || isModEnabled("service")) {
$tmparray['product/index.php?mainmenu=products&leftmenu='] = 'ProductsAndServicesArea'; $tmparray['product/index.php?mainmenu=products&leftmenu='] = 'ProductsAndServicesArea';
} }
if (isModEnabled("propal") || !empty($conf->commande->enabled) || !empty($conf->ficheinter->enabled) || !empty($conf->contrat->enabled)) { if (isModEnabled("propal") || !empty($conf->commande->enabled) || !empty($conf->ficheinter->enabled) || !empty($conf->contrat->enabled)) {

View File

@@ -395,7 +395,7 @@ if (!empty($id) || !empty($ref)) {
print '<table class="border centpercent tableforfield">'; print '<table class="border centpercent tableforfield">';
// Type // Type
if (isModEnabled("product") && !empty($conf->service->enabled)) { if (isModEnabled("product") && isModEnabled("service")) {
$typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service"); $typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service");
print '<tr><td class="titlefieldcreate">'; print '<tr><td class="titlefieldcreate">';
print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat) : $langs->trans('Type'); print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat) : $langs->trans('Type');

View File

@@ -102,7 +102,7 @@ $webservices = array(
'user' => '', 'user' => '',
'thirdparty' => 'isModEnabled("societe")', 'thirdparty' => 'isModEnabled("societe")',
'contact' => 'isModEnabled("societe")', 'contact' => 'isModEnabled("societe")',
'productorservice' => '(isModEnabled("product") || !empty($conf->service->enabled))', 'productorservice' => '(isModEnabled("product") || isModEnabled("service"))',
'order' => '!empty($conf->commande->enabled)', 'order' => '!empty($conf->commande->enabled)',
'invoice' => 'isModEnabled("facture")', 'invoice' => 'isModEnabled("facture")',
'supplier_invoice' => '!empty($conf->fournisseur->enabled)', 'supplier_invoice' => '!empty($conf->fournisseur->enabled)',