<?php /* Smarty version Smarty-3.1.11, created on 2026-06-18 00:46:46
         compiled from "..\views\default\productReportsview\reportWithAllPrices.html" */ ?>
<?php /*%%SmartyHeaderCode:101766a3323d6109667-95109369%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'bd8905353cef91526de3e5b0a952641849e57b9d' => 
    array (
      0 => '..\\views\\default\\productReportsview\\reportWithAllPrices.html',
      1 => 1752437506,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '101766a3323d6109667-95109369',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'message' => 0,
    'mess' => 0,
    'youtubes' => 0,
    'itr' => 0,
    'j' => 0,
    'productsData' => 0,
    'totalQuantity' => 0,
    'totalPrice' => 0,
    'currency' => 0,
    'userGroup' => 0,
    'Programsettingdata' => 0,
    'data' => 0,
    'hidecat' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_6a3323d6d4c184_48193896',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_6a3323d6d4c184_48193896')) {function content_6a3323d6d4c184_48193896($_smarty_tpl) {?><style>
    .myresult {
        -webkit-print-color-adjust: exact;
    }

    @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,
        .table thead>tr>th,
        .table tbody>tr>th,
        .table tfoot>tr>th,
        .table thead>tr>td,
        .table tbody>tr>td,
        .table tfoot>tr>td {
            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
        }

        .dataTables_info,
        .dataTables_paginate,
        .dataTables_length,
        .dataTables_filter {
            display: none;
        }
    }
</style>

<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">التقارير</a></li>
            <li><a href="#">تقرير الأصناف بكل الأسعار</a></li>
            <li class="active">عرض التقرير</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading">تقرير الأصناف بكل الأسعار

                <br />

                <?php if ($_smarty_tpl->tpl_vars['message']->value!=''){?>
                <?php echo $_smarty_tpl->tpl_vars['message']->value;?>
/<?php echo $_smarty_tpl->tpl_vars['mess']->value;?>

                <?php }?>
                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[65]->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="productReportsController.php?do=reportWithAllPrices"
                    method="post">
                    <div class="form-group col-lg-3">
                        <label class="sr-only">تصنيف المنتج</label>
                        <select class="select2 wdt100" name="productCatId" id="productCatId">
                            <!--onChange="this.form.submit();"-->
                            <option value="-1"></option>
                            <option value="all">كل الأصناف</option>



                            <?php $_smarty_tpl->tpl_vars['j'] = new Smarty_Variable;$_smarty_tpl->tpl_vars['j']->step = 1;$_smarty_tpl->tpl_vars['j']->total = (int)ceil(($_smarty_tpl->tpl_vars['j']->step > 0 ? $_smarty_tpl->tpl_vars['itr']->value+1 - (0) : 0-($_smarty_tpl->tpl_vars['itr']->value)+1)/abs($_smarty_tpl->tpl_vars['j']->step));
if ($_smarty_tpl->tpl_vars['j']->total > 0){
for ($_smarty_tpl->tpl_vars['j']->value = 0, $_smarty_tpl->tpl_vars['j']->iteration = 1;$_smarty_tpl->tpl_vars['j']->iteration <= $_smarty_tpl->tpl_vars['j']->total;$_smarty_tpl->tpl_vars['j']->value += $_smarty_tpl->tpl_vars['j']->step, $_smarty_tpl->tpl_vars['j']->iteration++){
$_smarty_tpl->tpl_vars['j']->first = $_smarty_tpl->tpl_vars['j']->iteration == 1;$_smarty_tpl->tpl_vars['j']->last = $_smarty_tpl->tpl_vars['j']->iteration == $_smarty_tpl->tpl_vars['j']->total;?>
                            <option value="<?php echo $_smarty_tpl->tpl_vars['parentId'.($_smarty_tpl->tpl_vars['j']->value)]->value;?>
"><?php echo $_smarty_tpl->tpl_vars['names'.($_smarty_tpl->tpl_vars['j']->value)]->value;?>
 </option>

                            <?php }} ?>



                        </select>
                    </div>
                    <div class="form-group">
                        <label class="sr-only">خصم الجملة</label>
                        <input type="text" class="form-control positivefloat" name="sellAllDiscount" autocomplete="off">
                    </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="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>
                <?php if (count($_smarty_tpl->tpl_vars['productsData']->value)>0){?>
            </div>
            <div class="col-lg-offset-8 col-lg-4">
                <div class="well well-sm">
                    <h4 class="text-center">إجمالي الوحدات: <?php echo $_smarty_tpl->tpl_vars['totalQuantity']->value;?>
 </h4>
                </div>
            </div>
            <div class="col-lg-offset-8 col-lg-4">
                <div class="well well-sm">
                    <h4 class="text-center">إجمالي السعر: <?php echo $_smarty_tpl->tpl_vars['totalPrice']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                </div>
            </div>
            <div class="clearfix"></div>
            <hr />
            <table class="table table-black dataTableClass">
                <thead>
                    <tr>
                        <th>م</th>
                        <th>إسم الصنف</th>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showsStorerQuantity=="0"){?><th>الكمية بالمخزن</th><?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showpriceunit==1){?><th>
                            سعرالتجزئة</th><?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellHalfPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showpricehalf==1){?><th>سعرالنصف
                            جملة</th><?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellAllPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showpriceall==1){?><th>سعر الجملة
                        </th><?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice4==1){?><th>سعر4</th>
                        <?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice5==1){?><th>سعر5</th>
                        <?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice6==1){?><th>سعر6</th>
                        <?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice7==1){?><th>سعر7</th>
                        <?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice8==1){?><th>سعر8</th>
                        <?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice9==1){?><th>سعر9</th>
                        <?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice10==1){?><th>سعر10</th>
                        <?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice11==1){?><th>سعر11</th>
                        <?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice12==1){?><th>سعر12</th>
                        <?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice13==1){?><th>سعر13</th>
                        <?php }?>
                        <th><?php echo $_smarty_tpl->tpl_vars['mess']->value;?>
</th>
                        <th>سعر ج</th>
                        <th>الخصم المرجح</th>
                        <th>سعر بعد الخصم</th>
                    </tr>
                </thead>
                <tbody>

                    <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['productsData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['smarty']->value['foreach']['loop']['iteration']=0;
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
 $_smarty_tpl->tpl_vars['smarty']->value['foreach']['loop']['iteration']++;
?>
                    <tr class="gradeA">
                        <td><?php echo $_smarty_tpl->getVariable('smarty')->value['foreach']['loop']['iteration'];?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->productName;?>


                            <?php if ($_smarty_tpl->tpl_vars['hidecat']->value==1){?>
                            /<?php echo $_smarty_tpl->tpl_vars['data']->value->productCatName;?>

                            <?php }?>
                        </td>
                        <!-- <td><?php echo $_smarty_tpl->tpl_vars['data']->value->productquantity;?>
</td>-->
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showsStorerQuantity=="0"){?><td><?php echo $_smarty_tpl->tpl_vars['data']->value->sumProductQuantity;?>
</td><?php }?>


                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showpriceunit==1){?><td>
                            <?php echo $_smarty_tpl->tpl_vars['data']->value->productSellUnitPrice;?>
</td><?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellHalfPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showpricehalf==1){?> <td>
                            <?php echo $_smarty_tpl->tpl_vars['data']->value->productSellHalfPrice;?>
</td><?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellAllPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showpriceall==1){?><td>
                            <?php echo $_smarty_tpl->tpl_vars['data']->value->productSellAllPrice;?>
</td><?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice4==1){?><td>
                            <?php echo $_smarty_tpl->tpl_vars['data']->value->price4;?>
</td><?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice5==1){?><td>
                            <?php echo $_smarty_tpl->tpl_vars['data']->value->price5;?>
</td><?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice6==1){?><td>
                            <?php echo $_smarty_tpl->tpl_vars['data']->value->price6;?>
</td><?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice7==1){?><td>
                            <?php echo $_smarty_tpl->tpl_vars['data']->value->price7;?>
</td><?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice8==1){?><td>
                            <?php echo $_smarty_tpl->tpl_vars['data']->value->price8;?>
</td><?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice9==1){?><td>
                            <?php echo $_smarty_tpl->tpl_vars['data']->value->price9;?>
</td><?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice10==1){?><td>
                            <?php echo $_smarty_tpl->tpl_vars['data']->value->price10;?>
</td><?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice11==1){?><td>
                            <?php echo $_smarty_tpl->tpl_vars['data']->value->price11;?>
</td><?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice12==1){?><td>
                            <?php echo $_smarty_tpl->tpl_vars['data']->value->price12;?>
</td><?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showSellUnitPrice=="0"&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice13==1){?><td>
                            <?php echo $_smarty_tpl->tpl_vars['data']->value->price13;?>
</td><?php }?>
                        <!--<?php if ($_smarty_tpl->tpl_vars['userGroup']->value->showBuyPrice=="0"){?><td><?php echo $_smarty_tpl->tpl_vars['data']->value->productBuyPrice;?>
</td><?php }?>-->
                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->productBuyPrice;?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->weightedDiscountBuyPrice;?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->weightedDiscount;?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->weightedDiscountBuyPriceAfterDisc;?>
</td>
                    </tr>
                    <?php } ?>

                </tbody>

            </table>
            <div class="col-lg-offset-8 col-lg-4">
                <div class="well well-sm">
                    <h4 class="text-center">إجمالي الوحدات: <?php echo $_smarty_tpl->tpl_vars['totalQuantity']->value;?>
 </h4>
                </div>
            </div>
            <div class="col-lg-offset-8 col-lg-4">
                <div class="well well-sm">
                    <h4 class="text-center">إجمالي السعر: <?php echo $_smarty_tpl->tpl_vars['totalPrice']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                </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">طباعة</button>
                        </div>
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
</div>
<?php }?>


<script>
    /*$('.dataTableClass').dataTable({
     "order"
     : [
     [4, "desc"]       // order by drug cat
     ]
     });*/

</script>
<?php }} ?>