<div class="container mt-4">
    <div class="card shadow">
        <div class="card-header bg-warning text-white">
            <h5 class="m-0">Edit ATK Retrieval</h5>
        </div>
        <div class="card-body">
            <form action="<?= site_url('Admin/ATK/Atk_Pengambilan_Controller/update'); ?>" method="post">
                <!-- Ganti 'atk_pengambilan_id' menjadi 'id' sesuai PK di DB -->
                <input type="hidden" name="id" value="<?= $pengambilan->id; ?>">
                <input type="hidden" name="atk_product_id" value="<?= $pengambilan->atk_pengambilan_product; ?>">

                <input type="hidden" name="atk_pengambilan_product" value="<?= $pengambilan->atk_pengambilan_product ?>">

                <div class="mb-3">
                    <label class="form-label">Borrower's Name</label>
                    <input type="text" class="form-control" value="<?= $pengambilan->atk_pengambilan_peminjam ?>" readonly>
                </div>

                <input type="hidden" name="atk_pengambilan_peminjam" value="<?= $pengambilan->atk_pengambilan_peminjam ?>">



                <div class="mb-3">
                    <label for="divisi" class="form-label">Division</label>
                    <input type="text" class="form-control" value="<?= $pengambilan->divisi_categories_nama ?>" readonly>
                </div>

                <input type="hidden" name="atk_pengambilan_divisi" value="<?= $pengambilan->atk_pengambilan_divisi ?>">

                

                <div class="mb-4">
                    <label for="atk_pengambilan_jumlah" class="form-label">Count</label>
                    <input type="number" class="form-control" id="atk_pengambilan_jumlah" name="atk_pengambilan_jumlah"
                    value="<?= $pengambilan->atk_pengambilan_jumlah ?>" placeholder="Masukkan jumlah pengambilan">


                </div>

                <div class="mb-4">
                    <label for="atk_pengambilan_status" class="form-label">Status</label>
                    <select class="form-control" name="atk_pengambilan_status" id="atk_pengambilan_status">
                        <option value="1" <?= $pengambilan->atk_pengambilan_status == 1 ? 'selected' : '' ?>>Processed</option>
                        <option value="2" <?= $pengambilan->atk_pengambilan_status == 2 ? 'selected' : '' ?>>Finished</option>
                        <option value="3" <?= $pengambilan->atk_pengambilan_status == 3 ? 'selected' : '' ?>>Rejected</option>
                    </select>
                </div>

                <div class="d-flex justify-content-end">
                    <button type="submit" class="btn btn-warning me-2">Update</button>
                    <a href="<?= site_url('Admin/ATK/Atk_Pengambilan_Controller/index'); ?>" class="btn btn-secondary">Cancel</a>
                </div>
            </form>
        </div>
    </div>
</div>
