Contractjournal finished & Started Contractconfig Hooks for Provisioning Workflow
This commit is contained in:
@@ -4,9 +4,9 @@ class VoicenumberblockModel {
|
||||
public $name;
|
||||
public $countrycode;
|
||||
public $areacode;
|
||||
public $prefix;
|
||||
public $first;
|
||||
public $last;
|
||||
public $number_prepend_zero;
|
||||
public $comment;
|
||||
|
||||
public $create_by;
|
||||
@@ -138,56 +138,24 @@ class VoicenumberblockModel {
|
||||
}
|
||||
|
||||
if(array_key_exists("first", $filter)) {
|
||||
$add_zero = false;
|
||||
$first = $filter['first'];
|
||||
|
||||
mfLoghandler::singleton()->debug($first);
|
||||
|
||||
if(substr($first,0, 1) === "0") {
|
||||
$add_zero = true;
|
||||
$first = substr($first, 1);
|
||||
}
|
||||
|
||||
if(is_numeric($first)) {
|
||||
$where .= " AND first like '%$first%'";
|
||||
if($add_zero) {
|
||||
$where .= " AND number_prepend_zero = 1";
|
||||
}
|
||||
$where .= " AND first = '$first'";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("last", $filter)) {
|
||||
$add_zero = false;
|
||||
$last = $filter['last'];
|
||||
|
||||
mfLoghandler::singleton()->debug($last);
|
||||
|
||||
if(substr($last,0, 1) === "0") {
|
||||
$add_zero = true;
|
||||
$last = substr($last, 1);
|
||||
}
|
||||
|
||||
if(is_numeric($last)) {
|
||||
$where .= " AND last like '%$last%'";
|
||||
$where .= " AND last = '$last'";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("number", $filter)) {
|
||||
$add_zero = false;
|
||||
$number = $filter['number'];
|
||||
|
||||
mfLoghandler::singleton()->debug($number);
|
||||
|
||||
if(substr($number,0, 1) === "0") {
|
||||
$add_zero = true;
|
||||
$number = substr($number, 1);
|
||||
}
|
||||
|
||||
if(is_numeric($number)) {
|
||||
$where .= " AND first <= $number AND last >= $number";
|
||||
|
||||
if($add_zero) {
|
||||
$where .= " AND number_prepend_zero = 1";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user