<div class="vd_content-wrapper">
      <div class="vd_container">
        <div class="vd_content clearfix">
          <div class="vd_head-section clearfix">
            <div class="vd_panel-header">
              <ul class="breadcrumb">
                <li><a href="<?php echo base_url();?>admin">Home</a> </li>
                <li class="active">Orders Details</li>
              </ul>
              
 
            </div>
          </div>
          <!-- vd_head-section -->
          
          <div class="vd_title-section clearfix">
            <div class="vd_panel-header">
              <h1>Orders Details</h1>
              
<!-- vd_panel-menu --> 
            </div>
            <!-- vd_panel-header --> 
          </div>
          <!-- vd_title-section -->
          
          <div class="vd_content-section clearfix">
            
         <div class="row">
              <div class="col-sm-9">
                <div class="panel widget light-widget">
                  <div class="panel-body" style="padding:40px;" id="printsec">
                    <div class="pull-right text-right">
                      <h3 class="font-semibold mgbt-xs-20">INVOICE</h3>
                      <table class="table table-bordered">
                        <tr>
                          <th>Invoice No.</th>
                          <th>Date</th>
                        </tr>
                        <tr>
                          <td>#<?php echo $order->oid;?></td>
                          <td><?php echo date("d M Y",strtotime($order->odate));?></td>
                        </tr>
                      </table>
                    </div>
                    <div class="mgbt-xs-20"><img style="height:60px;" alt="logo" src="<?php echo base_url();?>assets/images/logo.png" /></div>
                    <address>
                    HadesIndia, <br>
                    123, ABC Test Store, ABC City State 123456<br/>shop no.1, ABC Banguluru 123456<br>
                    <abbr title="Phone">Ph :</abbr> 1234567890, +91 9986133566<br />
                    <br />
                    info@hadesindia.com
                    </address>
                    <hr/>
                    <br/>
                    <div class="pd-25">
                      <div class="row">
                        <div class="col-xs-8">
                          <address>
                          <strong>Bill To:</strong><br>
                          <?php echo $order->bname;?><br>
                          <?php echo $order->baddress;?><br>
                          <?php echo $order->blandmark.' '.$order->bcity.' '.$order->bstate.' '.$order->bpin;?><br>
                          <i class="fa fa-phone"></i> <?php echo $order->bphone;?>
                          </address>
                        </div>
                       <!-- <div class="col-xs-4">
                          <address>
                          <strong>Ship To:</strong><br>
                          John Doe<br>
                          795 Folsom Ave, Suite 600<br/>
                          San Francisco, CA 94107<br>
                          </address>
                        </div>-->
                       <!-- <div class="col-xs-2">
                          <address>
                          <strong>Due Date:</strong><br>
                          24 July 2013
                          </address>
                        </div>-->
                        <div class="col-xs-4">
                          <div class="text-right">
                          <strong>Total Amount:</strong><br>
                          <span class="mgtp-5 vd_green font-md">Rs. <?php echo $order->ototal;?>/-</span>
                          </div>
                        </div>
                      </div>
                    </div>
                    <table class="table table-condensed table-striped">
                      <thead>
                        <tr>
                          <th>SKU</th>
                          <th>DESCRIPTION</th>
                          <th class="text-center" style="width:20px;">QTY</th>
                          <th class="text-right" style="width:120px;">UNIT PRICE</th>
                          <th class="text-right" style="width:120px;">TOTAL</th>
                        </tr>
                      </thead>
                      <tbody>
                      <?php foreach($items as $item){?>
                        <tr>
                          <td class="text-center"><?php echo $item->pid;?></td>
                          <td class="text-center">
                          <img  width="100px" class="img img-responsive pull-left" src="<?php echo base_url();?>assets/images/products/<?php echo $item->pimg;?>"> <?php echo $item->pname;?></td>
                          <td><?php echo $item->qty?></td>
                          <td class="text-right"> <?php echo $item->price.'/- ';?></td>
                          <td class="text-right"> <?php echo $item->subtotal;?>/-</td>
                          
                        </tr>
                        <?php }?>
                      </tbody>
                      <tfoot>
                        <tr>
                          <th colspan="3" rowspan="3" class="bdr">
                            <!--<h4>Offer Code Used - 
                            <b class="text-danger"><?php if($order->offer!=""){
							  $of=$this->db->get_where("promos",array("promo_id"=>$order->offer))->row();
							  echo $of->promo_code;}?></b></h4>--></th>
                          <th class="text-right pd-10">Sub Total</th>
                          <th class="text-right pd-10">Rs <?php echo $order->ototal+$order->odis;?>/-</th>
                        </tr>
                        <tr>
                          <th class="text-right  pd-10 no-bd">Discount</th>
                          <th class="text-right  pd-10 vd_red no-bd">Rs <?php echo $order->odis;?>/-</th>
                        </tr>
                        <tr>
                          <th class="text-right  pd-10 no-bd">Shipping Cost</th>
                          <th class="text-right  pd-10 no-bd">0.0</th>
                        </tr>
                        <tr>
                          <th colspan="3">Thank you for your order. Please remit the total amount due within 30 days.</th>
                          <th class="text-right  pd-10">Order Total</th>
                          <th class="text-right  pd-10"><span class="vd_green font-sm font-normal">Rs <?php echo $order->ototal;//-$order->odis;?>/-</span></th>
                        </tr>
                      </tfoot>
                    </table>
                  </div>
                  <!-- panel-body --> 
                  
                </div>
                <!-- Panel Widget --> 
              </div>
              <!-- col-sm-9-->
              <div class="col-sm-3">
                <div class="mgbt-xs-5">
                  <a href="<?php echo base_url();?>admin/orders" class="btn btn-warning" type="button">
                  <i class="fa fa-arrow-left"></i> Back To All Orders</a>
                </div>
                <div class="mgbt-xs-5">
                  <button class="btn vd_btn vd_bg-grey" onclick="printPage('printsec');" type="button"><i class="fa fa-print append-icon"></i>Print Invoice</button>
                </div>
                <div class="mgbt-xs-5">
                  <a class="btn vd_btn vd_bg-green" href="<?php echo base_url();?>admin/invoice_pdf/<?php echo $this->uri->segment(3);?>"><i class="fa fa-download append-icon"></i>Get PDF</a>
                </div>
                 <div class="mgbt-xs-5">
                  <a class="btn vd_btn vd_bg-red" href="<?php echo base_url();?>admin/delete_order/<?php echo $order->oid;?>"><i class="fa fa-trash-o append-icon"></i>Delete Order</a>
                </div>
                <div class="mgbt-xs-5">
                <hr/>
                <h5>Update Order Status</h5>
                <p id="ostresponse" class="text-danger"></p>
                  <select id="changestatus" class="form-control">
                  		<option value="In Process" <?php if($order->ostatus=="In Process"){echo "selected";}?>>Pending</option>
                        <option value="Delivered" <?php if($order->ostatus=="Delivered"){echo "selected";}?>>Delivered</option>
                        <option value="Cancel" <?php if($order->ostatus=="Cancel"){echo "selected";}?>>Cancel</option>
                        <option value="Completed" <?php if($order->ostatus=="Completed"){echo "selected";}?>>Completed</option>
                  </select>
                </div>
              </div>
            </div>
          </div>
        </div>
        <!-- .vd_content --> 
      </div>
      <!-- .vd_container --> 
    </div>
  </div>
  <!-- .container --> 
