<style>
    .myresult {
        -webkit-print-color-adjust: exact;
    }
    .nodata{
        background-color: #72B4EC;
        color: white;
        border-radius: 13px;
        margin: 14px;
        font-size: 24px;
        text-align: center;
        padding: 5px;
    }
    @media print{
        .table-black{
            // border : 1px solid black;
        }
        td,th ,.mytotal {
            border: 1px solid #000 !important;
        }


        label {
            padding-top: 20px;
        }
        p,h4,h3,h2,h1,span,label,td,th,div.dataTables_info,a,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
        div.dataTables_wrapper div.dataTables_info,.panel-heading, tr.odd td.sorting_1{
            color:#000!important
        }
    }

</style>

<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">المنتجات</a></li>
            <li><a href="inventorybybarcodeController.php?do=productwithoutInventory">تقرير منتجات لم يتم جردها</a></li>
            <li class="active">عرض التقرير</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading">تقرير منتجات لم يتم جردها</div>
            <div class="panel-body">
                <form class="form-inline hidden-print " action="inventorybybarcodeController.php?do=productwithoutInventory" method="post">

                    <div class="form-group">
                        <label class="sr-only">المخزن</label>
                        <select class="select2 wdt100" name="storeId[]" id="storeId" multiple="multiple">
                            <option value="all">كل المخازن</option>
                            {foreach $storesData as $store}
                            <option value="{$store->storeId}">{$store->storeName}</option>
                            {/foreach}
                        </select>
                    </div>

                    <br/>
                    <div class="form-group">
                        <label class="sr-only">من التاريخ</label>
                        <input type="text" class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd" name="from" >
                    </div>
                    <div class="form-group">
                        <label class="sr-only">إلى التاريخ</label>
                        <input type="text" class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd" name="to" >
                    </div>
                    <div class="clearfix"></div>
                    <button type="submit" class="btn btn-primary">بحث</button>
                </form>
            </div>

            <div class="clearfix"></div>
            <hr/>
            <div class="panel panel-default panel-m">
                <!-- Default panel contents -->
                <div class="panel-heading">
                    مخزن:
                    {foreach $choosenStores as $data}
                    ,{$data->storeName}
                    {/foreach}
                    <br/>
                    {$message}
                </div>
                {if count($noInventoryProducts)>0}
                <div class="panel-body">
                    <table class="table table-black">
                        <thead>
                            <tr>
                                <th>المنتج</th>
                                {foreach $choosenStores as $data}
                                <th>{$data->storeName}</th>
                                {/foreach}
                            </tr>
                        </thead>
                        <tbody>
                            {foreach $noInventoryProducts as $noInv}
                            <tr>
                                <td>
                                    {$noInv->productName}
                                </td>
                                <!-- not all stores only choosen store and make sure quantity is of store-->
                                {foreach $choosenStores as $data}
                                <td>
                                    {if isset($noInv->storeName[$data->storeId])} {$noInv->storeName[$data->storeId]} {else} - {/if}
                                </td>
                                {/foreach}
                            </tr>
                            {/foreach}
                        </tbody>
                    </table>
                </div>
            </div>
            {else}
            <div class="nodata">عفوا لا توجد نتائج</div>
            {/if}
        </div>