<?php /* Smarty version Smarty-3.1.11, created on 2025-02-20 06:59:53
         compiled from "../views/default/salesreportview/products.html" */ ?>
<?php /*%%SmartyHeaderCode:343200026679927fe583237-83090899%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'ef295b83f3386a08c6241a44d16a36fabb6def2f' => 
    array (
      0 => '../views/default/salesreportview/products.html',
      1 => 1740000151,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '343200026679927fe583237-83090899',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_679927fe5f3fc7_18797803',
  'variables' => 
  array (
    'catData' => 0,
    'products' => 0,
    'data' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_679927fe5f3fc7_18797803')) {function content_679927fe5f3fc7_18797803($_smarty_tpl) {?>
<div id="productIdDiv">
    <input type="hidden" name="proIsOptic" id="proIsOptic" value=""/>
    <div class="form-group col-md-5">
        <?php if ($_smarty_tpl->tpl_vars['catData']->value->isOptic==2){?>
        <label class="sr-only">المقاسات والالوان</label>
        <?php }else{ ?>
        <div class="col-md-2">
            <label class="sr-only">المنتجات</label>
        </div>
        <?php }?>
        <select class="select2 wdt300" name="productId" id="productId">
            <option value="-1">اختر منتج</option>
            <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['products']->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->productId;?>
" data-optic="<?php echo $_smarty_tpl->tpl_vars['data']->value->isOptic;?>
"><?php echo $_smarty_tpl->tpl_vars['data']->value->productName;?>
</option>
            <?php } ?>
        </select>
    </div>
</div>

<script>
    $('#productId').select2();
    $('#productId').live('change', function () {
        var isoptic = $('#productId option:selected').attr('data-optic');
        $('#proIsOptic').val(isoptic);
    });
</script>
<?php }} ?>