<?php /* Smarty version Smarty-3.1.11, created on 2024-07-15 17:50:14
         compiled from "..\views\default\storemovementview\add.html" */ ?>
<?php /*%%SmartyHeaderCode:29973669545362ae289-93690171%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '68286af955e04a3014568d9af7d0b9a590cf6049' => 
    array (
      0 => '..\\views\\default\\storemovementview\\add.html',
      1 => 1698954398,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '29973669545362ae289-93690171',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'productData' => 0,
    'product' => 0,
    'path' => 0,
    'Programsettingdata' => 0,
    'nextId' => 0,
    'searchinonestore' => 0,
    'manyParcodesstoreidfrom' => 0,
    'store' => 0,
    'stores' => 0,
    'manyParcodes' => 0,
    'userDefStore' => 0,
    'storeData' => 0,
    'manyParcodesstoreidto' => 0,
    'usergroupdata' => 0,
    'drivers' => 0,
    'data' => 0,
    'whatPrice' => 0,
    'manyParcodeswhatPrice' => 0,
    'storenegative' => 0,
    'products_ordered' => 0,
    'i' => 0,
    'pro' => 0,
    'total_quantity' => 0,
    'total_Price' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_6695453659a5d9_79691877',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_6695453659a5d9_79691877')) {function content_6695453659a5d9_79691877($_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)||($_smarty_tpl->tpl_vars['manyParcodes']->value!=1&&$_smarty_tpl->tpl_vars['userDefStore']->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['manyParcodes']->value==1&&$_smarty_tpl->tpl_vars['manyParcodesstoreidfrom']->value!=$_smarty_tpl->tpl_vars['store']->value->storeId)||$_smarty_tpl->tpl_vars['userDefStore']->value!=$_smarty_tpl->tpl_vars['store']->value->storeId){?>
                            <option value="<?php echo $_smarty_tpl->tpl_vars['store']->value->storeId;?>
" <?php if ($_smarty_tpl->tpl_vars['manyParcodesstoreidto']->value==$_smarty_tpl->tpl_vars['store']->value->storeId){?>
                                selected="selected" <?php }?>><?php echo $_smarty_tpl->tpl_vars['store']->value->storeName;?>
</option>
                            <?php }?>



                            <?php } ?>
                            
                        </select>
                    </div>
                </div>
                <div class="form-group <?php if ($_smarty_tpl->tpl_vars['usergroupdata']->value->storeSupervisorShow==0){?> hidden <?php }?>">
                    <label class="col-lg-2 control-label">التحويل </label>
                    <div class="col-lg-8">
                        <div class="radio-inline">
                            <label>
                                <input value="0" class="radioR" name="recieveType" type="radio" <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->storeRecieveType==0){?>checked="checked"<?php }?>>
                                مباشر </label>
                        </div>
                        <div class="radio-inline">
                            <label>
                                <input value="1" class="radioR" name="recieveType" type="radio" <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->storeRecieveType==1){?>checked="checked"<?php }?>>
                                عن طريق مخزن وسيط </label>
                        </div>
                    </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 class="form-group">
                    <?php echo $_smarty_tpl->tpl_vars['whatPrice']->value;?>

                    <label class="col-lg-2 control-label">اظهر سعر </label>
                    <div class="col-lg-8">
                        <div class="radio-inline">
                            <label>
                                <input value="hide" class="radioR whatPrice" name="whatPrice" id="whatPrice0"
                                    type="radio" <?php if ($_smarty_tpl->tpl_vars['manyParcodes']->value==1&&$_smarty_tpl->tpl_vars['manyParcodeswhatPrice']->value=="hide"){?>
                                    checked="checked" <?php }elseif($_smarty_tpl->tpl_vars['manyParcodes']->value!=1){?> checked="checked" <?php }?>>
                                بدون </label>
                        </div>
                        <?php if ($_smarty_tpl->tpl_vars['usergroupdata']->value->showBuyPrice==0){?>
                        <div class="radio-inline">
                            <label>
                                <input value="productBuyPrice" class="radioR whatPrice" name="whatPrice" id="whatPrice1"
                                    type="radio" <?php if ($_smarty_tpl->tpl_vars['manyParcodes']->value==1&&$_smarty_tpl->tpl_vars['manyParcodeswhatPrice']->value=="productBuyPrice"){?>
                                    checked="checked" <?php }?>>
                                الشراء </label>
                        </div>
                        <?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['usergroupdata']->value->showSellAllPrice==0){?>
                        <div class="radio-inline">
                            <label>
                                <input value="productSellAllPrice" class="radioR whatPrice" name="whatPrice"
                                    id="whatPrice2" type="radio" <?php if ($_smarty_tpl->tpl_vars['manyParcodes']->value==1&&$_smarty_tpl->tpl_vars['manyParcodeswhatPrice']->value=="productSellAllPrice"){?> checked="checked" <?php }?>>
                                جملة </label>
                        </div>
                        <?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['usergroupdata']->value->showSellHalfPrice==0){?>
                        <div class="radio-inline">
                            <label>
                                <input value="productSellHalfPrice" class="radioR whatPrice" name="whatPrice"
                                    id="whatPrice3" type="radio" <?php if ($_smarty_tpl->tpl_vars['manyParcodes']->value==1&&$_smarty_tpl->tpl_vars['manyParcodeswhatPrice']->value=="productSellHalfPrice"){?> checked="checked" <?php }?>>
                                نص جملة </label>
                        </div>
                        <?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['usergroupdata']->value->showSellUnitPrice==0){?>
                        <div class="radio-inline">
                            <label>
                                <input value="productSellUnitPrice" class="radioR whatPrice" name="whatPrice"
                                    id="whatPrice4" type="radio" <?php if ($_smarty_tpl->tpl_vars['manyParcodes']->value==1&&$_smarty_tpl->tpl_vars['manyParcodeswhatPrice']->value=="productSellUnitPrice"){?> checked="checked" <?php }?>>
                                قطاعى </label>
                        </div>
                        <?php }?>

                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-lg-2 control-label">تعليق</label>
                    <div class="col-lg-4">
                        <textarea name="comment" id="comment" rows="3" class="form-control"></textarea>
                    </div>
                </div>
            </div>
            <!-- end of frist row-->
            <input name="storenegative" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['storenegative']->value;?>
" id="storenegative" />
            <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="addpro" class="btn btn-primary pull-left ft-nor"> اضافة
                            جديد</button>
                        <?php if ($_smarty_tpl->tpl_vars['manyParcodes']->value!=1){?>
                        <button type="button" name="addManyParcodes" id="addManyParcodes"
                            class="btn btn-success pull-left ft-nor" style="margin-left:3px;"> اضافة بالباركود
                            المجمع</button>
                        <?php }?>
                    </div>
                </div>
                <!-- end of title row-->
                <div class="table-responsive">
                    <table class="table billtable table-bordered table-black " id="containerpros">
                        <thead>
                            <tr>
                                <th class="wdt200">رقم</th>
                                <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 pricesClass" <?php if (($_smarty_tpl->tpl_vars['manyParcodes']->value==1&&$_smarty_tpl->tpl_vars['manyParcodeswhatPrice']->value=="hide")||$_smarty_tpl->tpl_vars['manyParcodes']->value!=1){?>style="display:none" <?php }?>>السعر</th>
                                <th class="wdt200 pricesClass" <?php if (($_smarty_tpl->tpl_vars['manyParcodes']->value==1&&$_smarty_tpl->tpl_vars['manyParcodeswhatPrice']->value=="hide")||$_smarty_tpl->tpl_vars['manyParcodes']->value!=1){?>style="display:none" <?php }?>>السعر الاجمالي</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="wdt200 ck_comment">تعليق</th>
                                <th class="hidden-print">حذف</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php if ($_smarty_tpl->tpl_vars['manyParcodes']->value==1&&$_smarty_tpl->tpl_vars['products_ordered']->value){?>

                            <?php $_smarty_tpl->tpl_vars['total_quantity'] = new Smarty_variable(0, null, 0);?>
                            <?php $_smarty_tpl->tpl_vars['total_Price'] = new Smarty_variable(0, null, 0);?>
                            <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                            <?php  $_smarty_tpl->tpl_vars['pro'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['pro']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['products_ordered']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['pro']->key => $_smarty_tpl->tpl_vars['pro']->value){
$_smarty_tpl->tpl_vars['pro']->_loop = true;
?>
                            <tr>
                                <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                <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="parcode<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="parcode<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" class="form-control parcode"
                                        value="<?php echo $_smarty_tpl->tpl_vars['pro']->value->parcode;?>
" />
                                </td>
                                <td>
                                    <div id="myproductselect">
                                        <input type="hidden" class="select2product wdt400 myproduct" data-itr="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"
                                            name="product<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="product<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" data-placeholder="اختر منتج" />
                                        <input type="hidden" name="oldproductname<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="oldproductname<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"
                                            value="<?php echo $_smarty_tpl->tpl_vars['pro']->value->productName;?>
" />
                                        <input type="hidden" name="oldproductid<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="oldproductid<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"
                                            value="<?php echo $_smarty_tpl->tpl_vars['pro']->value->productId;?>
" />
                                    </div>
                                    <!--
                                        <select class="select2 wdt100" id="productid1" name="productid1" tabindex="7" onchange="getProductQuantity(this.value,1);" onblur="anotherProduct(this.value,1);" >


                                       </select>
                                    -->

                                </td>
                                <td>
                                    <div id="quantity1">
                                        <input type="text" name="currentquantity<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="currentquantity<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"
                                            class="form-control getprototal  positiveNo txt-nonraduis"
                                            value="<?php echo $_smarty_tpl->tpl_vars['pro']->value->currentQuantity;?>
" tabindex="7" readonly />
                                    </div>
                                </td>
                                <td>
                                    <input type="text" name="productamount<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" onkeyup="checkdata(<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
)"
                                        id="productamount<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"
                                        class="form-control getprototal  positivefloat txt-nonraduis"
                                        value="<?php echo $_smarty_tpl->tpl_vars['pro']->value->quantityMovement;?>
" tabindex="7" />
                                </td>
                                <td class="pricesClass" <?php if (($_smarty_tpl->tpl_vars['manyParcodes']->value==1&&$_smarty_tpl->tpl_vars['manyParcodeswhatPrice']->value=="hide")||$_smarty_tpl->tpl_vars['manyParcodes']->value!=1){?>style="display:none" <?php }?>>
                                    <input type="text" name="pricePro<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="pricePro<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"
                                        class="form-control txt-nonraduis" value="<?php echo $_smarty_tpl->tpl_vars['pro']->value->choosenPrice;?>
" tabindex="7"
                                        readonly />
                                </td>
                                <td class="pricesClass" <?php if (($_smarty_tpl->tpl_vars['manyParcodes']->value==1&&$_smarty_tpl->tpl_vars['manyParcodeswhatPrice']->value=="hide")||$_smarty_tpl->tpl_vars['manyParcodes']->value!=1){?>style="display:none" <?php }?>>
                                    <input type="text" name="price<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="price<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"
                                        class="form-control txt-nonraduis getPriceTotal" value="<?php echo $_smarty_tpl->tpl_vars['pro']->value->choosenPrice;?>
"
                                        tabindex="7" readonly />
                                    <input type="hidden" name="productBuyPrice<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="productBuyPrice<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"
                                        value="<?php echo $_smarty_tpl->tpl_vars['pro']->value->productBuyPrice;?>
" />
                                    <input type="hidden" name="productSellAllPrice<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="productSellAllPrice<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"
                                        value="<?php echo $_smarty_tpl->tpl_vars['pro']->value->productSellAllPrice;?>
" />
                                    <input type="hidden" name="productSellHalfPrice<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="productSellHalfPrice<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"
                                        value="<?php echo $_smarty_tpl->tpl_vars['pro']->value->productSellHalfPrice;?>
" />
                                    <input type="hidden" name="productSellUnitPrice<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="productSellUnitPrice<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"
                                        value="<?php echo $_smarty_tpl->tpl_vars['pro']->value->productSellUnitPrice;?>
" />
                                </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="proSerials<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="proSerials<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" data-itr="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"
                                        value="">
                                </td>
                                <td class="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->expiredate;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==1){?>  hidden <?php }?>">
                                    <input type="hidden" name="proSerials<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="proSerials<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" data-itr="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"
                                        value="">
                                </td>
                                <td>
                                    <textarea name="comment<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="comment<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" class="form-control"
                                        style="height: 25px;"><?php echo $_smarty_tpl->tpl_vars['pro']->value->productDescription;?>
</textarea>
                                </td>
                                <td id="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" class="hidden-print">
                                    <button id="remove<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" type="button"
                                        class="close flt-none removeicon removeproduct"
                                        aria-hidden="true">&times;</button>
                                </td>
                            </tr>
                            <?php $_smarty_tpl->tpl_vars['total_quantity'] = new Smarty_variable($_smarty_tpl->tpl_vars['total_quantity']->value+$_smarty_tpl->tpl_vars['pro']->value->quantityMovement, null, 0);?>
                            <?php $_smarty_tpl->tpl_vars['total_Price'] = new Smarty_variable($_smarty_tpl->tpl_vars['total_Price']->value+$_smarty_tpl->tpl_vars['pro']->value->choosenPrice, null, 0);?>
                            <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable($_smarty_tpl->tpl_vars['i']->value+1, null, 0);?>
                            <?php } ?>

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

                            <?php }else{ ?>


                            <tr>
                                <td>1</td>
                                <td class=" check_tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->parcode;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6==1){?> hidden <?php }?>">
                                    <input type="text" name="parcode1" id="parcode1" class="form-control parcode"
                                        value="" />
                                </td>
                                <td>
                                    <div id="myproductselect">
                                        <input type="hidden" class="select2product wdt400 myproduct" data-itr="1"
                                            name="product1" id="product1" data-placeholder="اختر منتج" />
                                    </div>
                                    <!--
                                    <select class="select2 wdt100" id="productid1" name="productid1" tabindex="7" onchange="getProductQuantity(this.value,1);" onblur="anotherProduct(this.value,1);" >


                                   </select>
                                -->

                                </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  positivefloat txt-nonraduis" value="0"
                                        tabindex="7" />
                                </td>
                                <td class="pricesClass" style="display:none">
                                    <input type="text" name="pricePro1" id="pricePro1"
                                        class="form-control txt-nonraduis" value="0" tabindex="7" readonly />
                                </td>
                                <td class="pricesClass" style="display:none">
                                    <input type="text" name="price1" id="price1"
                                        class="form-control txt-nonraduis getPriceTotal" value="0" tabindex="7"
                                        readonly />
                                    <input type="hidden" name="productBuyPrice1" id="productBuyPrice1" value="0" />
                                    <input type="hidden" name="productSellAllPrice1" id="productSellAllPrice1"
                                        value="0" />
                                    <input type="hidden" name="productSellHalfPrice1" id="productSellHalfPrice1"
                                        value="0" />
                                    <input type="hidden" name="productSellUnitPrice1" id="productSellUnitPrice1"
                                        value="0" />
                                </td>

                                <!-- onkeyup="checkquantity(1);"-->
                                <td class="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->expiredate;?>
<?php $_tmp7=ob_get_clean();?><?php if ($_tmp7==1){?>  hidden <?php }?>">
                                    <input type="hidden" name="proSerials1" id="proSerials1" data-itr="1" value="">
                                </td>
                                <td>
                                    <textarea name="comment1" id="comment1" class="form-control"
                                        style="height: 25px;"></textarea>
                                </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>
                            <input type="hidden" name="productitr" id="productitr" value="1" />
                            <?php }?>

                        </tbody>
                    </table>
                    <button type="button" class="btn btn-primary pull-left ft-nor">
                        اجمالى الكمية المحولة <span class="badge wht-clo">
                            <div id="totalQuantityMove"><?php if ($_smarty_tpl->tpl_vars['manyParcodes']->value==1){?><?php echo $_smarty_tpl->tpl_vars['total_quantity']->value;?>
<?php }else{ ?>0<?php }?></div>
                        </span>
                    </button>
                    <button type="button" class="btn btn-primary pull-left ft-nor pricesClass" <?php if (($_smarty_tpl->tpl_vars['manyParcodes']->value==1&&$_smarty_tpl->tpl_vars['manyParcodeswhatPrice']->value=="hide")||$_smarty_tpl->tpl_vars['manyParcodes']->value!=1){?>style="display:none;margin-left: 3px;" <?php }else{ ?>style="margin-left: 3px;"
                        <?php }?>>
                        اجمالى السعر<span class="badge wht-clo">
                            <div id="totalQuantityMovePrice"><?php if ($_smarty_tpl->tpl_vars['manyParcodes']->value==1){?><?php echo $_smarty_tpl->tpl_vars['total_Price']->value;?>
<?php }else{ ?>0<?php }?></div>
                        </span>
                    </button>
                </div>
            </div>

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

            <br />
            <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>
                <button type="button" id="add_print_btn2" class="btn btn-success">حفظ وطباعة </button>
                <button type="button" id="saveBtn_allStoreProducts" class="btn btn-danger" style="float: left">تحويل
                    جميع منتجات المخزن</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;?>
" />
<input type="hidden" name="showStoreToDetail" id="showStoreToDetail" value="<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->showStoreToDetail;?>
" />



<!------------------------Client Model----------------------------->
<!-- Modal -->
<div class="modal fade" id="myModalManyParcodes" 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 savemodel2" data-dismiss="modal"
                    aria-hidden="true">&times;</button>
                <h4 class="modal-title">اضافة منتجات بالباركود المجمع</h4>
            </div>
            <div class="modal-body">
                <form id="manyParcodesForm" action="storemovementController.php?do=addManyParcodes" method="post"
                    class="form-horizontal">
                    <div class="form-group">
                        <label for="debtLimit" class="col-lg-3 control-label">الباركودات مجمعة</label>
                        <div class="col-lg-9">
                            <textarea name="manyParcodes" class="form-control" style="background: url(http://i.imgur.com/2cOaJ.png);
                                      background-attachment: local;
                                      background-repeat: no-repeat;
                                      padding-left: 35px;
                                      padding-top: 10px;
                                      text-align: left !important;
                                      border-color:#ccc;
                                      direction: ltr;" id="manyParcodes" rows="5"></textarea>

                        </div>
                        <div id='hazemc'>1</div>
                    </div>
                    <input type="hidden" name="manyParcodesstoreidfrom" id="manyParcodesstoreidfrom" value="" />
                    <input type="hidden" name="manyParcodesstoreidto" id="manyParcodesstoreidto" value="" />
                    <input type="hidden" name="manyParcodeswhatPrice" id="manyParcodeswhatPrice" value="" />
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default savemodel2" data-dismiss="modal">الغاء</button>
                <button type="button" class="btn btn-primary" id="doAddManyParcodes">تم</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->



<!------------------------Client Model----------------------------->
<!-- Modal -->
<div class="modal fade" id="storeDescriptionMoal" 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 savemodel2" data-dismiss="modal"
                    aria-hidden="true">&times;</button>
                <h4 class="modal-title"> مخزن الى</h4>
            </div>
            <div class="modal-body">
                <form id="manyParcodesForm" action="" method="post" class="form-horizontal">
                    <div class="form-group">
                        <label for="debtLimit" class="col-lg-3 control-label">وصف المخزن</label>
                        <div class="col-lg-9">
                            <textarea class="form-control" rows="5" id="storeDescriptionMoalText" readonly></textarea>

                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default savemodel2" data-dismiss="modal">اغلاق</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->


<script type="text/javascript">
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", { isRequired: false, invalidValue: "-1" });
    $(document).on('click', "#addManyParcodes", function () {
        if ($('#storeidfrom').val() == "-1" || $('#storeidto').val() == "-1") {
            alert('اختر المخازن اولا');
        } else {
            $('#myModalManyParcodes').modal('show');
            setTimeout(function () {
                $('#manyParcodes').focus();
            }, 800);
        }
    });
    $(document).on('click', "#doAddManyParcodes", function () {
        if ($('#manyParcodes').val() != '') {
            $('#manyParcodesstoreidfrom').val($('#storeidfrom').val());
            $('#manyParcodesstoreidto').val($('#storeidto').val());
            $('#manyParcodeswhatPrice').val($("input[name=whatPrice]:checked").val());
            $('#manyParcodesForm').submit();
        } else {
            alert('عفوا لم تدخل اى باركود');
        }

    });
    $(document).on('change', "#storeidto", function () {
        var showStoreToDetail = $('#showStoreToDetail').val();
        if (Number($(this).val()) > 0 && showStoreToDetail == 1) {
            $('#storeDescriptionMoalText').html($("#storeidto option:selected").data('description'));
            $('#storeDescriptionMoal').modal('show');
        }
    });
</script>
<?php }} ?>