<?php /* Smarty version Smarty-3.1.11, created on 2025-02-20 08:50:20
         compiled from "../views/default/storemovementview/addprocat.html" */ ?>
<?php /*%%SmartyHeaderCode:90481331367b6d0ac71e082-58380306%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '36823e96f39db38ae4679571d4747cf92968bbfc' => 
    array (
      0 => '../views/default/storemovementview/addprocat.html',
      1 => 1740000151,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '90481331367b6d0ac71e082-58380306',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'productData' => 0,
    'product' => 0,
    'path' => 0,
    'Programsettingdata' => 0,
    'nextId' => 0,
    'searchinonestore' => 0,
    'manyParcodesstoreidfrom' => 0,
    'store' => 0,
    'stores' => 0,
    'manyParcodes' => 0,
    'storeData' => 0,
    'drivers' => 0,
    'data' => 0,
    'storenegative' => 0,
    'catDataReport' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_67b6d0ac7aae07_10880998',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_67b6d0ac7aae07_10880998')) {function content_67b6d0ac7aae07_10880998($_smarty_tpl) {?>
<style>

</style>
<div id="addproduct" style="display:none"> <?php  $_smarty_tpl->tpl_vars['product'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['product']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['productData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['product']->key => $_smarty_tpl->tpl_vars['product']->value){
$_smarty_tpl->tpl_vars['product']->_loop = true;
?>
    <option value="<?php echo $_smarty_tpl->tpl_vars['product']->value->productid;?>
"><?php echo $_smarty_tpl->tpl_vars['product']->value->productName;?>
</option>
    <?php } ?> </div>
<div id="imageClose" style="display:none"> <img alt="" src="<?php echo $_smarty_tpl->tpl_vars['path']->value;?>
/images/close.png" /> </div>
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">المخازن</a></li>
            <li><a href="storemovementController.php?do=show">التحويل بين المخازن</a></li>
            <li class="active">اضافة تحويل</li>
        </ol>
        <h3>اضافة تحويل بين المخازن</h3>
        <hr/>
        <form class="form-horizontal " role="form" action="storemovementController.php?do=add" method="post" id="sellbillForm">
            <div class="row">
                <input type="hidden" name="searchvalue" id="searchvalue" value="<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->searchvalue;?>
"/>
                <!---onChange="loadStoreTo(this.value);"-->

                <div class="<?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->storeserial==0){?> hidden <?php }?>">
                    <label style="margin-right: -17;" class="col-lg-2 "> رقم ايصال التحويل</label> <span  style="margin-right: 23px;">
                        <input style="margin-bottom: 7px;"  class="positiveNo" type="text" name="operationnum" id="operationnum" value="<?php echo $_smarty_tpl->tpl_vars['nextId']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->operationnumEdit==1){?>readonly<?php }?>/></span>
                </div>
                <div id="opNoError" style="display:none;"></div>
                <!-- =================================================   -->
                <!--                <div class="form-group" style="display: none;">
                                    <label class="col-lg-2 control-label">الرقم التسلسلي</label>
                                    <div class="col-lg-3">
                                        <input type="text" disabled class="form-control wdt300" value="<?php echo $_smarty_tpl->tpl_vars['nextId']->value;?>
"/>
                                    </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"> <span id="spryselect1">
                        <input type="hidden" name="storeidfrom" id="storeidfrom"  value="<?php echo $_smarty_tpl->tpl_vars['manyParcodesstoreidfrom']->value;?>
">
                        <?php echo $_smarty_tpl->tpl_vars['store']->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 wdt300" name="storeidfrom" id="storeidfrom"  onChange="loadStoreTo(this.value);" >
                            <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['manyParcodes']->value==1&&$_smarty_tpl->tpl_vars['manyParcodesstoreidfrom']->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 storeTo">
                    <label class="col-lg-2 control-label">إلى المخزن</label>
                    <div class="col-lg-8">
                        <select class="select2 wdt300" name="storeidto" id="storeidto"  >
                            <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;
?>
                            <?php if ($_smarty_tpl->tpl_vars['manyParcodesstoreidfrom']->value!=$_smarty_tpl->tpl_vars['store']->value->storeId){?>
                            <option value="<?php echo $_smarty_tpl->tpl_vars['store']->value->storeId;?>
" ><?php echo $_smarty_tpl->tpl_vars['store']->value->storeName;?>
</option>
                            <?php }?>
                            <?php } ?>
                        </select>
                    </div>
                </div>





                <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->workerbetweenstores==0){?>
                <div class="form-group">
                    <label class="col-lg-2 control-label">السائق</label>
                    <div class="col-lg-8">
                        <select class="select2 wdt300 checkme" id="driver" name="driver">
                            <option value="-1"></option>
                            <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['drivers']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
?>
                            <option value="<?php echo $_smarty_tpl->tpl_vars['data']->value->userid;?>
"><?php echo $_smarty_tpl->tpl_vars['data']->value->employeename;?>
</option>
                            <?php } ?>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-2 control-label">مدة انجاز السائق بالساعة</label>
                    <div class="col-lg-8">
                        <input type="text" class="form-control positiveNo checkme" name="drivertimeout" id="drivertimeout" value="<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->drivertimeout;?>
">
                    </div>
                </div>
                <?php }?>
            </div>
            <!-- end of frist row-->
            <input name="storenegative" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['storenegative']->value;?>
" id="storenegative" />
            <input name="parcodesetting" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->parcode;?>
" id="parcodesetting" />


            <div class="row">
                <div class="row">
                    <hr/>
                    <div class="col-lg-6">
                        <h4>المنتجات</h4>
                    </div>
                    <div class="col-lg-6  hidden-print">
                        <button type="button" name="addpro" id="addpro2" class="btn btn-primary pull-left ft-nor"> اضافة جديد</button>
                    </div>
                </div>
                <!-- end of title row-->
                <div class="table-responsive">
                    <table class="table billtable table-bordered table-black " id="containerpros">
                        <thead>
                            <tr>
                                <th class="wdt120 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 }?>">الباركود</th>
                                <th class="wdt400">اسم المنتج</th>
                                <th  class="wdt200">الكمية الحالية</th>
                                <th  class="wdt200" >الكمية المحولة</th>
                                <th  class="wdt200 ck_expireDate <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->expiredate;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2==1){?>  hidden <?php }?>" >ت الصلاحية</th>
                                <th class="hidden-print">حذف</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td class=" check_tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->parcode;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3==1){?> hidden <?php }?>">
                                    <input type="text" name="parcode1" id="parcode1"  class="form-control parcode" value="" />
                                </td>
                                <td>
                                    <div style="display: inline">
                                        <select class="select2 productCat productCat1" style="width:40%;display: inline" data-level="0" data-itr ="1" name="product1" id="productCatId0_1" >
                                            <option value="-1">اختر تصنيف</option>
                                            <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['catDataReport']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
?>
                                            <option value="<?php echo $_smarty_tpl->tpl_vars['data']->value->productCatId;?>
"><?php echo $_smarty_tpl->tpl_vars['data']->value->productCatName;?>
</option>
                                            <?php } ?>
                                        </select>
                                    </div>
                                    <input type="hidden" id="level_1" data-itr ="1" name="level_1" value="0">
                                    <div id="manyParents_1"  data-itr ="1" style="display: inline">

                                    </div>
                                    <!--div id="productdiv1">
                                        <input type="hidden" id="product1" name="product1"  class="productchange wdt100" data-newR="0"  data-itr="1"  data-placeholder="اختر منتج"  tabindex="7" />
                                    </div-->
                                </td>
                                <td>
                                    <div id="quantity1">
                                        <input type="text" name="currentquantity1" id="currentquantity1"  class="form-control getprototal  positiveNo txt-nonraduis" value="0" tabindex="7" readonly />
                                    </div>
                                </td>
                                <td>
                                    <input  type="text" name="productamount1"  onkeyup="checkdata(1)" id="productamount1"  class="form-control getprototal  positiveNo txt-nonraduis" value="0" tabindex="7"   />
                                </td>

                                <!-- onkeyup="checkquantity(1);"-->
                                <td class="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->expiredate;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4==1){?>  hidden <?php }?>">
                                    <input type="hidden" name="proSerials1" id="proSerials1" data-itr="1" value="">
                                </td>
                                <td id="1" class="hidden-print">
                                    <button id="remove1" type="button" class="close flt-none removeicon removeproduct" aria-hidden="true">&times;</button>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>

            <!-- end of second row-->
            <input type="hidden" name="add_print" id="add_print" value="0"/>

            <input type="hidden" name="productitr" id="productitr" value="1"/>
            <div class="row  hidden-print" >
                <button type="button"  id="saveBtn" class="btn btn-primary">حفظ</button>
                <button type="button"  id="add_print_btn" class="btn btn-success">حفظ وطباعة</button>
            </div>
            <!-- end of fifth row-->

        </form>
    </div>
    <!-- end of container-->
</div>

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


<script type="text/javascript">
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {isRequired: false, invalidValue: "-1"});
</script>
<?php }} ?>