<?php  $i=1;foreach($orders as $order){?>

                                            <tr data-category="active">

													<td data-title=""><?php echo $i;?></td>

                        <td data-title="Title"><h4>#<?php echo $order->oid;?></h4></td>

                        <td><?php echo date("d M Y",strtotime($order->odate));?></td>
                        <td><?php echo $order->city_name.'<br/>'.$order->store_person;?></td>
                        <td><?php echo date("d M Y",strtotime($order->delivery_date)).' '.$order->dt_slot;?></td>

                        <td><i class="fa fa-user"></i> <?php echo $order->first_name.' '.$order->last_name;?><br/>

                           <i class="fa fa-envelope"></i> <?php echo $order->email;?></td>

                           <td><label class="badge badge-primary">SubTotal :<?php echo $order->ototal;?></label><br/>

                               <label class="badge badge-info">Shipping :<?php echo $order->shiptot;?></label><br/>

                               <label class="badge badge-default">Discount :<?php echo $order->odis;?></label><br/>

                               <label class="badge badge-success">Total :<?php echo $order->ototal-$order->odis;?></label></td>

                           <td><span class="badge badge-default"><?php if($order->pay_status==""){echo "Transaction Pending";}else{echo $order->pay_status;}?></span><br/>

                           <span class="badge badge-warning"><?php echo $order->trans_id;?></span><br/>

                           <span class="badge badge-success"><?php echo $order->txn_ref;?></span></td>

                        <td>
 <span class="badge badge-dark"><?php echo $order->ostatus;?></span>
                         <!-- <a href="#" id="<?php echo $order->oid;?>" data-toggle="modal" data-target="#md-default" class="btn btn-xs btn-success vieworder"><i class="fa fa-shopping-cart"> <?php echo $order->bitems;?> Items</i></a>-->

                           <a href="<?php echo base_url();?>store/order_details/<?php echo $order->oid;?>" class="btn btn-sm btn-success vieworder"><i class="fa fa-shopping-cart"> View <?php echo $order->bitems;?> Items</i></a><br/>

                        

                          

                        </td>

                        <td data-title="Action">

<div class="tg-btnsactions">

    <a class="btn btn-sm btn-danger order_delete" href="<?php //echo $order->oid;?>"><i class="fa fa-trash-o"></i></a>

  

</div>

                        </td>

												</tr>

                                            <?php $i++;}?>