<?php /* Smarty version Smarty-3.1.11, created on 2025-03-17 15:46:30
         compiled from "../views/default/productview/details.html" */ ?>
<?php /*%%SmartyHeaderCode:29046641567d827b643f448-42400191%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'bbeb50acb1650d419392bcd139ff3873f1cc6a3d' => 
    array (
      0 => '../views/default/productview/details.html',
      1 => 1695758668,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '29046641567d827b643f448-42400191',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'alldata' => 0,
    'productsData' => 0,
    'data' => 0,
    'userGroupData' => 0,
    'Programsettingdata' => 0,
    'lastSellDataOfProduct' => 0,
    'lastBuyDataOfProduct' => 0,
    'productUnitsData' => 0,
    'unitsData' => 0,
    'proUnit' => 0,
    'unit' => 0,
    'j' => 0,
    'isCollective' => 0,
    'Productionrateproduct' => 0,
    'rows' => 0,
    'material' => 0,
    'x' => 0,
    'y' => 0,
    'myUnit' => 0,
    'i' => 0,
    'sizeColorStoreDetail' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_67d827b6669d66_67983263',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_67d827b6669d66_67983263')) {function content_67d827b6669d66_67983263($_smarty_tpl) {?><div class="form-group">
    <label class="col-lg-2 control-label">تصنيف المنتج</label>
    <div class="col-lg-4">
        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['alldata']->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;
?>
        <?php if ($_smarty_tpl->tpl_vars['productsData']->value->productCatId==$_smarty_tpl->tpl_vars['data']->value->productCatId){?><?php echo $_smarty_tpl->tpl_vars['data']->value->productCatName;?>
<?php }?>
        <?php } ?>
    </div>

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

    <table id="product_Table"  class="table table-black">
        <tr>
            <td colspan="2"><label class="control-label">الإسم</label></td>

            <?php if ($_smarty_tpl->tpl_vars['userGroupData']->value->hideproductcatid==0){?><td ><label class="control-label">سعر الشراء</label></td><?php }?>
            <td><label class="control-label">الخصم المرجح</label></td>
            <td><label class="control-label">سعر الجمله</label></td>
            <td><label class="control-label">سعر نصف الجمله</label></td>
            <td><label class="control-label">سعر التجزئة</label></td>
        </tr>
        <tr >

            <td  colspan="2"><?php echo $_smarty_tpl->tpl_vars['productsData']->value->productName;?>
</td>
            <?php if ($_smarty_tpl->tpl_vars['userGroupData']->value->hideproductcatid==0){?><td><?php echo $_smarty_tpl->tpl_vars['productsData']->value->productBuyPrice;?>
</td><?php }?>
            <td><?php echo $_smarty_tpl->tpl_vars['productsData']->value->weightedDiscount;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['productsData']->value->productSellAllPrice;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['productsData']->value->productSellHalfPrice;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['productsData']->value->productSellUnitPrice;?>
</td>
        </tr>
        <tr>
            <td class=" check_tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->parcode;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==1){?> hidden <?php }?>"><label class="control-label">الباركود</label></td>
            <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->expiredate;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2==1){?> hidden <?php }?>><label class="control-label">مدة الصلاحية</label> </td>
            <td ><label class="control-label">الكمية</label></td>
            <td class="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->date;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3==1){?> hidden <?php }?>"><label class="control-label">التاريخ</label></td>
            <td  class=" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->limitamount;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4==1){?> hidden <?php }?>"><label class="control-label">الحد الأدنى للمنتج</label></td>
            <td class="<?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->isCaf!=1&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->isRestaurent!=1){?> hidden <?php }?>"><label class="control-label">فى المنيو</label></td>
        </tr>
        <tr>
            <td class=" check_tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->parcode;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==1){?> hidden <?php }?>">
                <?php echo $_smarty_tpl->tpl_vars['productsData']->value->parcode;?>

            </td>
            <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->expiredate;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6==1){?> hidden <?php }?>>
                <?php echo $_smarty_tpl->tpl_vars['productsData']->value->expireDate;?>
 <span style="float: left;margin-top: -27px; color: white;font-size: 15px;font-weight: bold;">يوم</span>
            </td>
            <td><?php echo $_smarty_tpl->tpl_vars['productsData']->value->sumProductQuantity;?>
</td>
            <td  class="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->date;?>
<?php $_tmp7=ob_get_clean();?><?php if ($_tmp7==1){?> hidden <?php }?>">
                <?php echo $_smarty_tpl->tpl_vars['productsData']->value->productDate;?>

            </td>
            <td class=" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->limitamount;?>
<?php $_tmp8=ob_get_clean();?><?php if ($_tmp8==1){?> hidden <?php }?>"><?php echo $_smarty_tpl->tpl_vars['productsData']->value->limitamount;?>
</td>
            <td class="<?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->isCaf!=1&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->isRestaurent!=1){?> hidden <?php }?>">
                <div class="form-group">
                    <div class="col-lg-12">
                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['productsData']->value->inMenu;?>
<?php $_tmp9=ob_get_clean();?><?php if ($_tmp9==0){?>
                        نعم
                        <?php }else{ ?>
                        لا
                        <?php }?>
                    </div>
                </div>
            </td>
        </tr>

        <tr>
            <td   colspan="3" class="check_tr_description <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->description;?>
<?php $_tmp10=ob_get_clean();?><?php if ($_tmp10==1){?> hidden <?php }?>"><label class="control-label">التعليق</label></td>
            <?php if ($_smarty_tpl->tpl_vars['userGroupData']->value->hideproductcatid==0){?><td><label class="control-label">متوسط سعر الشراء</label></td><?php }?>
            <?php if ($_smarty_tpl->tpl_vars['userGroupData']->value->hideproductcatid==0){?><td><label class="control-label">اخر سعر شراء</label></td><?php }?>
            <td><label class="control-label">خدمة</label></td>
            <td class=" check_tr_production <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->production;?>
<?php $_tmp11=ob_get_clean();?><?php if ($_tmp11==1){?> hidden <?php }?>"><label class="control-label">تصنيع</label></td>

        </tr>
        <tr>


            <td   colspan="3" class=" check_tr_description <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->description;?>
<?php $_tmp12=ob_get_clean();?><?php if ($_tmp12==1){?> hidden <?php }?>">
                <?php echo $_smarty_tpl->tpl_vars['productsData']->value->productDescription;?>

            </td>
            <?php if ($_smarty_tpl->tpl_vars['userGroupData']->value->hideproductcatid==0){?><td><?php echo $_smarty_tpl->tpl_vars['productsData']->value->meanbuyprice;?>
</td><?php }?>
            <?php if ($_smarty_tpl->tpl_vars['userGroupData']->value->hideproductcatid==0){?><td><?php echo $_smarty_tpl->tpl_vars['productsData']->value->lastbuyprice;?>
</td><?php }?>
            <td>
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['productsData']->value->isService;?>
<?php $_tmp13=ob_get_clean();?><?php if ($_tmp13==1){?>
                نعم
                <?php }else{ ?>
                لا
                <?php }?>
            </td>
            <td class=" check_tr_production <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->production;?>
<?php $_tmp14=ob_get_clean();?><?php if ($_tmp14==1){?> hidden <?php }?>">
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['productsData']->value->type;?>
<?php $_tmp15=ob_get_clean();?><?php if ($_tmp15==1){?>
                نعم
                <?php }else{ ?>
                لا
                <?php }?>
            </td>

        </tr>

        <tr>
            <?php if (isset($_smarty_tpl->tpl_vars['lastSellDataOfProduct']->value)){?>
            <td colspan="2"><label class="control-label">اخر خصم بيع</label></td>
            <td><label class="control-label">اخر سعر بيع</label></td>
            <?php }?>
            <?php if (isset($_smarty_tpl->tpl_vars['lastBuyDataOfProduct']->value)&&$_smarty_tpl->tpl_vars['lastBuyDataOfProduct']->value->discountvalue>0){?>
            <td colspan="2"><label class="control-label">اخر خصم شراء</label></td>
            <?php }?>
        </tr>
        <tr >
            <?php if (isset($_smarty_tpl->tpl_vars['lastSellDataOfProduct']->value)){?>
            <td  colspan="2"><?php echo $_smarty_tpl->tpl_vars['lastSellDataOfProduct']->value->discountvalue;?>
 (<?php echo $_smarty_tpl->tpl_vars['lastSellDataOfProduct']->value->discounttype;?>
%)</td>
            <td><?php echo $_smarty_tpl->tpl_vars['lastSellDataOfProduct']->value->sellbilldetailprice;?>
</td>
            <?php }?>
            <?php if (isset($_smarty_tpl->tpl_vars['lastBuyDataOfProduct']->value)&&$_smarty_tpl->tpl_vars['lastBuyDataOfProduct']->value->discountvalue>0){?>
            <td  colspan="2"><?php echo $_smarty_tpl->tpl_vars['lastBuyDataOfProduct']->value->discountvalue;?>
 (<?php echo $_smarty_tpl->tpl_vars['lastBuyDataOfProduct']->value->discounttype;?>
%)</td>
            <?php }?>
        </tr>

        <tr>
            <td   colspan="3"><label class="control-label">صورة</label></td>
            <td   colspan="2"></td>
            <td  colspan="2"></td>
        </tr>
        <tr>
            <td   colspan="3">
                <?php if ($_smarty_tpl->tpl_vars['productsData']->value->logo!=''&&$_smarty_tpl->tpl_vars['productsData']->value->logo!="."){?><img src="../views/default/images/product_image/<?php echo $_smarty_tpl->tpl_vars['productsData']->value->logo;?>
" alt="" width="<?php echo $_smarty_tpl->tpl_vars['productsData']->value->displayWidth;?>
" height="<?php echo $_smarty_tpl->tpl_vars['productsData']->value->displayHeight;?>
" style="cursor: pointer;" onclick="window.open($(this).attr('src'))"/><?php }?>
            </td>
            <td   colspan="2"></td>
            <td  colspan="2"></td>
        </tr>
        <tr>
            <td colspan="10"><!--------------------------------  adding units   ----------------------------->

                <div id="addUnitsDiv1" class="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->measuringunit;?>
<?php $_tmp16=ob_get_clean();?><?php if ($_tmp16==1){?> hidden <?php }?>">
                    <div class="table-responsive">
                        <table id="unitsTable1"  class="table table-black" >
                            <?php $_smarty_tpl->tpl_vars['j'] = new Smarty_variable(1, null, 0);?>
                            <?php  $_smarty_tpl->tpl_vars['proUnit'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['proUnit']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['productUnitsData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['proUnit']->key => $_smarty_tpl->tpl_vars['proUnit']->value){
$_smarty_tpl->tpl_vars['proUnit']->_loop = true;
?>
                            <tr>
                                <td>
                                    <div>
                                        <label class="control-label">وحدة القياس</label>
                                        <div>
                                            <?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;
?>
                                            <?php if ($_smarty_tpl->tpl_vars['proUnit']->value->unitid==$_smarty_tpl->tpl_vars['unit']->value->unitId){?><?php echo $_smarty_tpl->tpl_vars['unit']->value->unitName;?>
<?php }?>
                                            <?php } ?>
                                        </div>
                                    </div>
                                </td>
                                <td>
                                    <div>
                                        <label class="control-label">عدد الوحدات</label>
                                        <div><?php echo $_smarty_tpl->tpl_vars['proUnit']->value->productnumber;?>
</div>
                                    </div>
                                </td>
                                <td>
                                    <div>
                                        <label class="control-label">الباركود</label>
                                        <div><?php echo $_smarty_tpl->tpl_vars['proUnit']->value->proUnitParcode;?>
</div>
                                    </div>
                                </td>
                                <?php if ($_smarty_tpl->tpl_vars['userGroupData']->value->hideproductcatid==0){?>
                                <td>
                                    <div>
                                        <label class="control-label">سعر الشراء</label>
                                        <div><?php echo $_smarty_tpl->tpl_vars['proUnit']->value->proUnitBuyPrice;?>
</div>
                                    </div>
                                </td>
                                <?php }?>
                                <td>
                                    <div>
                                        <label class="control-label">سعر الجملة</label>
                                        <div><?php echo $_smarty_tpl->tpl_vars['proUnit']->value->proUnitSellAllPrice;?>
</div>
                                    </div>
                                </td>
                                <td>
                                    <div>
                                        <label class="control-label">سعر نص جملة</label>
                                        <div><?php echo $_smarty_tpl->tpl_vars['proUnit']->value->proUnitSellHalfPrice;?>
</div>
                                    </div>
                                </td>
                                <td>
                                    <div>
                                        <label class="control-label">سعر قطاعى</label>
                                        <div><?php echo $_smarty_tpl->tpl_vars['proUnit']->value->proUnitSellUnitPrice;?>
</div>
                                    </div>
                                </td>
                            </tr>
                            <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'j', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['j']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
                            <?php } ?>
                        </table>
                    </div>
                    <!--end unitsTable-->
                </div>

                <!-------------------------------- end adding units   -------------------------->
            </td>
        </tr>
        <?php if ($_smarty_tpl->tpl_vars['isCollective']->value==1){?>
        <tr>
            <td colspan="10"><!--------------------------------  adding units   ----------------------------->
                <div class="panel panel-default panel-m">
                    <div class="panel-heading">
                        <h3 class="panel-title">المكونات</h3>
                        <input type="hidden" name="isCollective" id="isCollective" value="1"/>
                    </div>
                    <div class="panel-body">
                        <table class="table billtable table-bordered table-black col-lg-4" id="table">
                            <thead>
                                <tr>
                                    <th class="wdt400">المنتجات الخام</th>
                                    <th  class="wdt200"><span class="sr-only">وحدة القياس</span></th>
                                    <!--<th  class="wdt200">نسبة المشاركة </th>-->
                                    <th  class="wdt200" >عدد الوحدات</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                <?php $_smarty_tpl->tpl_vars['y'] = new Smarty_variable(1, null, 0);?>
                                <?php  $_smarty_tpl->tpl_vars['x'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['x']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['Productionrateproduct']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['x']->key => $_smarty_tpl->tpl_vars['x']->value){
$_smarty_tpl->tpl_vars['x']->_loop = true;
?>
                                <tr>
                                    <td >
                                        <?php  $_smarty_tpl->tpl_vars['material'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['material']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['rows']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['material']->key => $_smarty_tpl->tpl_vars['material']->value){
$_smarty_tpl->tpl_vars['material']->_loop = true;
?>
                                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['material']->value->productId;?>
<?php $_tmp17=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['x']->value->ingridientId;?>
<?php $_tmp18=ob_get_clean();?><?php if ($_tmp17==$_tmp18){?><?php echo $_smarty_tpl->tpl_vars['material']->value->productName;?>
<?php }?>
                                        <?php } ?>
                                    </td>
                                    <td>
                                        <?php  $_smarty_tpl->tpl_vars['myUnit'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['myUnit']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['productUnitData'.($_smarty_tpl->tpl_vars['y']->value)]->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['myUnit']->key => $_smarty_tpl->tpl_vars['myUnit']->value){
$_smarty_tpl->tpl_vars['myUnit']->_loop = true;
?>
                                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['myUnit']->value->productunitid;?>
<?php $_tmp19=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['x']->value->unitId;?>
<?php $_tmp20=ob_get_clean();?><?php if ($_tmp19==$_tmp20){?><?php echo $_smarty_tpl->tpl_vars['myUnit']->value->unitName;?>
<?php }?>
                                        <?php } ?>
                                    </td>
                                    <!--                                    <td><div id="table">
                                                                                <input type="text" name="input<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="input<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"  class="form-control check" value="<?php echo $_smarty_tpl->tpl_vars['x']->value->rate;?>
" tabindex=""  />
                                                                            </div></td>-->
                                    <td><?php echo $_smarty_tpl->tpl_vars['x']->value->quantity;?>
</td>
                                </tr>
                                <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
                                <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'y', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['y']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
                                <?php } ?>
                            </tbody>
                        </table>
                        <p>&nbsp; </p>
                        <?php if ($_smarty_tpl->tpl_vars['userGroupData']->value->hideproductcatid==0){?>
                        <div>
                            <!--h4><u>حساب تكلفة المنتج من المكونات</u></h4-->
                            <button type="button" class="btn btn-primary ft-nor"> التكلفة بسعر الشراء
                                <span class="badge wht-clo"><div id="productBuyPrice"><?php echo $_smarty_tpl->tpl_vars['productsData']->value->productBuyPrice;?>
</div></span></button>
                            &nbsp;
                            <button type="button" class="btn btn-primary ft-nor"> التكلفة باخر سعر شراء
                                <span class="badge wht-clo"><div id="lastbuyprice"><?php echo $_smarty_tpl->tpl_vars['productsData']->value->lastbuyprice;?>
</div></span></button>
                            &nbsp;
                            <button type="button" class="btn btn-primary ft-nor"> التكلفة باخر سعر شراء مع الخصم
                                <span class="badge wht-clo"><div id="lastbuyprice_withDiscount"><?php echo $_smarty_tpl->tpl_vars['productsData']->value->lastbuyprice_withDiscount;?>
</div></span></button>
                            &nbsp;
                            <button type="button" class="btn btn-primary ft-nor"> التكلفة بمتوسط سعر الشراء
                                <span class="badge wht-clo"><div id="meanbuyprice"><?php echo $_smarty_tpl->tpl_vars['productsData']->value->meanbuyprice;?>
</div></span></button>
                            &nbsp;
                            <button type="button" class="btn btn-primary ft-nor"> التكلفة بمتوسط سعر الشراء مع الخصم
                                <span class="badge wht-clo"><div id="meanbuyprice_withDiscount"><?php echo $_smarty_tpl->tpl_vars['productsData']->value->meanbuyprice_withDiscount;?>
</div></span></button>
                        </div>
                        <br/>
                        <?php }?>
                        <div class="clearfix"></div>
                    </div>
                </div>
            </td>
        </tr>
        <?php }?>
        <?php if ($_smarty_tpl->tpl_vars['productsData']->value->hasSizeAndColor==1){?>
        <input name="hasSizeAndColor" type="hidden" value="1">
        <tr>
            <td colspan="10"><!--------------------------------  adding units   ----------------------------->
                <div class="panel panel-default panel-m">
                    <div class="panel-heading">
                        <h3 class="panel-title">المقاسات والالوان</h3>
                        <input type="hidden" name="isCollective" id="isCollective" value="1"/>
                    </div>
                    <div class="panel-body">
                        <div class="row" id="quantity_div">
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>الباركود</th>
                                        <th>المقاس</th>
                                        <th>اللون</th>
                                    </tr>
                                </thead>
                                <tbody id="SizeColorTB">
                                    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                    <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['sizeColorStoreDetail']->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;
?>
                                    <tr>
                                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->parcode;?>
</td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->sizeName;?>
</td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->colorName;?>
</td>
                                    </tr>
                                    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable($_smarty_tpl->tpl_vars['i']->value+1, null, 0);?>
                                    <?php } ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </td>
        </tr>
        <?php }?>
    </table><?php }} ?>