New display for listing events (#30713)

* New display for listing invoice events

* Fix phpstan errors
This commit is contained in:
lamrani abdelwadoud
2024-08-22 03:30:27 +02:00
committed by GitHub
parent 5797a0db3f
commit cc8e1cd81e
3 changed files with 261 additions and 6 deletions

View File

@@ -13879,6 +13879,8 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
$sql .= ", ".MAIN_DB_PREFIX."bom_bom as o";
} elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') {
$sql .= ", ".MAIN_DB_PREFIX."contrat as o";
} elseif (is_object($filterobj) && get_class($filterobj) == 'Facture') {
$sql .= ", ".MAIN_DB_PREFIX."facture as o";
}
$sql .= " WHERE a.entity IN (".getEntity('agenda').")";
@@ -13922,6 +13924,11 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
if ($filterobj->id) {
$sql .= " AND a.fk_contact = ".((int) $filterobj->id);
}
} elseif (is_object($filterobj) && get_class($filterobj) == 'Facture') {
$sql .= "AND a.fk_element = o.rowid";
if ($filterobj->id) {
$sql .= " AND a.fk_element = ".((int) $filterobj->id);
}
}
} else {
$sql .= " AND u.rowid = ". ((int) $filterobj->id);