<?php /* Smarty version Smarty-3.1.11, created on 2025-12-20 03:19:01
         compiled from "..\views\default\storedetailview\show.html" */ ?>
<?php /*%%SmartyHeaderCode:49496945f9857683d4-35564055%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '6a79d25803757b40045fcc7057e75bae64b437ea' => 
    array (
      0 => '..\\views\\default\\storedetailview\\show.html',
      1 => 1762194450,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '49496945f9857683d4-35564055',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'youtubes' => 0,
    'Programsettingdata' => 0,
    'productCatData' => 0,
    'cat' => 0,
    'j' => 0,
    'data' => 0,
    'searchinonestore' => 0,
    'storeid' => 0,
    'storedef' => 0,
    'stores' => 0,
    'store' => 0,
    'storeData' => 0,
    'message' => 0,
    'storedetailData' => 0,
    'minusQuantity' => 0,
    'plusQuantity' => 0,
    'productquantity' => 0,
    'showstoredetailprice' => 0,
    'minusPrice' => 0,
    'currency' => 0,
    'plusPrice' => 0,
    'sumValue' => 0,
    'sumSellValue' => 0,
    'showProductImage' => 0,
    'showLastOperationsDates' => 0,
    'storedetail' => 0,
    'x' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_6945f985c3ae50_34721328',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_6945f985c3ae50_34721328')) {function content_6945f985c3ae50_34721328($_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{
            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
        }
        body{
            direction: rtl;
        }
    }

    td.details-control {
        background: url('../views/default/images/details_open.png') no-repeat center center;
        cursor: pointer;
    }
    tr.details td.details-control {
        background: url('../views/default/images/details_close.png') no-repeat center center;
    }

</style>
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#"><?php echo @STORE_REPORTS;?>
</a></li>
            <li class="active"><?php echo @STORE_WAREHOUSE_BALANCE;?>
 </li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading"><?php echo @STORE_WAREHOUSE_BALANCE;?>

                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[111]->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="storedetailController.php?do=show" method="post">
                    <input type="hidden" name="searchvalue" id="searchvalue" value="<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->searchvalue;?>
"/>
                    <input type="hidden" name="childitr" id="childitr" value="1"/>

                    <input type="hidden" name="companyname" id="companyname" value="<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->companyname;?>
"/>
                    <!--                    <div class="form-group">
                                            <label class="sr-only">تصنيف المنتج</label>
                                            <select class="select2 wdt300 productCatId" data-id="55"  name="productCatId" id="productCatId" >
                                                <option value="-1">اختر تصنيف</option>
                                                <?php  $_smarty_tpl->tpl_vars['cat'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['cat']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['productCatData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['cat']->key => $_smarty_tpl->tpl_vars['cat']->value){
$_smarty_tpl->tpl_vars['cat']->_loop = true;
?>
                                                <option value="<?php echo $_smarty_tpl->tpl_vars['cat']->value->productCatId;?>
"><?php echo $_smarty_tpl->tpl_vars['cat']->value->productCatName;?>
</option>
                                                <?php } ?>
                                                
                                                          <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>
                                                
                                            </select>
                                        </div>-->

                    <div class="form-group">
                        <div class="col-md-2">

                            <label class="sr-only"><?php echo @STORE_PRODUCT_RATING;?>
</label>
                        </div>
                        <select class="select2 wdt300 productCat" data-level="0"  name="productCatId0" id="productCatId0" >
                            <option value="-1"><?php echo @STORE_CHOOSE_RATING;?>
</option>
                            <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['productCatData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
?>
                            <option value="<?php echo $_smarty_tpl->tpl_vars['data']->value->productCatId;?>
"><?php echo $_smarty_tpl->tpl_vars['data']->value->productCatName;?>
</option>
                            <?php } ?>
                        </select>
                        <input type="hidden" id="level" name="level" value="0">
                    </div>
                    <!--                    <div id="hereischilds">
                                        </div>-->

                    <div class="form-group">
                        <div id="manyParents">

                        </div>
                    </div>
                    <br />

                    <?php if ($_smarty_tpl->tpl_vars['searchinonestore']->value!=0){?>
                    <div class="form-group">
                        <label class="sr-only"><?php echo @STORE_STORE;?>
</label>
                        <input type="hidden" name="storeId" id="storeId"  value="<?php echo $_smarty_tpl->tpl_vars['storeid']->value;?>
"  >
                        <?php echo $_smarty_tpl->tpl_vars['storedef']->value->storeName;?>

                        <input type="hidden" name="storeId_hidden" id="storeId_hidden" value="<?php echo $_smarty_tpl->tpl_vars['storeid']->value;?>
"/>
                    </div>

                    <?php }else{ ?>
                    <div class="form-group">
                        <label class="sr-only"><?php echo @STORE_STORE;?>
</label>
                        <select class="select2 wdt300"  name="storeId" id="storeId" >
                            <option value="-1"><?php echo @STORE_CHOOSE_STORE;?>
</option>
                            <?php  $_smarty_tpl->tpl_vars['store'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['store']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['stores']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['store']->key => $_smarty_tpl->tpl_vars['store']->value){
$_smarty_tpl->tpl_vars['store']->_loop = true;
?>
                            <option value="<?php echo $_smarty_tpl->tpl_vars['store']->value->storeId;?>
"><?php echo $_smarty_tpl->tpl_vars['store']->value->storeName;?>
</option>
                            <?php } ?>
                        </select>
                    </div>
                    <?php }?>




                    <!--   <div class="form-group">
                          <div class="col-md-2">

                              <label class="sr-only"><?php echo @STORE_STORE;?>
</label>
                          </div>

                          <select class="select2 wdt300"  name="storeId" id="storeId" >
                              <option value="-1"><?php echo @STORE_CHOOSE_STORE;?>
</option>



                              <?php  $_smarty_tpl->tpl_vars['store'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['store']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['storeData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['store']->key => $_smarty_tpl->tpl_vars['store']->value){
$_smarty_tpl->tpl_vars['store']->_loop = true;
?>




                              <option value="<?php echo $_smarty_tpl->tpl_vars['store']->value->storeId;?>
"><?php echo $_smarty_tpl->tpl_vars['store']->value->storeName;?>
</option>


                              <?php } ?>



                          </select>
                      </div> -->
                    <div class="form-group" style="padding: 0 10px;">
                        <div class="col-md-2">

                            <label class="sr-only">اظهار الكميات فى المخازن الوسيطة</label>
                        </div>

                        <input type="checkbox" name="showStoreBetweenQuantity" id="showStoreBetweenQuantity" value="1">
                    </div>


                    <div class="form-group">
                        <div class="col-md-2">

                            <label class="sr-only"><?php echo @STORE_ORDER;?>
</label>
                        </div>

                        <select class="select2 wdt300"  name="order" id="order" >



                            <option value="desc"><?php echo @STORE_ORDER_ASCENDING;?>
</option>
                            <option value="asc"><?php echo @STORE_ORDER_DESCENDING;?>
</option>






                        </select>
                    </div>
                    <input type="radio" name="search" value="0" checked="checked"/><label><?php echo @STORE_FINAL_PRODUCT;?>
</label>
                    <input type="radio" name="search" value="1"/><label><?php echo @STORE_RATING;?>
</label>

                    <div class="form-group" style="padding: 0 10px;">
                        <div class="col-md-2">

                            <label class="sr-only">اخر تاريخ للعمليات خلال 3 شهور</label>
                        </div>

                        <input type="checkbox" name="showLastOperationsDates" id="showLastOperationsDates" value="1">
                    </div>
                    <div class="form-group" style="padding: 0 10px;">
                        <div class="col-md-2">

                            <label class="sr-only">صورة المنتج </label>
                        </div>

                        <input type="checkbox" name="showProductImage" id="showProductImage" value="1">
                    </div>
                    <br />
                    <button type="submit" class="btn btn-primary"><?php echo @STORE_SEARCH;?>
</button>
                </form>
            </div>
            <div class="panel panel-default">
                <!-- Default panel contents -->
                <div class="panel-heading"><?php echo $_smarty_tpl->tpl_vars['message']->value;?>
</div>
                <div class="panel-body">
                    <hr/>
                    <?php ob_start();?><?php echo count($_smarty_tpl->tpl_vars['storedetailData']->value);?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1>0){?>
                    <div class="col-lg-4">
                        <div class="well well-sm">
                            <h4 class="text-center"><?php echo @STORE_TOTAL_NUMBER_NEGATIVE_PRODUCTS;?>
<?php echo $_smarty_tpl->tpl_vars['minusQuantity']->value;?>
</h4>
                        </div>
                    </div>
                    <div class="col-lg-4">
                        <div class="well well-sm">
                            <h4 class="text-center"><?php echo @STORE_TOTAL_NUMBER_POSITIVE_PRODUCTS;?>
<?php echo $_smarty_tpl->tpl_vars['plusQuantity']->value;?>
</h4>
                        </div>
                    </div>
                    <div class="col-lg-4">
                        <div class="well well-sm">
                            <h4 class="text-center"><?php echo @STORE_TOTAL_NET_NUMBER_PRODUCTS;?>
 <?php echo $_smarty_tpl->tpl_vars['productquantity']->value;?>
</h4>
                        </div>
                    </div>
                    <?php if ($_smarty_tpl->tpl_vars['showstoredetailprice']->value!=1){?>
                    <div class=" col-lg-4">
                        <div class="well well-sm">
                            <h4 class="text-center"><?php echo @STORE_TOTAL_NEGATIVE_PRODUCTS_PRICE;?>
<?php echo $_smarty_tpl->tpl_vars['minusPrice']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                        </div>
                    </div>
                    <div class=" col-lg-4">
                        <div class="well well-sm">
                            <h4 class="text-center"><?php echo @STORE_TOTAL_PRICE_POSITIVE_PRODUCTS;?>
 <?php echo $_smarty_tpl->tpl_vars['plusPrice']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                        </div>
                    </div>
                    <div class=" col-lg-4">
                        <div class="well well-sm">
                            <h4 class="text-center"><?php echo @STORE_TOTAL_NET_PRICE_PRODUCTS;?>
 <?php echo $_smarty_tpl->tpl_vars['sumValue']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                        </div>
                    </div>
                    <div class=" col-lg-4">
                        <div class="well well-sm">
                            <h4 class="text-center"><?php echo @STORE_TOTAL_SELL_PRICE_PRODUCTS;?>
 <?php echo $_smarty_tpl->tpl_vars['sumSellValue']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                        </div>
                    </div>
                    <?php }?>
                    <?php }?>
                    <a href="javascript:;" id="toggleAll" data-status="closed" class="btn btn-default bg-black hidden-print"> <?php echo @STORE_OPEN_CLOSEALL;?>
</a>
                    <input type="hidden" name="showstoredetailprice" id="showstoredetailprice" value="<?php echo $_smarty_tpl->tpl_vars['showstoredetailprice']->value;?>
"/>
                    <table class="table datatable table-bordered table-black " id="productQuantityTable"><!-- dataTableClass22 -->
                        <thead>
                            <tr>
                                <th></th>
                                <th></th>
                                <th><?php echo @STORE_NUMBER;?>
</th>
                                <th><?php echo @STORE_STORE_NAME;?>
</th>
                                <th><?php echo @STORE_CATEGORY_NAME;?>
</th>
                                <th><?php echo @STORE_PRODUCT_NAME;?>
</th>
                                <?php if ($_smarty_tpl->tpl_vars['showProductImage']->value==1){?><th>الصورة</th><?php }?>
                                <th> <?php echo @STORE_BARCODE;?>
</th>
                                <th><?php echo @STORE_QUANTITY;?>
</th>
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2!='0'){?>
                                <th><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
</th>
                                <?php }?>
                                <?php if ($_smarty_tpl->tpl_vars['showstoredetailprice']->value!=1){?>
                                <!-- <th><?php echo @STORE_UNIT_PRICE;?>
</th> -->
                                <th>سعر الشراء</th>
                                <th>نسبة الخصم</th>
                                <th><?php echo @STORE_TOTAL;?>
</th>
                                <th>الاجمالى شامل ق.م</th>
                                <th>سعر البيع</th>
                                <th>إجمالي البيع</th>
                                <?php }?>

                                <?php if ($_smarty_tpl->tpl_vars['showLastOperationsDates']->value!=1){?>
                                <th><?php echo @STORE_DATE_LAST_OPERATION;?>
</th>
                                <?php }else{ ?>
                                <th>اخر بيع</th>
                                <th>اخر رد بيع</th>
                                <th>اخر بيع ورد</th>
                                <th>اخر شراء</th>
                                <th>اخر رد شراء</th>
                                <th>اخر جرد</th>
                                <?php }?>
                                <th></th>
                            </tr>
                        </thead>
                        <tbody>
                            <!--<?php $_smarty_tpl->tpl_vars['x'] = new Smarty_variable(1, null, 0);?>-->
                            <?php  $_smarty_tpl->tpl_vars['storedetail'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['storedetail']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['storedetailData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['storedetail']->key => $_smarty_tpl->tpl_vars['storedetail']->value){
$_smarty_tpl->tpl_vars['storedetail']->_loop = true;
?>
                            <?php if ($_smarty_tpl->tpl_vars['storedetail']->value['productquantity']!='0'){?>
                            <tr data-pro="<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productid'];?>
<?php if ($_smarty_tpl->tpl_vars['storedetail']->value['productDataSOC']!=''){?>_SOC<?php }?><?php if ($_smarty_tpl->tpl_vars['storedetail']->value['productDataSAC']!='[]'){?>_SAC<?php }?><?php if ($_smarty_tpl->tpl_vars['storedetail']->value['productDataING']!='[]'){?>_ING<?php }?><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['storeid'];?>
" data-store="<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['storeid'];?>
">
                                <td></td>
                                <td></td>
                                <td>
                                    <?php echo $_smarty_tpl->tpl_vars['storedetail']->value['itra'];?>

                                    <?php if ($_smarty_tpl->tpl_vars['storedetail']->value['productDataSAC']!="[]"){?>
                                    <input type='hidden' name='sizecolordetails<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productid'];?>
_SAC' id='sizecolordetails<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productid'];?>
_SAC<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['storeid'];?>
' value='<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productDataSAC'];?>
'/>
                                    <?php }?>
                                    <?php if ($_smarty_tpl->tpl_vars['storedetail']->value['productDataSOC']!=''){?>
                                    <input type='hidden' name='sizecolordetails<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productid'];?>
_SOC' id='sizecolordetails<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productid'];?>
_SOC<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['storeid'];?>
' value='<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productDataSOC'];?>
'/>
                                    <?php }?>
                                    <?php if ($_smarty_tpl->tpl_vars['storedetail']->value['productDataING']!=''){?>
                                    <input type='hidden' name='sizecolordetails<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productid'];?>
_ING' id='sizecolordetails<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productid'];?>
_ING<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['storeid'];?>
' value='<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productDataING'];?>
'/>
                                    <?php }?>
                                </td>

                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['storeName'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productCatName'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productName'];?>
</td>
                                <?php if ($_smarty_tpl->tpl_vars['showProductImage']->value==1){?><td><img src="../views/default/images/product_image/<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['logo'];?>
" class="moImg" alt="" width="50" height="30"></td><?php }?>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['parcode'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productquantity'];?>
</td>
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3!='0'){?>

                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['unittype'];?>
</td>
                                <?php }?>
                                <?php if ($_smarty_tpl->tpl_vars['showstoredetailprice']->value!=1){?>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productBuyPrice'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['buydiscountpercent'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productquantity']*$_smarty_tpl->tpl_vars['storedetail']->value['productBuyPriceWithbuydiscountPrice'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productquantity']*$_smarty_tpl->tpl_vars['storedetail']->value['taxPriceWithbuydiscountPrice'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productSellUnitPrice'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productSellUnitPrice']*$_smarty_tpl->tpl_vars['storedetail']->value['productquantity'];?>
</td>
                                <?php }?>


                                <?php if ($_smarty_tpl->tpl_vars['showLastOperationsDates']->value!=1){?>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['storedetaildate'];?>
</td>
                                <?php }else{ ?>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['last_operation_date_sell'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['last_operation_date_retsell'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['last_operation_date_sellandret'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['last_operation_date_buy'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['last_operation_date_retbuy'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['storedetail']->value['last_operation_date_inventory'];?>
</td>
                                <?php }?>

                                <td><input type="button" class="btn btn-success pull-left ft-nor getSerials" data-proid="<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['productid'];?>
" data-storeid="<?php echo $_smarty_tpl->tpl_vars['storedetail']->value['storeid'];?>
" value="السيريالات"/></td>
                            </tr>
                            <?php }?>
                            <!--<?php $_smarty_tpl->_capture_stack[0][] = array('default', 'x', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['x']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>-->
                            <?php } ?>

                        </tbody>

                    </table>
                    <div class="col-lg-4">
                        <div class="well well-sm">
                            <h4 class="text-center"><?php echo @STORE_TOTAL_NUMBER_PRODUCTS;?>
 <?php echo $_smarty_tpl->tpl_vars['productquantity']->value;?>
</h4>
                        </div>
                    </div>
                    <?php if ($_smarty_tpl->tpl_vars['showstoredetailprice']->value!=1){?>
                    <div class=" col-lg-4">
                        <div class="well well-sm">
                            <h4 class="text-center"><?php echo @STORE_TOTAL_PRICE_PRODUCTS;?>
 <?php echo $_smarty_tpl->tpl_vars['sumValue']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                        </div>
                    </div>
                    <?php }?>
                    <div class="clearfix"></div>
                    <hr />
                    <?php ob_start();?><?php echo count($_smarty_tpl->tpl_vars['storedetailData']->value);?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4>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"><?php echo @STORE_PRINT;?>
</button>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>



                    <?php }?>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>


        <!-- Modal -->
<div class="modal fade" id="myModalProSerials" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content bg-modal">
            <div class="modal-header">
                <button type="button" class="close pull-left savemodel2" data-dismiss="modal"
                        aria-hidden="true">&times;</button>
                <h4 class="modal-title">سيريالات المنتج</h4>
            </div>
            <div class="modal-body">
                
            </div>
                <input type="hidden" name="serialProductId" id="serialProductId" value="" />
            <div class="modal-footer">
                <button type="button" class="btn btn-default savemodel2" data-dismiss="modal">تم</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->


<script>
    $(document).on('click', ".getSerials", function () {
    var proId = $(this).data('proid');
    var storeid = $(this).data('storeid');
    let itr = $(this).data('itr');
    let newQty = $('#newQty' + itr).val();
    let oldQty = $('#oldQty' + itr).val();
    let qty = oldQty;
    if (newQty > oldQty) {
        qty = newQty;
    }
    $.post('storedetailAjaxController.php?do=getProSerials', { proId: proId,storeid:storeid, qty: qty }, function (response) {
        $('#myModalProSerials').modal('show');
        $('#serialProductId').val(proId);
        if (response != -1) {
            $('#myModalProSerials .modal-body').html(response);
        } else {
            $('#myModalProSerials .modal-body').html('<div class="alert alert-danger">لا يوجد سيريالات لهذا المنتج</div>');
        }
    });
});
</script>
<?php }} ?>