@extends('layouts.dashboard')
@section('page_title')
	GRN
@endsection
@section('page_header_title')
	GRN
@endsection
@section('page_body')
{{ Breadcrumbs::render('grn.view') }}
@php($label_list = EF::getWhiteLabel())
 <div class="my-3 my-md-5">
          <div class="container">
            <div class="row">
              <div class="col-md-12">
                <div class="card">
                  <div class="card-header">
                    <h3 class="card-title"><b>GRN Details</b> </h3>
                  </div>

                  <div class="card-body" style ="width:50%; align-self: center;" >
                    <div class ="row">
                      <div class = "col-md-12">
                      <div class = "card">
                      <div class ="card-body" >


                        <div class="row clear margin">


                          <div class="col margin" style="width: 70%;">
                            <label><b>Entry #: </b>{{$grn->grn_number}}</label>
                          </div>


                          <div class="col margin" style="width: 30%;">
                            <label><b>Date: </b>{{EF::dateFormat($grn->created_at)}}</label>
                          </div>
                        </div>

                         <div class="row clear margin">


                          <div class="col margin" style="width: 70%;">
                            <label><b>Project: </b>{{$grn->purchaseOrder->boq->branch->name}}</label>
                          </div>


                          <div class="col margin" style="width: 30%;">
                            <label><b>Ref #: </b>{{$grn->id}}</label>
                          </div>
                        </div>

                        <div class="row clear margin">


                         <div class="col margin" style="width: 70%;">
                           <label><b>Receiving Date: </b>{{ucwords($grn->receive_date)}}</label>
                         </div>


                        </div>



                              <div class="row clear" style="margin-bottom:30%;">
                        <table border="1" style="border-collapse: collapse; margin-top:3%; text-align: center; width:100%;">
                          <thead>


                            <tr>

                               <th style ="width:5%;" >S/N. </th>
                               <th style ="width:25%;" >Item </th>
                                <th>Total quantity</th>
                                <th>Accepted quantity</th>
                                <th>Remaining quantity</th>
                            </tr>
                            <tbody>
                              <tr>
                              <td>1</td>
                              <td>{{$grn->purchaseOrder->boqitem->item->name}}</td>
                              <td>{{$grn->total_quantity}}</td>
                              <td>{{$grn->accepted_quantity}}</td>
                              <td>{{$grn->rejected_quantity}}</td>
                             </tr>
                        </tbody>
                          </thead>
                        </table>
                        </div>




                      </div>
                    </div>
                      </div>

                    </div>


                </div>
                </div>
              </div>
            </div>
            </div>
          </div>


@endsection

@section('page_modal')
  <div id="invoice_model"></div>

@endsection

@section('page_script')

   @include('inventory_module.scripts.boq')
   @include('inventory_module.scripts.grn')

@endsection
