@extends('master')

@section('title')
    Debt Collection
@stop

@section('styles')

@stop

@section('content')

<img style="max-width: 30%;display: block; margin-top: -3rem; margin-left: auto; margin-right: auto;" src="/img/Prestige_Logo.jpg" />

<hr>

 <a  href="/dashboard"><button style="    margin-left: auto;
                                                                        padding-bottom: 0.01rem;
                                                                        margin-right:auto;
                                                                        display:block;
                                                                        margin-top: 2rem;
                                                                        padding-left: 0rem;
                                                                        padding-right: 3rem;
                                                                        background-color: #093c68;"><i style="font-size: 1rem;" class="fa fa-arrow-circle-left" aria-hidden="true"></i>Back</button></a>



<hr>
 <h1 style="margin-top: 6px; text-align: center; font-size: 28px;">Hand over Account</h1>

{{ Form::open(['url' => '/debt-collection', 'method' => 'POST', 'data-abide' => '','files' => true]) }}


        <div class="row">
           <div class="large-4 columns">
                <label class="" for="name">Debtor <small class="red">{{ $errors->first('debtor') }}</small>
                       {{ Form::text('debtor', '', ['class' => '']) }}
                </label>
           </div>
           <div class="large-4 columns">
                <label class="" for="reference">Ref Number <small class="red">{{ $errors->first('reference') }}</small>
                        {{ Form::text('reference', '', ['class' => '']) }}
                </label>
           </div>
           <div class="large-4 columns">
                <label class="" for="reference">Registration Number <small class="red">{{ $errors->first('registration_number') }}</small>
                       {{ Form::text('registration_number', '', ['class' => '']) }}
                </label>
           </div>
        </div>

        <div class="row">
           <div class="large-6 columns">
                <label class="" for="amount">Amount <small class="red">{{ $errors->first('amount') }}</small>
                       {{ Form::text('amount', '', ['class' => '']) }}
                </label>
           </div>
           <div class="large-6 columns">
                <label class="" for="outstandingSince">Outstanding Since</label>
                       <input id="outstandingSince" name="outstandingSince" type="date"  class="">
           </div>
        </div>
        <div class="row">
           <div class="large-6 columns">
                <label class="" for="cause">Cause of debt <small class="red">{{ $errors->first('cause') }}</small>
                       {{ Form::text('cause', '', ['class' => '']) }}
                </label>
           </div>
           <div class="large-6 columns">
                <label class="" for="interest">Interest % p.a<small class="red">{{ $errors->first('interest') }}</small>
                       {{ Form::text('interest', '', ['class' => '']) }}
                </label>
           </div>
        </div>
        <div class="row">
           <div class="large-6 columns">
            <label>Surerty</label>
                  {{ Form::radio('surerty', 1) }}
                         Yes
                  {{ Form::radio('surerty', 0) }}
                         No
            </div>
            <div class="large-6 columns">
                <label class="" for="otherSurerty">Any other sererty <small class="red">{{ $errors->first('otherSurerty') }}</small>
                       {{ Form::text('otherSurerty', '', ['class' => '']) }}
                </label>
            </div>

        </div>

    <div class="row">
        <div class="large-6 columns">
            <label class="" for="contactPerson">Contact Person <small class="red">{{ $errors->first('contactPerson') }}</small>
                   {{ Form::text('contactPerson', '', ['class' => '']) }}
            </label>
        </div>
        <div class="large-6 columns">
             <label class="" for="telephone">Telephone <small class="red">{{ $errors->first('telephone') }}</small>
                    {{ Form::text('telephone', '', ['class' => '']) }}
             </label>
        </div>
    </div>

    <div class="row">
        <div class="large-6 columns">
             <label class="" for="email">Email <small class="red">{{ $errors->first('email') }}</small>
                    {{ Form::email('email', '', ['class' => '']) }}
             </label>
        </div>
        <div class="large-6 columns">
             <label class="" for="cell">Cell Number <small class="red">{{ $errors->first('cell') }}</small>
                    {{ Form::text('cell', '', ['class' => '']) }}
             </label>
        </div>
    </div>

    <div class="row">
    <div class="large-6 columns">
         <label class="" for="fax">Fax <small class="red">{{ $errors->first('fax') }}</small>
                {{ Form::text('fax', '', ['class' => '']) }}
         </label>
    </div>
    <div class="large-6 columns">
        <label class="" for="dated">Signed credit application on file - dated</label>
               <input name="dated" id="dated" type="date"  class="">
    </div>

    </div>

    <div class="row">
         <div class="large-6 columns">
            <label class="" for="postalAddress">Postal Address <small class="red">{{ $errors->first('postalAddress') }}</small>
                   {{ Form::textarea('postalAddress', '', ['class' => '']) }}
            </label>
         </div>
         <div class="large-6 columns">
            <label class="" for="physicalAddress">Physical Address <small class="red">{{ $errors->first('physicalAddress') }}</small>
                   {{ Form::textarea('physicalAddress', '', ['class' => '']) }}
            </label>
         </div>
    </div>

<hr>
    <h3 style="text-align: center;">Documents to upload</h3>
    <hr>

    <div class="row">
         <div class="large-4 columns">
              <label for="statement"> Last updated statement
                     {{ Form::file('statement') }}
              </label>
         </div>
         <div class="large-4 columns">
              <label for="creditApplication"> Credit application (if available)
                     {{ Form::file('creditApplication') }}
              </label>
         </div>
    </div>

<hr>
<button style="margin-left: 26rem;" type="submit" class="reg">SUBMIT</button>
{{ Form::close() }}



@stop

@section('scripts')
<script type="text/javascript">
    var datefield=document.createElement("input")
    datefield.setAttribute("type", "date")
    if (datefield.type!="date"){ //if browser doesn't support input type="date", load files for jQuery UI Date Picker
        document.write('<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />\n')
        document.write('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"><\/script>\n')
        document.write('<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"><\/script>\n')
    }
</script>

<script>
    if (datefield.type!="date"){ //if browser doesn't support input type="date", initialize date picker widget:
        jQuery(function($){ //on document.ready
            $('#outstandingSince').datepicker({
                dateFormat: 'yy-mm-dd'
            });
            $('#dated').datepicker({
                dateFormat: 'yy-mm-dd'
            });
        })
    }
</script>
<script type="text/javascript">
  $(document).ready(function () {
      $("button").click(function () {
          $(".pop").fadeIn(300);
          positionPopup();
      });

      $(".pop > span, .pop").click(function () {
          $(".pop").fadeOut(300);
      });
  });
</script>
@stop