<style>
    .unsetBoldProp {
        font-weight: unset;
    }
</style>
<div class="row">
    <div class="container {if $lang_code == 'en'} gt4-ltr{/if}">
        <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>
            </div>
            <div class="panel-body">
                <div class="col-lg-5 ">
                    <div class="row">
                        <div class="container">
                            <div class="panel panel-default panel-m" style="padding-bottom: 30px;border:0!important">
                                <!--                                <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">
                                                                                    {$treeHTML}
                                                                                </ul>
                                                                            </li>
                                                                        </ul>
                                                                    </div>
                                                                    -- portlet-body---
                                                                </div>
                                                                -- panel-body----->

                                <div>
                                    <label class="sr-only">تصنيف المنتج</label>
                                    <select class="select2 wdt300 productCatt" data-level="0" name="productCatId0"
                                            id="productCatId0">
                                        <option value="-1">اختر تصنيف</option>
                                        {foreach $catDataReport as $data}
                                        <option value="{$data->productCatId}">{$data->productCatName}</option>
                                        {/foreach}
                                    </select>
                                    <input type="hidden" id="level" name="level" value="0">
                                </div>
                                <div id="manyParents"></div>
                                <input type="hidden" id="dontLoadProducts" name="dontLoadProducts" value="1" />
                            </div>



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


                    </div>
                    <!----container-->
                </div><!----row-->

                <div class="col-lg-12">
                    <input type="hidden" id="eunitInTax" value="{$Programsettingdata->eunitInTax}">
                    <input type="hidden" id="ebillsetting" value="{$Programsettingdata->ebill}">
                    <input type="hidden" id="importproduct" value="{$Programsettingdata->importproduct}">
                    <input type="hidden" id="showpriceall" value="{$Programsettingdata->showpriceall}">
                    <input type="hidden" id="showpricehalf" value="{$Programsettingdata->showpricehalf}">
                    <input type="hidden" id="showpriceunit" value="{$Programsettingdata->showpriceunit}">
                    <input type="hidden" id="showprice4" value="{$Programsettingdata->showprice4}">
                    <input type="hidden" id="showprice5" value="{$Programsettingdata->showprice5}">
                    <input type="hidden" id="showprice6" value="{$Programsettingdata->showprice6}">
                    <input type="hidden" id="showprice7" value="{$Programsettingdata->showprice7}">
                    <input type="hidden" id="showprice8" value="{$Programsettingdata->showprice8}">
                    <input type="hidden" id="showprice9" value="{$Programsettingdata->showprice9}">
                    <input type="hidden" id="showprice10" value="{$Programsettingdata->showprice10}">
                    <input type="hidden" id="showprice11" value="{$Programsettingdata->showprice11}">
                    <input type="hidden" id="showprice12" value="{$Programsettingdata->showprice12}">
                    <input type="hidden" id="showprice13" value="{$Programsettingdata->showprice13}">
                    <input type="hidden" id="addclienttoproduct" value="{$Programsettingdata->addclienttoproduct}">
                    <input type="hidden" id="shownameE" value="{$Programsettingdata->shownameE}">
                    <input type="hidden" id="showprocode" value="{$Programsettingdata->showprocode}">
                    <input type="hidden" id="showpartnumber" value="{$Programsettingdata->showpartnumber}">
                    <input type="hidden" id="showtype" value="{$Programsettingdata->showtype}">
                    <input type="hidden" id="showcompany" value="{$Programsettingdata->showcompany}">
                    <input type="hidden" id="showweight" value="{$Programsettingdata->showweight}">
                    <input type="hidden" id="showorigin" value="{$Programsettingdata->showorigin}">
                    <input type="hidden" id="showhscode" value="{$Programsettingdata->showhscode}">
                    <input type="hidden" id="showexpire" value="{$Programsettingdata->showexpire}">
                    <input type="hidden" id="showgrantduration" value="{$Programsettingdata->showgrantduration}">
                    <input type="hidden" id="showonline" value="{$Programsettingdata->showonline}">
                    <input type="hidden" id="showminappear" value="{$Programsettingdata->showminappear}">
                    <input type="hidden" id="showonlinecat" value="{$Programsettingdata->showonlinecat}">
                    <input type="hidden" id="showsearchfilter" value="{$Programsettingdata->showsearchfilter}">
                    <input type="hidden" id="showsellpercentage" value="{$Programsettingdata->showsellpercentage}">
                    <input type="hidden" id="showbuydiscount" value="{$Programsettingdata->showbuydiscount}">
                    <input name="today" type="hidden" id="today" value="{$today}" />
                    <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 id="productEdit"></div>

                    <!------------    Start  productsformDiv  --------------------------->
                    <div id="productsformDiv" style="display:none">
                        {literal}
                        <form action="productController.php?do=add" method="post" class="nameToBeChecked"
                              id="myProductForm" name="myProductForm" enctype="multipart/form-data" autocomplete="off">
                            <!--validate the form before checking name-->
                            {/literal}

                            <div style="">
                                <label>تصنيف المنتج الرئيسي</label>
                                <input name="productCatId" id="productCatId" type="hidden" />
                            </div>
                            <!------------    Start  productsDiv  --------------------------->
                            <div id="productsDiv">
                                <input name="addProducts" id="addProducts" type="button" class="btn btn-success"
                                       value="إضافة منتج" />
                                <input type="hidden" name="searchvalue" id="searchvalue"
                                       value="{$Programsettingdata->searchvalue}" />
                                <!-- <div class="form-group pull-left">
                                    <input type="hidden" id="product" class="select2product">
                                    <input type="button" class="btn btn-warning" id="copyProduct" value="نسخ" />
                                </div> -->
                                <input name="productItr" id="productItr" type="hidden" value="1" />
                                <input type="hidden" name="productindextype" id="productIndexType" value="0" />

                                <div class="clear"></div>
                                <div
                                    class="alert alert-warning alert-dismissible show {if {$Programsettingdata->measuringunit} eq 1} hidden {/if}">
                                    <strong>تنبيه ! &nbsp;</strong> فى حالة عدم اضافة اسعار امام الوحدات سيتم اضافة
                                    اسعار المنتج الاساسية للوحدة
                                    <button type="button" class="close" data-dismiss="alert">&times;</button>
                                </div>
                                <div class="clear"></div>

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

                                    <input id="ebill" type="hidden" value="{$Programsettingdata->ebill}" />
                                    {if $Programsettingdata->ebill eq 1}
                                    <a id="etaproduct1" onclick="etaproduct(1);"
                                       class="etaproduct pull-left btn btn-primary">الفاتوره الالكترونيه </a>
                                    {/if}
                                    <!-----remove-product---->

                                    <!-------- اضافه وحدة قياس------->
                                    <input
                                        class="addUnits btn btn-warning pull-left check_tr_mesurunit {if {$Programsettingdata->measuringunit} eq 1} hidden {/if}"
                                        onClick="addUnits(1);" type="button" value="إضافة وحدة قياس" />
                                    <input name="unitsItr1" id="unitsItr1" type="hidden" value="1" />
                                    <input name="hide_precentage" id="hide_precentage" type="hidden"
                                           value="{$Programsettingdata->precentages}" />
                                    <input name="hide_realprice" id="hide_realprice" type="hidden"
                                           value="{$Programsettingdata->realprice}" />
                                    <input name="hide_isCaf" id="hide_isCaf" type="hidden"
                                           value="{$Programsettingdata->isCaf}" />
                                    <input name="hide_isRestaurent" id="hide_isRestaurent" type="hidden"
                                           value="{$Programsettingdata->isRestaurent}" />

                                    <table id="productsTable" class="table table-black"
                                           style="background-color:#fff;color:#000!important">

                                        <tr>
                                            <td style="width:27px" class="p0">الإسم</td>
                                            <td style="width:27px" class="p0">سعر الشراء</td>
                                            <td style="width:27px; {if {$Programsettingdata->realprice} eq 1} display: none; {/if} "
                                                class="p0">سعر الشراء الفعلى </td>
                                            {if $Programsettingdata->showpriceall == 1}
                                            <td style="width:15px" class="p0">{if {$Programsettingdata->precentages} eq
                                                1} سعر الجملة{else} نسبة ربح الجملة{/if} </td>
                                            {/if}
                                            {if $Programsettingdata->showpricehalf == 1}
                                            <td style="width:15px" class="p0">{if {$Programsettingdata->precentages} eq
                                                1} سعر نصف الجملة{else} نسبة ربح نصف الجملة{/if} </td>
                                            {/if}
                                            {if $Programsettingdata->showpriceunit == 1}
                                            <td style="width:15px" class="p0">{if {$Programsettingdata->precentages} eq
                                                1} سعر التجزئه{else} نسبة ربح التجزئه{/if}</td>
                                            {/if}
                                            {if $Programsettingdata->showprice4 eq 1}
                                            <td style="width:27px; " class="p0">سعر4 </td>
                                            {/if}
                                            {if $Programsettingdata->showprice5 eq 1}
                                            <td style="width:27px;" class="p0">سعر5 </td>
                                            {/if}
                                            {if $Programsettingdata->showprice6 eq 1}
                                            <td style="width:27px;" class="p0">سعر6 </td>
                                            {/if}
                                            {if $Programsettingdata->showprice7 eq 1}
                                            <td style="width:27px;" class="p0">سعر7 </td>
                                            {/if}
                                            {if $Programsettingdata->showprice8 eq 1}
                                            <td style="width:27px;" class="p0">سعر8 </td>
                                            {/if}
                                            {if $Programsettingdata->showprice9 eq 1}
                                            <td style="width:27px;" class="p0">سعر9 </td>
                                            {/if}
                                            {if $Programsettingdata->showprice10 eq 1}
                                            <td style="width:27px;" class="p0">سعر10 </td>
                                            {/if}
                                            {if $Programsettingdata->showprice11 eq 1}
                                            <td style="width:27px;" class="p0">سعر11 </td>
                                            {/if}
                                            {if $Programsettingdata->showprice12 eq 1}
                                            <td style="width:27px;" class="p0">سعر12 </td>
                                            {/if}
                                            {if $Programsettingdata->showprice13 eq 1}
                                            <td style="width:27px;" class="p0">سعر13 </td>
                                            {/if}
                                            <td style="width:15px" class="p0">الكمية</td>
                                            <td style="width:15px" class="p0">صورة</td>
                                            <td style="width:27px"
                                                class="p0 check_tr {if {$Programsettingdata->parcode} eq 1} hidden {/if}">
                                                الباركود</td>
                                            <td style="width:27px"
                                                class="p0 check_tr_period {if {$Programsettingdata->expiredate} eq 1} hidden {/if}">
                                                تاريخ الصلاحية</td>
                                            <td style="width:27px"
                                                class="p0 check_tr_date {if {$Programsettingdata->date} eq 1} hidden {/if}">
                                                التاريخ</td>
                                            <td style="width:27px"
                                                class="p0 check_tr_limitamount {if {$Programsettingdata->limitamount} eq 1} hidden {/if}">
                                                الحد الأدنى للمنتج</td>
                                            <td style="width:27px"
                                                class="p0 check_tr_webApiId {if {$Programsettingdata->webApiId} eq 0} hidden {/if}">
                                                web Api Id</td>
                                            <td style="width:47px"
                                                class="p0 {if {$Programsettingdata->ebill} neq 1} hidden {/if}">نوع
                                                الباركود الضريبى</td>

                                                 
                                            <td style="width:27px"
                                                class="p0 {if {$Programsettingdata->ebill} neq 1} hidden {/if}">الباركود
                                                الضريبى</td>
                                            <td style="width:27px"
                                                class="p0 {if $Programsettingdata->isCaf != 1 && $Programsettingdata->isRestaurent != 1} hidden {/if}">
                                                فى المنيو</td>
                                            <td style="width:27px"
                                                class="p0 check_tr_production {if {$Programsettingdata->production} eq 1} hidden {/if}">
                                                التصنيع</td>
                                            <td style="width:30px!important"
                                                class="p0 check_tr_service {if {$Programsettingdata->service} eq 1} hidden {/if}">
                                                خدمة</td>
                                            <td style="width:100px!important"
                                                class="p0 check_tr_description {if {$Programsettingdata->description} eq 1} hidden {/if}">
                                                الوصف</td>
                                            <td
                                                class="p0  {if $Programsettingdata->addclienttoproduct neq 1} hidden {/if}">
                                                العميل</td>
                                            <td colspan="2"
                                                class="p0  {if $Programsettingdata->showonlinecat neq 1} hidden {/if}">
                                                تصنيف اونلاين</td>
                                            <td colspan="2"
                                                class="p0  {if $Programsettingdata->showsearchfilter neq 1} hidden {/if}">
                                                فلاتر البحث</td>
                                        </tr>
                                        <tr>
                                            <td class="p0" style="width:150px"><input name="productName1"
                                                                                      required="required" type="text" id="productName1" width="100%"
                                                                                      onChange="checkProductName(this.value, 1);"
                                                                                      class="form-control add_required_attr" data-itra="1" data-id="1" />
                                            </td>

                                            <td class="p0"><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 class="p0" {if {$Programsettingdata->realprice} eq 1} style="display:
                                                none; "{/if}>
                                                <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" tabindex="-1" readonly
                                                       class="form-control precentages success  aw_m aw_mt aw_pp numberclic enteraction  numberinput positivefloat buypricereal_precentage1"
                                                       data-id="1" width="10" />
                                            </td>
                                            {if $Programsettingdata->showpriceall == 1}
                                            <td class="p0">
                                                <input
                                                    style=" {if {$Programsettingdata->precentages} eq 1} width: 100%; {else} width: 50%; {/if} 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=" {if {$Programsettingdata->precentages} eq 1} display: none; {/if}  width: 50%;"
                                                    name="buytotal_precentage1" type="text" id="buytotal_precentage1"
                                                    data-type="buytotal" tabindex="-1" readonly
                                                    class="form-control  aw_m aw_mt aw_pp numberclic enteraction precentages success numberinput positivefloat buytotal_precentage1"
                                                    data-id="1" width="10" />
                                            </td>
                                            {/if}
                                            {if $Programsettingdata->showpricehalf == 1}
                                            <td class="p0">
                                                <input
                                                    style="{if {$Programsettingdata->precentages} eq 1} width: 100%; {else} width: 50%; {/if} 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="{if {$Programsettingdata->precentages} eq 1} display: none; {/if}  width: 50%;"
                                                    name="buyhalf_precentage1" type="text" id="buyhalf_precentage1"
                                                    data-type="buyhalf" tabindex="-1" readonly
                                                    class="form-control  aw_m aw_mt aw_pp numberclic enteraction  precentages success numberinput positivefloat buyhafe_precentage1"
                                                    data-id="1" width="10" />
                                            </td>
                                            {/if}
                                            {if $Programsettingdata->showpriceunit == 1}
                                            <td class="p0">
                                                <input
                                                    style="{if {$Programsettingdata->precentages} eq 1} width: 100%; {else} width: 50%; {/if}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=" {if {$Programsettingdata->precentages} eq 1} display: none; {/if} width: 50%;"
                                                    name="buypart_precentage1" type="text" id="buypart_precentage1"
                                                    data-type="buypart" tabindex="-1" readonly
                                                    class="form-control  aw_m aw_mt aw_pp numberclic enteraction precentages success numberinput positivefloat buypart_precentage1"
                                                    data-id="1" width="10" />
                                            </td>
                                            {/if}
                                            {if $Programsettingdata->showprice4 eq 1}
                                            <td class="p0">
                                                <input style=" 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" />
                                            </td>
                                            {/if}
                                            {if $Programsettingdata->showprice5 eq 1}
                                            <td class="p0">
                                                <input style=" 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" />
                                            </td>
                                            {/if}
                                            {if $Programsettingdata->showprice6 eq 1}
                                            <td class="p0">
                                                <input style=" 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" />
                                            </td>
                                            {/if}
                                            {if $Programsettingdata->showprice7 eq 1}
                                            <td class="p0">
                                                <input style=" 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" />
                                            </td>
                                            {/if}
                                            {if $Programsettingdata->showprice8 eq 1}
                                            <td class="p0">
                                                <input style=" 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" />
                                            </td>
                                            {/if}
                                            {if $Programsettingdata->showprice9 eq 1}
                                            <td class="p0">
                                                <input style=" float: left;" name="price9_1" type="text"
                                                       data-type="price9" id="price9_1"
                                                       class="form-control  aw_m aw_mt aw_pp numberclic prices enteraction numberinput positivefloat price9_1"
                                                       data-id="1" width="20" />
                                            </td>
                                            {/if}
                                            {if $Programsettingdata->showprice10 eq 1}
                                            <td class="p0">
                                                <input style=" float: left;" name="price10_1" type="text"
                                                       data-type="price10" id="price10_1"
                                                       class="form-control  aw_m aw_mt aw_pp numberclic prices enteraction numberinput positivefloat price10_1"
                                                       data-id="1" width="20" />
                                            </td>
                                            {/if}
                                            {if $Programsettingdata->showprice11 eq 1}
                                            <td class="p0">
                                                <input style=" float: left;" name="price11_1" type="text"
                                                       data-type="price11" id="price11_1"
                                                       class="form-control  aw_m aw_mt aw_pp numberclic prices enteraction numberinput positivefloat price11_1"
                                                       data-id="1" width="20" />
                                            </td>
                                            {/if}
                                            {if $Programsettingdata->showprice12 eq 1}
                                            <td class="p0">
                                                <input style=" float: left;" name="price12_1" type="text"
                                                       data-type="price12" id="price12_1"
                                                       class="form-control  aw_m aw_mt aw_pp numberclic prices enteraction numberinput positivefloat price12_1"
                                                       data-id="1" width="20" />
                                            </td>
                                            {/if}
                                            {if $Programsettingdata->showprice13 eq 1}
                                            <td class="p0">
                                                <input style=" float: left;" name="price13_1" type="text"
                                                       data-type="price13" id="price13_1"
                                                       class="form-control  aw_m aw_mt aw_pp numberclic prices enteraction numberinput positivefloat price13_1"
                                                       data-id="1" width="20" />
                                            </td>
                                            {/if}

                                            <td class="p0"><input name="productquantity1" type="text"
                                                                  id="productquantity1" value="0"
                                                                  class="form-control aw_m aw_mt aw_pp numberclic enteraction numberinput"
                                                                  size="20" data-id="1" /></td>
                                            <td class="p0"><input type="file" name="logo1" id="logo1"
                                                                  class="form-control" placeholder="الشعار" accept="image/*"
                                                                  data-id="1" /></td>
                                            <td
                                                class="p0  check_tr {if {$Programsettingdata->parcode} eq 1} hidden {/if}">
                                                <input name="parcode1" onblur="checkbarcode(this.value, 1);" type="text"
                                                       id="parcode1" size="9" class="form-control" value="" size="50"
                                                       data-id="1">
                                            </td><!--value="{$generatedParcode}"-->
                                            <td
                                                class="p0 check_tr_period {if {$Programsettingdata->expiredate} eq 1} hidden {/if}">
                                                <input name="expireDate1" type="text" id="expireDate1" size="9"
                                                       class="form-control" value="0" style="width: 81%;"><span
                                                       style="float: left;margin-top: -27px;color: white;font-size: 14px;font-weight: bold;padding-left: 2px;"
                                                       data-id="1">يوم</span>
                                            </td>

                                            <td
                                                class="p0 check_tr_date {if {$Programsettingdata->date} eq 1} hidden {/if}">
                                                <input name="productDate1" type="text" id="productDate1" size="9"
                                                       class="form-control awdatepicker" autocomplete="off"
                                                       data-date-format="yyyy-mm-dd" value="{$today}" width="27"
                                                       data-id="1" />
                                            </td>
                                            <td
                                                class="p0 check_tr_limitamount {if {$Programsettingdata->limitamount} eq 1} hidden {/if}">
                                                <input name="limitamount1" type="text" id="limitamount1" value="0"
                                                       class="form-control  aw_m aw_mt aw_pp numberclic enteraction numberinput"
                                                       data-id="1" />
                                            </td>
                                            <td
                                                class="p0 check_tr_webApiId {if {$Programsettingdata->webApiId} eq 0} hidden {/if}">
                                                <input name="webApiId1" type="text" id="webApiId1" value=""
                                                       class="form-control  aw_m aw_mt aw_pp numberclic enteraction numberinput"
                                                       data-id="1" />
                                            </td>
                                            <td class="p0  {if {$Programsettingdata->ebill} neq 1} hidden {/if}">
                                                <div class="form-group" style="font-size:13px">
                                                    <label class='color-black unsetBoldProp'>
                                                        <input value="GS1" class="radioR" name="TypeOfBarcodeInTax1"
                                                               checked="checked" type="radio" data-id="1" />
                                                        GS1 </label>

                                                    <label class='color-black unsetBoldProp'>
                                                        <input value="EGS" class="noradioR" name="TypeOfBarcodeInTax1"
                                                               type="radio" data-id="1" />
                                                        EGS </label>
                                                </div>
                                            </td>

                                            <td class="p0 {if {$Programsettingdata->ebill} neq 1} hidden {/if}">
                                                    <div class="form-group" style="font-size:13px">
                                                            <input type="hidden" name="barcodeInTax1" id="barcodeInTax1"
                                                                   data-itr="1" />
                                                    </div>
                                            </td>

                                           
                                            <td class="p0 {if $Programsettingdata->isCaf != 1 && $Programsettingdata->isRestaurent != 1} hidden {/if}"
                                                style="width:60px">
                                                <div class="form-group" style="font-size:13px">
                                                    <label class='color-black'>
                                                        <input value="0" class="radioR" name="inMenu1" checked="checked"
                                                               type="radio" data-id="1" />
                                                        نعم </label>

                                                    <label class='color-black'>
                                                        <input value="1" class="noradioR" name="inMenu1" type="radio"
                                                               data-id="1" />
                                                        لا </label>
                                                </div>
                                            </td>
                                            <td class="p0 check_tr_production {if {$Programsettingdata->production} eq 1} hidden {/if}"
                                                style="width:60px">
                                                <!--                                                <div class="form-group">
                                                                                                    <div class="col-md-9">
                                                <input type="checkbox" name="checkbox1">
                                                                                                      </div>
                                                                                                </div>-->
                                                <div class="form-group" style="font-size:13px">
                                                    <!--                                                    <input type="checkbox" checked data-toggle="toggle">-->

                                                    <label class='color-black'>
                                                        <input value="1" class="radioR" name="type1" type="radio"
                                                               data-id="1" />
                                                        نعم </label>

                                                    <label class='color-black'>
                                                        <input value="0" class="noradioR" name="type1" checked="checked"
                                                               type="radio" data-id="1" />
                                                        لا </label>

                                                </div>
                                            </td>

                                            <td class="p0 check_tr_service {if {$Programsettingdata->service} eq 1} hidden {/if}"
                                                style="width:60px">
                                                <div class="form-group" style="font-size:13px">

                                                    <label class='color-black'>
                                                        <input value="1" class="radioR isservice" name="isservice1"
                                                               type="radio" data-id="1" />
                                                        نعم </label>

                                                    <label class='color-black'>
                                                        <input value="0" class="noradioR isservice" name="isservice1"
                                                               checked="checked" type="radio" data-id="1" />
                                                        لا </label>

                                                </div>
                                            </td>
                                            <td class="p0 check_tr_description {if {$Programsettingdata->description} eq 1} hidden {/if}"
                                                style="width:130px"><textarea style="width:100%"
                                                                          name="productDescription1" id="productDescription1"
                                                                          class="form-control" data-id="1"></textarea></td>

                                            <td class="p0 {if $Programsettingdata->addclienttoproduct neq 1} hidden {/if}"
                                                style="width: 10%;">
                                                <input type="hidden" id="clientid1" name="clientid1"
                                                       class="wdt100 select2-offscreen clientSelect"
                                                       data-placeholder="اختر عميل " tabindex="-1"
                                                       style="display: inline-block;" value="1" />
                                            </td>

                                            <td colspan="2"
                                                class="{if $Programsettingdata->showonlinecat neq 1} hidden {/if}"
                                                style="width: 10%;">
                                                <select name="onlinecatid1" id="onlinecatid1" class="select2 wdt100"
                                                        data-id="1" data-itra="1">
                                                    <option value="-1">اختر</option>
                                                    {foreach $allOnlineCat as $cat}
                                                    <option value="{$cat.id}">{$cat.name}{if $cat.parentName !=""} /
                                                        {$cat.parentName}{/if}</option>
                                                    {/foreach}
                                                </select>
                                            </td>

                                            <td colspan="2"
                                                class="{if $Programsettingdata->showsearchfilter neq 1} hidden {/if}"
                                                style="width: 10%;">
                                                <select name="searchfiltersid1[]" id="searchfiltersid1" multiple
                                                        class="select2 wdt100" data-id="1" data-itra="1">
                                                    <option value="-1">اختر</option>
                                                    {foreach $allSearchFilters as $filter}
                                                    <option value="{$filter.id}">{$filter.name}{if $filter.parentName
                                                        !=""} /
                                                        {$filter.parentName}{/if}</option>
                                                    {/foreach}
                                                </select>
                                            </td>

                                        </tr>
                                        {if $Programsettingdata->importproduct eq 1}
                                    </table>
                                    <table>
                                        <tr>

                                            <td colspan="1"
                                                class="p0 {if $Programsettingdata->shownameE neq 1}hidden{/if}"
                                                style="width:250">E الإسم</td>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->showprocode neq 1}hidden{/if}">الكود
                                            </td>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->showpartnumber neq 1}hidden{/if}">رقم
                                                القطعة</td>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->showtype neq 1}hidden{/if}">النوع</td>
                                            <td colspan="2"
                                                class=" {if $Programsettingdata->showcompany neq 1}hidden{/if}">الشركه
                                                المنتجه للصنف </td>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->showweight neq 1}hidden{/if}">وزن</td>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->showorigin neq 1}hidden{/if}">منشأ</td>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->showhscode neq 1}hidden{/if}">رمز
                                                النظام المنسق</td>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->showexpire neq 1}hidden{/if}">صلاحيه
                                            </td>
                                            <td colspan="1"
                                                class="power1 {if $Programsettingdata->showexpire neq 1}hidden{/if}">
                                                تاريخ الانتاج</td>
                                            <td colspan="1"
                                                class="power1 {if $Programsettingdata->showexpire neq 1}hidden{/if}">مدة
                                                الصلاحيه</td>
                                            <td colspan="1"
                                                class="{if $Programsettingdata->showgrantduration neq 1}hidden{/if}">
                                                مدة الضمان</td>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->showonline neq 1}hidden{/if}">اونلاين
                                            </td>
                                            <td colspan="1"
                                                class="{if $Programsettingdata->showminappear neq 1}hidden{/if}">
                                                الحد الأدنى للظهور اونلاين</td>
                                            <td colspan="1"
                                                class="{if $Programsettingdata->showsellpercentage neq 1}hidden{/if}">
                                                نسبة البيع: إضافة/خصم </td>
                                            <td colspan="1"
                                                class="sellpercentadd1 {if $Programsettingdata->showsellpercentage neq 1}hidden{/if}">
                                                نسبة اضافة بيع</td>
                                            <td colspan="1" class="sellpercentdiscount1" style="display: none;">
                                                نسبة خصم بيع</td>
                                            <td colspan="1"
                                                class="{if $Programsettingdata->showbuydiscount neq 1}hidden{/if}">
                                                نسبة خصم الشراء</td>
                                        </tr>
                                        <tr>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->shownameE neq 1}hidden{/if}">
                                                <input name="productNameE1" type="text" id="productNameE1" width="100%"
                                                       class="form-control" data-itra="1" data-id="1" />
                                            </td>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->showprocode neq 1}hidden{/if}">
                                                <input name="procode1" type="text" id="procode1" width="100%"
                                                       class="form-control" data-itra="1" data-id="1" />
                                            </td>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->showpartnumber neq 1}hidden{/if}">
                                                <input name="partNumber1" type="text" id="partNumber1" width="100%"
                                                       class="form-control positivefloat" data-itra="1" data-id="1" />
                                            </td>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->showtype neq 1}hidden{/if}">
                                                <select name="vehicleType1" id="vehicleType1"
                                                        class="select2 wdt100 vehicleType">
                                                    <option value="-1">اختر</option>
                                                    {foreach $vehicletypes as $vehicle}
                                                    <option value="{$vehicle->id}">{$vehicle->typename}</option>
                                                    {/foreach}
                                                </select>


                                            </td>
                                            <td colspan="2"
                                                class=" {if $Programsettingdata->showcompany neq 1}hidden{/if}">
                                                <select name="company1" id="company1" class="select2 wdt100 vehicleType"
                                                        data-id="1" data-itra="1">
                                                    <option value="-1">اختر</option>
                                                    {foreach $companyproduces as $company}
                                                    <option value="{$company->id}">{$company->companyname}</option>
                                                    {/foreach}
                                                </select>
                                            </td>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->showweight neq 1}hidden{/if}">
                                                <input name="weight1" type="text" id="weight1" width="100%"
                                                       class="form-control positivefloat" data-itra="1" data-id="1" />
                                            </td>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->showorigin neq 1}hidden{/if}">
                                                <input name="origin1" type="text" id="origin1" width="100%"
                                                       class="form-control" data-itra="1" data-id="1" />
                                            </td>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->showhscode neq 1}hidden{/if}">
                                                <input name="hscode1" type="text" id="hscode1" width="100%"
                                                       class="form-control positivefloat" data-itra="1" data-id="1" />
                                            </td>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->showexpire neq 1}hidden{/if}">
                                                <div class="form-group" style="font-size:13px">
                                                    <label class='color-black'>
                                                        <input value="0" class="power" data-itra="1" name="power1"
                                                               checked="checked" type="radio" data-id="1" />
                                                        نعم </label>

                                                    <label class='color-black'>
                                                        <input value="1" class="power" data-itra="1" name="power1"
                                                               type="radio" data-id="1" />
                                                        لا </label>
                                                </div>
                                            </td>
                                            <td colspan="1"
                                                class="power1 {if $Programsettingdata->showexpire neq 1}hidden{/if}">
                                                <input name="ProductionDate1" required="required" type="text"
                                                       id="ProductionDate1" width="100%" class="form-control awdatepicker"
                                                       data-date-format="yyyy-mm-dd" data-itra="1" data-id="1" />
                                            </td>
                                            <td colspan="1"
                                                class="power1 {if $Programsettingdata->showexpire neq 1}hidden{/if}">
                                                <input name="expiry1" required="required" type="text" id="expiry1"
                                                       width="100%" class="form-control positivefloat" data-itra="1"
                                                       data-id="1" />
                                            </td>
                                            <td colspan="1"
                                                class="{if $Programsettingdata->showgrantduration neq 1}hidden{/if}">
                                                <input name="grantduration1" type="text" id="grantduration1"
                                                       width="100%" class="form-control positivefloat" data-itra="1"
                                                       data-id="1" />
                                            </td>
                                            <td colspan="1"
                                                class=" {if $Programsettingdata->showonline neq 1}hidden{/if}">
                                                <div class="form-group" style="font-size:13px">
                                                    <label class='color-black'>
                                                        <input value="1" data-itra="1" name="onlinepro1"
                                                               checked="checked" type="radio" data-id="1" />
                                                        نعم </label>

                                                    <label class='color-black'>
                                                        <input value="0" data-itra="1" name="onlinepro1" type="radio"
                                                               data-id="1" />
                                                        لا </label>
                                                </div>
                                            </td>
                                            <td colspan="1"
                                                class="{if $Programsettingdata->showminappear neq 1}hidden{/if}">
                                                <input name="minappearonline1" type="text" id="minappearonline1"
                                                       width="100%" class="form-control positivefloat" data-itra="1"
                                                       data-id="1" />
                                            </td>
                                            <td colspan="1"
                                                class="{if $Programsettingdata->showsellpercentage neq 1}hidden{/if}">
                                                <div class="form-group" style="font-size:13px">
                                                    <label class='color-black'>
                                                        <input value="0" class="sellpercenttype" data-itra="1"
                                                               name="sellpercenttype1" checked="checked" type="radio"
                                                               data-id="1" />
                                                        إضافة </label>

                                                    <label class='color-black'>
                                                        <input value="1" class="sellpercenttype" data-itra="1"
                                                               name="sellpercenttype1" type="radio" data-id="1" />
                                                        خصم </label>
                                                </div>
                                            </td>
                                            <td colspan="1"
                                                class="sellpercentadd1 {if $Programsettingdata->showsellpercentage neq 1}hidden{/if}">
                                                <input name="selladdpercent1" type="text" id="selladdpercent1"
                                                       width="100%" class="form-control positivefloat" data-itra="1"
                                                       data-id="1" />
                                            </td>
                                            <td colspan="1" class="sellpercentdiscount1" style="display: none;">
                                                <input name="selldiscountpercent1" type="text" id="selldiscountpercent1"
                                                       width="100%" class="form-control positivefloat" data-itra="1"
                                                       data-id="1" />
                                            </td>
                                            <td colspan="1"
                                                class="{if $Programsettingdata->showbuydiscount neq 1}hidden{/if}">
                                                <input name="buydiscountpercent1" type="text" id="buydiscountpercent1"
                                                       width="100%" class="form-control positivefloat" data-itra="1"
                                                       data-id="1" />
                                            </td>
                                        </tr>
                                        {/if}

                                    </table>

                                    <!------------------------ وحدة قياس---------------------->
                                    <div id="addUnitsDiv1 "
                                         class="check_tr_mesurunit {if {$Programsettingdata->measuringunit} eq 1} hidden {/if}"
                                         style=" ">
                                        <table id="unitsTable1" class="table" style="
                                               width: 98%;
                                               box-shadow: 0px 3px 5px #a59f9f, -3px 0px 5px #fff;
                                               background-color: #999;">
                                            <tr style="display: none">
                                                <td>
                                                    <div class="form-group">
                                                        <label class="col-lg-4 control-label">وحدة القياس</label>
                                                        <div class="col-lg-8">
                                                            <select name="productunit11" id="productunit11"
                                                                    data-placeholder="اختر"
                                                                    class="select2 wdt100 chosenproduct">
                                                                <option value="-1">اختر وحدة القياس</option>

                                                                {foreach $unitsData as $unit}

                                                                <option value="{$unit->unitId}">{$unit->unitName}
                                                                </option>

                                                                {/foreach}

                                                            </select>
                                                        </div>
                                                    </div>
                                                </td>
                                                <td class="{if {$Programsettingdata->ebill} neq 1} hidden {/if}">
                                                    <div class="form-group">
                                                        <label class="col-lg-4 control-label">وحدة القياس
                                                            الضريبية</label>
                                                        <div class="col-lg-8">
                                                            <input type="hidden" name="unitInTax11" id="unitInTax11"
                                                                   data-id="1" />
                                                        </div>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div class="form-group">
                                                        <label class="col-lg-4 control-label">عدد الوحدات</label>
                                                        <div class="col-lg-8">
                                                            <input name="productnumber11" id="productnumber11"
                                                                   type="text" class="form-control numberinput" />
                                                        </div>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div class="form-group">
                                                        <label class="col-lg-4 control-label">الباركود</label>
                                                        <div class="col-lg-8">
                                                            <input name="proUnitParcode1" id="proUnitParcode1"
                                                                   type="text"
                                                                   class="form-control numberinput positiveNo" />
                                                        </div>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div class="form-group">
                                                        <label class="col-lg-4 control-label">سعر الشراء</label>
                                                        <div class="col-lg-8">
                                                            <input name="proUnitBuyPrice1" id="proUnitBuyPrice1"
                                                                   type="text" class="form-control positivefloat" />
                                                        </div>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div class="form-group">
                                                        <label class="col-lg-4 control-label">سعر الجملة</label>
                                                        <div class="col-lg-8">
                                                            <input name="proUnitSellAllPrice1" id="proUnitSellAllPrice1"
                                                                   type="text" class="form-control positivefloat" />
                                                        </div>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div class="form-group">
                                                        <label class="col-lg-4 control-label">سعر نص جملة</label>
                                                        <div class="col-lg-8">
                                                            <input name="proUnitSellHalfPrice1"
                                                                   id="proUnitSellHalfPrice1" type="text"
                                                                   class="form-control positivefloat" />
                                                        </div>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div class="form-group">
                                                        <label class="col-lg-4 control-label">سعر قطاعى</label>
                                                        <div class="col-lg-8">
                                                            <input name="proUnitSellUnitPrice1"
                                                                   id="proUnitSellUnitPrice1" type="text"
                                                                   class="form-control positivefloat" />
                                                        </div>
                                                    </div>
                                                </td>
                                                <td>
                                                    <a id="remove11" onClick="removeUnits(1, 1);"
                                                       class="removeUnits">X</a>
                                                </td>
                                            </tr>
                                        </table>
                                        <!--end unitsTable-->
                                    </div>
                                    <!--end productsTable -->

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

                                    </div>

                                </div>
                            </div>
                            <!------------    End  productsDiv  --------------------------->
                            <div class="form-group">
                                <div class="col-lg-12">
                                    <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>
                        {foreach $unitsData as $unit}
                        <option value="{$unit->unitId}">{$unit->unitName}</option>
                        {/foreach}
                    </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">
                                {literal}
                                <form class="nameToBeChecked2 form-horizontal" id="catForm" name="catForm"
                                      method="post">
                                    {/literal}
                                    <!--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">
                                        <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 table-black">
                                                <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>

                                                                    {foreach $unitsData as $unit}

                                                                    <option value="{$unit->unitId}">{$unit->unitName}
                                                                    </option>

                                                                    {/foreach}

                                                                </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">
                                            {literal}
                                            <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;}"/>-->

                                            {/literal}
                                        </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>


    <div class="modal fade" id="etaproductModal" tabindex="-1" role="dialog" aria-labelledby="etaproductModalLabel"
         aria-hidden="true">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel" style="text-align: center;">البحث عن المنتج</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <form id="etaproductform">
                        <div class="row">
                            <div class="col-lg-3">
                                <label for="recipient-name" class="col-form-label">code type</label>
                                <input type="text" class="form-control" id="etacodetype">
                            </div>
                            <div class="col-lg-3">
                                <label for="recipient-name" class="col-form-label">Code Lookup Value</label>
                                <input type="text" class="form-control" id="etaCodeLookupValue">
                            </div>
                            <div class="col-lg-3">
                                <label for="recipient-name" class="col-form-label">Parent Code Lookup Value</label>
                                <input type="text" class="form-control" id="etaParentCodeLookupValue">
                            </div>
                            <div class="col-lg-3">
                                <label for="recipient-name" class="col-form-label">Code ID</label>
                                <input type="text" class="form-control" id="etaCodeID">
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-lg-3">
                                <label for="recipient-name" class="col-form-label">Code Name</label>
                                <input type="text" class="form-control" id="etaCodeName">
                            </div>
                            <div class="col-lg-3">
                                <label for="recipient-name" class="col-form-label">Code Description</label>
                                <input type="text" class="form-control" id="etaCodeDescription">
                            </div>
                            <div class="col-lg-3">
                                <label for="recipient-name" class="col-form-label">Taxpayer RIN</label>
                                <input type="text" class="form-control" id="etaTaxpayerRIN">
                            </div>
                            <div class="col-lg-3">
                                <label for="recipient-name" class="col-form-label">Parent Code ID</label>
                                <input type="text" class="form-control" id="etaParentCodeID">
                            </div>
                        </div>
                        <div id="etaproductbody">
                        </div>

                        <input type="hidden" class="form-control" id="etaproductitr" value="">
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">اغلاق</button>
                    <button type="button" class="btn btn-primary " id="etaproductsearch"> بحث</button>
                </div>
            </div>
        </div>
    </div>
    <!--    <<<<<<< .mine
    </div></td>
    </tr>
    <tr>
        <td colspan="2">خدمة</td>
        <td colspan="3">الوصف</td>
    </tr>
    <tr>
        <td  colspan="2">
            <div class="form-group">
                ||||||| .r20806
            </div>
        </td>
        <td colspan="3"><textarea name="productDescription1" id="productDescription1" cols="1" rows="3" class="form-control"></textarea></td>
        =======
    </div>
    </td>
    <td colspan="3" class="check_tr_description {if {$Programsettingdata->description} eq 1} hidden {/if}"><textarea name="productDescription1" id="productDescription1" cols="1" rows="3" class="form-control"></textarea></td>
    <td  colspan="2">
        <div class="form-group">
        </div></td>
    </tr>
    <tr>
        <td colspan="2">خدمة</td>
        <td colspan="3">الوصف</td>
    </tr>
    <tr>
        <td  colspan="2">
            <div class="form-group">

            </div></td>
    </tr>
    <tr>
        <td colspan="2" class="check_tr_service {if {$Programsettingdata->service} eq 1} hidden {/if}">خدمة</td>
        <td colspan="3" class="check_tr_description {if {$Programsettingdata->description} eq 1} hidden {/if}">الوصف</td>
    </tr>
    <tr >
        <td  colspan="2" class="check_tr_service {if {$Programsettingdata->service} eq 1} hidden {/if}">
            <div class="form-group">
    -->
    <input type="hidden" name="productAddMultiCatLevel" id="productAddMultiCatLevel" value="1" />
    {literal}
    <script>
        $(window).bind('keydown', function (event) {
            //needs that form autocomplete="off"
            if (event.which === 33) {//page up
                event.preventDefault();
                var itr = Number(event.target.getAttribute('data-id')) - 1;
                $('#productName' + itr).focus();
            }
            //needs that form autocomplete="off"
            if (event.which === 34) {//page down
                event.preventDefault();
                var itr = Number(event.target.getAttribute('data-id')) + 1;
                $('#productName' + itr).focus();
            }
        });

        $(function () {

            $(".select2product").select2({
                placeholder: "بحث باسم المنتج",
                minimumInputLength: document.getElementById("searchvalue").value,
                multiple: false,
                quietMillis: 100,
                containerCssClass: "wdt300",
                ajax: {
                    url: "sellbillAjaxController.php?do=getProducts2",
                    dataType: 'json',
                    data: function (term, page) {
                        //alert("sellbillAjaxController.php?do=getProducts&term="+term+"&page_limit=10&storeid="+document.getElementById("storeid").value);
                        return {
                            term: term, //search term
                            page_limit: 10, // page size,
                        };
                    },
                    results: function (data) {

                        return {results: data};
                    }
                },
                formatResult: function (data) {
                    return data.text;
                },
                initSelection: function (element, callback) {
                    var item = element.val().split(':');
                    var data = {id: item[0], text: item[1], productquantity: item[2], price: item[3]};
                    callback(data);
                }

            });
        });
    </script>
    {/literal}