<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            TotalPatientByCompany <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">TotalPatientByCompany</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> <b>TotalPatientByCompany</b>


            </div>
            <div class="col-md-4" align="right">
                <form action="<?= base_url('DashboardLaporan/caritotalCompany'); ?>" 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'); ?>
                <div class="table-responsive">
                        <table id="example1" class="table table-bordered dataTable dtr-inline">
                    <thead>
                        <tr>
                            <th>NamaPerusahaan</th>
                            <th>Kunjungan</th>
                            <th>TotalCharge</th>
                            <th>SlisihBayar</th>
                            <th>HarusBayar</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach($patientbycompany as $d) : ?>
                        <tr>
                            <?php $bayar = $d['charge'] - $d['slisih']; ?>
                            <td><?= $d['CompanyName']; ?></td>
                            <td><?= number_format($d['total'],0); ?></td>
                            <td><?= number_format($d['charge'],0); ?></td>
                            <td><?= number_format($d['slisih'],0); ?></td>
                            <td><?= number_format($bayar,0); ?></td>
                        </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </section>
</div>