<?php /* Smarty version Smarty-3.1.11, created on 2024-07-20 15:22:44
         compiled from "..\views\default\productview\addproductfromtree.html" */ ?>
<?php /*%%SmartyHeaderCode:11694669bac14dc5d93-86567664%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'bcc4f15e4a70f6d46feae077afe4f289c98cd950' => 
    array (
      0 => '..\\views\\default\\productview\\addproductfromtree.html',
      1 => 1706479755,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '11694669bac14dc5d93-86567664',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'youtubes' => 0,
    'treeHTML' => 0,
    'catDataReport' => 0,
    'data' => 0,
    'today' => 0,
    'Programsettingdata' => 0,
    'generatedParcode' => 0,
    'unitsData' => 0,
    'unit' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_669bac150e2bd5_39630823',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_669bac150e2bd5_39630823')) {function content_669bac150e2bd5_39630823($_smarty_tpl) {?><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">
                <h3 class="panel-title">إضافة منتج</h3>
                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[49]->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">
                <div class="col-lg-4 ">
                    <div class="row">
                        <div class="container">
                            <div class="panel panel-default panel-m" style="padding-bottom: 30px;">
                                <div class="panel-heading">
                                    <div class="caption"><i class="icon-comments"></i>شجرة المنتجات</div>
                                    <div class="actions"> <a href="javascript:;" id="tree_product_collapse"
                                            class="btn btn-success"> إغلاق الكل</a> <a href="javascript:;"
                                            id="tree_product_expand" class="btn btn-warning"> فتح الكل</a> </div>
                                </div>
                                <div class="panel-body"
                                    style="overflow-x:auto;  overflow-y:auto; height:400px; width:104%;">
                                    <div class=" portlet-body fuelux">
                                        <ul class="tree" id="tree_product">
                                            <li> <a href="#" data-role="branch" class="tree-toggle" data-toggle="branch"
                                                    data-value="التصنيفات"> التصنيفات </a>
                                                <ul class="branch in">
                                                    <?php echo $_smarty_tpl->tpl_vars['treeHTML']->value;?>

                                                </ul>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                                <!--                            <div >
                                                                    <label class="sr-only">تصنيف المنتج</label>
                                                                    <select class="select2 wdt300 productCatt" data-level="0"  name="productCatId0" id="productCatId0" >
                                                                        <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['catDataReport']->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="manyParents"></div>-->
                            </div>



                        </div>
                        <!----panel----->


                    </div>
                    <!----container-->
                </div><!----row-->
            </div><!----col-lg-4-->

            <div class="col-lg-8">
                <input name="today" type="hidden" id="today" value="<?php echo $_smarty_tpl->tpl_vars['today']->value;?>
" />
                <input name="selectedId" id="selectedId" type="hidden" value="" />
                <input name="selectedClass" id="selectedClass" type="hidden" value="" />
                <input name="addParent" id="addParent" type="button" onclick="addParent();" style="display:none;"
                    class="btn btn-primary conformdel" value="إضافة تصنيف منتج" />&nbsp;&nbsp;
                <input name="addProduct" id="addProduct" type="button" onclick="addProduct();" style="display:none;"
                    class="btn btn-primary" value="إضافة منتج" />
                <!------------    Start  productCatformDiv  --------------------------->
                <div id="productCatformDiv" style="display:none">

                </div>
                <!------------    End  productCatformDiv  --------------------------->

                <div class="clearfix"></div>

                <div id="productEdit"></div>
                <div class="clearfix"></div>

                <input name="hide_precentage" id="hide_precentage" type="hidden"
                    value="<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
" />
                <input name="hide_realprice" id="hide_realprice" type="hidden"
                    value="<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->realprice;?>
" />

                <!------------    Start  productsformDiv  --------------------------->
                <div id="productsformDiv" style="display:none">
                    <form action="productController.php?do=add" method="post" class="nameToBeChecked" id="myProductForm"
                        name="myProductForm">
                        <div style="display:none;">
                            <label>تصنيف المنتج الرئيسي</label>
                            <input name="productCatId" id="productCatId" type="hidden" />
                        </div>
                        <!------------    Start  productsDiv  --------------------------->
                        <div id="productsDiv">
                            <div class="table-responsive">
                                <!--start productsTable -->

                                <table id="productsTable" class="table table-black bg-theme-white">

                                    <tr>
                                        <td colspan="2">الإسم</td>
                                        <td>سعر الشراء</td>
                                        <td style="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->realprice;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==1){?> display: none; <?php }?>">
                                            سعرالشراء الفعلى </td>
                                        <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->showpriceall==1){?>
                                        <td><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2==1){?> سعر الجملة<?php }else{ ?> نسبة ربح
                                            الجملة<?php }?> </td>
                                        <?php }?>
                                        <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->showpricehalf==1){?>
                                        <td><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3==1){?> سعر نصف الجملة<?php }else{ ?> نسبة ربح
                                            نصف الجملة<?php }?></td>
                                        <?php }?>
                                        <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->showpriceunit==1){?>
                                        <td><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4==1){?> سعرالتجزئه<?php }else{ ?> نسبة ربح
                                            التجزئه<?php }?>
                                        <td>
                                            <?php }?>
                                            <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice4==1){?>
                                        <td>سعر4 </td>
                                        <?php }?>
                                        <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice5==1){?>
                                        <td>سعر5 </td>
                                        <?php }?>
                                        <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice6==1){?>
                                        <td>سعر6 </td>
                                        <?php }?>
                                        <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice7==1){?>
                                        <td>سعر7 </td>
                                        <?php }?>
                                        <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice8==1){?>
                                        <td>سعر8 </td>
                                        <?php }?>
                                    </tr>
                                    <tr>
                                        <td colspan="2"><input name="productName1" type="text" id="productName1"
                                                width="20" required onChange="checkProductName(this.value, 1);"
                                                class="form-control" /></td>

                                        <td><input name="productBuyPrice1" data-rowadded="0" type="text"
                                                id="productBuyPrice1"
                                                class="form-control  aw_m aw_mt aw_pp numberclic enteraction new_product numberinput positivefloat buy_price"
                                                data-id="1" width="10" /></td>

                                        <td style="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->realprice;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==1){?> display: none; <?php }?>">
                                            <input style="width: 50%;float: left;" name="productbuypricereal1"
                                                type="text" id="buypricereal1" data-type="pricereal"
                                                class="form-control prices  aw_m aw_mt aw_pp numberclic enteraction  numberinput positivefloat buy_pricereal1"
                                                data-id="1" width="10" /></span>
                                            <input style="  width: 50%;" name="buypricereal_precentage1" type="text"
                                                id="productBuyPrice1" data-type="pricereal"
                                                class="form-control precentages  aw_m aw_mt aw_pp numberclic enteraction  numberinput positivefloat buypricereal_precentage1"
                                                data-id="1" width="10" />
                                        </td>
                                        <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->showpriceall==1){?>
                                        <td>
                                            <input
                                                style=" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6==1){?> width: 100%; <?php }else{ ?> width: 50%; <?php }?>float: left;"
                                                name="productSellAllPrice1" type="text" id="productSellAllPrice1"
                                                data-type="buytotal"
                                                class="form-control prices aw_m aw_mt aw_pp numberclic positivefloat buy_total1 enteraction numberinput"
                                                data-id="1" width="10" />
                                            <input
                                                style=" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp7=ob_get_clean();?><?php if ($_tmp7==1){?> display: none; <?php }?> width: 50%;"
                                                name="buytotal_precentage1" type="text" id="productBuyPrice1"
                                                data-type="buytotal"
                                                class="form-control  aw_m aw_mt aw_pp numberclic enteraction precentages numberinput positivefloat buytotal_precentage1"
                                                data-id="1" width="10" />
                                        </td>
                                        <?php }?>
                                        <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->showpricehalf==1){?>
                                        <td>
                                            <input
                                                style="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp8=ob_get_clean();?><?php if ($_tmp8==1){?> width: 100%; <?php }else{ ?> width: 50%; <?php }?>float: left;"
                                                name="productSellHalfPrice1" type="text" data-type="buyhalf"
                                                id="productSellHalfPrice1"
                                                class="form-control  aw_m aw_mt aw_pp numberclic prices enteraction numberinput positivefloat buy_hafe1"
                                                data-id="1" width="10" />
                                            <input
                                                style=" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp9=ob_get_clean();?><?php if ($_tmp9==1){?> display: none; <?php }?> width: 50%;"
                                                name="buyhalf_precentage1" type="text" id="productBuyPrice1"
                                                data-type="buyhalf"
                                                class="form-control  aw_m aw_mt aw_pp numberclic enteraction  precentages numberinput positivefloat buyhafe_precentage1"
                                                data-id="1" width="10" />
                                        </td>
                                        <?php }?>
                                        <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->showpriceunit==1){?>
                                        <td>
                                            <input
                                                style="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp10=ob_get_clean();?><?php if ($_tmp10==1){?> width: 100%; <?php }else{ ?> width: 50%; <?php }?>float: left;"
                                                name="productSellUnitPrice1" type="text" data-type="buypart"
                                                id="productSellUnitPrice1"
                                                class="form-control  aw_m aw_mt aw_pp numberclic prices enteraction numberinput positivefloat buy_part1"
                                                data-id="1" width="20" />
                                            <input
                                                style="  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp11=ob_get_clean();?><?php if ($_tmp11==1){?> display: none; <?php }?> width: 50%;"
                                                name="buypart_precentage1" type="text" id="productBuyPrice1"
                                                data-type="buypart"
                                                class="form-control  aw_m aw_mt aw_pp numberclic enteraction precentages numberinput positivefloat buypart_precentage1"
                                                data-id="1" width="10" />
                                        </td>
                                        <?php }?>
                                        <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice4==1){?>
                                        <td>
                                            <input
                                                style="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp12=ob_get_clean();?><?php if ($_tmp12==1){?> width: 100%; <?php }else{ ?> width: 50%; <?php }?>float: left;"
                                                name="price4_1" type="text" data-type="price4" id="price4_1"
                                                class="form-control  aw_m aw_mt aw_pp numberclic prices enteraction numberinput positivefloat price4_1"
                                                data-id="1" width="20" />
                                            <input
                                                style="  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp13=ob_get_clean();?><?php if ($_tmp13==1){?> display: none; <?php }?> width: 50%;"
                                                name="price4_precentage1" type="text" id="price4_1" data-type="price4"
                                                class="form-control  aw_m aw_mt aw_pp numberclic enteraction precentages numberinput positivefloat price4_precentage1"
                                                data-id="1" width="10" />
                                        </td>
                                        <?php }?>
                                        <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice5==1){?>
                                        <td>
                                            <input
                                                style="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp14=ob_get_clean();?><?php if ($_tmp14==1){?> width: 100%; <?php }else{ ?> width: 50%; <?php }?>float: left;"
                                                name="price5_1" type="text" data-type="price5" id="price5_1"
                                                class="form-control  aw_m aw_mt aw_pp numberclic prices enteraction numberinput positivefloat price5_1"
                                                data-id="1" width="20" />
                                            <input
                                                style="  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp15=ob_get_clean();?><?php if ($_tmp15==1){?> display: none; <?php }?> width: 50%;"
                                                name="price5_precentage1" type="text" id="price5_1" data-type="price5"
                                                class="form-control  aw_m aw_mt aw_pp numberclic enteraction precentages numberinput positivefloat price5_precentage1"
                                                data-id="1" width="10" />
                                        </td>
                                        <?php }?>
                                        <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice6==1){?>
                                        <td>
                                            <input
                                                style="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp16=ob_get_clean();?><?php if ($_tmp16==1){?> width: 100%; <?php }else{ ?> width: 50%; <?php }?>float: left;"
                                                name="price6_1" type="text" data-type="price6" id="price6_1"
                                                class="form-control  aw_m aw_mt aw_pp numberclic prices enteraction numberinput positivefloat price6_1"
                                                data-id="1" width="20" />
                                            <input
                                                style="  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp17=ob_get_clean();?><?php if ($_tmp17==1){?> display: none; <?php }?> width: 50%;"
                                                name="price6_precentage1" type="text" id="price6_1" data-type="price6"
                                                class="form-control  aw_m aw_mt aw_pp numberclic enteraction precentages numberinput positivefloat price6_precentage1"
                                                data-id="1" width="10" />
                                        </td>
                                        <?php }?>
                                        <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice7==1){?>
                                        <td>
                                            <input
                                                style="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp18=ob_get_clean();?><?php if ($_tmp18==1){?> width: 100%; <?php }else{ ?> width: 50%; <?php }?>float: left;"
                                                name="price7_1" type="text" data-type="price7" id="price7_1"
                                                class="form-control  aw_m aw_mt aw_pp numberclic prices enteraction numberinput positivefloat price7_1"
                                                data-id="1" width="20" />
                                            <input
                                                style="  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp19=ob_get_clean();?><?php if ($_tmp19==1){?> display: none; <?php }?> width: 50%;"
                                                name="price7_precentage1" type="text" id="price7_1" data-type="price7"
                                                class="form-control  aw_m aw_mt aw_pp numberclic enteraction precentages numberinput positivefloat price7_precentage1"
                                                data-id="1" width="10" />
                                        </td>
                                        <?php }?>
                                        <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->showprice8==1){?>
                                        <td>
                                            <input
                                                style="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp20=ob_get_clean();?><?php if ($_tmp20==1){?> width: 100%; <?php }else{ ?> width: 50%; <?php }?>float: left;"
                                                name="price8_1" type="text" data-type="price8" id="price8_1"
                                                class="form-control  aw_m aw_mt aw_pp numberclic prices enteraction numberinput positivefloat price8_1"
                                                data-id="1" width="20" />
                                            <input
                                                style="  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->precentages;?>
<?php $_tmp21=ob_get_clean();?><?php if ($_tmp21==1){?> display: none; <?php }?> width: 50%;"
                                                name="price8_precentage1" type="text" id="price8_1" data-type="price8"
                                                class="form-control  aw_m aw_mt aw_pp numberclic enteraction precentages numberinput positivefloat price8_precentage1"
                                                data-id="1" width="10" />
                                        </td>
                                        <?php }?>

                                    </tr>
                                    <tr>
                                        <td class="check_tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->parcode;?>
<?php $_tmp22=ob_get_clean();?><?php if ($_tmp22==1){?> hidden <?php }?>">
                                            الباركود</td>
                                        <td
                                            class="check_tr_period <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->expiredate;?>
<?php $_tmp23=ob_get_clean();?><?php if ($_tmp23==1){?> hidden <?php }?>">
                                            مدة الصلاحية</td>
                                        <td>الكمية</td>
                                        <td class="check_tr_date <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->date;?>
<?php $_tmp24=ob_get_clean();?><?php if ($_tmp24==1){?> hidden <?php }?>">
                                            التاريخ</td>
                                        <td
                                            class="check_tr_limitamount <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->limitamount;?>
<?php $_tmp25=ob_get_clean();?><?php if ($_tmp25==1){?> hidden <?php }?>">
                                            الحد الأدنى للمنتج</td>
                                        <td colspan="2"
                                            class="check_tr_production <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->production;?>
<?php $_tmp26=ob_get_clean();?><?php if ($_tmp26==1){?> hidden <?php }?>">
                                            التصنيع</td>
                                    </tr>
                                    <tr>
                                        <td class="check_tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->parcode;?>
<?php $_tmp27=ob_get_clean();?><?php if ($_tmp27==1){?> hidden <?php }?>">
                                            <input name="parcode1" onblur="checkbarcode(this.value, 1);" type="text"
                                                required id="parcode1" size="9" class="form-control" value="" size="50">
                                        </td><!-- <?php echo $_smarty_tpl->tpl_vars['generatedParcode']->value;?>
 -->
                                        <td
                                            class="check_tr_period <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->expiredate;?>
<?php $_tmp28=ob_get_clean();?><?php if ($_tmp28==1){?> hidden <?php }?>">
                                            <input name="expireDate1" type="text" style="width: 64%;" required
                                                id="expireDate1" size="9" class="form-control" value="0"> <span
                                                style="float: left;margin-top: -27px;">يوم</span>
                                        </td>
                                        <td>
                                            <input name="productquantity1" type="text" id="productquantity1"
                                                required="required" value="0"
                                                class="form-control wd50 aw_m aw_mt aw_pp numberclic enteraction numberinput"
                                                size="20" />
                                        </td>
                                        <td class="check_tr_date <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->date;?>
<?php $_tmp29=ob_get_clean();?><?php if ($_tmp29==1){?> hidden <?php }?>">
                                            <input name="productDate1" type="text" id="productDate1" size="9" required
                                                class="form-control awdatepicker" autocomplete="off"
                                                data-date-format="yyyy-mm-dd" value="<?php echo $_smarty_tpl->tpl_vars['today']->value;?>
" width="20" />
                                        </td>
                                        <td
                                            class="check_tr_limitamount <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->limitamount;?>
<?php $_tmp30=ob_get_clean();?><?php if ($_tmp30==1){?> hidden <?php }?>">
                                            <input name="limitamount1" type="text" id="limitamount1" value="0"
                                                class="form-control wd50 aw_m aw_mt aw_pp numberclic enteraction numberinput" />
                                        </td>

                                        <td colspan="2"
                                            class="check_tr_production <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->production;?>
<?php $_tmp31=ob_get_clean();?><?php if ($_tmp31==1){?> hidden <?php }?>">
                                            <div class="form-group">

                                                <label>
                                                    <input value="1" class="radioR" name="type1" type="radio" />
                                                    نعم </label>

                                                <label>
                                                    <input value="0" class="noradioR" name="type1" checked="checked"
                                                        type="radio" />
                                                    لا </label>

                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2"
                                            class="check_tr_service <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->service;?>
<?php $_tmp32=ob_get_clean();?><?php if ($_tmp32==1){?> hidden <?php }?>">
                                            خدمة</td>
                                        <td colspan="2"
                                            class="<?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->isCaf!=1&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->isRestaurent!=1){?> hidden <?php }?>">
                                            فى المنيو</td>
                                        <td colspan="3"
                                            class="check_tr_description <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->description;?>
<?php $_tmp33=ob_get_clean();?><?php if ($_tmp33==1){?> hidden <?php }?>">
                                            الوصف</td>
                                    </tr>
                                    <tr>
                                        <td colspan="2"
                                            class="check_tr_service <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->service;?>
<?php $_tmp34=ob_get_clean();?><?php if ($_tmp34==1){?> hidden <?php }?>">
                                            <div class="form-group">

                                                <label>
                                                    <input value="1" class="radioR isservice" name="isservice1"
                                                        type="radio" />
                                                    نعم </label>

                                                <label>
                                                    <input value="0" class="noradioR isservice" name="isservice1"
                                                        checked="checked" type="radio" />
                                                    لا </label>

                                            </div>
                                        </td>
                                        <td colspan="2">
                                            <div
                                                class="form-group <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->isCaf!=1&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->isRestaurent!=1){?> hidden <?php }?>">
                                                <label>
                                                    <input value="0" class="radioR" name="inMenu1" checked="checked"
                                                        type="radio" />
                                                    نعم </label>

                                                <label>
                                                    <input value="1" class="noradioR" name="inMenu1" type="radio" />
                                                    لا </label>

                                            </div>
                                        </td>
                                        <td colspan="3"
                                            class="check_tr_description <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->description;?>
<?php $_tmp35=ob_get_clean();?><?php if ($_tmp35==1){?> hidden <?php }?>">
                                            <textarea name="productDescription1" id="productDescription1" cols="1"
                                                rows="3" class="form-control"></textarea>
                                        </td>

                                    </tr>
                                    <tr>
                                        <td colspan="10"
                                            class="check_tr_mesurunit <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->measuringunit;?>
<?php $_tmp36=ob_get_clean();?><?php if ($_tmp36==1){?> hidden <?php }?>">
                                            <!--------------------------------  adding units   ----------------------------->

                                            <div id="addUnitsDiv1">
                                                <div class="table-responsive">
                                                    <table id="unitsTable1" class="table table-black bg-theme-white">
                                                        <tr>
                                                            <td>
                                                                <div>
                                                                    <label class="control-label">وحدة القياس</label>
                                                                    <select name="productunit11" id="productunit11"
                                                                        data-placeholder="اختر"
                                                                        class="select2 wdt100 chosenproduct">
                                                                        <option value="-1">اختر وحدة القياس</option>

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

                                                                        <option value="<?php echo $_smarty_tpl->tpl_vars['unit']->value->unitId;?>
">
                                                                            <?php echo $_smarty_tpl->tpl_vars['unit']->value->unitName;?>
</option>

                                                                        <?php } ?>

                                                                    </select>
                                                                </div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <label class="control-label">عدد الوحدات</label>
                                                                    <input name="productnumber11" id="productnumber11"
                                                                        type="text" class="form-control numberinput" />
                                                                </div>
                                                            </td>
                                                            <td><a id="remove11" onClick="removeUnits(1, 1);"
                                                                    class="removeUnits close">X</a></td>
                                                        </tr>
                                                    </table>
                                                </div>
                                                <!--end unitsTable-->
                                            </div>
                                            <input class="addUnits btn btn-warning" onClick="addUnits(1);" type="button"
                                                value="إضافة وحدة قياس" />
                                            <input name="unitsItr1" id="unitsItr1" type="hidden" value="1" />

                                            <!-------------------------------- end adding units   -------------------------->

                                            <a id="remove1" onclick="removeProduct(1);"
                                                class="removeProduct pull-left btn btn-danger">حذف المنتج</a>

                                        </td>
                                    </tr>



                                </table>
                            </div>
                            <!--end productsTable -->


                        </div>
                        <!------------    End  productsDiv  --------------------------->
                        <input name="addProducts" id="addProducts" type="button" class="btn btn-success"
                            value="إضافة منتج" />
                        <input name="productItr" id="productItr" type="hidden" value="1" />
                        <input type="hidden" name="productindextype" id="productIndexType" value="1" />
                        <div class="form-group">
                            <div class="col-lg-offset-2 col-lg-4">
                                <input type="submit" id="ss" name="ss" class="btn btn-primary pull-left" value="حفظ" />
                            </div>
                        </div>
                    </form>
                </div>
                <!------------    End  productsformDiv  --------------------------->
                <div class="clearfix"></div>
                <div id="productUnitsDiv" style="display:none;">
                    <option value="-1">اختر وحدة القياس</option>
                    <?php  $_smarty_tpl->tpl_vars['unit'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['unit']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['unitsData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['unit']->key => $_smarty_tpl->tpl_vars['unit']->value){
$_smarty_tpl->tpl_vars['unit']->_loop = true;
?>
                    <option value="<?php echo $_smarty_tpl->tpl_vars['unit']->value->unitId;?>
"><?php echo $_smarty_tpl->tpl_vars['unit']->value->unitName;?>
</option>
                    <?php } ?>
                </div>



                <div id="catUnitsDiv" style="display:none;">

                </div>


            </div><!----col-lg-8-->
            <div class="clearfix"></div>

            <!--------------------------------------   إضافة تصنيف    ----------------------------------------->

            <!-- Modal -->
            <div class="modal fade" id="catModal" 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" data-dismiss="modal"
                                aria-hidden="true">&times;</button>
                            <h4 class="modal-title">إضافة تصنيف</h4>
                        </div>
                        <div class="modal-body">
                            
                            <form class="nameToBeChecked2 form-horizontal" id="catForm" name="catForm" method="post">
                                
                                <!--validate the form before checking name-->


                                <br />
                                <input name="parent" id="parent" type="hidden" value="" />
                                <div class="form-group">
                                    <label class="col-lg-2 control-label">اسم التصنيف</label>
                                    <div class="col-lg-4">
                                        <input type="text" name="productCatName" id="productCatName" value="" required
                                            class="form-control" placeholder="اسم التصنيف" />
                                        <div id="nameError" class="alert alert-block alert-danger fade in"
                                            style="display:none">
                                            <button type="button" class="close pull-left" data-dismiss="alert"
                                                aria-hidden="true">&times;</button>
                                            <h4>رسالة خطأ</h4>
                                            <p>هذا الإسم مستخدم من قبل</p>
                                            <div class="clearfix"></div>
                                        </div>
                                    </div>
                                </div>

                                <!--==============================-->

                                <div
                                    class="form-group check_tr_description <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->description;?>
<?php $_tmp37=ob_get_clean();?><?php if ($_tmp37==1){?> hidden <?php }?>">
                                    <label class="col-lg-2 control-label">التعليق</label>
                                    <div class="col-lg-4">
                                        <textarea name="productCatDescription" id="productCatDescription"
                                            class="form-control" cols="45" rows="5"></textarea>
                                    </div>
                                </div>

                                <!--==============================-->
                                <!--------------------------------  adding units   ----------------------------->

                                <div id="cat_addUnitsDiv">
                                    <div class="table-responsive">
                                        <table id="cat_unitsTable" class="table">
                                            <tr>
                                                <td>
                                                    <div class="form-group">
                                                        <label class="col-lg-4 control-label">اسم وحدة القياس</label>
                                                        <div class="col-lg-8">
                                                            <select name="productcatunit1" id="productcatunit1"
                                                                data-placeholder="اختر"
                                                                class="select2 wdt100 chosenproduct">
                                                                <option value="-1">اختر وحدة القياس</option>

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

                                                                <option value="<?php echo $_smarty_tpl->tpl_vars['unit']->value->unitId;?>
"><?php echo $_smarty_tpl->tpl_vars['unit']->value->unitName;?>

                                                                </option>

                                                                <?php } ?>

                                                            </select>
                                                        </div>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div class="form-group">
                                                        <label class="col-lg-4 control-label">عدد الوحدات</label>
                                                        <div class="col-lg-8">
                                                            <input name="cat_productnumber1" id="cat_productnumber1"
                                                                type="text" class="form-control numberinput" />
                                                        </div>
                                                    </div>
                                                </td>
                                                <td><a id="cat_remove1" onClick="cat_removeUnits(1);"
                                                        class="cat_removeUnits">X</a></td>
                                            </tr>
                                        </table>
                                    </div>
                                    <!--end cat_unitsTable-->
                                </div>
                                <input class="cat_addUnits btn btn-warning" onClick="cat_addUnits();" type="button"
                                    value="إضافة وحدة قياس" />
                                <input name="cat_unitsItr" id="cat_unitsItr" type="hidden" value="1" />

                                <!-------------------------------- end adding units   -------------------------->

                                <div class="form-group">
                                    <div class="col-lg-offset-2 col-lg-4">
                                        
                                        <input type="button" id="submit" name="ww" class="btn btn-primary pull-left"
                                            value="إضافة" onclick="addCat()" />

                                        <!--<input type="button"  id="submit" name="ww" class="btn btn-primary pull-left" value="إضافة" onclick="if (Spry.Widget.Form.validate(this)) {checkCatName(event, 'productcat', 'productCatName');   return true;} else {return false;}"/>-->

                                        
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <!--              <button type="reset" class="btn btn-default" data-dismiss="modal">اغلاق</button>
                        --> <!--<button type="submit" class="btn btn-primary savemodel">حفظ</button>-->
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
        <!--------=====================================================================---->

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