  <!-- Modal HistoryBayaran -->
  @php

  $hargaemas = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/harga_emas/')->json();

 @endphp

  <div class="modal fade" id="editMarhunModal" tabindex="-1" role="dialog" aria-labelledby="ModalCenterTitle" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="ModalTitle">Ubah Marhun</h5>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <input type="hidden" name="norujukedit" id="norujukedit"/>
          <input type="hidden" name="recnoedit" id="recnoedit"/>
          <div class="row justify-content-center">
            <div class="col-md-6">
              <div class="form-group row">
                <div class="col-md-4">Marhun</div>
                <div class="col-md-8">
                  <select class="form-control" name="marhun_edit" id="marhun_edit">
                    <option disabled selected value> -- Pilih Jenis Marhun -- </option>
                  </select>
                </div>
                <div class="col-md-12">
                  <div class="form-group">
                    <label>Nota</label>
                    <select name="nota_edit" id="nota_edit" class="form-control" multiple="multiple" data-placeholder="Nota Tambahan" style="width: 100%;">
                      <option value="Rosak">Rosak</option>
                      <option value="Putus">Putus</option>
                      <option value="Patah">Patah</option>
                      <option value="Sebelah">Sebelah</option>
                    </select>
                  </div>
                </div>
                <div class="col-md-12 col_edit_permata">
                  <div class="form-group">
                      <div class="d-flex justify-content-between">
                          <span>Ada Batu Permata?</span>
                          <div>
                              <label for="tagpermataedit">Ya</label>
                              <input type="checkbox" id="tagpermataedit" name="tagpermataedit">
                          </div>
                      </div>
                  </div>
                </div> 
                <div class="col-md-8 col_edit_permata div_anggaran_edit">Anggaran Berat Permata</div>
                <div class="col-md-4 mb-2 col_edit_permata div_anggaran_edit"><input class="form-control" type="text" name="beratpermataedit" id="beratpermataedit" autocomplete="off"></div>
                <div class="col-md-4 div_kuantiti_edit">Kuantiti</div>
                <div class="col-md-8 div_column_kuantiti_edit">
                    <input class="form-control" name="kuantiti_edit" id="kuantiti_edit" type="text" pattern="\d*" maxlength="2" disabled>
                </div>
                <div class="col-md-4">Karat</div>
                <div class="col-md-8">
                  <select name="sltkarat" id="sltkarat" class="form-control">
                    <option disabled selected value> -- Pilih Karat -- </option>
                    @foreach ($hargaemas as $index=>$he)
                      <option value="{{ $he['karat'] }}" data-harga="{{ $he['harga'] }}">{{ $he['karat'] }}</option>
                    @endforeach
                  </select>
                </div>
                <div class="col-md-4">Berat</div>
                <div class="col-md-8"><input type="text" class="form-control" name="berat_edit" id="berat_edit" onkeyup="calculationharga(this)"/></div>
                <div class="col-md-4">Harga</div>
                <div class="col-md-8"><input type="text" name="harga_edit" id="harga_edit" class="form-control" readonly/></div>
                <div class="col-md-4">Nilai Marhun</div>
                <div class="col-md-8"><input type="text" name="nilaimarhun_edit" id="nilaimarhun_edit" class="form-control" readonly/></div>
              </div>
            </div>
          </div>
        </div>

        <div class="modal-footer">
            <button type="button" class="btn btn-danger btn-lg" data-dismiss="modal">Batal</button>
            <button type="button" id="terima_edit" class="btn btn-success btn-lg">Terima</button>
        </div>
      </div>
    </div>
  </div>



