<?php /* Smarty version Smarty-3.1.11, created on 2024-07-16 15:29:57
         compiled from "..\views\default\salesreportview\products.html" */ ?>
<?php /*%%SmartyHeaderCode:20738669667c5427ed5-06336736%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '572b9629d4a1a079b427dd7cd30351665879f842' => 
    array (
      0 => '..\\views\\default\\salesreportview\\products.html',
      1 => 1672089200,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '20738669667c5427ed5-06336736',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'catData' => 0,
    'products' => 0,
    'data' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_669667c5461328_08180896',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_669667c5461328_08180896')) {function content_669667c5461328_08180896($_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 }} ?>