@extends('admin.pros.view')
@section('content-inner')

    <h4 class='my-3'>
        <div>Payment Schedule Add New</div>
    </h4>

    <form action="/post-to-api"
          method="post" enctype="multipart/form-data"
          class="bg-light rounded border px-3 pt-3 mr-3 mb-3">
        @csrf

        @if (session('message'))
            <div class="alert alert-danger">{{ session('message') }}</div>
        @endif

        <input type="hidden" name="_uid" value="{{ $record->uid }}">
        <input type="hidden" name="_api" value="/api/proRate/create">
        <input type="hidden" name="_success" value="{{route('pros_SINGLE-SUB_payment_schedule', ['uid' => $record->uid])}}">
        <input type="hidden" name="_return" value="{{route('pros_SINGLE-ACTION_payment_scheduleAddNew', ['uid' => $record->uid])}}">
        <input class='form-control' type='hidden' name='proUid' value='{{ old('proUid') ? old('proUid') : $record->uid }}' >
<div class='form-group mb-3'>
<label class='control-label'>As Hcp Or Ally</label>
<select class='form-control' name='asHcpOrAlly' value='{{ old('asHcpOrAlly') ? old('asHcpOrAlly') : '' }}' >
<option value=''>-- Select --</option>
<option <?= 'HCP' === (old('asHcpOrAlly') ? old('asHcpOrAlly') : '') ? 'selected' : '' ?> value='HCP'>HCP</option>
<option <?= 'ALLY' === (old('asHcpOrAlly') ? old('asHcpOrAlly') : '') ? 'selected' : '' ?> value='ALLY'>ALLY</option>
</select>
</div>
<div class='form-group mb-3'>
<label class='control-label'>Code</label>
<input class='form-control' type='text' name='code' value='{{ old('code') ? old('code') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Amount</label>
<input class='form-control' type='number' name='amount' value='{{ old('amount') ? old('amount') : '' }}' >
</div>
        <div class="form-group mb-3">
            <button class="btn btn-sm btn-primary mr-3 px-5">Submit</button>
            <a href="{{route('pros_SINGLE-SUB_payment_schedule', ['uid' => $record->uid])}}" class="btn btn-sm btn-default px-5">Cancel</a>
        </div>
    </form>

@endsection
