
	<script>
	var util = { };

document.addEventListener('keydown', function(e){

    var key = util.key[e.which];
    if( key ){
        e.preventDefault();
    }

   if( key === 'F5' ){        
  return  printDiv('printableArea');
    }
  if( key === 'F6' ){        
  window.location.href = "../user/viewtasks";
    }

	 if( key === 'enter' ){        
return true;
    }
	
   
	
	
})


  
util.key = { 
  9: "tab",
  //13: "enter",
  16: "shift",
  12: "alt",
  27: "esc",
  33: "rePag",
  34: "avPag",
  35: "end",
  36: "home",
  37: "left",
  38: "up",
  39: "right",
  40: "down",
  112: "F1",
  113: "F2",
  114: "F3",
  115: "F4",
  116: "F5",
  117: "F6",
  112: "F7",
  119: "F8",
  120: "F9",
  121: "F10",
  122: "F11",
  123: "F12"
}
 

	</script>
<script>
	function printDiv(divName) {
     var printContents = document.getElementById(divName).innerHTML;
     var originalContents = document.body.innerHTML;

     document.body.innerHTML = printContents.fontsize(16);

	 if( window.print()) {
         window.location.href = "../user/viewtasks";
		alert(" printing...........");
    }else {

	
		      return      window.location.href = "../user/viewtasks";

		    // document.body.innerHTML = originalContents;

	}
}
	</script>
  <style type="text/css">
  
  

    #printable { display: none; }
#print{  	


    background-repeat: no-repeat;
	font-size;20px;
  
    width:100%; height:50px;


}

#sale{  	
background-image:url(images/add.png) ;

    background-repeat: no-repeat;
  
    width:100px; height:50px;


}
    @media print
    {
    	#non-printable { display: none; }
    	#printableArea { display: block; font-size:18; width:100%; }
    }
    </style>
<?PHP

 echo $this->session->flashdata('imagemsg1'); 
		 
		    
$session_data = $this->session->userdata('logged_in');


$data['surname'] = $session_data['surname'];
$data['id'] = $session_data['id'];

$surname=$data['surname'];
   $userid=$data['id'];

   $myuser=$this->usermodel->geteuser($userid);
   $myname=$myuser[0]['firstname'];
    $postedtime = date('Y-m-d');
		$currenttime = date('h:i:sa');
 		$dateposted =  ($postedtime)." ".$currenttime ;	

function formatMoney($number, $fractional=false) {
						if ($fractional) {
							$number = sprintf('%.2f', $number);
						}
						while (true) {
							$replaced = preg_replace('/(-?\d+)(\d\d\d)/', '$1,$2', $number);
							if ($replaced != $number) {
								$number = $replaced;
							} else {
								break;
							}
						}
						return $number;
					}	

 $displaycode=$this->usermodel->populatuserpermissionsdataarray('config','productcode',$userid);

					
?>
 
 <div class="row">

 

   	<div class="col-md-12">
	
  
		<div class="panel panel-default" data-collapsed="0">
        	<div class="panel-heading" id="non-printable">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>
						 <span class="pull-right"> View Valuation</span>
						 
							<div class="print-hide"  >
<form name="print" method="post" action="">
 
 <div class="row">

 

   	<div class="col-md-6">
	
	
  			  <a class="btn btn-primary" id="next-btn" href="<?php echo base_url(); ?>user/viewtasks">Go back </a>
</div>
   	<div class="col-md-6">
<input type="submit" id="print"  accesskey="p" class="btn btn-primary"  name="print"onclick="printDiv('printableArea')" value="Print Assesment!" />
</form></div></div>
							</div> 
						 
						 

				
            	</div>
            </div>
				<div class="table-responsive">
			<div id="printableArea" style="width:100%" >

				<table border="0" width="100%">
					
						<tr>
						<td colspan="2" valign="top">
<?php
 $session_data = $this->session->userdata('logged_in');

   
 	$data['id'] = $session_data['id'];
        
		 $userid = $data['id'];
