<?php /* Smarty version Smarty-3.1.11, created on 2023-10-12 00:32:41
         compiled from "../views/default/salesreportview/products.html" */ ?>
<?php /*%%SmartyHeaderCode:1630212458652714793d36f2-97226086%%*/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 => 1693253994,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1630212458652714793d36f2-97226086',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'catData' => 0,
    'products' => 0,
    'data' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_65271479420127_22185323',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_65271479420127_22185323')) {function content_65271479420127_22185323($_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 }} ?>