FIX Replace conf by hidden conf editable by user
This commit is contained in:
parent
0c6499f193
commit
bd2f5ba037
@ -147,9 +147,6 @@ if ($action == 'other')
|
|||||||
$value = GETPOST('activate_useProdFournDesc', 'alpha');
|
$value = GETPOST('activate_useProdFournDesc', 'alpha');
|
||||||
$res = dolibarr_set_const($db, "PRODUIT_FOURN_TEXTS", $value, 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "PRODUIT_FOURN_TEXTS", $value, 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
//$value = GETPOST('activate_globalSearchOnExtrafield', 'alpha');
|
|
||||||
//$res = dolibarr_set_const($db, "PRODUIT_GLOBAL_SEARCH_ON_EXTRAFIELD", $value,'chaine',0,'',$conf->entity);
|
|
||||||
|
|
||||||
if ($value) {
|
if ($value) {
|
||||||
$sql_test = "SELECT count(desc_fourn) as cpt FROM ".MAIN_DB_PREFIX."product_fournisseur_price WHERE 1";
|
$sql_test = "SELECT count(desc_fourn) as cpt FROM ".MAIN_DB_PREFIX."product_fournisseur_price WHERE 1";
|
||||||
$resql = $db->query($sql_test);
|
$resql = $db->query($sql_test);
|
||||||
@ -679,12 +676,6 @@ if (! empty($conf->fournisseur->enabled))
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*print '<tr class="oddeven">';
|
|
||||||
print '<td>'.$langs->trans("GlobalSearchOnExtrafield").'</td>';
|
|
||||||
print '<td width="60" align="right">';
|
|
||||||
print $form->selectyesno("activate_globalSearchOnExtrafield", (! empty($conf->global->PRODUIT_GLOBAL_SEARCH_ON_EXTRAFIELD)?$conf->global->PRODUIT_GLOBAL_SEARCH_ON_EXTRAFIELD:0), 1);
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';*/
|
|
||||||
|
|
||||||
if (! empty($conf->global->PRODUCT_CANVAS_ABILITY))
|
if (! empty($conf->global->PRODUCT_CANVAS_ABILITY))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -136,10 +136,6 @@ $fieldstosearchall = array(
|
|||||||
'p.label'=>"ProductLabel",
|
'p.label'=>"ProductLabel",
|
||||||
'p.description'=>"Description",
|
'p.description'=>"Description",
|
||||||
"p.note"=>"Note",
|
"p.note"=>"Note",
|
||||||
"p.note_public"=>"NotePublic",
|
|
||||||
"p.url"=>"PublicUrl",
|
|
||||||
"p.accountancy_code_sell"=>"AccountancyCodeSell",
|
|
||||||
"p.accountancy_code_buy"=>"AccountancyCodeBuy",
|
|
||||||
|
|
||||||
);
|
);
|
||||||
// multilang
|
// multilang
|
||||||
@ -153,23 +149,8 @@ if (! empty($conf->barcode->enabled)) {
|
|||||||
$fieldstosearchall['p.barcode']='Gencod';
|
$fieldstosearchall['p.barcode']='Gencod';
|
||||||
$fieldstosearchall['pfp.barcode']='GencodBuyPrice';
|
$fieldstosearchall['pfp.barcode']='GencodBuyPrice';
|
||||||
}
|
}
|
||||||
|
// Personalized search criterias. Example: $conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS = 'p.ref=ProductRef;p.label=ProductLabel'
|
||||||
//global search on extrafields
|
if (! empty($conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS)) $fieldstosearchall=dolExplodeIntoArray($conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS);
|
||||||
if(!empty($conf->global->PRODUIT_GLOBAL_SEARCH_ON_EXTRAFIELD) && !empty($extralabels)) {
|
|
||||||
foreach($extralabels as $codeExtra => $labelExtra) {
|
|
||||||
$TExtraTypeNotHandled=array(
|
|
||||||
'boolean',
|
|
||||||
'select',
|
|
||||||
'sellist',
|
|
||||||
'radio',
|
|
||||||
'checkbox',
|
|
||||||
'chkbxlst',
|
|
||||||
'link',
|
|
||||||
'separate',
|
|
||||||
);
|
|
||||||
if(!in_array($extrafields->attribute_type[$codeExtra], $TExtraTypeNotHandled)) $fieldstosearchall['ef.' . $codeExtra] = $labelExtra;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($conf->global->PRODUIT_MULTIPRICES))
|
if (empty($conf->global->PRODUIT_MULTIPRICES))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user