diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php
index 8d93dfc950c..fc1cdaf8971 100644
--- a/htdocs/admin/ihm.php
+++ b/htdocs/admin/ihm.php
@@ -57,6 +57,7 @@ if ($action == 'update')
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["main_lang_default"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["main_multilangs"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity);
+ dolibarr_set_const($db, "MAIN_SIZE_SHORTLISTE_LIMIT", $_POST["main_size_shortliste_limit"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST["MAIN_BUTTON_HIDE_UNAUTHORIZED"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity);
@@ -204,6 +205,12 @@ if ($action == 'edit') // Edit
print '
| ';
print '';
+ // Max size of short lists on customer card
+ $var=!$var;
+ print '| '.$langs->trans("DefaultMaxSizeShortListCustomerCard").' | | ';
+ print ' | ';
+ print '
';
+
// Disable javascript and ajax
$var=!$var;
print '| '.$langs->trans("DisableJavascript").' | ';
@@ -385,6 +392,11 @@ else // Show
print ' |
| '.$langs->trans("DefaultMaxSizeList").' | ' . $conf->global->MAIN_SIZE_LISTE_LIMIT . ' | ';
print ' | ';
print "
";
+
+ $var=!$var;
+ print '| '.$langs->trans("DefaultMaxSizeShortListCustomerCard").' | ' . $conf->global->MAIN_SIZE_SHORTLISTE_LIMIT . ' | ';
+ print ' | ';
+ print "
";
// Disable javascript/ajax
$var=!$var;
diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index a44a79da1f0..edd64d97706 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -491,7 +491,7 @@ if ($id > 0)
// Nbre max d'elements des petites listes
- $MAXLIST=4;
+ $MAXLIST=$conf->global->MAIN_SIZE_SHORTLISTE_LIMIT;
$tableaushown=1;
// Lien recap
diff --git a/htdocs/install/mysql/data/llx_const.sql b/htdocs/install/mysql/data/llx_const.sql
index 2c25765223e..95dfb2683f9 100644
--- a/htdocs/install/mysql/data/llx_const.sql
+++ b/htdocs/install/mysql/data/llx_const.sql
@@ -53,6 +53,7 @@ insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_M
-- IHM
--
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_LISTE_LIMIT','25','chaine','Longueur maximum des listes',0,0);
+insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_SHORTLISTE_LIMIT','4','chaine','Longueur maximum des listes courtes (fiche client)',0,0);
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SHOW_WORKBOARD','1','yesno','Affichage tableau de bord de travail Dolibarr',0,0);
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENU_STANDARD','eldy_menu.php','chaine','Menu manager for internal users',0);
diff --git a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql
index 4942378e58c..34d75a695d9 100755
--- a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql
+++ b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql
@@ -20,6 +20,7 @@
INSERT INTO llx_const (name, value, type, note, visible) values (__ENCRYPT('MAIN_DELAY_EXPENSEREPORTS_TO_PAY')__,__ENCRYPT('31')__,'chaine','Tolérance de retard avant alerte (en jours) sur les notes de frais impayées',0);
+INSERT INTO llx_const (name, value, type, note, visible) values ('MAIN_SIZE_SHORTLISTE_LIMIT','4','chaine','Longueur maximum des listes courtes (fiche client)',0);
ALTER TABLE llx_accounting_system MODIFY COLUMN pcg_version varchar(32);
ALTER TABLE llx_accountingaccount MODIFY COLUMN fk_pcg_version varchar(32);