<!DOCTYPE html>
<html >
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>SUHOL AL FAYHA</title>
  <!-- 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>

  <!-- Main content -->

      <!-- title row -->
      <div class="row">
        <div class="col-xs-10">

          <h2 class="page-header">
            <i class=""></i> MR Product Wise Report
            <small class="pull-right">Request Date: {{date('d-m-Y',strtotime($from))}} - {{date('d-m-Y',strtotime($to))}}</small>
          </h2>
        </div>
        <!-- /.col -->
      </div>
      
      <!-- info row -->
        
      <div class="row invoice-info">
       <div class="col-xs-2"></div>
        <div class="col-sm-4 invoice-col">
         <strong> Category Name  :  </strong> {{$product->productCategory['category']}}<br>
          
        </div>
        <!-- /.col -->
        <div class="col-sm-4 invoice-col">
           <strong> Product Name : </strong> {{$product->name}}
        </div>
       
      </div><br>
      <!-- /.row -->

      <!-- Table row -->
     
      <div class="row" style="page-break-after: always;">
      <div class="col-xs-2"></div>
        <div class="col-xs-8 table-responsive">
          <table class="table table-bordered table-striped">
            <thead>
            <tr>
              <th>Sl No.</th>
              <th>MR No.</th>
              <th>Customer Name</th>
              <th>Customer Type</th>
              <th>Unit</th>
              <th>Grade</th>
              @if($status == 'REQ')
              <th>Quantity</th>
              @else
              <th>Requested Qty</th>
              <th>Approved Qty</th>
              @endif
            </tr>
            </thead>
            <tbody>
            
            <?php $c = 1;  $qty = 0 ;?>
            @if($requests != NULL)
            @foreach($requests as $request)
            <tr>
              <td>{{$c++}}</td>
              <td>{{$request->request_no}}</td>
              <td>{{$request->name}}</td>
              <td>{{$request->type}}</td>
              <td>{{$request->unit }}</td>
              <td>{{$request->grade}}</td>
              <td>{{(is_null($request->sum))? 0 : $request->sum}}</td>
              @if($status != 'REQ')
              <td>{{$request->sum_apr}}</td>
              @endif
            </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-10" style="margin-left: 17px;">
          <a  target="_blank"  class="btn btn-default " onclick="window.print();"><i class="fa fa-print"></i> Print</a>
         
        </div>
      </div>

    <!-- /.content -->
  <!-- /.content -->

<!-- ./wrapper -->
</body>
</html>
