
<style>
    .table thead tr >th{
        background-color: #4c0870;
        color:#fff;
    }
    .table thead tr th[class*='sorting_'] {
        color: #FFFFFF;
    }
    .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('Loaded_Depot');?></div>
            <div class="pull-right">
                <div class="col-xs-12">
                    <div class="form-group form-group-default input-group col-md-3 pull-right" >
                        <label class="fade"><?php print CommonLAnguage::getMessage('Date');?></label>
                        <input id="Loaded_List_Date" name="Loaded_List_Date" class="form-control" data-date-format="yyyy-mm-dd" value="<?php echo($today); ?>" aria-required="true" aria-invalid="false">
                        <span class="input-group-addon bg-complete-darker"><i class="fa fa-calendar"></i></span>
                    </div> 
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="panel-body" id="LoadedListDiv">
            <?php 
            $header = [CommonLanguage::getMessage('Code'), 
               CommonLanguage::getMessage('Item'),
               CommonLanguage::getMessage('Quantity'), 
               CommonLanguage::getMessage('Price')];
            echo Forms::CreateDatatable(['TableHeaders'=>$header,
                                             'ArrayContent'=>$loadingListToday,
                                                        'Color_Value'=>'4c0870']);
                ?>
        </div>
    </div>
</div>
<nav class="navbar navbar-default bg-master-lighter sm-padding-10" role="navigation">
    <div class="container-fluid">
        <div class="collapse navbar-collapse" id="sub-nav">
            <div class="row"> 
                <div class="col-sm-4 ">
                    <ul class="nav navbar-nav navbar-center">
                        <li><a href="#" data-toggle="tooltip" title="Print" class="PrintThisTableButton" data-table="#tableWithSearch" data-date="" data-title="PRODUCT LIST"><i class="fa fa-print"></i></a></li>
                        <li><a href="#" data-toggle="tooltip" data-placement="bottom" title="Download"><i class="fa fa-download"></i></a></li>
                    </ul>
                </div>
                <div class="col-sm-4 pull-right">
                    <ul class="nav navbar-nav navbar-right">
                        <li>
                            <a href="#" class="p-r-10"><img width="25" height="25" alt="" class="icon-pdf" data-src-retina="<?php echo SITE_LINK; ?>img/invoice/pdf2x.png" data-src="<?php echo SITE_LINK; ?>img/invoice/pdf2x.png" src="<?php echo SITE_LINK; ?>img/invoice/pdf2x.png"></a>
                        </li>
                        <li>
                            <a href="#" class="p-r-10"><img width="25" height="25" alt="" class="icon-image" data-src-retina="<?php echo SITE_LINK; ?>img/invoice/image2x.png" data-src="<?php echo SITE_LINK; ?>img/invoice/image2x.png" src="<?php echo SITE_LINK; ?>img/invoice/image2x.png"></a>
                        </li>
                        <li>
                            <a href="#" class="p-r-10"><img width="25" height="25" alt="" class="icon-doc" data-src-retina="<?php echo SITE_LINK; ?>img/invoice/doc2x.png" data-src="<?php echo SITE_LINK; ?>img/invoice/doc2x.png" src="<?php echo SITE_LINK; ?>img/invoice/doc2x.png"></a>
                        </li>
                        <li><a href="#" class="p-r-10" onclick="$.Pages.setFullScreen(document.querySelector('html'));return false"><i class="fa fa-expand"></i></a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</nav>
<script>
    $(function(){
        $('#LoadedListDiv table').DataTable()
        $("#Loaded_List_Date").datepicker({autoclose:true }).on("changeDate",function(e){
            var CurrentDate =  {
                Loaded_List_Date:$("#Loaded_List_Date").val()
            };
            $('#LoadedListDiv table').DataTable()
            $.ajax({
                url:"StockAjax/LoadingListRequest",
                data:CurrentDate,
                dataType: 'text',
                complete:function(v1,v2){
                    if(v2 == "success"){
                        var Data  = (v1.responseText);
                        $("#LoadedListDiv").empty().html(Data)
                        $("#tableWithSearch").dataTable()
                    }
                }
            })
        })
    })
</script>