<?php /* Smarty version Smarty-3.1.11, created on 2025-02-20 15:18:33
         compiled from "../views/default/profitproductview/productmovment.html" */ ?>
<?php /*%%SmartyHeaderCode:145808236467b72ba9ae7fe5-09986352%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '45dc4d479607d87c77f34109448950dce6d92af1' => 
    array (
      0 => '../views/default/profitproductview/productmovment.html',
      1 => 1740000155,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '145808236467b72ba9ae7fe5-09986352',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'message' => 0,
    'youtubes' => 0,
    'Programsettingdata' => 0,
    'allstor' => 0,
    'myallstor' => 0,
    'productData' => 0,
    'x' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_67b72ba9b7bf53_77611867',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_67b72ba9b7bf53_77611867')) {function content_67b72ba9b7bf53_77611867($_smarty_tpl) {?><style>
    .myresult {
        -webkit-print-color-adjust: exact;
    }
</style>

<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">التقارير</a></li>
            <li><a href="productmovmentController.php?do=show">تقرير حركه منتج</a></li>
            <li class="active">عرض التقرير</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <?php if ($_smarty_tpl->tpl_vars['message']->value!=''){?>
            <div class="panel-heading"><?php echo $_smarty_tpl->tpl_vars['message']->value;?>

                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[70]->url;?>
" target="_blank" class="hidden-print">
                    <img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>

            </div>
            <?php }else{ ?>
            <div class="panel-heading">تقرير حركه منتج

                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[70]->url;?>
" target="_blank" class="hidden-print">
                    <img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>
            </div>
            <?php }?>
            <div class="panel-body">
                <form class="form-inline hidden-print" action="productmovmentController.php?do=show" method="post">

                    <input type="hidden" name="searchvalue" id="searchvalue" value="<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->searchvalue;?>
"/>
                    <div class="form-group">
                        <label class="sr-only">المنتج</label>

                        <input type="hidden" class="select2product wdt300"  name="productId" id="productId" data-placeholder="اختر منتج"  />


                    </div>



                    <br/>
                    <div class="form-group">
                        <label class="sr-only">من التاريخ</label>
                        <input type="text" class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd" name="from" >
                    </div>
                    <div class="form-group">
                        <label class="sr-only">إلى التاريخ</label>
                        <input type="text" class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd" name="to" >
                    </div>
                    <button type="submit" class="btn btn-primary">بحث</button>
                </form>
            </div>
            <hr/>
            <?php $_smarty_tpl->tpl_vars['x'] = new Smarty_variable(1, null, 0);?>
            <?php  $_smarty_tpl->tpl_vars['myallstor'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['myallstor']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allstor']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['myallstor']->key => $_smarty_tpl->tpl_vars['myallstor']->value){
$_smarty_tpl->tpl_vars['myallstor']->_loop = true;
?>

            <table class="table table-black">
                <thead>
                    <tr><th colspan="5" style="text-align:center;background:#CCCCCC ;"><?php echo $_smarty_tpl->tpl_vars['myallstor']->value->storeName;?>
</th></tr>
                    <tr>
                        <th>اسم المنتج</th>

                        <th>رصيد اول مده</th>
                        <th>المبيعات</th>
                        <th>المشتريات</th>



                        <th>رصيد اخر مده</th>

                    </tr>
                </thead>
                    <tr>
                        <td><?php echo $_smarty_tpl->tpl_vars['productData']->value->productName;?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['productafter'.($_smarty_tpl->tpl_vars['x']->value)]->value;?>
</td>
                        <td>
                            <table class="table-black">
                                <tr>
                                    <td>مبيعات</td>
                                    <td>مردودات  المبيعات</td>
                                </tr>
                                <tr>
                                    <td style="text-align:center"><?php echo $_smarty_tpl->tpl_vars['totalsell'.($_smarty_tpl->tpl_vars['x']->value)]->value;?>
</td>
                                    <td style="text-align:center"><?php echo $_smarty_tpl->tpl_vars['totalreturnsell'.($_smarty_tpl->tpl_vars['x']->value)]->value;?>
</td>
                                </tr>
                                <tr>
                                    <td  colspan="2" style="text-align:center"> المجموع</td>

                                </tr>
                                <tr>
                                    <td colspan="2" style="text-align:center">  <?php echo $_smarty_tpl->tpl_vars['selldif'.($_smarty_tpl->tpl_vars['x']->value)]->value;?>
</td>

                                </tr>

                            </table>
                        </td>
                        <td>
                            <table class="table-black">
                                <tr>
                                    <td>المشتريات</td>
                                    <td>مردودات  المشتريات</td>
                                </tr>
                                <tr>
                                    <td style="text-align:center"><?php echo $_smarty_tpl->tpl_vars['totalbuy'.($_smarty_tpl->tpl_vars['x']->value)]->value;?>
</td>
                                    <td style="text-align:center"><?php echo $_smarty_tpl->tpl_vars['totalreturnbuy'.($_smarty_tpl->tpl_vars['x']->value)]->value;?>
</td>
                                </tr>
                                <tr>
                                    <td  colspan="2" style="text-align:center"> المجموع</td>

                                </tr>
                                <tr>
                                    <td colspan="2" style="text-align:center">  <?php echo $_smarty_tpl->tpl_vars['buydif'.($_smarty_tpl->tpl_vars['x']->value)]->value;?>
</td>

                                </tr>

                            </table>
                        </td>
                        <td>
                            <table class="table-black">
                                <tr>
                                    <td>رصيد اول مده</td>
                                    <td> + المشتريات</td>
                                </tr>
                                <tr>

                                    <td  colspan="2" style="text-align:center">- المبيعات</td>
                                </tr>
                                <tr>
                                    <td  colspan="2" style="text-align:center"> المجموع</td>

                                </tr>
                                <tr>
                                    <td colspan="2" style="text-align:center">  <?php echo $_smarty_tpl->tpl_vars['final'.($_smarty_tpl->tpl_vars['x']->value)]->value;?>
</td>

                                </tr>

                            </table></td>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>

            <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'x', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['x']->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 } ?>


            <div class="clearfix"></div>
            <hr />
            <div  class="noprint">
                <div class="col-lg-12">
                    <div class="form-group">
                        <div class="col-lg-4">
                            <button type="button" onclick="print_Custom('mycustomheader');" class="btn btn-success pull-right hidden-print">طباعة</button>
                        </div>
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
</div>
<?php }} ?>