<?php
if($permissions->hasPermission('NewDepot')){
    include 'Views/Stock/depot_modal.php';
}
?>
<div class="container-fluid container-fixed-lg bg-white">
    <div class="panel panel-transparent">
        <div class="panel-heading">
            <div class="panel-title"> 
                <?php print CommonLanguage::getMessage('Depot_List');?>
            </div>
            <?php 
            if (smc_session()['default_setting']['sync_type'] != 2 && $permissions->hasPermission('NewDepot')) {
                echo Forms::FloatingAddButton('4c0870','#EditDepot', CommonLanguage::getMessage('add'),'new_depot'); 
            } ?> 
        </div>
        <div class="panel-body">
            <table class="table table-bordered table-hover stock" id="tableWithSearch" >
                <thead>
                    <tr>
                        <th class="text-center"><?php print CommonLanguage::getMessage('Code'); ?></th>
                        <th class="text-center"  ><?php print CommonLanguage::getMessage('Name'); ?></th>
                        <th class="text-center"  ><?php print CommonLanguage::getMessage('Category'); ?></th>
                        <th class="text-center" ><?php print CommonLanguage::getMessage('Type_of_Storage'); ?></th>
                        <th class="text-center no-print" ><?php print CommonLanguage::getMessage('PIC'); ?></th>
                        <th class="text-center no-print" ><?php print CommonLanguage::getMessage('Action'); ?></th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>

        </div>
    </div>
</div>
<script>
    $(function(){ 
        RebuildDataTable($('.panel-heading .panel-title').html(),[0,1,2,3,4],'StockAjax/ListDepotRequest');
    });
</script>