<main id="main" class="main">

    <div class="pagetitle">
        <h1><i class="bi bi-box"></i>&nbsp;Laporan Penerimaan Harian Gudang Klero</h1>
        <nav>
            <ol class="breadcrumb">

            </ol>
        </nav>
    </div><!-- End Page Title -->
    <section class="section">
        <div class="row">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-body">
                        <br>
                        <!-- Table with stripped rows -->
                        <div class="datatable-wrapper datatable-loading no-footer sortable searchable fixed-columns">
                            <div class="row g-3">
                                <div class="col-md-3">
                                    <input type="date" class="form-control" id="tgl" value="<?= date('Y-m-d'); ?>">
                                </div>
                                <div class="col-md-4">
                                    <button onclick="tampildata()" type="button" class="btn btn-primary">
                                        <i class="bi bi-search"></i>&nbsp;Lihat
                                    </button>
                                </div>

                            </div>
                            <br>
                            <div class="datatable-container">
                                <div id="tb_data"></div>
                            </div>
                        </div>
                        <!-- End Table with stripped rows -->
                    </div>
                </div>
            </div>
        </div>
    </section>

</main>

<script>
    function tampildata() {
        var tgl = $("#tgl").val();
        //document.getElementById("btnloading").style.display = "block";
        //document.getElementById("btnview").style.display = "none";
        $.get("<?= base_url(); ?>Sub_klero/tb_laporan_penerimaan_harian?tgl=" + tgl, function(data, status) {
            $("#tb_data").html(data);
            //document.getElementById("btnloading").style.display = "none";
            //document.getElementById("btnview").style.display = "block";
        });
    }
</script>