<? if($operation['ajax_area']=='service'){?>
<div class="row">
		<div class="col-sm-3 m-t-xs">
			<!--<label><? echo $vis_language['TXTSERVICEITEM']?></label>-->
			<span class="m-l-sm"><? echo $service_details[0]['name'];?></span>
		</div>
		<div class="col-sm-3 m-t-xs">
			<label><? echo $vis_language['TXTCOST'];?></label>
			 <span class="m-l-sm"><? echo $operation['vis_total_cost'].' '.$domain[0]['currency'];?></span>
		</div>
		<div class="col-sm-2 m-t-xs">
			<label><? echo $vis_language['TXTQUANTITY']; ?></label>
			 <span class="m-l-sm"><? echo $operation['vis_quantity'];?></span>
		</div>
        <div class="col-sm-2 m-t-xs">
			<label><? echo $vis_language['TXTTOTAL']; ?></label>
			 <span class="m-l-sm"><? echo $operation['vis_quantity']*$operation['vis_total_cost'].' '.$domain[0]['currency'];?></span>
		</div>
		<div class="col-sm-2 m-t-xs">
			<ul class="navSeprator no-padder m-n">
				<li id="show_vis_ticket_tags"><a class="link"  href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=get_service_cost_update&vis_service_id=<? echo $operation['vis_service_id'];?>&vis_service_cost=<? echo $operation['vis_total_cost'];?>&vis_service_quantity=<? echo $operation['vis_quantity'];?>&vis_ticket_id=<? echo $operation['vis_ticket_id'];?>&vis_dept_id=<? echo $operation['vis_dept_id'];?>&vis_service_item_id=<? echo $service_details[0]['item_id'];?>" title="<? echo $vis_language['TXTUPDATE']; ?>"><?= $vis_language['TXTUPDATE']?></a></li>
			</ul>
		</div>       
</div>
<? $t=0; if($service_custom_details!=-1){?>
    <div class="row m-t">
    <div class="col-md-12">
    <? for($i=0;$i<count($service_custom_details);$i++){?>
                <? if($service_custom_details[$i]['field_type']==7 || $service_custom_details[$i]['field_type']==4){
					if($t==0){?>
                    <div class="form-group">
                     <label class="col-sm-2 control-label text-right" title=""><? echo $service_custom_details[$i]['field_name']?></label>
                    <div class="col-sm-10"> 
                        <label class="control-label"><? echo $service_custom_details[$i]['field_value'];?>&nbsp;</label>
                <? }else {?>
                , <label class="control-label"><? echo $service_custom_details[$i]['field_value'];?>&nbsp;</label>
				<? }$t++;?>
                     
			    <? }else{
                if(($t>0 && $service_custom_details[$i]['field_type']!=7) || ($t>0 && $service_custom_details[$i]['field_type']!=4)){ 
						echo '</div></div>';
						$t=0;
				}?>                   
                <div class="form-group"> 
                <label class="col-sm-2 control-label text-right" title=""><? echo $service_custom_details[$i]['field_name']?></label>
                <div class="col-sm-10">
                    <label class="control-label"><? echo $service_custom_details[$i]['field_value'];?>&nbsp;</label>
                </div>
                </div>
                <? }
				?>
            		
    <? }?> 	
    <script>$('.selectpicker').selectpicker();</script>
    </div>
    </div>
<? }?>
<? }?>
<? if($operation['ajax_area']=='CI'){
		if($total_ci>0){
			foreach($assets_details as $ci_details){
				//$is_expired ='';
				$is_expired =' ';
				//if($ci_details['ci_type_id']==2){
					if($ci_details['ci_type_id']==2 || $ci_details['ci_type_id']==3){
					$total_month = ($ci_details['warranty_year']*12)+$ci_details['warranty_month'];
					$current_date = strtotime(date('Y-m-d h:i:s'));
					$expiry_date = strtotime(date('Y-m-d h:i:s', $ci_details['installation_date']) . $total_month.' month');
					if($expiry_date <= $current_date){
						$is_expired='<div class="col-sm-1 m-t-xs"><span style="background-color: #e33244; color: #fff; font-weight: normal" class="btn btn-xs l-h-1x text-xs">'.$vis_language['TXTITILEXPIRED'].'</span></div>';
					}
				}?>
				<div class="row">
					<div class="col-sm-3 m-t-xs">
						<span class="m-l-sm"><a class="link m-l-xs" href="#/cmdb/cmdb_assets_details/<? echo $ci_details['name'];?>/<? echo $ci_details['child_id'];?>" title=""><? echo $ci_details['name'];?></a></span>
					</div>
					<div class="col-sm-3 m-t-xs">
						<label><? echo $vis_language['TXTUSEDBY']; ?></label>
						<span class="m-l-sm"><? echo $ci_details['usedby'];?></span>
					</div>
					<div class="col-sm-2 m-t-xs">
					   <label><? echo $vis_language['TXTIMPACT']; ?></label>
					   <span class="m-l-sm"><? echo $ci_details['impact_name'];?></span>
					</div>
					<?php echo $is_expired;?>
					<div class="col-sm-2 m-t-xs pull-right">
						<label><a class="text-muted link"  href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=cmdb&vis_operation=get_attach_ci_delete&vis_attach_id=<? echo $ci_details['attach_id'];?>&vis_static_area=vis_attach_ci_delete_form&vis_ticket_id=<? echo $operation['vis_ticket_id'];?>&vis_dept_id=<? echo $operation['vis_dept_id'];?>" title="<? echo $vis_language['TXTITILDETACH']; ?>"><?= $vis_language['TXTITILDETACH'];?></a></label>
					</div>	
				</div>
			<?php
				$attached_id .=$ci_details['child_id'].',';
			}
		}?>
		<div class="row">
			<div class="col-sm-12 m-t-xs">
				<?php if($total_ci==0){ $class="m-l-sm";?><label><? echo  $vis_language['TXTITILNOCIASSOCIATED'];?></label><?php }?>
				<span class="<?php echo $class;?>"><a class="link"  href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=cmdb&vis_operation=attach_ci_cmdb&vis_dept_id=<? echo $operation['vis_dept_id'];?>&vis_ticket_id=<? echo $operation['vis_ticket_id'];?>&vis_domain_id=<? echo $operation['vis_domain_id'];?>&attached_id=<?php echo $attached_id;?>" title="<? echo $vis_language['TXTATTACHCI']; ?>"><?= $vis_language['TXTATTACHCI'];?></a></span>
			</div>	
		</div>
<?php }?>
<? if($operation['ajax_area']=='problem'){?>
<div class="row">
	<div class="col-sm-3 m-t-xs">
        <!--<label><? echo $vis_language['TXTNAME'];?></label>-->
         <span class="m-l-sm"><a class="link" href="#/problem/problems_details/<? echo $problems_details[0]['problem_hash'];?>/<? echo $problems_details[0]['problem_id'];?>"><? echo $problems_details[0]['subject'];?></a></span>
    </div>
    <div class="col-sm-4 m-t-xs">
        <label><? echo $vis_language['TXTDEPARTMENT']; ?></label>
         <span class="m-l-sm"><? echo $problems_details[0]['department_name'];?></span>
    </div>
    <div class="col-sm-2 m-t-xs">
        <label><? echo $vis_language['TXTSTATUS']; ?></label>
         <span class="m-l-sm"><? echo $problems_details[0]['status_name'];?></span>
    </div>
    <div class="col-sm-2 m-t-xs pull-right">
        <label><a class="text-muted link"  href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=get_attach_problem_delete&vis_attach_id=<? echo $operation['vis_attach_id'];?>&vis_static_area=vis_attach_ci_delete_form&vis_ticket_id=<? echo $operation['vis_ticket_id'];?>&vis_dept_id=<? echo $operation['vis_dept_id'];?>" title="<? echo $vis_language['TXTITILDETACH']; ?>"><?= $vis_language['TXTITILDETACH'];?></a></label>
    </div>	
</div>
<? }?>
<? if($operation['ajax_area']=='changes'){?>
<div class="row">
    <div class="col-sm-3 m-t-xs">
        <!--<label><? echo $vis_language['TXTNAME'];?></label>-->
         <span class="m-l-sm"><a class="link" href="#/changes/changes_details/<?= $changes_details[0]['changes_hash'];?>/<?= $changes_details[0]['changes_id'];?>"><? echo $changes_details[0]['subject'];?></a></span>
    </div>
    <div class="col-sm-4 m-t-xs">
        <label><? echo $vis_language['TXTDEPARTMENT']; ?></label>
         <span class="m-l-sm"><? echo $changes_details[0]['department_name'];?></span>
    </div>
    <div class="col-sm-2 m-t-xs">
        <label><? echo $vis_language['TXTSTATUS']; ?></label>
         <span class="m-l-sm"><? echo $changes_details[0]['status_name'];?></span>
    </div>
    <div class="col-sm-2 m-t-xs pull-right">
        <label><a class="text-muted link"  href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=get_attach_changes_delete&vis_attach_id=<? echo $operation['vis_attach_id'];?>&vis_static_area=vis_attach_ci_delete_form&vis_ticket_id=<? echo $operation['vis_ticket_id'];?>&vis_dept_id=<? echo $operation['vis_dept_id'];?>" title="<? echo $vis_language['TXTITILDETACH']; ?>"><?= $vis_language['TXTITILDETACH'];?></a></label>
    </div>	
</div>
<? }?>