Skip to content

Commit

Permalink
Merge branch 'develop' into fix_getrights_loadrights
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy authored Jan 13, 2025
2 parents 9535baf + 2ae2ddc commit 8b3c958
Show file tree
Hide file tree
Showing 214 changed files with 2,042 additions and 1,132 deletions.
648 changes: 177 additions & 471 deletions dev/build/phpstan/phpstan-baseline.neon

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dev/tools/codespell/codespell-ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ espace
methode
datee

# Some string found because part of a text the is html entities escaped into file
tre
activ

# Translation keys
addin
amountin
Expand Down
1 change: 1 addition & 0 deletions dev/tools/codespell/codespell-lines-ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,4 @@ print '<td class="right">'.$langs->trans("NbOfMembers").' <span class="opacityme
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.periode", "", $param, '', $sortfield, $sortorder, 'center ');
select#date_startday, select#date_startmonth, select#date_endday, select#date_endmonth, select#reday, select#remonth
select#date_startday, select#date_startmonth, select#date_endday, select#date_endmonth, select#reday, select#remonth,
$sql = "SELECT id_users, nom as name, id_sondage, reponses, tms, date_creation";
2 changes: 1 addition & 1 deletion dev/tools/phan/baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ return [
'htdocs/core/modules/facture/doc/pdf_sponge.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
'htdocs/core/modules/facture/modules_facture.php' => ['PhanPluginUnknownPropertyType'],
'htdocs/core/modules/fichinter/mod_pacific.php' => ['PhanPossiblyUndeclaredVariable'],
'htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
'htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php' => ['PhanUndeclaredProperty'],
'htdocs/core/modules/hrm/mod_evaluation_advanced.php' => ['PhanUndeclaredProperty'],
'htdocs/core/modules/import/import_csv.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'],
'htdocs/core/modules/import/import_xlsx.modules.php' => ['PhanTypeMismatchProperty'],
Expand Down
11 changes: 6 additions & 5 deletions htdocs/accountancy/closure/index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2019-2023 Open-DSI <[email protected]>
* Copyright (C) 2024 Frédéric France <[email protected]>
/* Copyright (C) 2019-2023 Open-DSI <[email protected]>
* Copyright (C) 2024 Frédéric France <[email protected]>
* Copyright (C) 2025 Alexandre Spangaro <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -39,7 +40,7 @@
*/

// Load translation files required by the page
$langs->loadLangs(array("compta", "bills", "other", "accountancy"));
$langs->loadLangs(array("accountancy", "bills", "compta", "exports", "other"));

