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

    .magnify:hover {
        position: relative;
        transition: transform .3s;
        /* Animation */
        transform: scale(3.5);
        z-index: 999;
        top: -25px;
        left: -35px;
        display: block;
    }

    @media print {

        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,
        tr.odd td.sorting_1 {
            color: #000 !important
        }

        .table thead>tr>th,
        .table tbody>tr>th,
        .table tfoot>tr>th,
        .table thead>tr>td,
        .table tbody>tr>td,
        .table tfoot>tr>td {
            text-align: center !important
        }
    }
</style>

<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">{$smarty.const.STORE_REPORTS}</a></li>
            <li class="active">{$smarty.const.STORE_PRICE_GOODS_PRICE_LIST_REPORT}</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading">{$smarty.const.STORE_PRICE_GOODS_PRICE_LIST_REPORT}
                <a href="{$youtubes[71]->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="storedetailpriceController.php?do=show" method="post">
                    <input type="hidden" name="searchvalue" id="searchvalue"
                        value="{$Programsettingdata->searchvalue}" />


                    <div class="form-group col-lg-3">
                        <label class="sr-only">{$smarty.const.STORE_PRODUCT_RATING}</label>
                        <select class="select2 wdt300 productCat" data-level="0" name="productCatId0"
                            id="productCatId0">
                            <option value="-1">{$smarty.const.STORE_CHOOSE_RATING}</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>

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



                    <!--{*foreach $productCatData as $cat*}-->



                    <!--&lt;!&ndash;          <option value="{$cat->productCatId}">{$cat->productCatName}</option>-->
                    <!--&ndash;&gt;-->
                    <!--{*/foreach*}-->
                    <!--{for $j=0 to $itr}-->




                    <!--<option value="{$parentId{$j}}">{$names{$j}}</option>-->





                    <!--{/for}-->



                    <!--</select>-->
                    <!--</div>-->
                    <!--div class="form-group">
                        <label class="sr-only">المنتج</label>
                        <input type="hidden" class="select2product wdt300"  name="productId" id="productId" data-placeholder="اختر منتج"  />
                    </div-->
                    <br />
                    <div class="form-group">
                        <label class="sr-only">{$smarty.const.STORE_STORE}</label>
                        <select class="select2 wdt300" name="storeId" id="storeId">
                            <option value="-1">{$smarty.const.STORE_CHOOSE_STORE}</option>



                            {foreach $storeData as $store}




                            <option value="{$store->storeId}">{$store->storeName}</option>


                            {/foreach}



                        </select>
                    </div>


                    <div class="form-group">
                        <label class="sr-only">{$smarty.const.STORE_ORDER}</label>
                        <select class="select2 wdt300" name="order" id="order">



                            <option value="asc">{$smarty.const.STORE_ORDER_ASCENDING}</option>
                            <option value="desc">{$smarty.const.STORE_ORDER_DESCENDING}</option>






                        </select>
                    </div>
                    <br />
                    <div class="form-group">
                        <label class="sr-only">{$smarty.const.STORE_PRICE_QUANTITY_GREATER_EQUAL}</label>
                        <input type="number" class="form-control" name="quantityGreaterThan" autocomplete="off">
                    </div>
                    <div class="form-group">
                        <label class="sr-only">{$smarty.const.STORE_PRICE_QUANTITY_LESS_EQUAL}</label>
                        <input type="number" class="form-control" name="quantityLessThan" autocomplete="off">
                    </div>
                    <br />

                    <div class="form-group">
                        <label class="sr-only">{$smarty.const.STORE_PRICE_SHOW}</label>
                        <input name='cheak' id='chkall' type="hidden" value='{$array}' />
                        <label> <input name="selectall" type="checkbox" value="1" id="parent" {if $selectall eq 1 }
                                checked {/if} />{$smarty.const.STORE_PRICE_ALL}</label>
                        <div id="checkboxlist">
                            {if $usergroupdata->showBuyPrice eq 0}
                            <label> <input name="productBuyPrice" type="checkbox" value="1" {if $productBuyPrice eq 1 }
                                    checked {/if} />{$smarty.const.STORE_PRICE_PURCHASING_PRICE} </label>
                            <label> <input name="lastbuyprice" type="checkbox" value="1" {if $lastbuyprice eq 1 }
                                    checked {/if} />اخر سعر الشراء </label>
                            <label> <input name="lastbuyprice_withDiscount" type="checkbox" value="1" {if
                                    $lastbuyprice_withDiscount eq 1 } checked {/if} />اخر سعر الشراء مع الخصم </label>
                            <label> <input name="meanbuyprice" type="checkbox" value="1" {if $meanbuyprice eq 1 }
                                    checked {/if} />متوسط سعر الشراء </label>
                            <label> <input name="meanbuyprice_withDiscount" type="checkbox" value="1" {if
                                    $meanbuyprice_withDiscount eq 1 } checked {/if} />متوسط سعر الشراء مع الخصم </label>
                            {/if}
                            {if $usergroupdata->showSellAllPrice eq 0 && $Programsettingdata->showpriceall == 1}
                            <label> <input name="productSellAllPrice" type="checkbox" value="1" id="productSellAllPrice"
                                    {if $productSellAllPrice eq 1 } checked {/if} />{$smarty.const.STORE_PRICE_SENTENCE}
                            </label>
                            {/if}
                            {if $usergroupdata->showSellHalfPrice eq 0 && $Programsettingdata->showpricehalf == 1}
                            <label> <input name="productSellHalfPrice" type="checkbox" value="1" {if
                                    $productSellHalfPrice eq 1 } checked
                                    {/if} />{$smarty.const.STORE_PRICE_HALF_SENTENCE} </label>
                            {/if}
                            {if $usergroupdata->showSellUnitPrice eq 0 && $Programsettingdata->showpriceunit == 1}
                            <label> <input name="productSellUnitPrice" type="checkbox" value="1" {if
                                    $productSellUnitPrice eq 1 } checked
                                    {/if} />{$smarty.const.STORE_PRICE_RETAIL_PRICE} </label>
                            {/if}
                            {if $usergroupdata->showSellUnitPrice eq 0 && $Programsettingdata->showprice4 == 1}
                            <label> <input name="price4" type="checkbox" value="1" {if $price4 eq 1 } checked
                                    {/if} />{$smarty.const.STORE_PRICE4} </label>
                            {/if}
                            {if $usergroupdata->showSellUnitPrice eq 0 && $Programsettingdata->showprice5 == 1}
                            <label> <input name="price5" type="checkbox" value="1" {if $price5 eq 1 } checked
                                    {/if} />{$smarty.const.STORE_PRICE5} </label>
                            {/if}
                            {if $usergroupdata->showSellUnitPrice eq 0 && $Programsettingdata->showprice6 == 1}
                            <label> <input name="price6" type="checkbox" value="1" {if $price6 eq 1 } checked
                                    {/if} />{$smarty.const.STORE_PRICE6} </label>
                            {/if}
                            {if $usergroupdata->showSellUnitPrice eq 0 && $Programsettingdata->showprice7 == 1}
                            <label> <input name="price7" type="checkbox" value="1" {if $price7 eq 1 } checked
                                    {/if} />{$smarty.const.STORE_PRICE7} </label>
                            {/if}
                            {if $usergroupdata->showSellUnitPrice eq 0 && $Programsettingdata->showprice8 == 1}
                            <label> <input name="price8" type="checkbox" value="1" {if $price8 eq 1 } checked
                                    {/if} />{$smarty.const.STORE_PRICE8} </label>
                            {/if}
                            {if $usergroupdata->showSellUnitPrice eq 0 && $Programsettingdata->showprice9 == 1}
                            <label> <input name="price9" type="checkbox" value="1" {if $price9 eq 1 } checked
                                    {/if} />{$smarty.const.STORE_PRICE9} </label>
                            {/if}
                            {if $usergroupdata->showSellUnitPrice eq 0 && $Programsettingdata->showprice10 == 1}
                            <label> <input name="price10" type="checkbox" value="1" {if $price10 eq 1 } checked
                                    {/if} />{$smarty.const.STORE_PRICE10} </label>
                            {/if}
                            {if $usergroupdata->showSellUnitPrice eq 0 && $Programsettingdata->showprice11 == 1}
                            <label> <input name="price11" type="checkbox" value="1" {if $price11 eq 1 } checked
                                    {/if} />{$smarty.const.STORE_PRICE11} </label>
                            {/if}
                            {if $usergroupdata->showSellUnitPrice eq 0 && $Programsettingdata->showprice12 == 1}
                            <label> <input name="price12" type="checkbox" value="1" {if $price12 eq 1 } checked
                                    {/if} />{$smarty.const.STORE_PRICE12} </label>
                            {/if}
                            {if $usergroupdata->showSellUnitPrice eq 0 && $Programsettingdata->showprice13 == 1}
                            <label> <input name="price13" type="checkbox" value="1" {if $price13 eq 1 } checked
                                    {/if} />{$smarty.const.STORE_PRICE13} </label>
                            {/if}
                            <label> <input name="storename" type="checkbox" value="1" {if $storename eq 1 } checked
                                    {/if} />{$smarty.const.STORE_STORE_NAME}</label>
                            <label> <input name="amount" type="checkbox" value="1" {if $amount eq 1 } checked {/if} />
                                {$smarty.const.STORE_PRICE_QUANTITY}</label>
                            <label> <input name="lastProcessDate" type="checkbox" value="1" {if $lastProcessDate eq 1 }
                                    checked {/if} />{$smarty.const.STORE_PRICE_DATE_LAST_OPERATION}</label>
                            <label> <input name="selldiscount" type="checkbox" value="1" {if $selldiscount eq 1 }
                                    checked {/if} />{$smarty.const.STORE_PRICE_DISCOUNT_CATEGORIES_SALE}</label>
                            <label> <input name="image" type="checkbox" value="1" {if $image eq 1 } checked {/if} />
                                {$smarty.const.STORE_PRICE_IMAGE}</label>
                            <label> <input name="hideZeroQuantity" type="checkbox" value="1" {if $hideZeroQuantity eq 1
                                    } checked {/if} />{$smarty.const.STORE_PRICE_HIDE_PRODUCTS_ZERO_QUANTITY}</label>
                            <label> <input name="description" type="checkbox" value="1" {if $description eq 1 } checked
                                    {/if} />{$smarty.const.STORE_PRICE_DESCRIPTION}</label>
                            <label> <input name="parcodaz" type="checkbox" value="1" {if $parcodaz eq 1 } checked
                                    {/if} />{$smarty.const.STORE_PRICE_BARCODE}</label>
                            <label> <input name="dasta" type="checkbox" value="1" {if $dasta eq 1 } checked
                                    {/if} />{$smarty.const.STORE_PRICE_DOZEN_PRICE}</label>
                            <label> <input name="ro3dasta" type="checkbox" value="1" {if $ro3dasta eq 1 } checked
                                    {/if} />{$smarty.const.STORE_PRICE_PRICE_QUARTER_DOZEN}</label>
                        </div>
                    </div>
                    <br />
                    <button type="submit" class="btn btn-primary">{$smarty.const.STORE_SEARCH}</button>
                </form>
            </div>
            {if {count($storedetailData)} > 0}
            <div class="panel panel-default">
                <!-- Default panel contents -->
                <div class="panel-heading">{$message}</div>
                <div class="panel-body">
                    <hr />
                    {if {count($storedetailData)} > 0}
                    <!--div class="col-lg-offset-8 col-lg-4">
                      <div class="well well-sm">
                        <h4 class="text-center">اجمالى سعر المنتجات {$sumValue} {$currency}</h4>
                      </div>
                    </div-->
                    {/if}
                    <table class="table table-black" id="dataTableClassSpecialSorting">
                        <thead>
                            <tr>
                                <th></th>
                                <th>{$smarty.const.STORE_NUMBER}</th>
                                {if {$storename} eq 1}

                                <th>{$smarty.const.STORE_STORE_NAME}</th>
                                {/if}

                                <th class="catClass">{$smarty.const.STORE_CATEGORY_NAME}</th>
                                <th>{$smarty.const.STORE_PRODUCT_NAME}</th>

                                {if {$amount} eq 1}
                                <th>{$smarty.const.STORE_PRICE_QUANTITY}</th>
                                {/if}

                                {if {$productBuyPrice} eq 1}
                                <th>{$smarty.const.STORE_PRICE_PURCHASING_PRICE}</th>
                                {/if}
                                {if {$lastbuyprice} eq 1}
                                <th>اخر سعر الشراء </th>
                                {/if}
                                {if {$lastbuyprice_withDiscount} eq 1}
                                <th>اخر سعر الشراء مع الخصم </th>
                                {/if}
                                {if {$meanbuyprice} eq 1}
                                <th>متوسط سعر الشراء </th>
                                {/if}
                                {if {$meanbuyprice_withDiscount} eq 1}
                                <th>متوسط سعر الشراء مع الخصم </th>
                                {/if}

                                {if {$productSellAllPrice} eq 1}
                                <th>{$smarty.const.STORE_PRICE_WHOLESALE_PRICE}</th>
                                {/if}

                                {if {$productSellHalfPrice} eq 1}
                                <th>{$smarty.const.STORE_PRICE_HALF_PRICE_WHOLESALE}</th>
                                {/if}
                                {if {$productSellUnitPrice} eq 1}
                                <th>{$smarty.const.STORE_PRICE_RETAIL_PRICE}</th>
                                {/if}
                                {if {$price4} eq 1}
                                <th>{$smarty.const.STORE_PRICE4}</th>
                                {/if}
                                {if {$price5} eq 1}
                                <th>{$smarty.const.STORE_PRICE5}</th>
                                {/if}
                                {if {$price6} eq 1}
                                <th>{$smarty.const.STORE_PRICE6}</th>
                                {/if}
                                {if {$price7} eq 1}
                                <th>{$smarty.const.STORE_PRICE7}</th>
                                {/if}
                                {if {$price8} eq 1}
                                <th>{$smarty.const.STORE_PRICE8}</th>
                                {/if}
                                {if {$price9} eq 1}
                                <th>{$smarty.const.STORE_PRICE9}</th>
                                {/if}
                                {if {$price10} eq 1}
                                <th>{$smarty.const.STORE_PRICE10}</th>
                                {/if}
                                {if {$price11} eq 1}
                                <th>{$smarty.const.STORE_PRICE11}</th>
                                {/if}
                                {if {$price12} eq 1}
                                <th>{$smarty.const.STORE_PRICE12}</th>
                                {/if}
                                {if {$price13} eq 1}
                                <th>{$smarty.const.STORE_PRICE13}</th>
                                {/if}

                                {if {$lastProcessDate} eq 1}
                                <th>{$smarty.const.STORE_PRICE_DATE_LAST_OPERATION}</th>
                                {/if}

                                {if {$image} eq 1}
                                <th>{$smarty.const.STORE_PRICE_IMAGE}</th>
                                {/if}
                                {if {$description} eq 1}
                                <th>{$smarty.const.STORE_PRICE_DESCRIPTION}</th>
                                {/if}
                                {if {$parcodaz} eq 1}
                                <th>{$smarty.const.STORE_PRICE_BARCODE}</th>
                                {/if}
                                {if {$dasta} eq 1}
                                <th>{$smarty.const.STORE_PRICE_DOZEN_PRICE}</th>
                                {/if}
                                {if {$ro3dasta} eq 1}
                                <th>{$smarty.const.STORE_PRICE_PRICE_QUARTER_DOZEN}</th>
                                {/if}

                            </tr>
                        </thead>
                        <tbody>
                            {assign var=x value=1}
                            {foreach $storedetailData as $storedetail}
                            {if {$storedetail->reviewType} eq 1}
                            <tr class="danger"> {elseif {$storedetail->reviewType} eq 0}
                            <tr>{/if}
                                <td><input type="checkbox" onclick='chkboxcolorrow(this);' /></td>
                                <td>{$x}</td>
                                {if {$storename} eq 1}
                                <td>{$storedetail->storeName}</td>
                                {/if}

                                <td>{$storedetail->productCatName}</td>
                                <td>{$storedetail->productName}</td>

                                {if {$amount} eq 1}
                                <td>{$storedetail->productquantity}</td>
                                {/if}

                                {if {$productBuyPrice} eq 1}
                                <td>{$storedetail->productBuyPrice}</td>
                                {/if}

                                {if {$lastbuyprice} eq 1}
                                <td>{$storedetail->lastbuyprice}</td>
                                {/if}
                                {if {$lastbuyprice_withDiscount} eq 1}
                                <td>{$storedetail->lastbuyprice_withDiscount}</td>
                                {/if}
                                {if {$meanbuyprice} eq 1}
                                <td>{$storedetail->meanbuyprice}</td>
                                {/if}
                                {if {$meanbuyprice_withDiscount} eq 1}
                                <td>{$storedetail->meanbuyprice_withDiscount}</td>
                                {/if}

                                {if {$productSellAllPrice} eq 1}
                                <td>{$storedetail->productSellAllPrice}</td>
                                {/if}

                                {if {$productSellHalfPrice} eq 1}
                                <td>{$storedetail->productSellHalfPrice}</td>
                                {/if}

                                {if {$productSellUnitPrice} eq 1}
                                <td>{$storedetail->productSellUnitPrice}</td>
                                {/if}
                                {if {$price4} eq 1}
                                <td>{$storedetail->price4}</td>
                                {/if}
                                {if {$price5} eq 1}
                                <td>{$storedetail->price5}</td>
                                {/if}
                                {if {$price6} eq 1}
                                <td>{$storedetail->price6}</td>
                                {/if}
                                {if {$price7} eq 1}
                                <td>{$storedetail->price7}</td>
                                {/if}
                                {if {$price8} eq 1}
                                <td>{$storedetail->price8}</td>
                                {/if}
                                {if {$price9} eq 1}
                                <td>{$storedetail->price9}</td>
                                {/if}
                                {if {$price10} eq 1}
                                <td>{$storedetail->price10}</td>
                                {/if}
                                {if {$price11} eq 1}
                                <td>{$storedetail->price11}</td>
                                {/if}
                                {if {$price12} eq 1}
                                <td>{$storedetail->price12}</td>
                                {/if}
                                {if {$price13} eq 1}
                                <td>{$storedetail->price13}</td>
                                {/if}

                                {if {$lastProcessDate} eq 1}
                                <td>{$storedetail->storedetaildate}</td>
                                {/if}

                                {if {$image} eq 1}
                                <td>
                                    {if $storedetail->logo =="." || $storedetail->logo ==""}
                                    {$smarty.const.STORE_PRICE_NOTHING}
                                    {else}
                                    <img src="../views/default/images/product_image/{$storedetail->logo}"
                                        class="moImg magnify" alt="" width="75" height="75">
                                    {/if}
                                </td>
                                {/if}

                                {if {$description} eq 1}
                                <td>{$storedetail->productDescription}</td>
                                {/if}

                                {if {$parcodaz} eq 1}
                                <td>{$storedetail->parcode}</td>
                                {/if}

                                {if {$dasta} eq 1}
                                <td>{$storedetail->productSellAllPrice*12}</td>
                                {/if}

                                {if {$ro3dasta} eq 1}
                                <td>{$storedetail->productSellAllPrice*3}</td>
                                {/if}

                            </tr>
                            {capture assign=x}{$x+1}{/capture}
                            {/foreach}

                        </tbody>

                    </table>
                    <div class="col-lg-offset-8 col-lg-4">
                        <div class="well well-sm">
                            <h4 class="text-center">{$smarty.const.STORE_PRICE_TOTAL_PRODUCTS}{$countproduct}</h4>
                        </div>
                    </div>
                    {/if}
                    <div class="clearfix"></div>
                    <hr />
                    {if {count($storedetailData)} > 0}
                    <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">{$smarty.const.STORE_PRINT}</button>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    {/if}
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
        {literal}
        <script>
            $(document).ready(function () {
                $('#dataTableClassSpecialSorting').dataTable({
                    dom: 'Bfrtip',
                    buttons: [//'csv', 'pdf'
                        {
                            extend: "print",
                            className: "btn dark btn-outline",
                            text: "طباعه<i class='fa fa-print'></i>",
                            exportOptions: {
                                //columns: '.show-print'
                                columns: ':visible'
                            },
                            customize: function (win) {
                                //                    $(win.document.body)
                                //                            .css('font-size', '10pt')
                                //                            .prepend(
                                //                                    '<img src="http://datatables.net/media/images/logo-fade.png" style="position:absolute; top:0; left:0;z-index:-1;" />'
                                //                                    );
                                $(win.document.body).find('table')
                                    //.addClass('compact')
                                    .css('direction', 'rtl');
                            }
                        }, {
                            extend: "copy",
                            className: "btn red btn-outline",
                            text: "نسخ",
                            exportOptions: {
                                //columns: '.show-print'
                                columns: ':visible'
                            }
                        }, {
                            extend: "excel",
                            className: "btn yellow btn-outline ",
                            text: "اكسل",
                            exportOptions: {
                                //columns: '.show-print'
                                columns: ':visible'
                            }
                        }, {
                            extend: "colvis",
                            className: "btn dark btn-outline",
                            text: "المكونات"
                        }
                    ],
                    "bStateSave": true,
                    "language": {
                        "aria": {
                            "sortAscending": ": Used to order Ascending",
                            "sortDescending": ": Used to order Descending"
                        },
                        "emptyTable": "لا يوجد بيانات",
                        "info": "عرض _START_ من _END_ الى _TOTAL_ عناصر",
                        "infoEmpty": "لا يوجد بيانات",
                        "infoFiltered": "(تنقيه _MAX_ من الاجمالى)",
                        "lengthMenu": " _MENU_ عنصر",
                        "search": "البحث:",
                        "zeroRecords": "لا يوجد بيانات تشابه البحث"
                    },
                    responsive: !0,
                    "columnDefs": [
                        //            {// set default column settings
                        //                "orderable": false,
                        //                "searchable": false,
                        //                "targets": [lstone],
                        //                "className": 'hide-print'
                        //            },
                        //            {// set default column settings
                        //                "orderable": false,
                        //                "searchable": false,
                        //                "targets": [belastone],
                        //                "className": 'hide-print'
                        //            },
                        //            {// set default column settings
                        //                "orderable": false,
                        //                "searchable": false,
                        //                "targets": [thrdone],
                        //                "className": 'hide-print'
                        //            },
                        { targets: '_all', "className": 'show-print' }],
                    order: [
                        //[0, "asc"]
                        [$('th.catClass').index(), "asc"]
                    ],
                    //        "paging": false,
                    lengthMenu: [
                        [5, 10, 15, 20, -1],
                        [5, 10, 15, 20, "All"]
                    ],
                    pageLength: 10,
                    dom: "<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>"
                });
                $('#dataTableClassSpecialSorting td').css("height", "30px");
            });
        </script>
        {/literal}