CMXX - Improved whereclause
This commit is contained in:
@@ -14,20 +14,8 @@ $post_content = json_decode($input,true);
|
||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||
|
||||
//default whereclause
|
||||
$whereclause = '';
|
||||
$whereclause = getWhereclauselvl2("categories",$permission,$partner);
|
||||
|
||||
switch ($permission) {
|
||||
case '4':
|
||||
$whereclause = '';
|
||||
break;
|
||||
case '3':
|
||||
$whereclause = '';
|
||||
break;
|
||||
default:
|
||||
$condition = '__salesid___'.$partner->salesid.'___soldto___'.substr($partner->soldto, 0, strpos($partner->soldto, "-")).$soldto_search;
|
||||
$whereclause = ' AND c.accounthierarchy like "'.$condition.'"';
|
||||
break;
|
||||
}
|
||||
|
||||
//BUILD UP PARTNERHIERARCHY FROM USER
|
||||
$partner_product = json_encode(array("salesid"=>$partner->salesid,"soldto"=>$partner->soldto), JSON_UNESCAPED_UNICODE);
|
||||
|
||||
Reference in New Issue
Block a user