<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[148]->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="clientsAndsellProductsReportController.php?do=show" method="post">
                    <input type="hidden" name="searchvalue" id="searchvalue" value="{$Programsettingdata->searchvalue}"/>
                    <div class="form-group">
                        <label class="sr-only">العملاء</label>
                        <select class="select2 wdt300"  name="clientId" id="clientId" >
                            <option value="-1">اختر عميل</option>

                            {foreach $clientsData as $c}

                            <option value="{$c->clientid}">{$c->clientname} </option>

                            {/foreach}

                        </select>
                    </div>
                    <br/>
                    <div class="form-group">
                        <label class="sr-only">المنتجات</label>
                        <!--input type="hidden" class="select2product "  name="productId" id="productId" data-placeholder="اختر منتج"  /-->

                        <input type="hidden" class="select2product wdt300"  name="productId" id="productId" data-placeholder="اختر منتج"  />

                    </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>
                    <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>

                            {assign var=i value=1}
                            {foreach $mydata as $pro}

                            {if {$pro->type} eq 0}
                            <tr>
                                {else}
                            <tr  class="danger" >
                                {/if}
                                <td>{$pro->productName}
                                    {if $hidecat eq 1}
                                    /{$pro->productCatName}
                                    {/if}</td>
                                <td>{$pro->quantity}</td>
                                <td>{$pro->price}</td>
                                <td>{$pro->selldate}</td>


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


                        </tbody>

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

                            <div class="well well-sm">

                                <h4 class="text-center">اجمالى المبيعات {$sellquantity} </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-0 col-lg-4">

                            <div class="well well-sm">

                                <h4 class="text-center">الاجمالى العام لعدد القطع {$final} قطعه</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>
