<div class="modal-content">
    <div class="modal-header">
        <h5 class="modal-title"><?php echo @$title ?></h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
    </div>
    <div class="modal-body">
        <?php
        if (@$member) {
            ?>
        <div class="form-group row">
            <label class="col-sm-3 col-form-label">Tukarkan</label>
            <div class="col-sm-4">
                <input type="number" class="form-control" id="tkoin" name="tkoin" onkeyup="tukarpoin()" max="<?php echo @$koin ?>">
                <span style="color: red">Mak koin: <?php echo @$koin ?></span>
            </div>
            <div class="col-sm-4">
                <input type="number" class="form-control" id="poin" name="poin" onkeyup="tukarpoin()" max="<?php echo @$poin ?>">
                <span style="color: red">Mak poin: <?php echo @$poin ?></span>
            </div>
        </div>
            <?php
        }
        ?>
        <div class="form-group row">
            <label class="col-sm-3 col-form-label">Total Harga</label>
            <div class="col-sm-9">
                <input type="text" class="form-control" id="totall" name="total" value="<?php echo @$total ?>" readonly>
            </div>
        </div>
        <div class="form-group row">
            <label class="col-sm-3 col-form-label">Bayar Tunai</label>
            <div class="col-sm-9">
                <input type="number" class="form-control" id="tunai" name="tunai" onkeypress="hitungkembali()" onkeyup="hitungkembali()" onchange="hitungkembali()" oninput="hitungkembali()" value="" autofocus>
            </div>
        </div>
        <div class="form-group row">
            <label class="col-sm-3 col-form-label">Bayar Non Tunai</label>
            <div class="col-sm-9">
                <input type="number" class="form-control" id="non" name="non" onkeypress="hitungkembali(); hidupmati()" onkeyup="hitungkembali(); hidupmati()" onchange="hitungkembali(); hidupmati()" oninput="hitungkembali(); hidupmati()" value="">
            </div>
        </div>
        <div class="form-group row">
            <label class="col-sm-3 col-form-label">Metode Non Tunai</label>
            <div class="col-sm-9">
                <select class="form-control" id="metode" name="metode">
                    <option value="">-- pilih metode non tunai --</option>
                    <?php
                    foreach ($datanontunai as $hasil) {
                        ?>
                        <option value="<?php echo $hasil->nontunai ?>"><?php echo $hasil->nontunai ?></option>
                        <?php
                    }
                    ?>
                </select>
            </div>
        </div>
        <div class="form-group row">
            <label class="col-sm-3 col-form-label">Nomor Referensi Non Tunai</label>
            <div class="col-sm-9">
                <input type="text" class="form-control" id="referensi" name="referensi">
            </div>
        </div>
        <div class="form-group row">
            <label class="col-sm-3 col-form-label">Uang Kembali</label>
            <div class="col-sm-9">
                <input type="number" class="form-control" id="kembali" name="kembali" readonly>
            </div>
        </div>
        <?php
        if (@$member) {
            ?>
        <div class="form-group row">
            <label class="col-sm-3 col-form-label">Koin Belanja</label>
            <div class="col-sm-9">
                <input type="number" class="form-control" id="koin" name="koin">
                <span style="color: red;"><i>Koin belanja diambil dari uang kembalian, silahkan diinput tidak lebih besar dari uang kembali</i></span>
            </div>
        </div>
            <?php
        }
        ?>
    </div>
    <input type="hidden" name="tot" id="tot" value="<?php echo @$total ?>">
    <input type="hidden" name="id" id="id" value="<?php echo @$kode ?>">
    <input type="hidden" name="member" id="member" value="<?php echo @$member ?>">
    <div class="modal-footer right-content-between">
        <button type="submit" class="btn bg-gradient-success"><i class="fa fa-save"></i> Bayar</button>
        <button type="button" class="btn bg-gradient-danger" data-dismiss="modal"><i class="fa fa-times"></i> Batal</button>
    </div>
</div>