mirror of https://github.com/itflow-org/itflow
Update ticket.php
- Display IP on Asset section so would be handy for the technician when troubleshooting - Implement Asset warranty so the technician can take better decision regarding the asset fixing option (parts replacement under manufacturer warranty or in house parts replacement)
This commit is contained in:
parent
3bd79635ec
commit
55f8ba652a
62
ticket.php
62
ticket.php
|
|
@ -70,12 +70,14 @@ if(isset($_GET['ticket_id'])){
|
||||||
$contact_mobile = formatPhoneNumber($row['contact_mobile']);
|
$contact_mobile = formatPhoneNumber($row['contact_mobile']);
|
||||||
|
|
||||||
$asset_id = $row['asset_id'];
|
$asset_id = $row['asset_id'];
|
||||||
|
$asset_ip = htmlentities($row['asset_ip']);
|
||||||
$asset_name = htmlentities($row['asset_name']);
|
$asset_name = htmlentities($row['asset_name']);
|
||||||
$asset_type = htmlentities($row['asset_type']);
|
$asset_type = htmlentities($row['asset_type']);
|
||||||
$asset_make = htmlentities($row['asset_make']);
|
$asset_make = htmlentities($row['asset_make']);
|
||||||
$asset_model = htmlentities($row['asset_model']);
|
$asset_model = htmlentities($row['asset_model']);
|
||||||
$asset_serial = htmlentities($row['asset_serial']);
|
$asset_serial = htmlentities($row['asset_serial']);
|
||||||
$asset_os = htmlentities($row['asset_os']);
|
$asset_os = htmlentities($row['asset_os']);
|
||||||
|
$asset_warranty_expire = $row['asset_warranty_expire'];
|
||||||
|
|
||||||
$location_name = $row['location_name'];
|
$location_name = $row['location_name'];
|
||||||
$location_address = $row['location_address'];
|
$location_address = $row['location_address'];
|
||||||
|
|
@ -146,6 +148,18 @@ if(isset($_GET['ticket_id'])){
|
||||||
}
|
}
|
||||||
$client_tags_display = implode(' ', $client_tag_name_display_array);
|
$client_tags_display = implode(' ', $client_tag_name_display_array);
|
||||||
|
|
||||||
|
// Get the asset warranty expiry
|
||||||
|
$date = date('Y-m-d H:i:s');
|
||||||
|
$dt_value = $asset_warranty_expire; //sample date
|
||||||
|
$warranty_check = date('m/d/Y',strtotime('-8 hours'));
|
||||||
|
|
||||||
|
if($dt_value <= $date){
|
||||||
|
$dt_value = "Expired on $asset_warranty_expire"; $color ='red';
|
||||||
|
}else{
|
||||||
|
$color = 'green';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Breadcrumbs-->
|
<!-- Breadcrumbs-->
|
||||||
|
|
@ -392,20 +406,7 @@ if(isset($_GET['ticket_id'])){
|
||||||
<div class="card card-body card-outline card-dark mb-3">
|
<div class="card card-body card-outline card-dark mb-3">
|
||||||
<div>
|
<div>
|
||||||
<h4 class="text-secondary">Asset</h4>
|
<h4 class="text-secondary">Asset</h4>
|
||||||
<i class="fa fa-fw fa-desktop text-secondary ml-1 mr-2 mb-2"></i><strong><?php echo $asset_name; ?></strong>
|
<i class="fa fa-fw fa-desktop text-secondary ml-1 mr-2 mb-2"></i> Asset name: <strong><?php echo $asset_name; ?></strong>
|
||||||
<br>
|
|
||||||
<?php
|
|
||||||
if(!empty($asset_make)){
|
|
||||||
?>
|
|
||||||
<i class="fa fa-fw fa-tag text-secondary ml-1 mr-2 mb-2"></i><?php echo "$asset_make $asset_model"; ?>
|
|
||||||
<br>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
if(!empty($asset_serial)){
|
|
||||||
?>
|
|
||||||
<i class="fa fa-fw fa-barcode text-secondary ml-1 mr-2 mb-2"></i><?php echo $asset_serial; ?>
|
|
||||||
<br>
|
<br>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
@ -413,7 +414,38 @@ if(isset($_GET['ticket_id'])){
|
||||||
<?php
|
<?php
|
||||||
if(!empty($asset_os)){
|
if(!empty($asset_os)){
|
||||||
?>
|
?>
|
||||||
<i class="fa fa-fw fa-tag text-secondary ml-1 mr-2 mb-2"></i><?php echo $asset_os; ?>
|
<i class="fa fa-fw fa-tag text-secondary ml-1 mr-2 mb-2"></i> OS: <?php echo $asset_os; ?>
|
||||||
|
<br>
|
||||||
|
<?php
|
||||||
|
if(!empty($asset_ip)){
|
||||||
|
?>
|
||||||
|
<i class="fa fa-fw fa-network-wired text-secondary ml-1 mr-2 mb-2"></i> IP: <?php echo "$asset_ip"; ?>
|
||||||
|
<br>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
if(!empty($asset_make)){
|
||||||
|
?>
|
||||||
|
<i class="fa fa-fw fa-tag text-secondary ml-1 mr-2 mb-2"></i> Model: <?php echo "$asset_make $asset_model"; ?>
|
||||||
|
<br>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if(!empty($asset_serial)){
|
||||||
|
?>
|
||||||
|
<i class="fa fa-fw fa-barcode text-secondary ml-1 mr-2 mb-2"></i> Service Tag: <?php echo $asset_serial; ?>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
if(!empty($asset_warranty_expire)){
|
||||||
|
?>
|
||||||
|
<i class="fa fa-fw fa-tag text-secondary ml-1 mr-2 mb-2"></i> Warranty expire: <strong><font color="<?php echo $color?>" > <?php echo $dt_value?></font></strong>
|
||||||
<br>
|
<br>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue