<div class="container-fluid bg-white">
    <div class="row">
        <div class="col-sm-12 pt-3 pb-3">
            <ul class="breadcrumb">
                <li class="breadcrumb-item"><a href="<?php echo base_url(); ?>Welcome">Home</a></li>
                <li class="breadcrumb-item"><a href="<?php echo base_url(); ?>Accounts">Accounts</a></li>
                <li class="breadcrumb-item">Account Heads</li>
            </ul>
            <div class="table-responsive">
                <table class="table table-bordered table-striped">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>Particulars</th>
                            <th>Debit/Credit</th>
                            <th>Status</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
                        $table='account_heads';
                        $count=0;
                        $all_heads=$this->AccountsModel->get_data($table);
                        if($all_heads){
                            foreach($all_heads as $heads){
                                $status=$heads['status'];
                                $count=$count + 1;
                        ?>
                        <tr>
                            <td><?php echo $count; ?></td>
                            <td><?php echo $heads['head']; ?></td>
                            <td><?php echo $heads['head_type']; ?></td>
                            <td>
                                <?php 
                                if($status == 1){
                                ?>
                                <button class="btn btn-sm btn-success">Active</button>
                                <?php
                                }else if($status == 0){
                                ?>
                                <button class="btn btn-sm btn-danger">Inactive</button>
                                <?php
                                }
                                ?>
                            </td>
                        </tr>
                        <?php
                            }
                        }
                        ?>
                        
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>