<div class="clearfix"></div>

  <div class="content-wrapper">

    <div class="container-fluid">

      <!-- Breadcrumb-->

     <div class="row pt-2 pb-2">

        <div class="col-sm-9">

			<a href="<?php echo base_url().'admin/influ_payments/'.$influ->influ_id;?>" class="btn btn-warning pull-right">Download Payment Sheet</a>
		    <h4 class="page-title">List Orders for Influence <b class="text-danger"><?php echo $influ->influ_name.' '.$influ->influ_mob;?></b></h4>

	   </div>

     

     </div>

    <!-- End Breadcrumb-->

      <div class="row">

			

            <div class="col-lg-12">

               <div class="card">

                    <div class="card-header">Listed Orders</div>

                    <div class="card-body">

                      <!--<select id="changestatus" class="form-control" style="width:200px;">

                                    <option value="">Filter Orders</option>

                                    <option value="Pending">Pending</option>

                                    <option value="Delivered">Delivered</option>

                                    <option value="Completed">Completed</option>

                                </select><br/>-->

                      <table class="table table-condensed table-bordered">

                        <thead>

                                                            <tr>



													<th>S.No.</th>



													<th>OrderNo.</th>



                                                    <th>OrderDate</th>


													<th>Customer</th>



                                                    <th>OrderTotal</th>



													<th>Margin</th>



													<th>Total Items</th>



													<th>Action</th>



												</tr>

                                                        </thead>

                        <tbody >
<?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->order_uid;?></h4></td>



                        <td><?php echo date("d M Y",strtotime($order->odate));?></td>
                        <td><?php echo $order->bname.'<br/>'.$order->bphone;?></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><?php echo $order->grand_total*$influ->influ_margin/100;?></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>
                           <span class="badge badge-dark">Pay Mode <?php echo $order->pay_method;?></span></td>



                        <td>



                         <!-- <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();?>admin/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++;}?>
											
                                            
                            

                        </tbody>

                      </table>


                      

                    </div>

                    

               </div>                  

            </div>

            

        </div><!--End Row-->

	  

	  <!--End Row-->



    </div>

    <!-- End container-fluid-->

    

    </div><!--End content-wrapper-->

   <!--Start Back To Top Button-->

    <a href="javaScript:void();" class="back-to-top"><i class="fa fa-angle-double-up"></i> </a>

    <!--End Back To Top Button-->

	

	<!--Start footer-->

	<footer class="footer">

      <div class="container">

        <div class="text-center">

          Copyright © 2020 Grocery Store

        </div>

      </div>

    </footer>

	<!--End footer-->

   

  </div><!--End wrapper-->



  <script src="<?php echo base_url();?>adminassets/plugins/bootstrap-datatable/js/jquery.dataTables.min.js"></script>

  <script src="<?php echo base_url();?>adminassets/plugins/bootstrap-datatable/js/dataTables.bootstrap4.min.js"></script>

  <script>

	$(document).ready(function(){
		});

</script>

<script src="<?php echo base_url();?>adminassets/js/sidebar-menu.js"></script>

<!-- Custom scripts -->

<script src="<?php echo base_url();?>adminassets/js/app-script.js"></script>

</body>

</html>

