NEW Add getcontacts on api of interventional and proposal (#35589)

* Add getContacts method to retrieve contact information

* Implement getContacts method for proposals

Added a method to retrieve contacts associated with a proposal, including access checks and data cleaning.

* Implement getContacts method for invoices

Added a method to retrieve contacts associated with a specific invoice, including access checks and error handling.

* Update api_proposals.class.php

* Update api_invoices.class.php

* Update api_interventions.class.php

* Update api_interventions.class.php

* Add method to set invoice as draft

* Return contacts directly instead of cleaned data

* Return raw contacts instead of cleaned data

* Combine external and internal contacts in order list

Merge external and internal contacts for orders.

* Change return type from Object to array in API doc

Updated return type in API documentation for contact information.

* Change return type in api_orders.class.php docblock

Updated return type in docblock to reflect array return.

* Change return type from Object to array in API doc

* Update api_orders.class.php

* Update api_interventions.class.php

* Update api_proposals.class.php

* Update api_orders.class.php

* Update api_interventions.class.php

* Update api_interventions.class.php

* Update api_interventions.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Charlène Benke
2025-10-04 20:01:57 +02:00
committed by GitHub
parent 900fa67c9e
commit d1e0efc466
3 changed files with 80 additions and 6 deletions

View File

@@ -607,6 +607,9 @@ class Orders extends DolibarrApi
}
$contacts = $this->commande->liste_contact(-1, 'external', 0, $type);
$socpeoples = $this->commande->liste_contact(-1, 'internal', 0, $type);
$contacts = array_merge($contacts, $socpeoples);
return $contacts;
}