2
0
forked from Wavyzz/dolibarr

NEW Add thirdparty search on api list (#34634)

* Add thirdparty search on api list

this change allow to seach element with filter on thirdparty (ex : list of bill of with name of thidparty)

* Update api_orders.class.php

* Update api_invoices.class.php

* Update api_contracts.class.php

* Update api_shipments.class.php

* Update api_interventions.class.php

* Update api_projects.class.php

* Update api_tickets.class.php

* Update api_tickets.class.php

* Update api_projects.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Charlène Benke
2025-07-18 02:35:50 +02:00
committed by GitHub
parent dbd5912658
commit 1df5ea8456
8 changed files with 13 additions and 2 deletions

View File

@@ -156,7 +156,9 @@ class Interventions extends DolibarrApi
}
$sql = "SELECT t.rowid";
$sql .= " FROM ".MAIN_DB_PREFIX."fichinter AS t LEFT JOIN ".MAIN_DB_PREFIX."fichinter_extrafields AS ef ON (ef.fk_object = t.rowid)"; // Modification VMR Global Solutions to include extrafields as search parameters in the API GET call, so we will be able to filter on extrafields
$sql .= " FROM ".MAIN_DB_PREFIX."fichinter AS t";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe AS s ON (s.rowid = t.fk_soc)";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."fichinter_extrafields AS ef ON (ef.fk_object = t.rowid)"; // Modification VMR Global Solutions to include extrafields as search parameters in the API GET call, so we will be able to filter on extrafields
$sql .= ' WHERE t.entity IN ('.getEntity('intervention').')';
if ($socids) {
$sql .= " AND t.fk_soc IN (".$this->db->sanitize($socids).")";