Added Preorderselfservice API
This commit is contained in:
@@ -670,6 +670,25 @@ class PreorderModel {
|
||||
$where .= " AND tt_preorder.extref = '$extref'";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("email", $filter)) {
|
||||
$email = FronkDB::singleton()->escape($filter['email']);
|
||||
if($email) {
|
||||
$where .= " AND tt_preorder.email = '$email'";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("phone", $filter)) {
|
||||
$phone = $filter["phone"];
|
||||
if(is_array($phone)) {
|
||||
$where .= " AND REGEXP_REPLACE(tt_preorder.phone, '[^0-9]+', '') IN ('".implode("','", $phone)."')";
|
||||
} else {
|
||||
$phone = FronkDB::singleton()->escape($filter['phone']);
|
||||
if($phone) {
|
||||
$where .= " AND REGEXP_REPLACE(tt_preorder.phone, '[^0-9]+', '') = '$phone'";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("workorder_export_date", $filter)) {
|
||||
$workorder_export_date = $filter['workorder_export_date'];
|
||||
|
||||
Reference in New Issue
Block a user