From e8fc2c0f0e61e23658122f48a8f1d786e4e20d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charl=C3=A8ne=20Benke?= <1179011+defrance@users.noreply.github.com> Date: Wed, 15 Oct 2025 01:16:49 +0200 Subject: [PATCH] Modify getListOfContactTypes for expedition type (#35726) * Modify getListOfContactTypes for expedition type Adjust the contact type based on shipping settings. * Update api_setup.class.php * Update api_setup.class.php --------- Co-authored-by: Laurent Destailleur --- htdocs/api/class/api_setup.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 0a25b4c8cd0..0940b2418fe 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -1042,6 +1042,10 @@ class Setup extends DolibarrApi { $list = array(); + if ($type == 'expedition' && !getDolGlobalInt('SHIPPING_USE_ITS_OWN_CONTACTS')) { + $type = 'commande'; + } + $sql = "SELECT rowid, code, element as type, libelle as label, source, module, position"; $sql .= " FROM ".MAIN_DB_PREFIX."c_type_contact as t"; $sql .= " WHERE t.active = ".((int) $active);