
<style>
    .table thead tr >th{
        background-color:#4c0870;
        /*width:16% !important;*/
        color:#fff;
    }
    .table thead tr th[class*='sorting_'] {
        color: #fff;
    }
    .bg-master-lighter {
        border:none;
        background-color:#fff;
        border-top:1px solid #ddd;  
    }

    .datepicker thead tr .dow {
        color:#ed9421 !important;
    }
    .datepicker table tr td.day:hover {
        background: #ed9421 !important;
        color:#fff;
    }
    .datepicker table tr td.active {
        background-color: #ed9421 !important;
    }
    .datepicker thead tr .datepicker-switch {
        color: #ed9421 !important;
        font-size: 13px;
    }
    .datepicker table tr td span.active {
        background-color: #ed9421 !important;
    }
    .datepicker table tr td span:hover {
        background-color: #ed9421 !important;
        color:#fff;
    }
    datepicker thead tr .next:before, .datepicker thead tr .prev:before {
        color: #ed9421 !important;
        font-family: 'FontAwesome';
        font-size: 10px;
    }
    .datepicker thead tr .next:before, .datepicker thead tr .prev:before {
        color: #ed9421 !important;
        font-family: 'FontAwesome';
        font-size: 10px;
    }
</style>
<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('fixed_assets_register'); ?></div>
            <div class="input-datarange input-group col-md-5 pull-right" style="width: 348px;">
                <input id="DateFrom"type="text" class="form-control input-sm" name="start" data-date-format="yyyy-mm-dd" value="<?php echo($today); ?>"  aria-required="true" aria-invalid="false">
                <span class="input-group-addon bg-complete"><i class="fa fa-calendar"></i></span>
                <input id="DateTo"type="text" class="form-control input-sm" name="end" data-date-format="yyyy-mm-dd" value="<?php echo($today); ?>"  aria-required="true" aria-invalid="false">
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="panel-body">
            <table class="table table-bordered table-hover demo-table-search" id="tableWithSearch">
                <thead>
                    <tr>
                        <th class="text-center" style="width:5%"> <?php echo CommonLanguage::getMessage('expense_nb')?></th>
                        <th class="text-center" style="width:10%" ><?php print CommonLanguage::getMessage('Code'); ?> </th>
                        <th class="text-center" style="width:10%"><?php print CommonLanguage::getMessage('Name'); ?></th>
                        <th class="text-center" style="width:15%"><?php print CommonLanguage::getMessage('description'); ?></th>
                        <th class="text-center" style="width:10%"><?php print CommonLanguage::getMessage('Vendor'); ?></th>
                        <th class="text-center" style="width:10%"><?php print CommonLanguage::getMessage('Expense_Date'); ?></th>
                        <th class="text-center" style="width:10%"><?php print CommonLanguage::getMessage('qty'); ?></th>
                        <th class="text-center" style="width:10%"><?php print CommonLanguage::getMessage('cost'); ?></th>
                        <th class="text-center" style="width:10%"><?php print CommonLanguage::getMessage('total'); ?></th>
                        <th class="text-center" style="width:10%"><?php print CommonLanguage::getMessage('dep_percent'); ?></th>
                        <th class="text-center" style="width:10%" ><?php print CommonLanguage::getMessage('accumilated_dep'); ?></th>
                        <th class="text-center" style="width:10%" ><?php print CommonLanguage::getMessage('dep_uptodate'); ?></th>
                        <th class="text-center no-print" ><?php print CommonLanguage::getMessage('Action'); ?></th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
    </div>
</div>



<script>
    var BalanceLang = <?php echo json_encode(CommonLanguage::getMessage('Balance')); ?>;
    var title = <?php print json_encode(CommonLanguage::getMessage('fixed_assets_register')); ?>;
    var is_actual = <?php echo $is_actual; ?>;
    $(function () {
        var Data = {
            DateFrom: $("#DateFrom").val(),
            DateTo: $("#DateTo").val(),
            actual: is_actual
        }
        RebuildDataTable(title, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 'ACCAjax/FixedAssetsRegisterList', Data)
        $("#DateFrom,#DateTo").datepicker({autoclose: true}).on("changeDate", function (e) {

            ChangeTable();
        })


    })
    function ChangeTable() {

        var Date = {
            DateFrom: $("#DateFrom").val(),
            DateTo: $("#DateTo").val(),
            actual: is_actual
        }
        RebuildDataTable(title, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 'ACCAjax/FixedAssetsRegisterList', Date)

    }


</script>