diff --git a/api/v2/get/products_software_assignment.php b/api/v2/get/products_software_assignment.php index fd29ca2..0c0a041 100644 --- a/api/v2/get/products_software_assignment.php +++ b/api/v2/get/products_software_assignment.php @@ -12,7 +12,7 @@ $pdo = dbConnect($dbname); if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';} //default whereclause -list($whereclause,$condition) = getWhereclauselvl2("software_assignment",$permission,$partner,'get'); +list($whereclause,$condition) = getWhereclauselvl2("",$permission,$partner,'get'); //NEW ARRAY $criterias = []; diff --git a/api/v2/post/products_software_assignment.php b/api/v2/post/products_software_assignment.php index 8a7d32c..b5c5151 100644 --- a/api/v2/post/products_software_assignment.php +++ b/api/v2/post/products_software_assignment.php @@ -27,15 +27,23 @@ $clause = ''; $clause_insert =''; $input_insert = ''; +//GET PARTNERDETAILS FROM USER +$sales_user = array( + "salesid"=>$partner->salesid, + "soldto"=>$partner->soldto +); +$accounthierarchy = json_encode($sales_user, JSON_UNESCAPED_UNICODE); + //ADD STANDARD PARAMETERS TO ARRAY BASED ON INSERT OR UPDATE if ($command == 'update'){ $post_content['updated'] = $date; $post_content['updatedby'] = $username; + $post_content['accounthierarchy'] = $accounthierarchy; } elseif ($command == 'insert'){ $post_content['created'] = $date; $post_content['createdby'] = $username; - // No accounthierarchy for assignments + $post_content['accounthierarchy'] = $accounthierarchy; } else { //do nothing diff --git a/equipments_mass_update.php b/equipments_mass_update.php index 565043e..285d955 100644 --- a/equipments_mass_update.php +++ b/equipments_mass_update.php @@ -193,7 +193,7 @@ if (isset($success_msg)){ } $view .= '
-
+
'; @@ -205,7 +205,7 @@ $soldto_dropdown = listPartner('soldto',$_SESSION['authorization']['permission'] $shipto_dropdown = listPartner('shipto',$_SESSION['authorization']['permission'],'',''); $location_dropdown = listPartner('location',$_SESSION['authorization']['permission'],'',''); -$view .='
+$view .='