<?php /* Smarty version Smarty-3.1.11, created on 2025-02-11 20:57:58
         compiled from "../views/default/buyBillview/updateProPrices.html" */ ?>
<?php /*%%SmartyHeaderCode:128192894667ab9db6b5cdc0-21712468%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'd8768c8d20b194506bd476bd2483a84286df5ab0' => 
    array (
      0 => '../views/default/buyBillview/updateProPrices.html',
      1 => 1672089198,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '128192894667ab9db6b5cdc0-21712468',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'Programsettingdata' => 0,
    'newBuyPrice' => 0,
    'productsData' => 0,
    'productUnitsData' => 0,
    'j' => 0,
    'unitsData' => 0,
    'unit' => 0,
    'proUnit' => 0,
    'countProductUnits' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_67ab9db6c2e238_09386383',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_67ab9db6c2e238_09386383')) {function content_67ab9db6c2e238_09386383($_smarty_tpl) {?><input type="hidden" id="changeBuyPriceChangeSellInProductCtrl" value="<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->changeBuyPriceChangeSellInProductCtrl;?>
"/>
<input type="hidden" id="newBuyPrice" value="<?php echo $_smarty_tpl->tpl_vars['newBuyPrice']->value;?>
"/>
<input type="hidden" name="productIdForPrices" id="productIdForPrices" value="<?php echo $_smarty_tpl->tpl_vars['productsData']->value->productId;?>
"/>
<table id="product_Table"  class="table table-black">
    <tr>
        <td colspan="2">الإسم</td>

        <td >سعر الشراء القديم</td>
        <td >سعر الشراء الجدبد</td>
        <td  class="hidden">سعر الشراء الفعلى</td>
        <td>سعر الجمله</td>
        <td >سعر  نصف الجمله </td>
        <td>سعر التجزئة</td>
    </tr>
    <tr>
        <td  colspan="2"><textarea disabled name="productName1" id="productName1" class="form-control" rows="2"><?php echo $_smarty_tpl->tpl_vars['productsData']->value->productName;?>
</textarea></td>
        <td><input data-id="1" name="oldproductBuyPrice1" disabled type="text" id="oldproductBuyPrice1" class="form-control wd50 aw_m aw_mt aw_pp numberclic"  value="<?php echo $_smarty_tpl->tpl_vars['productsData']->value->productBuyPrice;?>
" /></td>
        <td><span id="sprytextfield1">
                <input name="productBuyPrice1" data-id="1" type="text" id="productBuyPrice1" class="form-control newBuyPrice wd50 aw_m aw_mt aw_pp numberclic buy_price numberinput"  value="<?php echo $_smarty_tpl->tpl_vars['productsData']->value->productBuyPrice;?>
" />
                <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">أدخل رقم</span></span></td>
        <td class="hidden"><span id="sprytextfield1">
                <input style="width: 50%;float: left;" name="productbuypricereal1" value="<?php echo $_smarty_tpl->tpl_vars['productsData']->value->productbuypricereal;?>
" type="text" id="buypricereal1"  data-type="pricereal"  class="form-control prices  aw_m aw_mt aw_pp numberclic  numberinput positivefloat buy_pricereal1" data-id="1" width="10"/></span>
            <input style="  width: 50%;"  name="buypricereal_precentage1"  value="<?php echo $_smarty_tpl->tpl_vars['productsData']->value->buypricereal_precentage;?>
" type="text" id="productBuyPrice1" data-type="pricereal"  class="form-control precentages  aw_m aw_mt aw_pp numberclic  numberinput positivefloat buypricereal_precentage1" data-id="1" width="10" />

            <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">أدخل رقم</span></span></td>
        <td><span id="sprytextfield2">
                <input name="productSellAllPrice1" type="text" id="productSellAllPrice" data-type="buytotal"  class="form-control prices aw_m aw_mt aw_pp numberclic positivefloat buy_total1 numberinput" value="<?php echo $_smarty_tpl->tpl_vars['productsData']->value->productSellAllPrice;?>
" data-id="1" width="10"/>
                <input name="buytotal_precentage1" type="text"  value="<?php echo $_smarty_tpl->tpl_vars['productsData']->value->buytotal_precentage;?>
" id="productBuyPrice1"   data-type="buytotal" class="form-control hidden aw_m aw_mt aw_pp numberclic precentages numberinput positivefloat buytotal_precentage1" data-id="1" width="10"/>
                <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">أدخل رقم</span></span></td>
        <td><span id="sprytextfield3">
                <input  name="productSellHalfPrice1" type="text" data-type="buyhalf" id="productSellHalfPrice" value="<?php echo $_smarty_tpl->tpl_vars['productsData']->value->productSellHalfPrice;?>
"   class="form-control  aw_m aw_mt aw_pp numberclic prices numberinput positivefloat buy_hafe1" data-id="1" width="10"/>
                <input  name="buyhalf_precentage1" type="text" id="productBuyPrice1"  value="<?php echo $_smarty_tpl->tpl_vars['productsData']->value->buyhalf_precentage;?>
"   data-type="buyhalf" class="form-control hidden aw_m aw_mt aw_pp numberclic  precentages numberinput positivefloat buyhafe_precentage1" data-id="1" width="10"/>

                <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">أدخل رقم</span></span></td>
        <td><span id="sprytextfield4">
                <input  name="productSellUnitPrice1" type="text" data-type="buypart"  id="productSellUnitPrice"  class="form-control  aw_m aw_mt aw_pp numberclic prices enteraction numberinput positivefloat buy_part1"   value="<?php echo $_smarty_tpl->tpl_vars['productsData']->value->productSellUnitPrice;?>
" data-id="1"  width="20"/>
                <input  name="buypart_precentage1" type="text" id="productBuyPrice1" data-type="buypart"   value="<?php echo $_smarty_tpl->tpl_vars['productsData']->value->buypart_precentage;?>
"    class="form-control hidden aw_m aw_mt aw_pp numberclic enteraction precentages numberinput positivefloat buypart_precentage1" data-id="1" width="10"/>
                <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">أدخل رقم</span></span></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 $_tmp1=ob_get_clean();?><?php if ($_tmp1==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>
                                    <!--<select name="productunit1_disabled<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" id="productunit1_disabled<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" disabled="disabled" data-placeholder="اختر" class="select2 wdt100 aw_m1 chosenproduct"  tabindex="12">-->
                                    <!--<option value="-1">اختر وحدة القياس</option>-->
                                    <?php  $_smarty_tpl->tpl_vars['unit'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['unit']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['unitsData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['unit']->key => $_smarty_tpl->tpl_vars['unit']->value){
$_smarty_tpl->tpl_vars['unit']->_loop = true;
?>
                                    <!--<option value="<?php echo $_smarty_tpl->tpl_vars['unit']->value->unitId;?>
" <?php if ($_smarty_tpl->tpl_vars['proUnit']->value->unitid==$_smarty_tpl->tpl_vars['unit']->value->unitId){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['unit']->value->unitName;?>
</option>-->
                                    <?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 } ?>
                                    <!--</select>-->
                                    <input name="productunit1<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" id="productunit1<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['proUnit']->value->unitid;?>
" />
                                    <input name="productunitid<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" id="productunitid<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['proUnit']->value->productunitid;?>
" />
                                </div>
                            </td>
                            <td>
                                <div>
                                    <label class="control-label">عدد الوحدات</label>
                                    <input name="productnumber1<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" readonly="readonly"  id="productnumber1<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" type="text" value="<?php echo $_smarty_tpl->tpl_vars['proUnit']->value->productnumber;?>
" class="form-control"/>
                                </div>
                            </td>
                            <td>
                                <div>
                                    <label class="control-label">الباركود</label>
                                    <input disabled name="proUnitParcode1<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" id="proUnitParcode1<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" type="text" class="form-control numberinput positiveNo" value="<?php echo $_smarty_tpl->tpl_vars['proUnit']->value->proUnitParcode;?>
" data-unit-itr="1<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" data-unitid-itr="<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" onblur="checkUnitbarcodewithid(this.value, $(this).data('unitid-itr'), $(this).data('unit-itr'));"/>
                                </div>
                            </td>
                            <td>
                                <div>
                                    <label class="control-label">سعر الشراء</label>
                                    <input name="proUnitBuyPrice1<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" id="proUnitBuyPrice1<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" type="text" class="form-control positivefloat" value="<?php echo $_smarty_tpl->tpl_vars['proUnit']->value->proUnitBuyPrice;?>
"/>
                                </div>
                            </td>
                            <td>
                                <div>
                                    <label class="control-label">سعر الجملة</label>
                                    <input name="proUnitSellAllPrice1<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" id="proUnitSellAllPrice1<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" type="text" class="form-control positivefloat" value="<?php echo $_smarty_tpl->tpl_vars['proUnit']->value->proUnitSellAllPrice;?>
"/>
                                </div>
                            </td>
                            <td>
                                <div>
                                    <label class="control-label">سعر نص جملة</label>
                                    <input name="proUnitSellHalfPrice1<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" id="proUnitSellHalfPrice1<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" type="text" class="form-control positivefloat" value="<?php echo $_smarty_tpl->tpl_vars['proUnit']->value->proUnitSellHalfPrice;?>
"/>
                                </div>
                            </td>
                            <td>
                                <div>
                                    <label class="control-label">سعر قطاعى</label>
                                    <input name="proUnitSellUnitPrice1<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" id="proUnitSellUnitPrice1<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
" type="text" class="form-control positivefloat" value="<?php echo $_smarty_tpl->tpl_vars['proUnit']->value->proUnitSellUnitPrice;?>
"/>
                                </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>
            <input name="unitsItr1" id="unitsItr1" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['countProductUnits']->value;?>
" />

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

            <input name="productItr" id="productItr" type="hidden" value="1" />
        </td>
    </tr>
</table>

<script>
    //$('#productBuyPrice1').val($('#newBuyPrice').val()).keyup();
    $('.newBuyPrice').val($('#newBuyPrice').val());
</script><?php }} ?>