Added SLA to Products

This commit is contained in:
Frank Schubert
2021-07-05 18:43:03 +02:00
parent 4fae807663
commit 771c0f4bc2
12 changed files with 192 additions and 18 deletions

View File

@@ -2,7 +2,8 @@
class ProducttechModel {
public $name = null;
public $code = null;
public $rtrcode = null;
public $customer_type = null;
public $description = null;
public $note = null;
@@ -115,13 +116,18 @@ class ProducttechModel {
}
}
if(array_key_exists("code", $filter)) {
$code = $db->escape($filter['code']);
if($code) {
$where .= " AND `code` like '$code'";
if(array_key_exists("rtrcode", $filter)) {
$rtrcode = $db->escape($filter['rtrcode']);
if($rtrcode) {
$where .= " AND `code` like '$rtrcode'";
}
}
if(array_key_exists("customer_type", $filter)) {
$customer_type = ($customer_type == "business") ? "business" : "residential";
$where .= " AND `customer_type`='$customer_type'";
}
//var_dump($filter, $where);exit;
return $where;
}