CIM71 - Add related users to assest, CIM72 Add related users to accounts
This commit is contained in:
@@ -10,6 +10,8 @@ if (debug && debug_id == $_SESSION['id']){
|
||||
include_once './assets/functions.php';
|
||||
include_once './settings/settings.php';
|
||||
|
||||
//SET ORIGIN FOR NAVIGATION
|
||||
$_SESSION['prev_origin_equipment'] = $_SERVER['REQUEST_URI'];
|
||||
$page = 'equipment';
|
||||
//Check if allowed
|
||||
if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
@@ -276,11 +278,31 @@ if ($update_allowed === 1){
|
||||
';
|
||||
}
|
||||
|
||||
//DISPLAY RELATED COMMUNICATION RECORDS
|
||||
$soldto_id = explode("-",$partner_data->soldto) ?? '';
|
||||
$shipto_id = explode("-",$partner_data->shipto) ?? '';
|
||||
|
||||
$partner_users_id = ($shipto_id[0] != '')? $shipto_id[0] : (($soldto_id[0] != '')? $soldto_id[0] : 1);
|
||||
|
||||
$view_communication = '';
|
||||
if ($partner_users_id != 1 && ($_SESSION['permission'] == 3 || $_SESSION['permission'] == 4)){
|
||||
$view_communication = ' <a href="index.php?page=communications&partnerid='.$soldto_id[0].'" class="btn">'.$button_partner_assigned_communication.'</a>';
|
||||
}
|
||||
|
||||
//DISPLAY RELATED USERS
|
||||
$view_users ='';
|
||||
if ($partner_users_id != 1 && ($_SESSION['permission'] == 3 || $_SESSION['permission'] == 4)){
|
||||
$view_users = ' <a href="index.php?page=users&partnerid='.$soldto_id[0].'" class="btn">'.$button_partner_assigned_users.'</a>';
|
||||
}
|
||||
|
||||
$view .= '<div class="content-block">
|
||||
<div class="block-header">
|
||||
<i class="fa-solid fa-bars fa-sm"></i>'.$view_asset_actions.'
|
||||
</div>
|
||||
<a href="index.php?page=history&equipmentID='.$_GET['equipmentID'].'" class="btn">'.$button_history.'</a>';
|
||||
<a href="index.php?page=history&equipmentID='.$_GET['equipmentID'].'" class="btn">'.$button_history.'</a>
|
||||
'.$view_communication.'
|
||||
'.$view_users.'
|
||||
';
|
||||
|
||||
if ($update_allowed === 1){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user