<div class="modal-dialog" role="document">
  <div class="modal-content">

    {!! Form::open(['url' => action([\App\Http\Controllers\InvoiceSchemeController::class, 'update'], [$invoice->id]), 'method' => 'put', 'id' => 'invoice_scheme_add_form' ]) !!}

    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
      <h4 class="modal-title">@lang( 'invoice.edit_invoice' )</h4>
    </div>

    <div class="modal-body">
      <div class="row">
        <div class="option-div-group">
          <div class="col-sm-4">
            <div class="form-group">
              <div class="option-div @if($invoice->scheme_type == 'blank') {{ 'active'}} @endif">
                <h4>FORMAT: <br>XXXX <i class="fa fa-check-circle pull-right icon"></i></h4>
                <input type="radio" name="scheme_type" value="blank" @if($invoice->scheme_type == 'blank') {{ 'checked'}} @endif>
              </div>
            </div>
          </div>
          <div class="col-sm-4">
            <div class="form-group">
              <div class="option-div  @if($invoice->scheme_type == 'year') {{ 'active'}} @endif">
                <h4>FORMAT: <br>{{ date('Y') }}{{config('constants.invoice_scheme_separator')}}XXXX <i class="fa fa-check-circle pull-right icon"></i></h4>
                <input type="radio" name="scheme_type" value="year" @if($invoice->scheme_type == 'year') {{ 'checked'}} @endif>
              </div>
            </div>
          </div>
        </div>
        <div class="col-sm-4">
          <div class="form-group">
            <label>@lang('invoice.preview'):</label>
            <div id="preview_format">@lang('invoice.not_selected')</div>
          </div>
        </div>
        <div class="col-sm-12">
          <div class="form-group">
            {!! Form::label('name', __( 'invoice.name' ) . ':*') !!}
              {!! Form::text('name', $invoice->name, ['class' => 'form-control', 'required', 'placeholder' => __( 'invoice.name' ) ]); !!}
          </div>
        </div>
        <div id="invoice_format_settings">
        <div class="col-sm-6">
          <div class="form-group">
            {!! Form::label('prefix', __( 'invoice.prefix' ) . ':') !!}
            <div class="input-group col-md-12 col-sm-12">
              <span class="input-group-addon">
                  <i class="fa fa-info"></i>
              </span>
                {!! Form::text('prefix', $invoice->prefix, ['class' => 'form-control', 'placeholder' => '']); !!}
            </div>
          </div>
        </div>
        <div class="col-sm-6">
          <div class="form-group">
            {!! Form::label('start_number', __( 'invoice.start_number' ) . ':') !!}
            <div class="input-group col-md-12 col-sm-12">
              <span class="input-group-addon">
                  <i class="fa fa-info"></i>
              </span>
                {!! Form::number('start_number', $invoice->start_number, ['class' => 'form-control', 'required', 'min' => 0 ]); !!}
            </div>
            <input type="hidden" id="start_number_old" value="{{$invoice->start_number}}">
          </div>
        </div>
        <div class="numpad_div col-sm-12" id="start_number_div" data-type="cash" style="
						display: flex;
						align-items: center;
						justify-content: center;
						padding-right: 25px;">							
						<div class="form-group">									
							<div class="easy-numpad-number-container">
								<table id="start_number">
									<thead>
										<tr>
											<td class="numPadCash" style="padding: 10px;" data-type="top"><a href="#"  style="padding: 10px ; width: 90px !important; height: 70px !important; ">5</a></td>
											<td class="numPadCash" style="padding: 10px;" data-type="top"><a href="#"  style="padding: 10px ; width: 90px !important; height: 70px !important; ">10</a></td>
											<td class="numPadCash" style="padding: 10px;" data-type="top"><a href="#"  style="padding: 10px ; width: 90px !important; height: 70px !important; ">20</a></td>
											<td class="numPadCash" style="padding: 10px;" data-type="top"><a href="#"  style="padding: 10px ; width: 90px !important; height: 70px !important; ">50</a></td>
											<td class="numPadCash" style="padding: 10px;" data-type="top"><a href="#"  style="padding: 10px ; width: 90px !important; height: 70px !important; ">100</a></td>
										</tr>
										<tr>
											
											<td class="numPadCash" style="padding: 10px;" data-type="middle"><a href="#"  style="padding: 10px ; width: 90px !important; height: 70px !important; ">1</a></td>
											<td class="numPadCash" style="padding: 10px;" data-type="middle"><a href="#"  style="padding: 10px ; width: 90px !important; height: 70px !important; ">2</a></td>
											<td class="numPadCash" style="padding: 10px;" data-type="middle"><a href="#"  style="padding: 10px ; width: 90px !important; height: 70px !important; ">3</a></td>
											<td class="numPadCash" style="padding: 10px;" data-type="middle"><a href="#"  style="padding: 10px ; width: 90px !important; height: 70px !important; ">4</a></td>
											<td class="numPadCash" style="padding: 10px;" data-type="middle"><a href="#"  style="padding: 10px ; width: 90px !important; height: 70px !important; ">5</a></td>
										</tr>
										<tr>
											<td class="numPadCash" style="padding: 10px;" data-type="middle"><a href="#"  style="padding: 10px ; width: 90px !important; height: 70px !important; ">6</a></td>
											<td class="numPadCash" style="padding: 10px;" data-type="middle"><a href="#"  style="padding: 10px ; width: 90px !important; height: 70px !important; ">7</a></td>
											<td class="numPadCash" style="padding: 10px;" data-type="middle"><a href="#"  style="padding: 10px ; width: 90px !important; height: 70px !important; ">8</a></td>
											<td class="numPadCash" style="padding: 10px;" data-type="middle"><a href="#"  style="padding: 10px ; width: 90px !important; height: 70px !important; ">9</a></td>
											<td class="numPadCash" style="padding: 10px;" data-type="middle"><a href="#"  style="padding: 10px ; width: 90px !important; height: 70px !important; ">0</a></td>
										</tr>
										<tr>
											<!-- <td><a href="."  style="padding: 10px ;">.</a></td> -->
											<td colspan="2"><a href="#" class="numPadCash" style="padding: 10px ; width: calc(95% + -10px); margin-top:2px; margin-left: 10px;">00</a></td>
											<td colspan="2"><a href="#" class="numPadCashClear" id="numPadCashClear" style="padding: 10px ; width: calc(100% + -10px); margin-top:2px;">Clear</a></td>
											<td><a href="#" class="numPadCashDel" id="numPadCashDel" style="padding: 10px ; width: calc(100% + -10px); margin-top:2px;">DEL</a></td>									
										</tr>
									</thead>
								</table>
							</div>									
						</div>							
        </div>
        <div class="clearfix">
        <div class="col-sm-6">
          <div class="form-group">
            {!! Form::label('total_digits', __( 'invoice.total_digits' ) . ':') !!}
            <div class="input-group col-md-12 col-sm-12">
              <span class="input-group-addon">
                  <i class="fa fa-info"></i>
              </span>
              {!! Form::select('total_digits', ['4' => '4', '5' => '5', '6' => '6', '7' => '7', 
              '8' => '8', '9'=>'9', '10' => '10'], $invoice->total_digits, ['class' => 'form-control', 'required']); !!}
            </div>
          </div>
        </div>
        </div>
      </div>
    </div>

    <div class="modal-footer">
      <button type="submit" class="btn btn-primary">@lang( 'messages.save' )</button>
      <button type="button" class="btn btn-default" data-dismiss="modal">@lang( 'messages.close' )</button>
    </div>

    {!! Form::close() !!}

  </div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->