Added parent id to address

This commit is contained in:
Frank Schubert
2021-06-17 21:45:53 +02:00
parent 190747449b
commit d4fc9f3f35
4 changed files with 27 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
<?php
class AddressModel {
public $parant_id = null;
public $parent_id = null;
public $company = null;
public $firstname = null;
public $lastname = null;
@@ -119,6 +119,17 @@ class AddressModel {
$where .= " AND ( $or )";
}
}
//var_dump($filter);exit;
if(array_key_exists("parent_id", $filter)) {
$parentid = $filter['parent_id'];
if($parentid === null) {
$where .= " AND parent_id IS NULL";
} elseif(is_numeric($parentid)) {
$where .= " AND parent_id=$parentid";
}
}
return $where;
}