<style>
    .myresult {
        -webkit-print-color-adjust: exact;
    }
</style>

<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">التقارير</a></li>
            <li class="active"> تقرير المنتجات الراكدة فى التصنيفات</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading"> تقرير المنتجات الراكدة فى التصنيفات
                <a href="{$youtubes[75]->url}" target="_blank" class="hidden-print"><img
                        src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube"
                        style="width: 2%;"></a>
            </div>
            <div class="panel-body">
                <form class="form-inline hidden-print" action="catsellrateReportController.php?do=show" method="post">
                    <input type="hidden" name="searchvalue" id="searchvalue"
                        value="{$Programsettingdata->searchvalue}" />


                    <div class="form-group wdt300">
                        <label class="sr-only ">التصنيفات</label>
                        <select data-placeholder="اختر تصنيف المنتج" class="select2 wdt200" name="catid" id="catid">
                            <option value="-1">اختر تصنيف</option>

                            {foreach $catData as $data }
                            <option value="{$data->productCatId}" {if $catid eq $data->
                                productCatId}selected{/if}>{$data->productCatName}</option>
                            {/foreach}


                        </select>

                    </div>

                    <div class="form-group"><span id="sprytextfield1">
                            <label class="sr-only">عدد المبيعات</label>
                            <input name="numberid" class="positiveNo" type="text" id="numberid" value="{$numberid}"/>
                            <span class="textfieldRequiredMsg">***.</span></span>
                    </div>


                    <br />
                    <div class="form-group"><span id="sprytextfield2">
                            <label class="sr-only">من التاريخ</label>
                            <input type="text" class="form-control awdatepicker" autocomplete="off"
                                data-date-format="yyyy-mm-dd" name="from" value="{$startDate}">
                            <span class="textfieldRequiredMsg">***.</span></span>
                    </div>
                    <div class="form-group"><span id="sprytextfield3">
                            <label class="sr-only">إلى التاريخ</label>
                            <input type="text" class="form-control awdatepicker" autocomplete="off"
                                data-date-format="yyyy-mm-dd" name="to" value="{$endDate}">
                            <span class="textfieldRequiredMsg">***.</span></span>
                    </div>
                    <button type="submit" class="btn btn-primary">بحث</button>
                </form>
            </div>

            <div class="panel panel-default panel-m">
                <!-- Default panel contents -->
                <div class="panel-heading">{$message}</div>
                <div class="panel-body">
                    <hr />
                    <table class="table table-black">
                        <thead>
                            <tr>
                                <th>اسم المنتج</th>
                                <th> الكميه المباعه</th>
                                <th> الكميه المردوده</th>
                                <th> الكميه</th>


                            </tr>
                        </thead>
                        <tbody>


                            {foreach $newarray as $pro}
                            <tr>
                                <td>{$pro->productName}
                                    /{$pro->productCatName}
                                </td>

                                <td>{$pro->sellquantity}</td>
                                {if !empty($pro->returnquantity) }
                                <td>{$pro->returnquantity}</td>
                                {else}
                                <td>0</td>
                                {/if}
                                {if !empty($pro->sellandreturn)}
                                <td>{$pro->sellandreturn}</td>
                                {else}
                                <td>0</td>
                                {/if}


                                <!--<td><a href="{$pro->controlnname}?do=editprint&id={$pro->sellid}" type="button" class="btn btn-default btn-lg notesicon"></a></td>-->
                            </tr>

                            {/foreach}


                        </tbody>

                    </table>
                    <div style="width:100%">
                        <!------------------>
                        <div class="col-lg-offset-8 col-lg-4">

                            <div class="well well-sm">

                                <h4 class="text-center" id="vvv">اجمالى المبيعات {$totalnumofsells} </h4>

                            </div>

                        </div>

                        <!--------------->
                        <!-- <div class="col-lg-offset-4 col-lg-4">

                        <div class="well well-sm">

                          <h4 class="text-center">اجمالى المردودات {$returnquantity}</h4>

                        </div>

                      </div>-->

                        <!--------------->

                        <!-- <div class="col-lg-offset-12 col-lg-4">

                        <div class="well well-sm">

                          <h4 class="text-center">سعر المبيعات {$totalsellprice} {$currency}</h4>

                        </div>

                      </div>-->

                        <!--------------->
                        <!--<div class="col-lg-offset-4 col-lg-4">

                       <div class="well well-sm">

                         <h4 class="text-center">الاجمالى العام للمبيعات {$numofsellproduct} قطعه</h4>

                       </div>

                     </div>
                        -->
                        <!--------------->
                        <!--  <div class="col-lg-offset-0 col-lg-4">

                         <div class="well well-sm">

                           <h4 class="text-center">سعر  المردودات {$totalreturnprice} {$currency}</h4>

                         </div>

                       </div>-->
                        <!---------------------->

                    </div>

                    <div class="clearfix"></div>
                    <hr />

                    <div class="hidden-print">
                        <div class="col-lg-12">
                            <div class="form-group">
                                <div class="col-lg-4">
                                    <button type="button" onclick="print_Custom('mycustomheader');"
                                        class="btn btn-success pull-right hidden-print">طباعة</button>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>

                    <div class="clearfix"></div>
                </div>
            </div>
        </div>

        {literal}
        <script>

            var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "real");//, {validateOn: ["blur", "change"]}
            var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none");//, {validateOn: ["blur", "change"]}
            var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none");//, {validateOn: ["blur", "change"]}
        </script>
        {/literal}