<?php function buatrp($angka) { $jadi = "" . number_format($angka,0,',','.'); return $jadi; } ?>
<div class="row">
    <div class="col-md-12">
        <div class="box">
            <div class="box-header with-border">
                <h3 class="box-title">Gizi - Rekapitulasi Distribusi Barang Bulan <?php echo date('F');?></h3>
                <div class="box-tools pull-right">
                    <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                    <a href="<?php echo base_url('admin/home'); ?>" class="btn btn-box-tool"><i class="fa fa-times"></i></a>
                </div>
            </div>
            <div class="box-body">
                <a href="<?php echo base_url('admin/gizi/persediaan'); ?>" class="btn btn-info">Persediaan Barang</a>
                <a href="<?php echo base_url('admin/gizi/penerimaan'); ?>" class="btn btn-info">Penerimaan Barang</a>
                <a href="<?php echo base_url('admin/gizi/distribusi'); ?>" class="btn btn-info">Distribusi Barang</a>
                <br><br>
                <table class="table table-hover table-bordered table-responsive" id="list">
                    <thead>
                        <tr>
                            <td>No</td>
                            <td>Kelompok</td>
                            <td>Jumlah</td>
                            <td>Total</td>
                        </tr>                        
                    </thead>
                    <tbody>
                        <?php $i = 1; foreach ($data as $row) { ?>
                        <tr>
                            <td><?php  echo $i; ?></td>
                            <td><?php  echo $row->namakelompok; ?></td>
                            <td><?php  echo buatrp($row->QtyDistribusi); ?></td>
                            <td><?php  echo "Rp. ".buatrp($row->TotalDistribusi); ?></td>
                        </tr>
                        <?php $i++; } ?>
                    </tbody>
                </table>
            </div>
            <div class="box-footer">
                <i class="fa fa-clock-o"></i> Data realtime
            </div>
        </div>
    </div>
</div>