Show 'none' for assets where warranty isn't set
This commit is contained in:
+16
-20
@@ -148,15 +148,19 @@ 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
|
// Get & format asset warranty expiry
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = date('Y-m-d H:i:s');
|
||||||
$dt_value = $asset_warranty_expire; //sample date
|
$dt_value = $asset_warranty_expire; //sample date
|
||||||
$warranty_check = date('m/d/Y',strtotime('-8 hours'));
|
$warranty_check = date('m/d/Y',strtotime('-8 hours'));
|
||||||
|
|
||||||
if($dt_value <= $date){
|
if($dt_value <= $date){
|
||||||
$dt_value = "Expired on $asset_warranty_expire"; $color ='red';
|
$dt_value = "Expired on $asset_warranty_expire"; $warranty_status_color ='red';
|
||||||
}else{
|
}else{
|
||||||
$color = 'green';
|
$warranty_status_color = 'green';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($asset_warranty_expire == '0000-00-00'){
|
||||||
|
$dt_value = "None"; $warranty_status_color ='red';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -428,29 +432,25 @@ if(isset($_GET['ticket_id'])){
|
|||||||
<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> Asset name: <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>
|
<br>
|
||||||
<?php
|
|
||||||
if(!empty($asset_os)) {
|
<?php if(!empty($asset_os)) { ?>
|
||||||
?>
|
|
||||||
<i class="fa fa-fw fa-tag text-secondary ml-1 mr-2 mb-2"></i> OS: <?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>
|
<br>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($asset_ip)) {
|
}
|
||||||
?>
|
|
||||||
|
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"; ?>
|
<i class="fa fa-fw fa-network-wired text-secondary ml-1 mr-2 mb-2"></i> IP: <?php echo "$asset_ip"; ?>
|
||||||
<br>
|
<br>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
<?php
|
if (!empty($asset_make)) { ?>
|
||||||
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"; ?>
|
<i class="fa fa-fw fa-tag text-secondary ml-1 mr-2 mb-2"></i> Model: <?php echo "$asset_make $asset_model"; ?>
|
||||||
<br>
|
<br>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if (!empty($asset_serial)) {
|
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; ?>
|
<i class="fa fa-fw fa-barcode text-secondary ml-1 mr-2 mb-2"></i> Service Tag: <?php echo $asset_serial; ?>
|
||||||
@@ -458,20 +458,16 @@ if(isset($_GET['ticket_id'])){
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
if (!empty($asset_warranty_expire)) {
|
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
|
<i class="fa fa-fw fa-tag text-secondary ml-1 mr-2 mb-2"></i> Warranty expires: <strong><font color="<?php echo $warranty_status_color ?>"> <?php echo $dt_value ?></font></strong>
|
||||||
color="<?php echo $color ?>"> <?php echo $dt_value ?></font></strong>
|
|
||||||
<br>
|
<br>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<form action="post.php" method="post">
|
<form action="post.php" method="post">
|
||||||
|
|||||||
Reference in New Issue
Block a user