<form id="edit_manhour">

  <input type="hidden" name="_method" value="PUT">

  <div class="input-group">

  <select class="custom-select" id="vat_rate" name="data[vat]" style="width:10%;">
    @foreach(\Runtime::make('hwplus_vat_rates')->get() AS $rate)
    <option value="{{$rate->rate}}" @if($rate->rate == $model->vat) selected @endif>{{$rate->descriptor}}</option>
    @endforeach
  </select>

   <input type="text" class="form-control" name="data[netprice]" placeholder="Nettopreis (optional)" autocomplete="off" oninput="formatCell(this)" value="{{$model->netprice}}">
   <div class="input-group-append">
    <span class="input-group-text">€</span>
   </div>
  </div>

</form>

<script>

function formatCell(el) {

  el.value = el.value.replace(/[^\d,-]+/g, '');

}

var inp = $('input[name="data[netprice]"]')[0];
inp.value = formatAmount(inp.value);






</script>
