
<div class="modal fade" id="invoice_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
      
   {{ Form::open(array('route' => 'payable.store', 'id' => 'form_add_payable', 'class' => 'cls_from ', 'enctype' => 'multipart/form-data')) }}
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Issue Invoice</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true"></span>
        </button>
      </div>

      <div class="modal-body">
      
      <div class="invoice p-3 mb-3">
              <!-- title row -->
              <div class="row">
                <div class="col-12 text-info">
                  <h5>
                      <p style = "color:blue;"><b> Please recheck payable details mentioned below: </b></p>
                  </h5>
                </div>
                <!-- /.col -->
              </div>
              <div class="row">
                <div class="col-md-2  cls_alignment col-sm-2">
                  <label class="form-label">GRN Number: </label>
                </div>
                <div class="col-md-2  cls_alignment col-sm-2">
                  {{$curr_grn->grn_number}}
                </div>
              </div>

              <div class="row">
                <div class="col-md-2  cls_alignment col-sm-2">
                  <label class="form-label">PO Number: </label>
                </div>
                <div class="col-md-2  cls_alignment col-sm-2">
                    {{$curr_grn->purchaseOrder->p_number}}
                </div>
              </div>

            <div class="row">
              <div class="col-md-2  cls_alignment col-sm-2">
                <label class="form-label">Received Date: </label>
              </div>
              <div class="col-md-2  cls_alignment col-sm-2">
                {{EF::dateFormat($curr_grn->receive_date)}}
              </div>
            </div>
            

              <!-- Table row -->
              <div class="row mt-4">
                <div class="col-12 table-responsive">
                  <table class="table table-striped">
                    <thead>
                    <tr>
                      <th>PO Total Quantity</th>
                      <th>Accepted Quantity</th>
                      <th>Unit Price</th>
                      <th>Payable</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                      <td>{{$curr_grn->total_quantity}}</td>
                      <td>{{$curr_grn->accepted_quantity}}</td>
                      <td>{{EF::numberFormat($curr_grn->purchaseOrder->unit_price)}}</td>
                      <td style="color:blue; font-size:16px"><b>{{EF::numberFormat(($curr_grn->purchaseOrder->unit_price)*($curr_grn->accepted_quantity))}} </b></td>
                    </tr>
                   
                    </tbody>
                  </table>
                </div>
                <!-- /.col -->
              </div>
              <!-- /.row -->

           

              
            </div>
      </div>
      <div class="modal-footer">
        <input type = "hidden" name="grn" value="{{Crypt::encrypt($curr_grn->id)}}"/>
<button  type="submit"  class="btn btn-primary cls_submit" content="issue Invoice">Issue Invoice</button>
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
   {{ Form::close() }}
</div>
