<div class="content-wrapper">
    <?php 
        extract($_GET);
    ?>
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
        CashierIncomeShift <label style="font-weight: normal; font-size:15px" id="timer"></label>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Sis-RS</a></li>
            <li class="active">CashierIncomeShift</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="row" style="margin-bottom: 10px;">
            <div class="col-md-8">
                <i class="fa fa-fw fa-calendar"></i> Daftar Pasien <b>CashierIncomeShift</b>


            </div>
            <div class="col-md-4" align="right">
                <form action="<?= base_url('DashboardLaporan/cariCashierIncomeShift'); ?>" method="get">
                    <table>
                        <tr>
                            <td><input type="date" class="form-control" name="tgl1" id="tgl1" value="<?= date('Y-m-d'); ?>"></td>
                            <td><input type="date" class="form-control" name="tgl2" id="tgl2" value="<?= date('Y-m-d'); ?>"></td>
                            <td><button style="border-radius: 0px;" type="submit" class="btn btn-sm btn-primary">Cari</button></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="box">
            <div class="box-body">
                <?= $this->session->flashdata('message'); ?>
                <form action="<?= base_url('DashboardLaporan/exportincome/'.$tgl1.'/'.$tgl2); ?>" method="get">
                <button style="border-radius: 0px;" type="submit" class="btn btn-sm btn-primary">Exprt CashierIncomeShift</button><br><br>
                </form>
                <table id="example1" class="table table-bordered table-striped">
                    <thead>
                        <tr>
                            <th>No</th>
                            <th>Mr</th>
                            <th>Case ID</th>
                            <th>Invoice ID</th>
                            <th>Patient</th>
                            <th>From</th>
                            <th>Amount</th>
                            <th>Bank</th>
                            <th>Card No</th>
                            <th>UserCread</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        $no =1; 
                        foreach($kasir as $d) :
                         ?>
                        <tr>
                            <td><?= $no++; ?></td>
                            <td><?= $d['PatientCode']; ?></td>
                            <td><?= $d['Case ID']; ?></td>
                            <td><?= $d['Invoice ID']; ?></td>
                            <td><?= $d['PatientName']; ?></td>
                            <td><?= $d['PaidBy']; ?></td>
                            <td><?= $d['AmountPaid']; ?></td>
                            <td><?= $d['Bank']; ?></td>
                            <td><?= $d['CardNo']; ?></td>
                            <td><?= $d['UserCreated']; ?></td>
                        </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </section>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script>
<script type="text/javascript">
  $(document).ready(function() {
    $('#tgl1').change(function() {
      $('#out1').val($(this).val());
      $('#myDIVTag').html('<b>' + $(this).val() + '</b>');
    });
  });
</script>

<script type="text/javascript">
  $(document).ready(function() {
    $('#tgl2').change(function() {
      $('#out2').val($(this).val());
      $('#myDIVTag').html('<b>' + $(this).val() + '</b>');
    });
  });
</script>