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

<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">التقارير</a></li>
            <li><a href="profitproductcatController.php?dis=T">تقرير ارباح منتج</a></li>
            <li class="active">عرض التقرير</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            {if $message != ""}
            <div class="panel-heading">{$message}
                <a href="{$youtubes[68]->url}" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>

            </div>
            {else}
            <div class="panel-heading">تقرير أرباح منتج
                <a href="{$youtubes[68]->url}" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>

            </div>
            {/if}
            <div class="panel-body">
                <form class="form-inline hidden-print" action="profitproductController.php?dis=T" method="post">

                    <input type="hidden" name="searchvalue" id="searchvalue" value="{$Programsettingdata->searchvalue}"/>
                    <div class="form-group">
                        <label for="email" class="col-lg-3 control-label">الحساب بـ</label>
                        <div class="col-lg-6">
                            <label>
                                <input type="radio" name="buyPriceType"  value="first" {if {$programsettingsdata->Profitevaluation} eq "first"}  checked {/if}>
                                سعر شراء </label><br>
                            <label>
                                <input type="radio" name="buyPriceType"  value="last" {if {$programsettingsdata->Profitevaluation} eq "last"}  checked {/if}>
                                اخر سعر شراء </label><br>
                            <label>
                                <input type="radio" name="buyPriceType"  value="last_discount" {if {$programsettingsdata->Profitevaluation} eq "last_discount"}  checked {/if}>
                                اخر سعر شراء بعد الخصم </label><br>
                            <label>
                                <input type="radio" name="buyPriceType"  value="mean" {if {$programsettingsdata->Profitevaluation} eq "mean"}  checked {/if}>
                                متوسط سعر الشراء</label>
                            <label>
                                <input type="radio" name="buyPriceType"  value="mean_discount" {if {$programsettingsdata->Profitevaluation} eq "mean_discount"}  checked {/if}>
                                متوسط سعر الشراء بعد الخصم</label>
                            <label>
                                <input type="radio" name="buyPriceType"  value="generalPrice" {if {$programsettingsdata->Profitevaluation} eq "generalPrice"}  checked {/if}>
                                المتوسط العام</label>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                    <br/>
                    <div class="form-group col-lg-3">
                        <label class="sr-only">تصنيف المنتج</label>
                        <select class="select2 wdt300 productCat" data-level="0"  name="productCatId0" id="productCatId0" >
                            <option value="-1">اختر تصنيف</option>
                            {foreach $catDataReport as $data}
                            <option value="{$data->productCatId}">{$data->productCatName}</option>
                            {/foreach}
                        </select>
                        <input type="hidden" id="level" name="level" value="0">
                    </div>
                    <div id="manyParents">

                    </div>
                    <div style="clear: both"></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="color-white" style="margin-top: 14px;margin-bottom: 11px;font-size: 12px;font-weight: bold;">
                <input style="margin-left: 6px;" type="radio" name="clients_product" value="" onclick="document.location.href = '{$hosturl}/controllers/profitproductController.php'"/>عرض  بدون بالخصومات
                <input style="margin-left: 6px;" type="radio" name="clients_product" value=""    checked="checked"    onclick="document.location.href = '{$hosturl}/controllers/profitproductController.php?dis=T'"/>عرض  الخصومات
            </div>

            <hr/>
            <table class="table table-black">
                <thead>
                    <tr>
                        <th>اسم المنتج</th>
                        <th>{$productData->productName}</th>
                        <th>الكمية</th>
                        <th>{$quantityForOneProduct}</th>
                        <th>الربح</th>
                        <th>{$profitForOneProduct}</th>
                        <th>الخصم</th>
                        <th>{$discountPrice}</th>
                    </tr>

                </thead>
                <tbody>
                </tbody>
            </table>
            <div class="clearfix"></div>
            <hr />
            <div  class="noprint">
                <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>
