<?php /* Smarty version Smarty-3.1.11, created on 2023-10-28 20:34:20
         compiled from "../views/default/noticesview/show.html" */ ?>
<?php /*%%SmartyHeaderCode:961716777653d542c52b217-81377170%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'dfb47c8e225fa1de7da0478ba78cdb8fae449d1c' => 
    array (
      0 => '../views/default/noticesview/show.html',
      1 => 1693253994,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '961716777653d542c52b217-81377170',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'message' => 0,
    'youtubes' => 0,
    'loadData' => 0,
    'DDD' => 0,
    'branchId' => 0,
    'userGroupId' => 0,
    'toBranchRequests' => 0,
    'i' => 0,
    'data' => 0,
    'toGroupRequests' => 0,
    'toUserRequests' => 0,
    'userid' => 0,
    'newRequests' => 0,
    'acceptRequests' => 0,
    'refusedRequests' => 0,
    'allstore' => 0,
    'newstorex' => 0,
    'storeid' => 0,
    'allproduct' => 0,
    'allkempila' => 0,
    'kempila' => 0,
    'store' => 0,
    'storeid2' => 0,
    'allsell' => 0,
    'sell1' => 0,
    'clientcheck' => 0,
    'check' => 0,
    'suppiercheck' => 0,
    'checksupplier' => 0,
    'delayGo' => 0,
    'delayWorkshop' => 0,
    'delayBack' => 0,
    'premiums' => 0,
    'waitBills' => 0,
    'approvedBills' => 0,
    'rejectedBills' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_653d542c8a6790_40736420',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_653d542c8a6790_40736420')) {function content_653d542c8a6790_40736420($_smarty_tpl) {?><style>
    @media print{
        .dataTables_length , .dataTables_filter , .dataTables_info , .dataTables_paginate{
            display: none !important;
        }
        .table-black{
            margin-top: 35px !important;
            margin-bottom:  35px !important;

        }
        .table-black{
            border : 1px solid black;
        }
        tr > td, tr > th  {
            border: 1px solid #000 !important;
        }
        th > .sorting {
            border: 1px solid #000 !important;
        }
        .tab-content{
            color: black !important;
        }


</style>
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">التقارير</a></li>
            <li class="active">الاشعارات</li>
        </ol>
        <div class="panel panel-default panel-m">.
            <!-- Default panel contents -->
            <div class="panel-heading">الاشعارات<br />
                <?php if ($_smarty_tpl->tpl_vars['message']->value!=''){?>
                <?php echo $_smarty_tpl->tpl_vars['message']->value;?>

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


            <!-- ================================================   -->
            <!-- Nav tabs -->
            <ul class="nav nav-tabs">
                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->productno=="0"){?><li <?php if ($_smarty_tpl->tpl_vars['DDD']->value!=1){?>class="active" <?php }?>><a href="#info" data-toggle="tab"> المنتجات الاقل من الحد الادنى </a></li><?php }?>
                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->kempilano=="0"){?><li><a href="#props" data-toggle="tab"> الكمبيالات</a></li><?php }?>

                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->productnotsellno=="0"){?><li <?php if ($_smarty_tpl->tpl_vars['DDD']->value==1){?> class="active" <?php }?>><a href="#genpro" data-toggle="tab" > المنتجات الراكده من اسبوع</a></li><?php }?>

                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->clientcheckno=="0"){?><li><a href="#check" data-toggle="tab"> شيكات العملاء </a></li><?php }?>
                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->suppliercheckno=="0"){?><li><a href="#suppliercheck" data-toggle="tab"> شيكات الموردين </a></li><?php }?>
                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->productRequist=="0"){?><li><a href="#tabaaa" data-toggle="tab"> طلبات المنتجات  </a></li><?php }?>
                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->otherRequist=="0"){?><li><a href="#tabbbb" data-toggle="tab"> طلبات أخرى من الفروع   </a></li><?php }?>
                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->toWorkShopOrder=="0"){?><li class="<?php if ($_smarty_tpl->tpl_vars['loadData']->value->toWorkShopOrder==1){?> hidden <?php }?>"><a href="#delayOptic" data-toggle="tab">متاخرات البصريات</a></li><?php }?>
                <li><a href="#premium" data-toggle="tab">الاقساط المتاخره</a></li>
                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->insuranceBill=="0"){?><li class="<?php if ($_smarty_tpl->tpl_vars['loadData']->value->insuranceBill==1){?> hidden <?php }?>"><a href="#tabInsurance" data-toggle="tab"> فواتير التأمين</a></li><?php }?>

            </ul>
            <!-- =================================================   -->
            <!-- Tab panes -->
            <div class="tab-content">
                <!-- start the  tabbbb -->
                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->otherRequist=="0"){?>
                <div class="tab-pane" id="tabbbb">

                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab2" data-toggle="tab"><?php if ($_smarty_tpl->tpl_vars['branchId']->value==0){?> طلبات قادمة للفروع      <?php }else{ ?>طلبات قادمة للفرع  <?php }?></a></li>
                        <li><a href="#tab3" data-toggle="tab"><?php if ($_smarty_tpl->tpl_vars['userGroupId']->value==1){?>طلبات قادمة لمجموعات  المستخدمين <?php }else{ ?> طلبات قادمة لمجموعة المستخدمين    <?php }?></a></li>
                        <li><a href="#tab4" data-toggle="tab"><?php if ($_smarty_tpl->tpl_vars['userGroupId']->value==1){?> طلبات قادمة للمستخدمين     <?php }else{ ?> طلبات قادمة لى    <?php }?></a></li>
                    </ul>

                    <div class="tab-content">
                        <!-- start the 2nd tab -->
                        <div class="tab-pane active" id="tab2">

                            <div class="form-group">
                                <table class="table dataTableClass table-black">
                                    <thead>
                                        <tr>
                                            <th>م</th>
                                            <th>عنوان الطلب </th>
                                            <th> الفرع صاحب الطلب </th>
                                            <th> المستخدم </th>
                                            <th> التاريخ  </th>
                                            <th class='hidden-print'> التفاصيل  </th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php if ($_smarty_tpl->tpl_vars['toBranchRequests']->value){?>
                                        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['toBranchRequests']->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;
?>
                                        <tr>
                                            <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->requestTitle;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->branchName;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->userName;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->requestDate;?>
</td>
                                            <td  class="hidden-print"><a href="otherrequests.php?do=details&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" type="button" class="btn btn-default btn-lg notesicon"></a></td>

                                        </tr>
                                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->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 } ?>
                                        <?php }?>
                                    </tbody>
                                </table>
                                <button type="button" data-page="print_tab7_1" onclick='printDiv();' class="btn print_btn btn-success pull-right">طباعة</button>
                            </div>
                        </div>
                        <!-- end the 2nd tab -->

                        <!-- start the 3rd tab -->
                        <div class="tab-pane <?php if ($_smarty_tpl->tpl_vars['toGroupRequests']->value){?> <?php }else{ ?> hidden-print <?php }?>" id="tab3">

                            <div class="form-group">
                                <table class="table dataTableClass table-black">
                                    <thead>
                                        <tr>
                                            <th>م</th>
                                            <th>عنوان الطلب </th>
                                            <th> الفرع صاحب الطلب </th>
                                            <th> المستخدم </th>
                                            <th> التاريخ  </th>
                                            <th class='hidden-print'> التفاصيل  </th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php if ($_smarty_tpl->tpl_vars['toGroupRequests']->value){?>
                                        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['toGroupRequests']->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;
?>
                                        <tr>
                                            <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->requestTitle;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->branchName;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->userName;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->requestDate;?>
</td>
                                            <td  class="hidden-print"><a href="otherrequests.php?do=details&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" type="button" class="btn btn-default btn-lg notesicon"></a></td>

                                        </tr>
                                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->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 } ?>
                                        <?php }?>
                                    </tbody>
                                </table>
                                <button type="button" data-page="print_tab7_2" onclick='printDiv();' class="btn print_btn btn-success pull-right">طباعة</button>
                            </div>
                        </div>
                        <!-- end the 3rd tab -->


                        <!-- start the 4th tab -->
                        <div class="tab-pane" id="tab4">

                            <div class="form-group">
                                <table class="table dataTableClass table-black">
                                    <thead>
                                        <tr>
                                            <th>م</th>
                                            <th>عنوان الطلب </th>
                                            <th> الفرع صاحب الطلب </th>
                                            <th> المستخدم </th>
                                            <th> التاريخ  </th>
                                            <th class='hidden-print'> التفاصيل  </th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php if ($_smarty_tpl->tpl_vars['toUserRequests']->value){?>
                                        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['toUserRequests']->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;
?>
                                        <tr>
                                            <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->requestTitle;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->branchName;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->userName;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->requestDate;?>
</td>
                                            <td  class="hidden-print"><a href="otherrequests.php?do=details&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" type="button" class="btn btn-default btn-lg notesicon"></a></td>

                                        </tr>
                                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->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 } ?>
                                        <?php }?>
                                    </tbody>
                                </table>
                                <button type="button" data-page="print_tab7_3" onclick='printDiv();' class="btn print_btn btn-success pull-right">طباعة</button>
                            </div>
                        </div>
                        <!-- end the 4th tab -->
                    </div>
                </div>
                <?php }?>
                <!-- end the  tabbbb -->

                <!-- start the  tabaaa -->
                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->productRequist=="0"){?>
                <div class="tab-pane" id="tabaaa">

                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tabn" data-toggle="tab"> طلبات المنتجات من المخازن الاخرى </a></li>
                        <li><a href="#taba" data-toggle="tab"> طلبات المنتجات تمت الموافقة عليها  </a></li>
                        <li><a href="#tabb" data-toggle="tab"> طلبات المنتجات تمت رفضها  </a></li>
                    </ul>
                    <input type="hidden" name="userid" id="userid" value="<?php echo $_smarty_tpl->tpl_vars['userid']->value;?>
"/>
                    <div class="tab-content">
                        <!-- start the  tabn -->
                        <div class="tab-pane active" id="tabn">

                            <div class="form-group">
                                <table class="table dataTableClass table-black">
                                    <thead>
                                        <tr>
                                            <th>م</th>
                                            <th>اسم المنتج</th>
                                            <th>صاحب الطلب </th>
                                            <th> المخزن المطلوب منه </th>
                                            <th> العدد المطلوب </th>
                                            <th class="hidden-print">  </th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php if ($_smarty_tpl->tpl_vars['newRequests']->value){?>
                                        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['newRequests']->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;
?>
                                        <tr>
                                            <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->productName;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->requestStoreName;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->storeName;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->productnoreq;?>
</td>
                                            <td class="hidden-print"><button type="button" data-requestId="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" class="btn btn-primary seenBtn">تمت رؤيته</button></td>
                                        </tr>
                                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->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 } ?>
                                        <?php }?>
                                    </tbody>
                                </table>
                                <button type="button" data-page="print_tab6_1" onclick='printDiv();' class="btn print_btn btn-success pull-right">طباعة</button>
                            </div>
                        </div>
                        <!-- end the  tabn -->

                        <!-- start the  taba -->
                        <div class="tab-pane  <?php if ($_smarty_tpl->tpl_vars['acceptRequests']->value){?>  <?php }else{ ?> hidden-print <?php }?> " id="taba">

                            <div class="form-group">
                                <table class="table dataTableClass table-black">
                                    <thead>
                                        <tr>
                                            <th>م</th>
                                            <th>اسم المنتج</th>
                                            <th>صاحب الطلب </th>
                                            <th> المخزن المطلوب منه </th>
                                            <th> العدد المطلوب </th>
                                            <th> العدد الموافق عليه </th>
                                            <th>  </th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php if ($_smarty_tpl->tpl_vars['acceptRequests']->value){?>
                                        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['acceptRequests']->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;
?>
                                        <tr>
                                            <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->productName;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->requestStoreName;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->storeName;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->productnoreq;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->productnoaccept;?>
</td>
                                            <td><button type="button" data-requestId="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" class="btn btn-primary seenBtn">تمت رؤيته</button></td>
                                        </tr>
                                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->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 } ?>
                                        <?php }?>
                                    </tbody>
                                </table>
                                <button type="button" data-page="print_tab6_2" onclick='printDiv();' class="btn print_btn btn-success pull-right">طباعة</button>
                            </div>
                        </div>
                        <!-- end the  taba -->

                        <!-- start the  tabb -->
                        <div class="tab-pane  <?php if ($_smarty_tpl->tpl_vars['refusedRequests']->value){?>  <?php }else{ ?> hidden-print <?php }?> " id="tabb">

                            <div class="form-group">
                                <table class="table dataTableClass table-black">
                                    <thead>
                                        <tr>
                                            <th>م</th>
                                            <th>اسم المنتج</th>
                                            <th>صاحب الطلب </th>
                                            <th> المخزن المطلوب منه </th>
                                            <th> العدد المطلوب </th>
                                            <th>  </th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php if ($_smarty_tpl->tpl_vars['refusedRequests']->value){?>
                                        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['refusedRequests']->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;
?>
                                        <tr>
                                            <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->productName;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->requestStoreName;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->storeName;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->productnoreq;?>
</td>
                                            <td><button type="button" data-requestId="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" class="btn btn-primary seenBtn">تمت رؤيته</button></td>
                                        </tr>
                                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->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 } ?>
                                        <?php }?>
                                    </tbody>
                                </table>
                                <button type="button" data-page="print_tab6_3" onclick='printDiv();' class="btn print_btn btn-success pull-right">طباعة</button>
                            </div>
                        </div>
                        <!-- end the  tabb -->

                    </div>
                </div>
                <!-- end the  tabaaa -->
                <?php }?>

                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->productno=="0"){?>
                <div <?php if ($_smarty_tpl->tpl_vars['DDD']->value!=1){?> class="tab-pane active" <?php }else{ ?> class="tab-pane" <?php }?> id="info"><!-- start the 1st tab -->
                    <div class="panel-body">
                        <form class="form-inline  hidden-print" action="noticesController.php?do=show" method="post">
                            <div class="form-group">
                                <label class="sr-only">اختر مخزن</label>
                                <select data-placeholder="اختر مخزن" class="select2 wdt300" name="supplierid" id="supplierid">
                                    <option value="-1"> اختر مخزن </option>
                                    <?php  $_smarty_tpl->tpl_vars['newstorex'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['newstorex']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allstore']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['newstorex']->key => $_smarty_tpl->tpl_vars['newstorex']->value){
$_smarty_tpl->tpl_vars['newstorex']->_loop = true;
?>

                                    <option value="<?php echo $_smarty_tpl->tpl_vars['newstorex']->value->storeId;?>
" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['newstorex']->value->storeId;?>
<?php $_tmp1=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['storeid']->value->storeId;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp1==$_tmp2){?>selected <?php }?>><?php echo $_smarty_tpl->tpl_vars['newstorex']->value->storeName;?>
</option>
                                    <?php } ?>
                                </select>
                            </div>
                            <input type="hidden" name="get_storeid" value="<?php echo $_smarty_tpl->tpl_vars['storeid']->value->storeId;?>
" id="get_storeid"/>
                            <button type="submit" id="submit1" class="btn btn-primary">بحث</button>
                        </form>
                    </div>
                    <div class="form-group propbd" id="DivIdToPrint">
                        <table class="table table-black">
                            <thead>
                                <tr>

                                    <th>اسم المنتج</th>
                                    <th> الكميه بالمخزن</th>
                                    <th> الحد الادنى </th>
                                </tr>
                            </thead>
                            <tbody>

                                <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allproduct']->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;
?>
                                <tr>

                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->productName;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->productquantity;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->limitamount;?>
</td>

                                </tr>

                                <?php } ?>

                            </tbody>
                        </table>

                         <button type="button" data-page="print_tab1" onclick='printDiv();' class="btn print_btn btn-success pull-right">طباعة</button>
                    </div>
                </div><!-- end the 1st tab -->
                <?php }?>
                <!-- =================================================   -->
                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->kempilano=="0"){?>
                <div class="tab-pane <?php if ($_smarty_tpl->tpl_vars['allkempila']->value){?> <?php }else{ ?> hidden-print <?php }?>" id="props"><!-- start the 2nd tab -->

                    <div class="form-group">
                        <table class="table table-black">
                            <thead>
                                <tr>
                                    <th>      اسم العميل   </th>
                                    <th> التاريخ</th>
                                    <th> القيمه </th>
                                    <th> طباعه </th>
                                </tr>
                            </thead>
                            <tbody>


                                <?php  $_smarty_tpl->tpl_vars['kempila'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['kempila']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allkempila']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['kempila']->key => $_smarty_tpl->tpl_vars['kempila']->value){
$_smarty_tpl->tpl_vars['kempila']->_loop = true;
?>

                                <tr>
                                    <td><?php echo $_smarty_tpl->tpl_vars['kempila']->value->clientname;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['kempila']->value->recievingdate;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['kempila']->value->value;?>
</td>
                                    <td  class="hidden-print"><a href="noticesController.php?do=editprint&id=<?php echo $_smarty_tpl->tpl_vars['kempila']->value->id;?>
"  type="button" class="btn btn-default btn-lg printicon">  </a></td>

                                </tr>

                                <?php } ?>

                            </tbody>
                        </table>
                        <button type="button" data-page="print_tab2" onclick='printDiv();' class="btn print_btn btn-success pull-right">طباعة</button>
                    </div>
                </div><!-- end the 2nd tab -->
                <?php }?>


                <!-- =================================================   -->
                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->productnotsellno=="0"){?>
                <div <?php if ($_smarty_tpl->tpl_vars['DDD']->value==1){?> class="tab-pane active" <?php }else{ ?> class="tab-pane" <?php }?> id="genpro"><!-- start the 3rd tab -->
                    <div class="panel-body">
                        <form class="form-inline  hidden-print" action="noticesController.php?do=showproductnotsell" method="post" name="xx">
                            <div class="form-group">
                                <label class="sr-only">اختر مخزن</label>
                                <select data-placeholder="اختر مخزن" class="select2 wdt300 " name="supplierid2" id="supplierid2">
                                    <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['allstore']->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 ob_start();?><?php echo $_smarty_tpl->tpl_vars['store']->value->storeId;?>
<?php $_tmp3=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['storeid2']->value->storeId;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp3==$_tmp4){?>selected <?php }?>><?php echo $_smarty_tpl->tpl_vars['store']->value->storeName;?>
</option>
                                    <?php } ?>

                                </select>
                            </div>
                            <input type="hidden" name="get_storeid2" value="<?php echo $_smarty_tpl->tpl_vars['storeid2']->value->storeId;?>
" id="get_storeid2"/>
                            <button type="submit" id="submit2" class="btn btn-primary">بحث</button>
                        </form>
                    </div>
                    <div class="form-group">
                        <table class="table table-black">
                            <thead>

                                <tr>

                                    <th>اسم المنتج</th>
                                    <th> الكميه بالمخزن</th>
                                    <th> الحد الادنى </th>
                                </tr>
                            </thead>
                            <tbody>


                                <?php  $_smarty_tpl->tpl_vars['sell1'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['sell1']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allsell']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['sell1']->key => $_smarty_tpl->tpl_vars['sell1']->value){
$_smarty_tpl->tpl_vars['sell1']->_loop = true;
?>

                                <tr>

                                    <td><?php echo $_smarty_tpl->tpl_vars['sell1']->value->productName;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['sell1']->value->productquantity;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['sell1']->value->limitamount;?>
</td>

                                </tr>

                                <?php } ?>


                            </tbody>
                        </table>
                        <button type="button" data-page="print_tab3" onclick='printDiv();' class="btn print_btn btn-success pull-right">طباعة</button>

                    </div>
                </div><!-- end the 3rd tab -->
                <?php }?>
                <!-- =================================================   -->
                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->clientcheckno=="0"){?>
                <div class="tab-pane <?php if ($_smarty_tpl->tpl_vars['clientcheck']->value){?> <?php }else{ ?> hidden-print <?php }?>" id="check"><!-- start the 4th tab -->
                    <div class="form-group">
                        <table class="table table-black">
                            <thead>
                                <tr>
                                    <th> اسم البنك </th>
                                    <th> اسم العميل </th>
                                    <th> التاريخ</th>
                                    <th> رقم الشيك </th>
                                    <th> القيمه </th>
                                    <th> طباعه </th>
                                </tr>
                            </thead>
                            <tbody>


                                <?php  $_smarty_tpl->tpl_vars['check'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['check']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['clientcheck']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['check']->key => $_smarty_tpl->tpl_vars['check']->value){
$_smarty_tpl->tpl_vars['check']->_loop = true;
?>

                                <tr>
                                    <td><?php echo $_smarty_tpl->tpl_vars['check']->value->bankName;?>
</td>



                                    <td>

                                        <?php echo $_smarty_tpl->tpl_vars['check']->value->clientname;?>


                                    </td>

                                    <td><?php echo $_smarty_tpl->tpl_vars['check']->value->dueDate;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['check']->value->checkNo;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['check']->value->checkValue;?>
</td>
                                    <td  class="hidden-print"><a href="noticesController.php?do=editprint2&checkid=<?php echo $_smarty_tpl->tpl_vars['check']->value->datedCheckedID;?>
"  type="button" class="btn btn-default btn-lg printicon">  </a></td>

                                </tr>

                                <?php } ?>

                            </tbody>
                        </table>
                        <button type="button" data-page="print_tab4" onclick='printDiv();' class="btn print_btn btn-success pull-right">طباعة</button>

                    </div>
                </div><!-- end the 4th tab -->
                <?php }?>

                <!--**********************************************************************-->

                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->suppliercheckno=="0"){?>
                <div class="tab-pane  <?php if ($_smarty_tpl->tpl_vars['suppiercheck']->value){?> <?php }else{ ?> hidden-print <?php }?>" id="suppliercheck"><!-- start the 5th tab -->
                    <div class="form-group">
                        <table class="table table-black">
                            <thead>
                                <tr>
                                    <th> اسم البنك </th>
                                    <th> اسم المورد </th>
                                    <th> التاريخ</th>
                                    <th> رقم الشيك </th>
                                    <th> القيمه </th>
                                    <th>طباعه</th>
                                </tr>
                            </thead>
                            <tbody>


                                <?php  $_smarty_tpl->tpl_vars['checksupplier'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['checksupplier']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['suppiercheck']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['checksupplier']->key => $_smarty_tpl->tpl_vars['checksupplier']->value){
$_smarty_tpl->tpl_vars['checksupplier']->_loop = true;
?>

                                <tr>
                                    <td><?php echo $_smarty_tpl->tpl_vars['checksupplier']->value->bankName;?>
</td>

                                    <td>
                                        <?php echo $_smarty_tpl->tpl_vars['checksupplier']->value->suppliername;?>

                                    </td>

                                    <td><?php echo $_smarty_tpl->tpl_vars['checksupplier']->value->dueDate;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['checksupplier']->value->checkNo;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['checksupplier']->value->checkValue;?>
</td>
                                    <td  class="hidden-print"><a href="noticesController.php?do=editprint2&checkid=<?php echo $_smarty_tpl->tpl_vars['checksupplier']->value->datedCheckedID;?>
"  type="button" class="btn btn-default btn-lg printicon">  </a></td>

                                </tr>

                                <?php } ?>

                            </tbody>
                        </table>
                        <button type="button" data-page="print_tab5" onclick='printDiv();' class="btn print_btn btn-success pull-right">طباعة</button>
                    </div>
                </div><!-- end the 5th tab -->
                <?php }?>



                <!-- start the  delayOptic -->
                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->toWorkShopOrder=="0"){?>
                <div class="tab-pane <?php if ($_smarty_tpl->tpl_vars['loadData']->value->toWorkShopOrder==1){?> hidden <?php }?>" id="delayOptic">

                    <div class="form-group">
                        <table class="table dataTableClass table-black">
                            <thead>
                                <tr>
                                    <th>م</th>
                                    <th>رقم الطلبية</th>
                                    <th  >النوع</th>
                                    <th class='hidden-print'>تفاصيل</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['delayGo']->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;
?>
                                <tr>
                                    <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->orderNo;?>
</td>
                                    <td>متأخرات ذهاب</td>
                                    <td  class='hidden-print'>
                                        <a href="workshoptransport.php?do=orderdetails&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" target="_blank" type="button" class="btn btn-default btn-lg notesicon"></a>
                                    </td>
                                </tr>
                                <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->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 } ?>

                                <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['delayWorkshop']->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;
?>
                                <tr>
                                    <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->orderNo;?>
</td>
                                    <td>متأخرات ورشة</td>
                                    <td class='hidden-print'>
                                        <a href="workshoptransport.php?do=orderdetails&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" target="_blank" type="button" class="btn btn-default btn-lg notesicon"></a>
                                    </td>
                                </tr>
                                <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->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 } ?>

                                <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['delayBack']->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;
?>
                                <tr>
                                    <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->orderNo;?>
</td>
                                    <td>متأخرات عودة</td>
                                    <td class='hidden-print'>
                                        <a href="workshoptransport.php?do=orderdetails&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" target="_blank" type="button" class="btn btn-default btn-lg notesicon"></a>
                                    </td>
                                </tr>
                                <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->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 } ?>
                            </tbody>
                        </table>
                        <button type="button" data-page="print_tab8" onclick='printDiv();' class="btn print_btn btn-success pull-right">طباعة</button>

                    </div>
                </div>
                <?php }?>
                <!-- end the  delayOptic -->


                <!-- start the  premium -->

                <div class="tab-pane" id="premium">

                    <div class="form-group">
                        <table class="table dataTableClass table-black">
                            <thead>
                            <tr>
                                <th>م</th>
                                <th>اسم العميل</th>
                                <th>عدد الاقساط المتاخره</th>
                                <th >اجمالي الاقساط المتاخره</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                            <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['premiums']->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;
?>
                            <tr>
                                <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['data']->value->clientname;?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['data']->value->totalLate;?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['data']->value->totalnotpayed-$_smarty_tpl->tpl_vars['data']->value->totalRest;?>
</td>
                            </tr>
                            <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->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 } ?>
                            </tbody>
                        </table>
                        <button type="button" data-page="print_tab8" onclick='printDiv();' class="btn print_btn btn-success pull-right">طباعة</button>

                    </div>
                </div>
                <!-- end the  premium -->


                <!-- start the  tabaaa -->
                <?php if ($_smarty_tpl->tpl_vars['loadData']->value->insuranceBill=="0"){?>
                <div class="tab-pane <?php if ($_smarty_tpl->tpl_vars['loadData']->value->insuranceBill==1){?> hidden <?php }?>" id="tabInsurance">

                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tabInsurancea" data-toggle="tab">طلبات تنتظر الموافقة</a></li>
                        <li><a href="#tabInsuranceb" data-toggle="tab"> طلبات تمت الموافقة عليها  </a></li>
                        <li><a href="#tabInsurancec" data-toggle="tab"> طلبات تم رفضها  </a></li>
                    </ul>

                    <div class="tab-content">
                        <!-- start the  tabn -->
                        <div class="tab-pane active" id="tabInsurancea">

                            <div class="form-group">
                                <table class="table table-black dataTableClass">
                                    <thead>
                                        <tr>
                                            <th>رقم المسلسل</th>
                                            <th>اسم العميل</th>
                                            <th>رقم الفاتورة</th>
                                            <th>إجمالي الفاتورة</th>
                                            <th>التاريخ</th>
                                            <th class="hidden-print">المستخدم</th>
                                            <th>مكان  الاضافه </th>
                                            <th>شركة التأمين</th>
                                            <th class="hidden-print">الفرع</th>
                                            <th class="hidden-print">تفاصيل الفاتورة</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php if (count($_smarty_tpl->tpl_vars['waitBills']->value)>0){?>
                                        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['waitBills']->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;
?>
                                        <tr>
                                            <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                            <td> <?php echo $_smarty_tpl->tpl_vars['data']->value->clientname;?>
 </td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->billno;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->finalnetbillvalue;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->billdate;?>
</td>
                                            <td class="hidden-print"><?php echo $_smarty_tpl->tpl_vars['data']->value->username;?>
</td>
                                            <td><?php if ($_smarty_tpl->tpl_vars['data']->value->offline==1){?>محليا   <?php }else{ ?>  على السيرفر الرئيسى مباشرة  <?php }?></td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->insurancecompanyid;?>
</td>
                                            <td class="hidden-print"><?php echo $_smarty_tpl->tpl_vars['data']->value->branchid;?>
</td>
                                            <td  class="hidden-print"><a href="bills.php?do=details&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" target="_blank" type="button" class="btn btn-default btn-lg notesicon"></a></td>
                                        </tr>
                                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->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 } ?>

                                        <?php }else{ ?>
                                        <tr>
                                            <td colspan="7" style="text-align: center;"><label>لا توجد بيانات   </label></td>
                                        </tr>

                                        <?php }?>
                                    </tbody>

                                </table>
                                <button type="button" data-page="print_tab9_1" onclick='printDiv();' class="btn print_btn btn-success pull-right">طباعة</button>

                            </div>
                        </div>
                        <!-- end the  tabn -->

                        <!-- start the  taba -->
                        <div class="tab-pane" id="tabInsuranceb">

                            <div class="form-group">
                                <table class="table table-black dataTableClass">
                                    <thead>
                                        <tr>
                                            <th>رقم المسلسل</th>
                                            <th>اسم العميل</th>
                                            <th>رقم الفاتورة</th>
                                            <th>إجمالي الفاتورة</th>
                                            <th>التاريخ</th>
                                            <th class="hidden-print">المستخدم</th>
                                            <th>مكان  الاضافه </th>
                                            <th>شركة التأمين</th>
                                            <th class="hidden-print">الفرع</th>
                                            <th class="hidden-print">تفاصيل الفاتورة</th>
                                            <th class="hidden-print"></th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php if (count($_smarty_tpl->tpl_vars['approvedBills']->value)>0){?>
                                        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['approvedBills']->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;
?>
                                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->deleted;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==1){?>
                                        <tr class="danger"> <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->deleted;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6==0){?>
                                        <tr> <?php }}?>
                                            <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                            <td> <?php echo $_smarty_tpl->tpl_vars['data']->value->clientname;?>
 </td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->billno;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->finalnetbillvalue;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->billdate;?>
</td>
                                            <td class="hidden-print"><?php echo $_smarty_tpl->tpl_vars['data']->value->username;?>
</td>
                                            <td><?php if ($_smarty_tpl->tpl_vars['data']->value->offline==1){?>محليا   <?php }else{ ?>  على السيرفر الرئيسى مباشرة  <?php }?></td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->insurancecompanyid;?>
</td>
                                            <td class="hidden-print"><?php echo $_smarty_tpl->tpl_vars['data']->value->branchid;?>
</td>
                                            <td  class="hidden-print"><a href="bills.php?do=details&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" target="_blank" type="button" class="btn btn-default btn-lg notesicon"></a></td>
                                            <td  class="hidden-print"><button type="button" data-requestid="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" class="btn btn-primary seenBill">تمت رؤيته</button></td>
                                        </tr>
                                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->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 } ?>

                                        <?php }else{ ?>
                                        <tr>
                                            <td colspan="7" style="text-align: center;"><label>لا توجد بيانات  </label></td>
                                        </tr>

                                        <?php }?>
                                    </tbody>

                                </table>
                                 <button type="button" data-page="print_tab9_2" onclick='printDiv();' class="btn print_btn btn-success pull-right">طباعة</button>

                            </div>
                        </div>
                        <!-- end the  taba -->

                        <!-- start the  tabb -->
                        <div class="tab-pane" id="tabInsurancec">

                            <div class="form-group">
                                <table class="table table-black dataTableClass">
                                    <thead>
                                        <tr>
                                            <th>رقم المسلسل</th>
                                            <th>اسم العميل</th>
                                            <th>رقم الفاتورة</th>
                                            <th>إجمالي الفاتورة</th>
                                            <th>التاريخ</th>
                                            <th class="hidden-print">المستخدم</th>
                                            <th>مكان  الاضافه </th>
                                            <th>شركة التأمين</th>
                                            <th class="hidden-print">الفرع</th>
                                            <th class="hidden-print">تفاصيل الفاتورة</th>
                                            <th class="hidden-print"></th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php if (count($_smarty_tpl->tpl_vars['rejectedBills']->value)>0){?>
                                        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['rejectedBills']->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;
?>
                                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->deleted;?>
<?php $_tmp7=ob_get_clean();?><?php if ($_tmp7==1){?>
                                        <tr class="danger"> <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->deleted;?>
<?php $_tmp8=ob_get_clean();?><?php if ($_tmp8==0){?>
                                        <tr> <?php }}?>
                                            <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                            <td> <?php echo $_smarty_tpl->tpl_vars['data']->value->clientname;?>
 </td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->billno;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->finalnetbillvalue;?>
</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->billdate;?>
</td>
                                            <td class="hidden-print"><?php echo $_smarty_tpl->tpl_vars['data']->value->username;?>
</td>
                                            <td><?php if ($_smarty_tpl->tpl_vars['data']->value->offline==1){?>محليا   <?php }else{ ?>  على السيرفر الرئيسى مباشرة  <?php }?></td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value->insurancecompanyid;?>
</td>
                                            <td class="hidden-print"><?php echo $_smarty_tpl->tpl_vars['data']->value->branchid;?>
</td>
                                            <td  class="hidden-print"><a href="bills.php?do=details&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" target="_blank" type="button" class="btn btn-default btn-lg notesicon"></a></td>
                                            <td  class="hidden-print"><button type="button" data-requestid="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" class="btn btn-primary seenBill">تمت رؤيته</button></td>
                                        </tr>
                                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->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 } ?>

                                        <?php }else{ ?>
                                        <tr>
                                            <td colspan="7" style="text-align: center;"><label>لا توجد بيانات  </label></td>
                                        </tr>

                                        <?php }?>
                                    </tbody>

                                </table>

                                <button type="button" data-page="print_tab9_3" onclick='printDiv();' class="btn print_btn btn-success pull-right">طباعة</button>

                            </div>
                        </div>
                        <!-- end the  tabb -->

                    </div>
                </div>
                <?php }?>
                <!-- end the  Insurance -->



            </div><!-- end of tabs -->
            <!--**********************************************************************-->


            <div class="clearfix"></div>
            <hr />
            <div  class=" hidden-print">
                <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">طباعة</button>-->
                        </div>
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="clearfix"></div>

            </form>
        </div>
    </div>
</div>


<script>
    $(document).ready(function (e) {
        $('.seenBtn').live('click', function (e) {
            var requestId = $(this).attr('data-requestId');
            var row = $(this).parent().parent();
            $.post('productrequestajax.php?do=seerequestnotice', {requestId: requestId}, function (rslt) {
                if (Number(rslt) == 1)
                {
                    row.remove();
                }
            });
        });

        $('.seenBill').live('click', function (e) {
            var requestId = $(this).attr('data-requestId');
            var row = $(this).parent().parent();
            $.post('billsajax.php?do=notifseen', {id: requestId}, function (rslt) {
                if (Number(rslt) == 1)
                {
                    row.remove();
                }
            });
        });

    });

    function printDiv()
    {

       // var divToPrint=document.getElementById('DivIdToPrint');
       $('body').on('click','.print_btn',function(){

            var tab = $(this).attr('data-page');
            var supplierid = $('#get_storeid').val();

            var supplierid2 = $('#get_storeid2').val();
            var userid = $('#userid').val();
          //  alert('tab = '+tab);
            $.post('noticesAjaxController.php?do=print_tab',{ tab : tab , supplierid : supplierid , supplierid2 : supplierid2 , userid : userid },function(data){

             //  console.log(data);
                var newWin=window.open('','Print-Window');

                newWin.document.open();

                newWin.document.write('<html><body onload="window.print()">'+data+'</body></html>');

                newWin.document.close();

                setTimeout(function(){newWin.close();},10);

           });


       });

//        var newWin=window.open('','Print-Window');
//
//      newWin.document.open();
//
//      newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
//
//      newWin.document.close();
//
//      setTimeout(function(){newWin.close();},10);



    }


</script>

<?php }} ?>