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 <eldy@destailleur.fr>
This commit is contained in:
Charlène Benke
2025-10-15 01:16:49 +02:00
committed by GitHub
parent 51629b1949
commit e8fc2c0f0e

View File

@@ -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);