<div class="content-wrapper"> 
  <!-- Content Header (Page header) -->
  <section class="content-header">
    <h1> Channellimo <small>Preview</small> </h1>
    <ol class="breadcrumb">
      <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
      <li><a href="#">Forms</a></li>
      <li class="active">CLSERVICE Detail</li>
    </ol>
  </section>
  <section class="content">
    <div class="box">
      <div class="box-header">
        <h3 class="box-title"><a href="#">CLSERVICE Detail</a></h3>
      </div>
      <!-- /.box-header -->
      <div class="box-body">
       <style>
	    th{
			width:15%;			
		}
		.dd1{
			width:2%;
		}
		/*th{
			width:25%;
			border: 1px solid #ddd;			
		}
		td{
			border: 1px solid #ddd;			
		}		*/
        </style>
        <?php 
		
		?>
        <div class="col-lg-12">
          <table id="tech-companies-1" class="table table-small-font table-bordered table-striped">
          <thead>
            <tr>
              <th>DateService</th>
              <th>Company Name</th>
              <th>Guest Name</th>
              <th>Driver Name</th>
              <th>CarType</th>
              <th>Service Details</th>
              <th>SellerName</th>
              <th>VocherNum</th>
              <th>InvoiceNum</th>
              <th>Remark</th>
              <th>Reason</th>
              <th>CreatedDate</th>
              <th>CreatedBy</th>
            </tr>
          </thead>
          <tbody align="center">
          <?php 
			if($report->ref_id != NULL||$report->ref_id!=''){
				$ref_id = $report->ref_id;
			}else{
				$ref_id = '0';
			}
			$sql = $this->db->query('SELECT * FROM `tblcarservices` INNER JOIN `tbluser` on `tbluser`.`userid` = `tblcarservices`.`CreatedBy` WHERE `ref_id` = '.$ref_id.' ORDER BY `id`');
			foreach ($sql->result() as $v)
			{  	
		   ?>
			 <tr>
              <td data-order="<?php echo $i;?>"><?php echo date("d-M-Y", strtotime($v->Date));?></td>
              <td><?php echo $v->Company;?></td>
              <td><?php echo $v->GuestName;?></td>
              <td ><?php echo $v->DriverName;?></td>
              <td><?php echo $v->CarType;?></td>
              <td><?php echo $v->ServiceDetail;?></td>
              <td><?php echo $v->Seller;?></td>
              <td><?php echo $v->VocherNumber;?></td>
              <td><?php echo $v->InvoiceNumber;?></td>
              <td style="font-size:13px;"><?php echo $v->Remark;?></td>
              <td ><?php echo $v->reason;?></td>
              <td><?php echo date("Y-M-d H:i:s", strtotime($v->CreatedDate));?></td>
              <td style="font-size:13px;"><?php echo $v->fullname;?></td>
            </tr>
           <?php $i++;}?>
           </tbody>
        </table>
        </div>
      </div>
      <!-- /.box-body --> 
    </div>
    <!-- /.box --> 
    
  </section>
</div>

