<script type="text/javascript">
$(document).ready(function() {
    /* Build the DataTable with third column using our custom sort functions */
    var oTable = $("#test").dataTable( {
        "iDisplayLength": 25,
		 "aLengthMenu": [5,10,25,50,100],
		 "asSorting": [ "asc"], "aTargets": [ 1 ],
		 "sPaginationType": "full_numbers", "aoColumns": [  
			null, 
			null, 
			null, 
			null, 
			null, 
			null, 
			null, 
			 ]});
     oTable.fnSort( [ [1,'asc'] ] );
}); 


</script>
<div id="content">                        
<div class="wrap">
<div class="head">
	<div class="info">
							<h1><?php echo element('compName', $this->session->userdata('logged_in')) ?> [ 
								<?php echo element('compNo', $this->session->userdata('logged_in')) ?> ]</h1>
			<ul class="breadcrumb">
            	<li><a href="#"><?php echo $this->lang->line('dashboard') ?></a> <span class="divider">-</span></li>
                <li><a href="#"><?php echo $this->lang->line('module') ?></a> <span class="divider">-</span></li>
                <li class="active"><?php echo $this->lang->line('title') ?></li>
            </ul>
	</div>
	<div class="search">
		<form action="<?php echo base_url() ?>admin/search" method="post">
			<input name="search_text" type="text" placeholder="search..."/>                                
            <button type="submit"><span class="i-magnifier"></span></button>
		</form>
	</div>                        
</div><!-- head --> 
<div class="content">
<div class="wrap">                    
	<div class="row-fluid">
		<div class="span12">
        	<div class="block">
            	<div class="head">
                	<h2><?php echo $this->lang->line('titlelist') ?></h2>
                    	<ul class="buttons">
                        </ul>                                       
                </div>
            	<div class="content np table-sorting">
            	<table cellpadding="0" cellspacing="0" width="100%" id="test" class="editable">
                	<thead>
                    <tr>
            			<th style="display:none"></th>
            			<th width="5">#</th>
            			<th><?php echo $this->lang->line('itemCode')?></th>
            			<th><?php echo $this->lang->line('itemName')?></th>
            			<th><?php echo $this->lang->line('location')?></th>
            			<th class="tac"><?php echo $this->lang->line('um')?></th>
            			<th class="tar"><?php echo $this->lang->line('qthOH')?></th>
            		</tr>
        			</thead>
       				 <tbody>
			<?php $bil = 0;
				if($datatbls){
				foreach($datatbls as $datatbl):
				$bil++?>
            	<tr>
                	<td id="fldid"  style="display:none"><?php echo $datatbl->ID; ?></td>
                	<td class="tac"><?php echo $bil; ?></td>
                	<td id="locCode"><a href="<?php echo base_url()?>icsetting/ItemDetails/<?php echo $datatbl->ID; ?>"><?php echo $datatbl->itemCode; ?></a></td>
                	<td id="desc"><?php echo $datatbl->name; ?></td>
                	<td id="address"><?php echo $datatbl->locCode; ?></td>
                	<td class="tac" id="umCode"><?php echo $datatbl->umCode; ?></td>
                	<td class="tar" id="onHandQty"><?php echo $datatbl->onHandQty; ?></td>
                </tr>
            <?php endforeach; }?>
					</tbody>
			</table>                                         
			</div>

</div>   
</div>  

