|
@@ -14,10 +14,12 @@ Core::addBreadcrumb("/account/locations?customer_id=$customer->id", $page_title)
|
|
|
$nvp = ["customer_id" => $customer->id];
|
|
$nvp = ["customer_id" => $customer->id];
|
|
|
|
|
|
|
|
$id = http::value("id", "int");
|
|
$id = http::value("id", "int");
|
|
|
|
|
+$internal_id = http::value("internal_id", "trim");
|
|
|
$name = http::value("name", "trim");
|
|
$name = http::value("name", "trim");
|
|
|
|
|
|
|
|
if($id) $nvp["id"] = $id;
|
|
if($id) $nvp["id"] = $id;
|
|
|
-if($name) $nvp["name"] = (new Constraint("CONTAINS"))->setValues($name);
|
|
|
|
|
|
|
+if($internal_id) $nvp["internal_id"] = db::escape($internal_id);
|
|
|
|
|
+if($name) $nvp["name"] = (new Constraint("CONTAINS"))->setValues(db::escape($name));
|
|
|
|
|
|
|
|
$locations = Location::query($nvp, ["sort" => "name", "order" => "asc"]);
|
|
$locations = Location::query($nvp, ["sort" => "name", "order" => "asc"]);
|
|
|
|
|
|