added construction consent owner import

This commit is contained in:
Luca Haid
2025-04-22 17:46:23 +02:00
parent 684cc51a3a
commit 7932ad7ca4
4 changed files with 125 additions and 3 deletions

View File

@@ -221,9 +221,21 @@ class ConstructionConsentOwner extends mfBaseModel {
$constructionconsent_id = $filter['constructionconsent_id'];
if(is_numeric($constructionconsent_id)) {
$where .= " AND constructionconsent_id=$constructionconsent_id";
} else if(is_array($constructionconsent_id)) {
$where .= " AND constructionconsent_id IN (".implode(",", $constructionconsent_id).")";
}
}
foreach($filter as $field => $value)
if(in_array($field, ["firstname", "lastname", "street", "zip", "city", "country", "phone", "phone2", "birthdate", "fax", "email"]))
if(is_array($value)) {
$where .= " AND $field IN ('".implode("','", $value)."')";
} else {
$where .= " AND $field LIKE '%$value%'";
}
if(array_key_exists("add-where", $filter)) {