<form class="form-horizontal" id="form_transaction" enctype="multipart/form-data">
    <input type="hidden" name="idproduction_cash_book" id="f_id" value="">
    <input type="hidden" name="iduser" id="f_iduser" value="">

    <div class="form-group">
        <label class="control-label col-md-4">Tanggal <red>*</red></label>
        <div class="col-md-5">
            <input type="date" class="form-control" name="transaction_date" id="f_date" value="<?php echo date('Y-m-d'); ?>" <?php echo (!$is_admin) ? 'max="'.date('Y-m-d').'"' : ''; ?>>
            <?php if (!$is_admin) { ?>
            <small class="text-muted">Produksi hanya bisa input transaksi tanggal hari ini.</small>
            <?php } ?>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-md-4">Tipe Transaksi <red>*</red></label>
        <div class="col-md-5">
            <select class="form-control" name="transaction_type" id="f_type">
                <option value="credit">Pengeluaran (Kredit -)</option>
                <option value="debit">Pemasukan (Debit +)</option>
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-md-4">Item Kas <red>*</red></label>
        <div class="col-md-5">
            <select class="form-control" name="idproduction_cash_item" id="f_item">
                <option value="">Pilih Item</option>
            </select>
            <small class="text-muted">Daftar item menyesuaikan tipe transaksi. Kelola di menu "Item Kas".</small>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-md-4">Nominal <red>*</red></label>
        <div class="col-md-5">
            <div class="input-group">
                <span class="input-group-addon">Rp</span>
                <input type="text" class="form-control format-number-decimal" name="amount" id="f_amount" placeholder="0">
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-md-4">Keterangan <red>*</red></label>
        <div class="col-md-5">
            <textarea class="form-control" name="description" id="f_description" rows="3" placeholder="Keterangan pengeluaran / pemasukan"></textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-md-4">Foto Bukti 1 <red>*</red></label>
        <div class="col-md-5">
            <input type="file" name="photo1" id="f_photo1" accept="image/*">
            <div id="preview_photo1"></div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-md-4">Foto Bukti 2</label>
        <div class="col-md-5">
            <input type="file" name="photo2" id="f_photo2" accept="image/*">
            <div id="preview_photo2"></div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-md-4">Foto Bukti 3</label>
        <div class="col-md-5">
            <input type="file" name="photo3" id="f_photo3" accept="image/*">
            <div id="preview_photo3"></div>
        </div>
    </div>

    <div class="form-group">
        <div class="col-md-4"></div>
        <div class="col-md-7">
            <small class="text-muted">Foto 1 wajib. Maksimal 3 foto (jpg/png/jpeg, maks 5MB per foto).</small>
        </div>
    </div>
</form>