|
@@ -822,6 +822,13 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid =
|
|
|
if (($search_categ_cus > 0) || ($search_categ_cus == -2)) {
|
|
|
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ
|
|
|
}
|
|
|
+
|
|
|
+// Added by MMI Mathieu Moulin iProspective
|
|
|
+// Add fields from hooks
|
|
|
+$parameters = array();
|
|
|
+$reshook = $hookmanager->executeHooks('printFieldListJoinSoc', $parameters); // Note that $action and $object may have been modified by hook
|
|
|
+$sql .= $hookmanager->resPrint;
|
|
|
+
|
|
|
$sql .= ', '.MAIN_DB_PREFIX.'commande as c';
|
|
|
if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
|
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande_extrafields as ef on (c.rowid = ef.fk_object)";
|