</div>
<!-- .content -->

<!-- Footer Start -->
  <footer class="footer-1"  id="footer">      
    <div class="vd_bottom ">
        <div class="container">
            <div class="row">
              <div class=" col-xs-12">
                <div class="copyright">
                  	Copyright &copy;2018 HadesIndia. All Rights Reserved 
                </div>
              </div>
            </div><!-- row -->
        </div><!-- container -->
    </div>
  </footer>
<!-- Footer END -->
  

</div>

<!-- .vd_body END  -->
<a id="back-top" href="#" data-action="backtop" class="vd_back-top visible"> <i class="fa  fa-angle-up"> </i> </a>

<!--
<a class="back-top" href="#" id="back-top"> <i class="icon-chevron-up icon-white"> </i> </a> -->

<!-- Javascript =============================================== --> 
<!-- Placed at the end of the document so the pages load faster --> 

		<script>
function printPage(id) {
    var html="<html>";
    html+= document.getElementById(id).innerHTML;
    html+="</html>";
    var printWin = window.open('','','left=100,top=100,width=1200,height=600,toolbar=0,scrollbars=0,status =0');
    printWin.document.write(html);
    printWin.document.close();
    printWin.focus();
    printWin.print();
    printWin.close();
}
	$(document).ready(function(){
		$("#changestatus").change(function(){
			//alert("AFsd");
			var st=$(this).val();
			$.ajax({
					type:'POST',
					data:{oid:'<?php echo $this->uri->segment(3);?>',st:st},
					url:'<?php echo base_url();?>admin/ostatus_change',
					success:function(data){
					  // alert(data);
						$("#ostresponse").html(data); 
						//$('#sectionn').material_select();  
					}
			});
		});
	});
</script>
		
		
<script type="text/javascript" src='<?php echo base_url();?>adminassets/plugins/jquery-ui/jquery-ui.custom.min.js'></script>
<script type="text/javascript" src="<?php echo base_url();?>adminassets/plugins/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js"></script>

<script type="text/javascript" src="<?php echo base_url();?>adminassets/js/caroufredsel.js"></script> 
<script type="text/javascript" src="<?php echo base_url();?>adminassets/js/plugins.js"></script>

<script type="text/javascript" src="<?php echo base_url();?>adminassets/plugins/breakpoints/breakpoints.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>adminassets/plugins/prettyPhoto-plugin/js/jquery.prettyPhoto.js"></script> 

<script type="text/javascript" src="<?php echo base_url();?>adminassets/plugins/mCustomScrollbar/jquery.mCustomScrollbar.concat.min.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>adminassets/plugins/tagsInput/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>adminassets/plugins/bootstrap-switch/bootstrap-switch.min.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>adminassets/plugins/blockUI/jquery.blockUI.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>adminassets/plugins/pnotify/js/jquery.pnotify.min.js"></script>

<script type="text/javascript" src="<?php echo base_url();?>adminassets/js/theme.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>adminassets/custom/custom.js"></script>

</body>
</html>