$data['companyid'] = $session_data['companyid'];
	 $companyid = $data['companyid'];
		 $data['usertype'] = $session_data['usertype'];
	 $usertype = $data['usertype'];	

								$profile = $this->usermodel->populateall('smsconfig','id',$companyid);

	
		if(!is_array($profile)) 

 {
	 $this->session->set_flashdata('msg', '<div class="alert alert-danger fade in">
						 <a href="#" class="close" data-dismiss="alert">&times;</a><strong>Error!</strong>Upload photo</div>');
							

    }else {

    
          
  	foreach ($profile as $c): 
$photo= $c->logo;
		 	if($photo!=""){
		 
		 
		
		
	
			
		
		$img=$c->logo;
	
		$img1='uploads/';
	$url = base_url().$img1.$img;

 
 ?>
 <div >
<img class="img-circle" src="<?php echo $url ?>" height="100" width="100" style="border-radius:4px;  ">		 

</div>



	 <?php }else{
		 ?>

				<?php
	 }
		 endforeach; ?>

              <?php }?>
						
						
						
				
						<?php $description=$configuration[0]['description']; if(isset($description)) {echo   $description; }?>
							
						
						
						
						</td>
						
						<td colspan="4" valign="top">
					<h1>VALUATION 	</h1>
					
<br><br>
						 Valuation Date:  <?php echo$report[0]['date'];?><BR>
						  No: <?php echo$report[0]['id'];?><BR>

					

					
						REF NO:<?php echo$report[0]['invoice'];?><BR>
					 
					
			
						<BR>
						 Person Incharge:  <?php 
						
							$user=$this->usermodel->populateallarray('people','id', $report[0]['userid']);
						echo$names=$user[0]['firstname']. " ".$user[0]['surname'] ;
						
						
						?><BR>

						</td>
						
						</tr>
						
					<TR>
					<td colspan="6">
					<hr style="border-top: 2px solid gray;">

					</td>
					</TR>
						
						
																				
																				
																				</table >
											
											
											<table  class="table table-bordered" border="0" width="100%">
											
									<tr><td>SERIAL No:: </td> <td><?php echo $report[0]['serialno'] ; ?></td><td>INSPECTED BY: </td> <td><?php echo $report[0]['inspectedby'] ; ?></td></tr>										
<tr><td>INSURED NAME: </td> <td><?php echo $report[0]['insuredname'] ; ?></td><td>CONTACT: </td> <td><?php echo $report[0]['contact'] ; ?></td></tr>										
<tr><td>INSURER: </td> <td><?php echo $report[0]['insurer'] ; ?></td><td>POLICY No: </td> <td><?php echo $report[0]['policyno'] ; ?></td></tr>										

									
<tr><td><b>EXPIRY DATE: </b></td> <td><?php echo $report[0]['expirydate'] ; ?></td><td colspan="2"> </td></tr>										
<tr><td colspan="4"> <?php echo $report[0]['instructions'] ; ?></td></tr>

							
<tr><td>REG NO: </td> <td><?php echo $report[0]['registrationno'] ; ?></td><td>MAKE: </td> <td><?php echo $report[0]['make'] ; ?></td></tr>										
<tr><td>MODEL: </td> <td><?php echo $report[0]['model'] ; ?></td><td>COLOUR: </td> <td><?php echo $report[0]['colour'] ; ?></td></tr>										
<tr><td>YOM: </td> <td><?php echo $report[0]['yom'] ; ?></td><td>FUEL TYPE: </td> <td><?php echo $report[0]['fueltype'] ; ?></td></tr>										
<tr><td>ENGINE No: </td> <td><?php echo $report[0]['engineno'] ; ?></td><td>CHASSIS NO: </td> <td><?php echo $report[0]['chassisno'] ; ?></td></tr>										
<tr><td>MILEAGE: </td> <td><?php echo $report[0]['mileage'] ; ?></td><td>ENGINE RATING </td> <td><?php echo $report[0]['enginerating'] ; ?></td></tr>										
<tr><td>COUNTRY OF ORIGIN: </td> <td><?php echo $report[0]['countryoforigin'] ; ?></td><td>LOCATION OF INSPECTION: </td> <td><?php echo $report[0]['locationofinspection'] ; ?></td></tr>										
<tr><td>COACH WORK: </td> <td><?php echo $report[0]['coachwork'] ; ?></td><td>MECHANICAL: </td> <td><?php echo $report[0]['mechanical'] ; ?></td></tr>	


<tr><td><b>ELECTRICAL: </b></td> <td colspan="3"><?php echo $report[0]['electrical'] ; ?></td></tr>										
<tr><td><b>TYRES: </b></td> <td colspan="3"><?php echo $report[0]['tyres'] ; ?></td></tr>										
<tr><td><b>GENERAL CONDITION: </b></td> <td colspan="3"><?php echo $report[0]['generalcondition'] ; ?></td></tr>										
<tr><td><b>ASSESSED VALUE: </b></td> <td colspan="3"><?php echo $report[0]['assessedvalue'] ; ?></td></tr>										

<tr><td><b>FEATURES: </b></td> <td colspan="3"><?php echo $report[0]['features'] ; ?></td></tr>										
<tr><td>ANTI THEFT: </td> <td><?php echo $report[0]['anittheft'] ; ?></td><td>WINDSCREEN VALUE: </td> <td><?php echo $report[0]['windscreenvalue'] ; ?></td></tr>										

<tr><td><b>RADIO VALUE: </b></td> <td colspan="3"><?php echo $report[0]['radiovalue'] ; ?></td></tr>										
<tr><td><b>REMARKS: </b></td> <td colspan="3"><?php echo $report[0]['remarks'] ; ?></td></tr>										



	<tr><td>SIGN: </td> <td>-------------------------------</td><td>DATE: </td> <td><?php echo $report[0]['date'] ; ?></td></tr>										
								
<tr><td colspan="4"> <?php echo $report[0]['reportdetails'] ; ?></td></tr>										
								
									
															
								
											
											
											
											
							
							
									
							
							
							
				
								
									
									
					</table>
	
					
					
					
					
				</div>
			</div>
			</div>
		</div>
  
  </div>
 </div>
 </div> 
			
			
		
		
	<script type="text/javascript">


$(window).load(function()
{
	 if( window.print()) {
         window.location.href = "../user/viewtasks";
 }else{
	  //       window.location.href = "../user/allinvoices";
 
 }
});
</script>	


























