<?php /* Smarty version Smarty-3.1.11, created on 2024-07-16 15:17:46
         compiled from "..\views\default\storeview\show.html" */ ?>
<?php /*%%SmartyHeaderCode:8859669664eaacdca1-47757859%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '4b6d601f29e9abcc4da579dae2fd7b8b80684d7c' => 
    array (
      0 => '..\\views\\default\\storeview\\show.html',
      1 => 1672089200,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '8859669664eaacdca1-47757859',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'youtubes' => 0,
    'outputString' => 0,
    'storeData' => 0,
    'store' => 0,
    'i' => 0,
    'totalQuantity' => 0,
    'totalQuantityPrice' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_669664eac49348_25391370',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_669664eac49348_25391370')) {function content_669664eac49348_25391370($_smarty_tpl) {?><style>
    @media print{
        .table-black{
            border : 1px solid black;
        }
        td ,th {
            border: 1px solid #000 !important;
        }
    }
</style>



<div class="row">
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="#">المخازن</a></li>
            <li><a href="storeController.php?do=show">المخازن</a></li>
            <li class="active">عرض المخازن</li>
        </ol>



        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading" style="padding:5px 15px 15px">
                <h3 class="panel-title" style="display: inline-block;"> عرض المخازن</h3>
                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[104]->url;?>
" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>
                <a href="storeController.php" class="hidden-print"><input type="button"  id="submit" style="margin-left: 12px" class="btn btn-primary pull-left " value="إضافة جديد"/></a>
            </div>
            <div class="panel-body">


                <div id="outputString" class="alert alert-block alert-success fade in" style="display:none">
                    <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">&times;</button>

                    <p id="outputStringValue"><?php echo $_smarty_tpl->tpl_vars['outputString']->value;?>
</p>

                    <div class="clearfix"></div>
                </div>


            </div>

            <!-- Table -->
            
            <form method="post" action="storeController.php?do=executeOperation" onsubmit="if (Spry.Widget.Form.validate(this)) {
                        return countChoosenProducts('storeController');
                    } else {
                        return false;
                    }">
                
                <table class="table table-black">
                    <thead>
                        <tr>
                            <th class="noprint"><input type="checkbox" name="checkAll" id="checkAll"/></th>
                            <th>اسم المخزن</th>
                            <th>التاريخ</th>
                            <th>عدد القطع</th>
                            <th>اجمالى السعر</th>
                            <th class="noprint hidden-print"  style="display: none;">طباعه سريال المنتجات</th>
                            <th class="noprint hidden-print">تعديل</th>
                            <th class="noprint hidden-print">ايقاف</th>
                            <th class="noprint hidden-print">حذف</th>
                        </tr>
                    </thead>
                    <tbody>


                        <?php $_smarty_tpl->tpl_vars['totalQuantity'] = new Smarty_variable(0, null, 0);?>
                        <?php $_smarty_tpl->tpl_vars['totalQuantityPrice'] = new Smarty_variable(0, null, 0);?>
                        <?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 ob_start();?><?php echo $_smarty_tpl->tpl_vars['store']->value->conditions;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==1){?>
                        <tr class="danger">
                            <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['store']->value->conditions;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2==0){?>
                        <tr>
                            <?php }}?>




                            <td class="noprint hidden-print">
                                <input type="checkbox" name="choosedItem[]" id="checked<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" class="choosenItem" value="<?php echo $_smarty_tpl->tpl_vars['store']->value->storeId;?>
" />
                            </td>


                            <td><?php echo $_smarty_tpl->tpl_vars['store']->value->storeName;?>
</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['store']->value->storeDate;?>
</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['store']->value->totQty;?>
<?php $_smarty_tpl->tpl_vars['totalQuantity'] = new Smarty_variable($_smarty_tpl->tpl_vars['totalQuantity']->value+$_smarty_tpl->tpl_vars['store']->value->totQty, null, 0);?></td>
                            <td><?php echo $_smarty_tpl->tpl_vars['store']->value->totQtyPrice2;?>
<?php $_smarty_tpl->tpl_vars['totalQuantityPrice'] = new Smarty_variable($_smarty_tpl->tpl_vars['totalQuantityPrice']->value+$_smarty_tpl->tpl_vars['store']->value->totQtyPrice2, null, 0);?></td>
                            <td style="display: none;"> <a target="_new" href="productController.php?do=showbarcodestor&storid=<?php echo $_smarty_tpl->tpl_vars['store']->value->storeId;?>
" type="button" class="btn btn-default btn-lg printicon"></a></td>


                            <td class="noprint hidden-print">
                                <a href="storeController.php?do=edit&storeId=<?php echo $_smarty_tpl->tpl_vars['store']->value->storeId;?>
" type="button" class="btn btn-default btn-lg editicon"></a>
                            </td>


                            <td class="noprint hidden-print">

                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['store']->value->conditions;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3==1){?>
                                <a href="storeController.php?do=returndelete&storeId=<?php echo $_smarty_tpl->tpl_vars['store']->value->storeId;?>
" type="button" class="btn btn-default btn-lg correcticon"></a>

                                <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['store']->value->conditions;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4==0){?>

                                <a href="storeController.php?do=deletetemp&storeId=<?php echo $_smarty_tpl->tpl_vars['store']->value->storeId;?>
" type="button" class="btn btn-default btn-lg removeicon"></a>

                                <?php }}?>

                            </td>



                            <td class="hidden-print">

                                <a href="#" name="dd" type="button" class="btn btn-default btn-lg deleteicon conformdel1" data-position="storeController.php?do=delete&storeId=<?php echo $_smarty_tpl->tpl_vars['store']->value->storeId;?>
" ></a>


                            </td>



                        </tr>
                        <?php } ?>


                    </tbody>
                </table>

                <div class=" col-lg-4">
                    <div class="well well-sm">
                        <h4 class="text-center">اجمالى العدد : <?php echo $_smarty_tpl->tpl_vars['totalQuantity']->value;?>
</h4>
                    </div>
                </div>
                <div class=" col-lg-4">
                    <div class="well well-sm">
                        <h4 class="text-center">اجمالى السعر : <?php echo $_smarty_tpl->tpl_vars['totalQuantityPrice']->value;?>
</h4>
                    </div>
                </div>


                <div class="clearfix"></div>


                <hr />

                <div  class="noprint">
                    <div class="col-lg-12">
                        <div class="well well-sm">

                            <div class="form-group">
                                <div class="col-lg-4">
                                    <label for="operation"></label>
                                    <span id="spryselect1">
                                        <select name="operation" id="operation"  data-placeholder="اختر العملية" class="select2 wdt100">
                                            <option value="-1">اختر عملية</option>
                                            <option value="1">ايقاف</option>
                                            <option value="2">تشغيل </option>
                                            <option value="3">حذف </option>
                                        </select>
                                        <span class="selectInvalidMsg">*</span></span></div>
                            </div>

                            <div class="form-group">
                                <div class="col-lg-4">
                                    <input name=""  class="noprint btn btn-primary" type="submit" value="تنفيذ"/>
                                </div>
                            </div>

                            <div class="clearfix"></div>

                            <div id="noElementsError" class="alert alert-danger fade in" style="display:none;">
                                <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">×</button>
                                <p>يجب اختيار العناصر أولاً</p>
                                <div class="clearfix"></div>
                            </div>


                            <div class="clearfix"></div>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                </div>


            </form>

        </div>


        <!-- Modal -->
        <div class="modal fade hidden-print" id="myModal1" 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" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">
                            <label>تأكيد حذف المخزن</label>
                        </h4>
                    </div>
                    <div class="modal-body">
                        <label> هل تريد حذف هذه المخزن؟</label>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">لا</button>
                        <button type="button" class="btn btn-primary savemodel1">نعم</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->






    </div>

</div>




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

<?php }} ?>