<!DOCTYPE html>
<html >
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.7 -->
  <link rel="stylesheet" href="{{asset('lte/bower_components/bootstrap/dist/css/bootstrap.min.css')}}">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="{{asset('lte/bower_components/font-awesome/css/font-awesome.min.css')}}">
  <!-- Ionicons -->
  <link rel="stylesheet" href="{{asset('lte/bower_components/Ionicons/css/ionicons.min.css')}}">
  <!-- Theme style -->
  <link rel="stylesheet" href="{{asset('lte/dist/css/AdminLTE.min.css')}}">

  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->

  <!-- Google Font -->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body >
<div class="hidden-print text-center" style="float:left; margin:20px" >
        <a  class="btn btn-danger" href="{{URL::previous()}}">Back</a>
    </div>
<br><br><br>
  <!-- Main content -->
   <section class="invoice">
      <!-- title row -->
      <div class="row">
        <div class="col-xs-12">
          <h2 class="page-header">
            <i class=""></i>
            <small class="pull-right">}</small>
          </h2>
        </div>
        <!-- /.col -->
      </div>
      <!-- info row -->
      

      <?php $j = 1; ?>
      
      <div class="row invoice-info">
        <div class="col-sm-3 invoice-col" style="font-size: 15px;">
          <strong><strong>{{$order->prefix }}{{$order->request_no}} </strong></strong> <br>
        </div>

        <div class="col-sm-3 invoice-col" style="font-size: 15px;">
          <strong> Customer Name  : {{$order->customer ?? $order->customer_name}} </strong> <br>
        </div>
        
        <div class="col-sm-3 invoice-col" style="font-size: 15px;">
          <strong>Date   : {{date('d-m-Y',strtotime($order->request_date))}}</strong> <br>
        </div>


        <div class="col-sm-3 invoice-col" style="font-size: 15px;">
          <strong>Location   : {{$order->parent->name ?? ''}}</strong> <br>
        </div>
        
        <!-- /.col -->
      </div>
     <!--  page-break-after: always; -->
      <!-- Table row -->
      <div class="row" style="">
        <div class="col-xs-12 table-responsive">
          <table class="table table-bordered table-striped">
            <thead>
            <tr>
              <th>Sl No.</th>
              <th>Product</th>
              <th>Unit</th>
              <th>Grade</th>
              <th>Qty</th>
              <th>Price</th>
              <th>Tax</th>
              <th>Total</th>    
              <th>Remarks</th>
              <th>User</th>
            </tr>
            </thead>
            <tbody>
            <?php $c = 1;$total_amount = 0;?>
            @if($order_products != NULL)
            @foreach($order_products as $prd)
            <tr>
              <td>{{$c++}}</td>
              <td>{{$prd->product->name}}</td>
              <td>{{$prd->unit->unit ?? ''}}</td>
              <td>{{$prd->grade->grade}}</td>
              <td>{{$prd->qty}}</td>
              <td>{{$prd->price ?? ''}}</td>
              <td>{{$prd->tax_amount ?? ''}}</td>
              <td>{{$prd->total_amount ?? ''}}</td>
              <td>{{$prd->remarks}}</td>
              <td>{{$prd->user->name ?? ''}}</td>
            </tr>
            @endforeach
            @endif
            
            
            </tbody>
            
          </table>
          
        </div>
        
        <!-- /.col -->
      </div>
      <!-- /.row -->
      
      

      <!-- this row will not appear when printing -->
      <div class="row no-print">
        <div class="col-xs-12">
          <a  target="_blank"  class="btn btn-primary pull-right" onclick="window.print();"><i class="fa fa-print"></i> Print</a>
         <!-- <a href="{{url('ProductsReport.csv')}}" class="btn btn-success"><i class="fa fa-arrow-down"></i>Download Report</a> -->
        </div>
      </div>
    </section>
    <!-- /.content -->
  <!-- /.content -->
</div>
<!-- ./wrapper -->
</body>
</html>
