
<div class="modal fade" id="md_initialize_loan" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  {{ Form::open(array('route' => 'loandate.update', 'class' => 'cls_form', 'id' => 'form_initialize_loan')) }}
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel"> Manage Installments</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 = "card">
           <div class ="card-body form-fieldset">
            <h6><center>Installments</center></h6>
            <table style =" width:100%;">
              <thead>
                <tr style = "text-align:center;">
                  <th>Sr.</th>
                  <th>Description</th>
                  <th>Date</th>
                </tr>
              </thead>
             <tbody>
              @foreach($loan_installments as $rows)
              <tr>
                <td  style = "text-align: center;">{{$loop->iteration}}</td>
                <input type = "hidden" name = "installment_id[]" value = "{{Crypt::encrypt($rows->id)}}"/>
                  <td style = "text-align: center; width:50%;">{{$rows->title}}</td>
                   <td style = "text-align: center;  width:50%;">
                         <small class="form-errors pull-right " value="">{{ $errors->first('installment_date[]',":message") }}</small><input class = "form-control form-control-sm" type = "date" name = "installment_date[]" value = "{{EF::dateHtml($rows->created_at)}}"/></td>
              </tr>
              @endforeach

             </tbody>
             

            </table>
           </div>
      
      </div>
    </div>
    <input type = "hidden" name= "loan_id" value = "{{Crypt::encrypt($loan_id)}}"/>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
      <button type="submit" class="btn btn-primary cls_submit" content="update installments">Update</button>
      </div>
    </div>
  </div>
  {{ Form::close() }}
</div>