Get external contacts ids instead of BILLING contacts ids.

This commit is contained in:
Neil Orley
2018-05-28 09:42:24 +02:00
parent 4ad1f81ea9
commit 748be12da2
3 changed files with 12 additions and 12 deletions

View File

@@ -76,8 +76,8 @@ class Orders extends DolibarrApi
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
// Add billing contacts ids
$this->commande->billing_contacts_ids = $this->commande->liste_contact(-1,'external',1,'BILLING');
// Add external contacts ids
$this->commande->contacts_ids = $this->commande->liste_contact(-1,'external',1);
$this->commande->fetchObjectLinked();
return $this->_cleanObjectDatas($this->commande);
}
@@ -161,8 +161,8 @@ class Orders extends DolibarrApi
$obj = $db->fetch_object($result);
$commande_static = new Commande($db);
if($commande_static->fetch($obj->rowid)) {
// Add billing contacts ids
$commande_static->billing_contacts_ids = $commande_static->liste_contact(-1,'external',1,'BILLING');
// Add external contacts ids
$commande_static->contacts_ids = $commande_static->liste_contact(-1,'external',1);
$obj_ret[] = $this->_cleanObjectDatas($commande_static);
}
$i++;