<?php $type=$this->db->query("select image  from invoice 
      where id=$invoice_id");
    foreach ($type->result() as $key => $logo)
      $logo=$logo->image; 
    $defult="index.jpg";
    if($logo){
      $img= '<img src='.base_url().'invoice-uploads/'.$logo.' alt="Smiley face" class="profile"  style="height: 104px;margin: 0;float: right;width: 104px;background: #fff none repeat scroll 0 0;border: 5px solid #7fd000; border-radius: 50%;float: right;margin-top: -151px;margin-right: 62px;">';
    }
    else{
      $img='<img src='.base_url().'invoice-uploads/'.$defult.' alt="Smiley face" class="profile" style="height: 104px;margin: 0;float: right;width: 104px;background: #fff none repeat scroll 0 0;border: 5px solid #7fd000; border-radius: 50%;float: right;margin-top: -151px;margin-right: 62px;"  >'; 
    }
		
      
		foreach ($query as $key=> $invoice){
            $qty=unserialize($invoice->invoice_qty_info);
     $unit=unserialize($invoice->invoice_unit_info);
     $des=unserialize($invoice->invoice_des_info);
     $amount=unserialize($invoice->invoice_amount_info);
            $tax=unserialize($invoice->invoice_tax_info);
             $total=($invoice->total);
            $condition=($invoice->condition);
            $pay_type=($invoice->pay_type); ?>
            
            
             <div style="margin-bottom: 20px; width:40%;" class="company">
             <h3 style="margin-bottom: 5px;" class="from-company">  </h3> <p></p></div>
           
           
            
                               <?php  }  ?>