CMXX - Update whereclause get/post
This commit is contained in:
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclauselvl2('communications',$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2('communications',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ $partner = json_decode($partnerhierarchy);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('equipment',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('equipment',$permission,$partner,'get');
|
||||||
|
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ $partner = json_decode($partnerhierarchy);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('equipment',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('equipment',$permission,$partner,'get');
|
||||||
|
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclauselvl2('partners',$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2('partners',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $partner = json_decode($partnerhierarchy);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('profile',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('profile',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $partner = json_decode($partnerhierarchy);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('profile',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('profile',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode(decode_payload($input),true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('equipment',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('equipment',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode(decode_payload($input),true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
$id = $post_content['rowID'] ?? ''; //check for rowID
|
$id = $post_content['rowID'] ?? ''; //check for rowID
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
$id = $post_content['rowID'] ?? ''; //check for rowID
|
$id = $post_content['rowID'] ?? ''; //check for rowID
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode(decode_payload($input),true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause to check if data is owned by user
|
//default whereclause to check if data is owned by user
|
||||||
list($whereclause,$condition) = getWhereclauselvl2('partners',$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2('partners',$permission,$partner,'');
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
$id = $post_content['partnerID'] ?? ''; //check for rowID
|
$id = $post_content['partnerID'] ?? ''; //check for rowID
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode(decode_payload($input),true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode(decode_payload($input),true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//ENSURE PRODUCTROWID IS SEND
|
//ENSURE PRODUCTROWID IS SEND
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode(decode_payload($input),true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//ENSURE PRODUCTROWID IS SEND
|
//ENSURE PRODUCTROWID IS SEND
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ $owner_user = 0;
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause to check if data is owned by user
|
//default whereclause to check if data is owned by user
|
||||||
list($whereclause,$condition) = getWhereclause('profile',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('profile',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclauselvl2("discounts",$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2("discounts",$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ $partner = json_decode($partnerhierarchy);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('equipment',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('equipment',$permission,$partner,'get');
|
||||||
|
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ $partner = json_decode($partnerhierarchy);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('equipment',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('equipment',$permission,$partner,'get');
|
||||||
|
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ $partner = json_decode($partnerhierarchy);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclauselvl2("invoice",$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2("invoice",$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('pricelist',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('pricelist',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclauselvl2("attributes",$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2("attributes",$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclauselvl2("config",$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2("config",$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclauselvl2("software",$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2("software",$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclauselvl2("transactions",$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2("transactions",$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $partner = json_decode($partnerhierarchy);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('profile',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('profile',$permission,$partner,'get');
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('equipment',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('equipment',$permission,$partner,'');
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
$id = $post_content['rowID'] ?? ''; //check for rowID
|
$id = $post_content['rowID'] ?? ''; //check for rowID
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclauselvl2("categories",$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2("categories",$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//BUILD UP PARTNERHIERARCHY FROM USER
|
//BUILD UP PARTNERHIERARCHY FROM USER
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
$id = $post_content['rowID'] ?? ''; //check for rowID
|
$id = $post_content['rowID'] ?? ''; //check for rowID
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//BUILD UP PARTNERHIERARCHY FROM USER
|
//BUILD UP PARTNERHIERARCHY FROM USER
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} el
|
|||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = '';
|
$whereclause = '';
|
||||||
|
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
$id = $post_content['rowID'] ?? ''; //check for rowID
|
$id = $post_content['rowID'] ?? ''; //check for rowID
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
//CHECK IF PRODUCT ID IS SEND
|
//CHECK IF PRODUCT ID IS SEND
|
||||||
if (isset($post_content['product_id']) && $post_content['product_id'] != ''){
|
if (isset($post_content['product_id']) && $post_content['product_id'] != ''){
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//ENSURE PRODUCTROWID IS SEND
|
//ENSURE PRODUCTROWID IS SEND
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//ENSURE PRODUCTROWID IS SEND
|
//ENSURE PRODUCTROWID IS SEND
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//ENSURE PRODUCTROWID IS SEND
|
//ENSURE PRODUCTROWID IS SEND
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//BUILD UP PARTNERHIERARCHY FROM USER
|
//BUILD UP PARTNERHIERARCHY FROM USER
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//WEBSHOP UPDATE CAN SEND TXN_ID ONLY
|
//WEBSHOP UPDATE CAN SEND TXN_ID ONLY
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
@@ -70,7 +70,9 @@ if ($command == 'update' && isAllowed('translation_manage',$profile,$permission,
|
|||||||
$sql = 'UPDATE text_variables_translations SET '.$clause.' WHERE rowID = ? '.$whereclause.'';
|
$sql = 'UPDATE text_variables_translations SET '.$clause.' WHERE rowID = ? '.$whereclause.'';
|
||||||
$execute_input[] = $id;
|
$execute_input[] = $id;
|
||||||
$stmt = $pdo->prepare($sql);
|
$stmt = $pdo->prepare($sql);
|
||||||
|
$stmt->debugDumpParams();
|
||||||
$stmt->execute($execute_input);
|
$stmt->execute($execute_input);
|
||||||
|
|
||||||
}
|
}
|
||||||
elseif ($command == 'insert' && isAllowed('translation_manage',$profile,$permission,'C') === 1){
|
elseif ($command == 'insert' && isAllowed('translation_manage',$profile,$permission,'C') === 1){
|
||||||
$sql = 'INSERT INTO text_variables_translations ('.$clause_insert.') VALUES ('.$input_insert.')';
|
$sql = 'INSERT INTO text_variables_translations ('.$clause_insert.') VALUES ('.$input_insert.')';
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ $owner_user = 0;
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
list($whereclause,$condition) = getWhereclause('profile',$permission,$partner);
|
list($whereclause,$condition) = getWhereclause('profile',$permission,$partner,'');
|
||||||
|
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
|
|||||||
@@ -695,7 +695,7 @@ function ioAPIv2($api_call, $data, $token){
|
|||||||
// DEFINE WHERECLAUSE BASED ON ACCOUNTHIERARCHY ALL
|
// DEFINE WHERECLAUSE BASED ON ACCOUNTHIERARCHY ALL
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
|
|
||||||
function getWhereclause($table_name,$permission,$partner){
|
function getWhereclause($table_name,$permission,$partner,$method){
|
||||||
|
|
||||||
//api_name converter to table
|
//api_name converter to table
|
||||||
$table =[
|
$table =[
|
||||||
@@ -704,7 +704,7 @@ function getWhereclause($table_name,$permission,$partner){
|
|||||||
];
|
];
|
||||||
|
|
||||||
$table = ($table_name != '') ? $table[$table_name] : 'accounthierarchy';
|
$table = ($table_name != '') ? $table[$table_name] : 'accounthierarchy';
|
||||||
|
$type = ($method == 'get') ? 'WHERE ' : '';
|
||||||
//SoldTo is empty
|
//SoldTo is empty
|
||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
@@ -717,15 +717,15 @@ function getWhereclause($table_name,$permission,$partner){
|
|||||||
break;
|
break;
|
||||||
case '3':
|
case '3':
|
||||||
$condition = '__salesid___'.$partner->salesid.'___soldto___%';
|
$condition = '__salesid___'.$partner->salesid.'___soldto___%';
|
||||||
$whereclause = 'WHERE '.$table.' like "'.$condition.'"';
|
$whereclause = $type.$table.' like "'.$condition.'"';
|
||||||
break;
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
$condition = '__salesid___'.$partner->salesid.'___soldto___'.substr($partner->soldto, 0, strpos($partner->soldto, "-")).$soldto_search;
|
$condition = '__salesid___'.$partner->salesid.'___soldto___'.substr($partner->soldto, 0, strpos($partner->soldto, "-")).$soldto_search;
|
||||||
$whereclause = 'WHERE '.$table.' like "'.$condition.'"';
|
$whereclause = $type.$table.' like "'.$condition.'"';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$condition = '__salesid___'.$partner->salesid.'___soldto___'.substr($partner->soldto, 0, strpos($partner->soldto, "-")).$soldto_search.'___shipto___'.substr($partner->shipto, 0, strpos($partner->shipto, "-")).'%___location___'.substr($partner->location, 0, strpos($partner->location, "-")).'%';
|
$condition = '__salesid___'.$partner->salesid.'___soldto___'.substr($partner->soldto, 0, strpos($partner->soldto, "-")).$soldto_search.'___shipto___'.substr($partner->shipto, 0, strpos($partner->shipto, "-")).'%___location___'.substr($partner->location, 0, strpos($partner->location, "-")).'%';
|
||||||
$whereclause = 'WHERE '.$table.' like "'.$condition.'"';
|
$whereclause = $type.$table.' like "'.$condition.'"';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -735,7 +735,7 @@ function getWhereclause($table_name,$permission,$partner){
|
|||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
// DEFINE WHERECLAUSE BASED ON ACCOUNTHIERARCHY SALES AND SOLD
|
// DEFINE WHERECLAUSE BASED ON ACCOUNTHIERARCHY SALES AND SOLD
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
function getWhereclauselvl2($table_name,$permission,$partner){
|
function getWhereclauselvl2($table_name,$permission,$partner,$method){
|
||||||
|
|
||||||
//api_name converter to table
|
//api_name converter to table
|
||||||
$table =[
|
$table =[
|
||||||
@@ -752,6 +752,7 @@ function getWhereclauselvl2($table_name,$permission,$partner){
|
|||||||
];
|
];
|
||||||
|
|
||||||
$table = ($table_name != '') ? $table[$table_name] : 'accounthierarchy';
|
$table = ($table_name != '') ? $table[$table_name] : 'accounthierarchy';
|
||||||
|
$type = ($method == 'get') ? 'WHERE ' : '';
|
||||||
|
|
||||||
//SoldTo is empty
|
//SoldTo is empty
|
||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
@@ -765,11 +766,11 @@ function getWhereclauselvl2($table_name,$permission,$partner){
|
|||||||
break;
|
break;
|
||||||
case '3':
|
case '3':
|
||||||
$condition = '__salesid___'.$partner->salesid.'___soldto___%';
|
$condition = '__salesid___'.$partner->salesid.'___soldto___%';
|
||||||
$whereclause = 'WHERE '.$table.' like "'.$condition.'" ';
|
$whereclause = $type.$table.' like "'.$condition.'" ';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$condition = '__salesid___'.$partner->salesid.'___soldto___'.substr($partner->soldto, 0, strpos($partner->soldto, "-")).$soldto_search;
|
$condition = '__salesid___'.$partner->salesid.'___soldto___'.substr($partner->soldto, 0, strpos($partner->soldto, "-")).$soldto_search;
|
||||||
$whereclause = 'WHERE '.$table.' like "'.$condition.'"';
|
$whereclause = $type.$table.' like "'.$condition.'"';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,9 @@ if (isset($_GET['rowID'])) {
|
|||||||
if ($responses === 'NOK'){
|
if ($responses === 'NOK'){
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
generateLanguageFile($_POST['language_key'],$_SESSION['userkey']);
|
if ($_SESSION['permission'] == 4){
|
||||||
|
generateLanguageFile($_POST['language_key'],$_SESSION['userkey']);
|
||||||
|
}
|
||||||
header('Location: index.php?page=translation_manage&rowID='.$_GET['rowID'].'');
|
header('Location: index.php?page=translation_manage&rowID='.$_GET['rowID'].'');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -79,9 +81,10 @@ if (isset($_GET['rowID'])) {
|
|||||||
//RUN through all POST items
|
//RUN through all POST items
|
||||||
foreach ($_POST['item'] as $attr){
|
foreach ($_POST['item'] as $attr){
|
||||||
|
|
||||||
|
|
||||||
//GET ALL POST DATA
|
//GET ALL POST DATA
|
||||||
$payload = json_encode($attr, JSON_UNESCAPED_UNICODE);
|
$payload = json_encode($attr, JSON_UNESCAPED_UNICODE);
|
||||||
|
var_dump($payload);
|
||||||
//API call
|
//API call
|
||||||
$responses = ioServer('/v2/translations_details', $payload);
|
$responses = ioServer('/v2/translations_details', $payload);
|
||||||
|
|
||||||
@@ -96,11 +99,13 @@ if (isset($_GET['rowID'])) {
|
|||||||
|
|
||||||
if ($NOK_error == 0){
|
if ($NOK_error == 0){
|
||||||
//NO errors generatelanguagefile
|
//NO errors generatelanguagefile
|
||||||
generateLanguageFile($attr_language,$_SESSION['userkey']);
|
if ($_SESSION['permission'] == 4){
|
||||||
|
generateLanguageFile($attr_language,$_SESSION['userkey']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Location: index.php?page=translation_manage&rowID='.$_GET['rowID'].'');
|
//header('Location: index.php?page=translation_manage&rowID='.$_GET['rowID'].'');
|
||||||
exit;
|
//exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user