<?php /* Smarty version Smarty-3.1.11, created on 2025-02-24 06:57:37
         compiled from "../views/default/settlementstoreview/add.html" */ ?>
<?php /*%%SmartyHeaderCode:134102691167bbfc412d3a91-26689498%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '7d540b7e143e240fb4e2d714183680d77b72042e' => 
    array (
      0 => '../views/default/settlementstoreview/add.html',
      1 => 1740000151,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '134102691167bbfc412d3a91-26689498',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'Programsettingdata' => 0,
    'storeData' => 0,
    'store' => 0,
    'searchinonestore' => 0,
    'storeid' => 0,
    'storedef' => 0,
    'stores' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_67bbfc41358cb9_13235386',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_67bbfc41358cb9_13235386')) {function content_67bbfc41358cb9_13235386($_smarty_tpl) {?>
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">المخازن</a></li>
            <li><a href="settlementstoreController.php?do=show">تسوية مخزن</a></li>
            <li class="active">اضافة تسوية مخزن</li>
        </ol>
        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title">اضافة تسوية مخزن</h3>
            </div>
            <div class="panel-body">
                <form id="settForm" class="form-horizontal" role="form" action="settlementstoreController.php?do=add" method="post">
                    <input type="hidden" name="searchvalue" id="searchvalue" value="<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->searchvalue;?>
"/>
<!--                     <div class="form-group">
                        <label for="storeid" class="col-lg-2 control-label">المخزن</label>
                        <div class="col-lg-4">
                            <select class="select2" style='width:357px' name="storeid" id="storeid" onChange="loadproduct();">
                                <option value="-1">اختر مخزن</option>
                                <?php  $_smarty_tpl->tpl_vars['store'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['store']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['storeData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['store']->key => $_smarty_tpl->tpl_vars['store']->value){
$_smarty_tpl->tpl_vars['store']->_loop = true;
?>
                                <option value="<?php echo $_smarty_tpl->tpl_vars['store']->value->storeId;?>
"><?php echo $_smarty_tpl->tpl_vars['store']->value->storeName;?>
</option>
                                <?php } ?>
                            </select>
                            <div id="storeError" style="display:none;"></div>

                        </div>
                    </div> -->


                    <?php if ($_smarty_tpl->tpl_vars['searchinonestore']->value!=0){?>
                    <div class="form-group">
                        <label class="col-lg-2 control-label">من المخزن</label>
                        <div class="col-lg-8"> 
                            <input type="hidden" name="storeid" id="storeid"  value="<?php echo $_smarty_tpl->tpl_vars['storeid']->value;?>
">
                           <?php echo $_smarty_tpl->tpl_vars['storedef']->value->storeName;?>

                        </div>
                    </div>
                    <?php }else{ ?>
                     <div class="form-group">
                        <label class="col-lg-2 control-label">من المخزن</label>
                        <div class="col-lg-8"> <span id="spryselect1">
                            <select class="select2" style='width:357px' name="storeid" id="storeid" onChange="loadproduct();">
                                <option value="-1">اختر مخزن</option>
                                <?php  $_smarty_tpl->tpl_vars['store'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['store']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['stores']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['store']->key => $_smarty_tpl->tpl_vars['store']->value){
$_smarty_tpl->tpl_vars['store']->_loop = true;
?>
                                <option value="<?php echo $_smarty_tpl->tpl_vars['store']->value->storeId;?>
" <?php if ($_smarty_tpl->tpl_vars['storeid']->value==$_smarty_tpl->tpl_vars['store']->value->storeId){?> selected="selected" <?php }?>><?php echo $_smarty_tpl->tpl_vars['store']->value->storeName;?>
</option>
                                <?php } ?>
                            </select>
                            <span class="selectInvalidMsg">*</span></span> 
                        </div>
                    </div>
                    <?php }?>



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

                    <div class="form-group">
                        <label for="productid" class="col-lg-2 control-label">المنتج</label>
                        <div class="col-lg-4">
                            <input type="hidden" class="select2product " style='width:357px'  name="productid" id="productid"  onChange="getproductCurrentQuantity();"  />
                            <div id="productError" style="display:none;"></div>
                        </div>
                    </div>

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

                    <div class="form-group">
                        <label for="storereporttype" class="col-lg-2 control-label">نوع العملية</label>
                        <div class=" col-lg-4">
                            <div class="radio-inline">
                                <label>
                                    <input type="radio" name="storereporttype" id="addvalue" value="0" onClick="addproductvalue();" checked>
                                    اضافة </label>
                            </div>
                            <div class="radio-inline">
                                <label>
                                    <input type="radio" name="storereporttype" id="discountvalue" value="1" onClick="discountproductvalue();">
                                    خصم </label>
                            </div>
                        </div>
                    </div>

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

                    <div class="form-group">
                        <label for="productbefore" class="col-lg-2 control-label">الكمية الحالية</label>
                        <div class="col-lg-4">
                            <div class="input-group">
                                <input type="text" name="productbefore" id="productbefore"  class="form-control" readonly="readonly" value="0"  style="width: 356px;"/>
                            </div>
                        </div>
                    </div>

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

                    <div class="form-group">
                        <label for="productquantity" class="col-lg-2 control-label">الكمية المتغيرة</label>
                        <div class="col-lg-4">
                            <div class="input-group">
                                <input type="text"  style="width: 356px;" name="productquantity" id="productquantity"  onKeyUp="checkproductquantity();"  class="form-control positivefloat" placeholder="الكمية المتغيرة"/>
                                <div id="quantityError" style="display:none;"></div>
                            </div>
                        </div>
                    </div>

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

                    <div class="form-group">
                        <label for="productafter" class="col-lg-2 control-label">الكمية بعد التغيير</label>
                        <div class="col-lg-4">
                            <div class="input-group">
                                <input type="text"  style="width: 356px;" name="productafter" id="productafter"  class="form-control" readonly="readonly" value="0" />
                            </div>
                        </div>
                    </div>

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

                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button type="button" id="saveSettBtn" class="btn btn-primary pull-left">حفظ الامر</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<?php }} ?>