$action = GETPOST('action', 'aZ09');
$confirm = GETPOST('confirm', 'aZ09');
Expand Down Expand Up @@ -410,7 +411,7 @@
// Step 2
$head = array();
$head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id'];
$head[0][1] = $langs->trans("Step").(getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE") ? '1' : '2').' - '.$langs->trans("AccountancyClosureStep2");
$head[0][1] = $langs->trans("Step"). ' ' . (getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE") ? '1' : '2').' - '.$langs->trans("AccountancyClosureStep2");
$head[0][2] = 'step2';
print dol_get_fiche_head($head, 'step2', '', -1, '');

Expand All @@ -433,7 +434,7 @@
// Step 3
$head = array();
$head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id'];
$head[0][1] = $langs->trans("Step").(getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE") ? '2' : '3').' - '.$langs->trans("AccountancyClosureStep3");
$head[0][1] = $langs->trans("Step"). ' ' . (getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE") ? '2' : '3').' - '.$langs->trans("AccountancyClosureStep3");
$head[0][2] = 'step3';
print dol_get_fiche_head($head, 'step3', '', -1, '');

Expand Down
4 changes: 3 additions & 1 deletion htdocs/adherents/class/adherent.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ class Adherent extends CommonObject
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
'ref' => array('type' => 'varchar(30)', 'label' => 'Ref', 'default' => '1', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'position' => 12, 'index' => 1),
'entity' => array('type' => 'integer', 'label' => 'Entity', 'default' => '1', 'enabled' => 1, 'visible' => -2, 'notnull' => 1, 'position' => 15, 'index' => 1),
'ref_ext' => array('type' => 'varchar(128)', 'label' => 'Ref ext', 'enabled' => 1, 'visible' => 0, 'position' => 20),
'ref_ext' => array('type' => 'varchar(128)', 'label' => 'RefExt', 'enabled' => 1, 'visible' => 0, 'position' => 20),
'civility' => array('type' => 'varchar(6)', 'label' => 'Civility', 'enabled' => 1, 'visible' => -1, 'position' => 25),
'lastname' => array('type' => 'varchar(50)', 'label' => 'Lastname', 'enabled' => 1, 'visible' => 1, 'position' => 30, 'showoncombobox' => 1),
'firstname' => array('type' => 'varchar(50)', 'label' => 'Firstname', 'enabled' => 1, 'visible' => 1, 'position' => 35, 'showoncombobox' => 1),
Expand Down Expand Up @@ -399,6 +399,8 @@ public function __construct($db)
$this->isextrafieldmanaged = 1;
// les champs optionnels sont vides
$this->array_options = array();

$this->fields['ref_ext']['visible'] = getDolGlobalInt('MAIN_LIST_SHOW_REF_EXT');
}


Expand Down
100 changes: 51 additions & 49 deletions htdocs/admin/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -1272,55 +1272,57 @@
if (!getDolGlobalString('MAIN_DISABLE_DOLISTORE_SEARCH') && getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 1) {
// $options is array with filter criteria

$nbmaxtoshow = $options['per_page'];
$options['per_page']++;

$remotestore->getRemoteCategories();
$remotestore->getRemoteProducts($options);

print '<span class="opacitymedium">'.$langs->trans('DOLISTOREdescriptionLong').'</span><br><br>';

$previouslink = $remotestore->get_previous_link();
$nextlink = $remotestore->get_next_link();

print '<div class="liste_titre liste_titre_bydiv centpercent"><div class="divsearchfield">';

print '<form method="POST" class="centpercent" id="searchFormList" action="'.$remotestore->url.'">'; ?>
<input type="hidden" name="token" value="<?php echo newToken(); ?>">
<input type="hidden" name="mode" value="marketplace">
<div class="divsearchfield">
<input name="search_keyword" placeholder="<?php echo $langs->trans('Keyword') ?>" id="search_keyword" type="text" class="minwidth200" value="<?php echo dol_escape_htmltag($options['search']) ?>"><br>
</div>
<div class="divsearchfield">
<input class="button buttongen" value="<?php echo $langs->trans('Rechercher') ?>" type="submit">
<a class="buttonreset" href="<?php echo $_SERVER["PHP_SELF"].'?mode=marketplace'; ?>"><?php echo $langs->trans('Reset') ?></a>

&nbsp;
</div>
<?php
print $previouslink;
print $nextlink;
print '</form>';

print '</div></div>';
print '<div class="clearboth"></div>';
?>

<div id="category-tree-left">
<ul class="tree">
<?php
echo $remotestore->get_categories(); // Do not use dol_escape_htmltag here, it is already a structured content?>
</ul>
</div>

<div id="listing-content">
<table summary="list_of_modules" id="list_of_modules" class="productlist centpercent">
<tbody id="listOfModules">
<?php echo $remotestore->get_products($nbmaxtoshow); ?>
</tbody>
</table>
</div>
<?php
if (getDolGlobalInt('MAIN_ENANLE_OLD_DOLISTORE')) {
$nbmaxtoshow = $options['per_page'];
$options['per_page']++;

$remotestore->getRemoteCategories();
$remotestore->getRemoteProducts($options);

print '<span class="opacitymedium">'.$langs->trans('DOLISTOREdescriptionLong').'</span><br><br>';

$previouslink = $remotestore->get_previous_link();
$nextlink = $remotestore->get_next_link();

print '<div class="liste_titre liste_titre_bydiv centpercent"><div class="divsearchfield">';

print '<form method="POST" class="centpercent" id="searchFormList" action="'.$remotestore->url.'">'; ?>
<input type="hidden" name="token" value="<?php echo newToken(); ?>">
<input type="hidden" name="mode" value="marketplace">
<div class="divsearchfield">
<input name="search_keyword" placeholder="<?php echo $langs->trans('Keyword') ?>" id="search_keyword" type="text" class="minwidth200" value="<?php echo dol_escape_htmltag($options['search']) ?>"><br>
</div>
<div class="divsearchfield">
<input class="button buttongen" value="<?php echo $langs->trans('Rechercher') ?>" type="submit">
<a class="buttonreset" href="<?php echo $_SERVER["PHP_SELF"].'?mode=marketplace'; ?>"><?php echo $langs->trans('Reset') ?></a>

&nbsp;
</div>
<?php
print $previouslink;
print $nextlink;
print '</form>';

print '</div></div>';
print '<div class="clearboth"></div>';
?>

<div id="category-tree-left">
<ul class="tree">
<?php
echo $remotestore->get_categories(); // Do not use dol_escape_htmltag here, it is already a structured content?>
</ul>
</div>

<div id="listing-content">
<table summary="list_of_modules" id="list_of_modules" class="productlist centpercent">
<tbody id="listOfModules">
<?php echo $remotestore->get_products($nbmaxtoshow); ?>
</tbody>
</table>
</div>
<?php
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion htdocs/categories/class/categorie.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ class Categorie extends CommonObject
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 10, 'notnull' => 1, 'visible' => -1,),
'fk_parent' => array('type' => 'integer', 'label' => 'Fkparent', 'enabled' => 1, 'position' => 20, 'notnull' => 1, 'visible' => -1, 'css' => 'maxwidth500 widthcentpercentminusxx',),
'label' => array('type' => 'varchar(180)', 'label' => 'Label', 'enabled' => 1, 'position' => 25, 'notnull' => 1, 'visible' => -1, 'alwayseditable' => 1, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'csslist' => 'tdoverflowmax150',),
'ref_ext' => array('type' => 'varchar(255)', 'label' => 'Refext', 'enabled' => 1, 'position' => 30, 'notnull' => 0, 'visible' => 0, 'alwayseditable' => 1,),
'ref_ext' => array('type' => 'varchar(255)', 'label' => 'RefExt', 'enabled' => 1, 'position' => 30, 'notnull' => 0, 'visible' => 0, 'alwayseditable' => 1,),
'type' => array('type' => 'integer', 'label' => 'Type', 'enabled' => 1, 'position' => 35, 'notnull' => 1, 'visible' => -1, 'alwayseditable' => 1,),
'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => 1, 'position' => 40, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'color' => array('type' => 'varchar(8)', 'label' => 'Color', 'enabled' => 1, 'position' => 45, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
Expand Down
4 changes: 3 additions & 1 deletion htdocs/comm/propal/class/propal.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,9 @@ public function __construct($db, $socid = 0, $propalid = 0)
$this->socid = $socid;
$this->id = $propalid;

$this->duree_validite = getDolGlobalInt('PROPALE_VALIDITY_DURATION', 0);
$this->duree_validite = getDolGlobalInt('PROPALE_VALIDITY_DURATION');

$this->fields['ref_ext']['visible'] = getDolGlobalInt('MAIN_LIST_SHOW_REF_EXT');
}


Expand Down
2 changes: 2 additions & 0 deletions htdocs/commande/class/commande.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@ public function __construct($db)

$this->ismultientitymanaged = 1;
$this->isextrafieldmanaged = 1;

$this->fields['ref_ext']['visible'] = getDolGlobalInt('MAIN_LIST_SHOW_REF_EXT');
}

/**
Expand Down
42 changes: 37 additions & 5 deletions htdocs/commande/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
$search_product_category = GETPOST('search_product_category', 'intcomma');
$search_id = GETPOST('search_id', 'int');
$search_ref = GETPOST('search_ref', 'alpha') != '' ? GETPOST('search_ref', 'alpha') : GETPOST('sref', 'alpha');
$search_ref_ext = GETPOST('search_ref_ext', 'alpha');
$search_ref_customer = GETPOST('search_ref_customer', 'alpha');
$search_company = GETPOST('search_company', 'alpha');
$search_company_alias = GETPOST('search_company_alias', 'alpha');
Expand Down Expand Up @@ -201,6 +202,7 @@
$arrayfields = array(
'c.rowid' => array('label' => "ID", 'checked' => 1, 'enabled' => getDolGlobalInt('MAIN_SHOW_TECHNICAL_ID'), 'position' => 1),
'c.ref' => array('label' => "Ref", 'checked' => 1, 'position' => 5, 'searchall' => 1),
'c.ref_ext' => array('label' => "RefExt", 'checked' => 1, 'position' => 5, 'visible' => 0, 'searchall' => 1),
'c.ref_client' => array('label' => "RefCustomerOrder", 'checked' => -1, 'position' => 10, 'searchall' => 1),
'p.ref' => array('label' => "ProjectRef", 'checked' => -1, 'enabled' => (!isModEnabled('project') ? 0 : 1), 'position' => 20),
'p.title' => array('label' => "ProjectLabel", 'checked' => 0, 'enabled' => (!isModEnabled('project') ? 0 : 1), 'position' => 25),
Expand Down Expand Up @@ -309,6 +311,7 @@
$search_product_category = '';
$search_id = '';
$search_ref = '';
$search_ref_ext = '';
$search_ref_customer = '';
$search_company = '';
$search_company_alias = '';
Expand Down Expand Up @@ -715,6 +718,9 @@
if ($search_ref) {
$param .= '&search_ref='.urlencode($search_ref);
}
if ($search_ref_ext) {
$param .= '&search_ref_ext='.urlencode($search_ref_ext);
}
if ($search_company) {
$param .= '&search_company='.urlencode($search_company);
}
Expand Down Expand Up @@ -897,7 +903,7 @@
$sql .= " typent.code as typent_code,";
$sql .= " state.code_departement as state_code, state.nom as state_name,";
$sql .= " country.code as country_code,";
$sql .= ' c.rowid, c.ref, c.total_ht, c.total_tva, c.total_ttc, c.ref_client, c.fk_user_author,';
$sql .= ' c.rowid, c.ref, c.ref_ext, c.total_ht, c.total_tva, c.total_ttc, c.ref_client, c.fk_user_author,';
$sql .= ' c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva as multicurrency_total_vat, c.multicurrency_total_ttc,';
$sql .= ' c.date_valid, c.date_commande, c.note_public, c.note_private, c.date_livraison as delivery_date, c.fk_statut, c.facture as billed,';
$sql .= ' c.date_creation as date_creation, c.tms as date_modification, c.date_cloture as date_cloture,';
Expand Down Expand Up @@ -931,7 +937,7 @@
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande_extrafields as ef on (c.rowid = ef.fk_object)";
}
if ($search_all) {
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'commandedet as pd ON c.rowid=pd.fk_commande';
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'commandedet as pd ON c.rowid = pd.fk_commande';
}
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = c.fk_projet";
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON c.fk_user_author = u.rowid';
Expand Down Expand Up @@ -961,6 +967,9 @@
if ($search_ref) {
$sql .= natural_search('c.ref', $search_ref);
}
if ($search_ref_ext) {
$sql .= natural_search('c.ref_ext', $search_ref_ext);
}
if ($search_ref_customer) {
$sql .= natural_search('c.ref_client', $search_ref_customer);
}
Expand Down Expand Up @@ -1316,6 +1325,9 @@
if ($search_ref) {
$param .= '&search_ref='.urlencode($search_ref);
}
if ($search_ref_ext) {
$param .= '&search_ref_ext='.urlencode($search_ref_ext);
}
if ($search_company) {
$param .= '&search_company='.urlencode($search_company);
}
Expand Down Expand Up @@ -1647,6 +1659,12 @@
print '<input class="flat" size="6" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
print '</td>';
}
// Ref ext
if (!empty($arrayfields['c.ref_ext']['checked'])) {
print '<td class="liste_titre">';
print '<input class="flat" size="6" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref_ext).'">';
print '</td>';
}
// Ref customer
if (!empty($arrayfields['c.ref_client']['checked'])) {
print '<td class="liste_titre" align="left">';
Expand Down Expand Up @@ -1944,6 +1962,10 @@
print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], 'c.ref', '', $param, '', $sortfield, $sortorder);
$totalarray['nbfield']++;
}
if (!empty($arrayfields['c.ref_ext']['checked'])) {
print_liste_field_titre($arrayfields['c.ref_ext']['label'], $_SERVER["PHP_SELF"], 'c.ref_ext', '', $param, '', $sortfield, $sortorder);
$totalarray['nbfield']++;
}
if (!empty($arrayfields['c.ref_client']['checked'])) {
print_liste_field_titre($arrayfields['c.ref_client']['label'], $_SERVER["PHP_SELF"], 'c.ref_client', '', $param, '', $sortfield, $sortorder);
$totalarray['nbfield']++;
Expand Down Expand Up @@ -2283,6 +2305,16 @@
}
}

// Ref customer
if (!empty($arrayfields['c.ref_ext']['checked'])) {
print '<td class="nowrap tdoverflowmax75" title="'.dol_escape_htmltag($obj->ref_ext).'">';
print dol_escape_htmltag($obj->ref_ext);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}

// Ref customer
if (!empty($arrayfields['c.ref_client']['checked'])) {
print '<td class="nowrap tdoverflowmax150" title="'.dol_escape_htmltag($obj->ref_client).'">';
Expand Down Expand Up @@ -2704,7 +2736,7 @@

// Date creation
if (!empty($arrayfields['c.datec']['checked'])) {
print '<td align="center" class="nowrap">';
print '<td class="center nowraponall">';
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
print '</td>';
if (!$i) {
Expand All @@ -2714,7 +2746,7 @@

// Date modification
if (!empty($arrayfields['c.tms']['checked'])) {
print '<td align="center" class="nowrap">';
print '<td class="center nowraponall">';
print dol_print_date($db->jdate($obj->date_modification), 'dayhour', 'tzuser');
print '</td>';
if (!$i) {
Expand All @@ -2724,7 +2756,7 @@

// Date cloture
if (!empty($arrayfields['c.date_cloture']['checked'])) {
print '<td align="center" class="nowrap">';
print '<td class="center nowraponall">';
print dol_print_date($db->jdate($obj->date_cloture), 'dayhour', 'tzuser');
print '</td>';
if (!$i) {
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/facture/class/facture.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ class Facture extends CommonInvoice
'ref' => array('type' => 'varchar(30)', 'label' => 'Ref', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'showoncombobox' => 1, 'position' => 5),
'entity' => array('type' => 'integer', 'label' => 'Entity', 'default' => '1', 'enabled' => 1, 'visible' => -2, 'notnull' => 1, 'position' => 20, 'index' => 1),
'ref_client' => array('type' => 'varchar(255)', 'label' => 'RefCustomer', 'enabled' => 1, 'visible' => -1, 'position' => 10),
'ref_ext' => array('type' => 'varchar(255)', 'label' => 'Ref ext', 'enabled' => 1, 'visible' => 0, 'position' => 12),
'ref_ext' => array('type' => 'varchar(255)', 'label' => 'RefExt', 'enabled' => 1, 'visible' => 0, 'position' => 12),
'type' => array('type' => 'smallint(6)', 'label' => 'Type', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 15),
'subtype' => array('type' => 'smallint(6)', 'label' => 'InvoiceSubtype', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 15),
//'increment' =>array('type'=>'varchar(10)', 'label'=>'Increment', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
Expand Down
4 changes: 3 additions & 1 deletion htdocs/contact/class/contact.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class Contact extends CommonObject
public $fields = array(
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -2, 'noteditable' => 1, 'notnull' => 1, 'index' => 1, 'position' => 1, 'comment' => 'Id', 'css' => 'left'),
'entity' => array('type' => 'integer', 'label' => 'Entity', 'default' => '1', 'enabled' => 1, 'visible' => 3, 'notnull' => 1, 'position' => 30, 'index' => 1),
'ref_ext' => array('type' => 'varchar(255)', 'label' => 'Ref ext', 'enabled' => 1, 'visible' => 3, 'position' => 35),
'ref_ext' => array('type' => 'varchar(255)', 'label' => 'RefExt', 'enabled' => 1, 'visible' => 0, 'position' => 35),
'civility' => array('type' => 'varchar(6)', 'label' => 'Civility', 'enabled' => 1, 'visible' => 3, 'position' => 40),
'lastname' => array('type' => 'varchar(50)', 'label' => 'Lastname', 'enabled' => 1, 'visible' => 1, 'position' => 45, 'showoncombobox' => 1, 'searchall' => 1),
'name_alias' => array('type' => 'varchar(255)', 'label' => 'Name alias', 'enabled' => 1, 'visible' => -1, 'position' => 46, 'searchall' => 1),
Expand Down Expand Up @@ -386,6 +386,8 @@ public function __construct($db)
$this->ismultientitymanaged = 1;
$this->isextrafieldmanaged = 1;

$this->fields['ref_ext']['visible'] = getDolGlobalInt('MAIN_LIST_SHOW_REF_EXT');

if (!isModEnabled('mailing')) {
$this->fields['no_email']['enabled'] = 0;
}
Expand Down
Loading

0 comments on commit 8b3c958

Please sign in to comment.