<div class="col-xs-12 col-md-6">
                            <div class="well with-header">
                                <div class="header bordered-success">
                                    <i id="stockin_spinner" style="display: none;" class="fa fa-spinner fa-spin"></i>
                                    <?php echo $this->lang->line("LATESTSTOCKIN"); ?>
                                </div>
                                <div class="table-scrollable">
                                    <table class="table table-striped table-bordered table-hover databox-text">
                                        <thead>
                                            <tr>
                                                <th scope="col" style="width:10% !important">
                                                    <?php echo $this->lang->line("DATE"); ?>
                                                </th>
                                                <th scope="col" style="width:10% !important">
                                                    <?php echo $this->lang->line("REASON"); ?>
                                                </th>
                                                <th scope="col" style="width:10% !important">
                                                    <?php echo $this->lang->line("WAREHOUSE"); ?>
                                                </th>
                                                <th scope="col" style="width:30% !important">
                                                    <?php echo $this->lang->line("ITEM"); ?>
                                                </th>
                                                <th scope="col" style="text-align: center; width:10% !important">
                                                    <?php echo $this->lang->line("UNITS"); ?>
                                                </th>
                                                <th scope="col" style="text-align: center; width:10% !important">
                                                    <?php echo $this->lang->line("PRICE"); ?>
                                                </th>
                                                <th scope="col" style="text-align: center; width:10% !important">
                                                    <?php echo $this->lang->line("STOCK"); ?>
                                                </th>
                                                <th scope="col" style="text-align: center; width:10% !important">
                                                    <?php echo $this->lang->line("COST"); ?>
                                                </th>
                                            </tr>
                                        </thead>
                                        <tbody id="stockin">
                                            
                                            
                                        </tbody>
                                    </table>
                                </div>
                                
                            </div>

                        </div>

<script>
$(document).ready(function() {
$("#stockin_spinner").show();
        $.ajax({ url: "<?= base_url() ?>dashboard/databoxes/stockin",
                    data: { count: <?= $count ?>},
                    dataType: "json",
                    type: "POST",
                    success: function(data){
                        var html = '';
                var len = data.length;
                for (var i = 0; i< len; i++) {
                 
            html+="<tr style='font-size: 12px'>"+
                    "<td>"+data[i].date+"</td>"+
                    "<td>"+data[i].reason+"</td>"+
                    "<td>"+data[i].location+"</td>"+
                    "<td>"+data[i].name+"</td>"+
                    "<td style='text-align: center'>"+data[i].unit+"</td>"+
                    "<td style='text-align: right'>"+data[i].price+"</td>"+
                    "<td style='text-align: center'>"+data[i].stock+"</td>"+
                    "<td style='text-align: right'>"+data[i].cost+"</td>"+
                "</tr>";
            
            
                }
                $("#stockin").append(html);
                $("#stockin_spinner").hide();
                    }
                });
    
});
</script>