<?php /* Smarty version Smarty-3.1.11, created on 2023-10-11 20:53:36
         compiled from "../views/default/savedailyview/show.html" */ ?>
<?php /*%%SmartyHeaderCode:18310897706526e120a9eeb7-11814838%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'd64134c21a937c21c4aedcfeb90396b336e3b040' => 
    array (
      0 => '../views/default/savedailyview/show.html',
      1 => 1693253994,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '18310897706526e120a9eeb7-11814838',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'lang_code' => 0,
    'youtubes' => 0,
    'searchinonesave' => 0,
    'saveData' => 0,
    'save' => 0,
    'allprocess' => 0,
    'process' => 0,
    'usersData' => 0,
    'data' => 0,
    'savedailydate' => 0,
    'message' => 0,
    'Programsetting' => 0,
    'savedailyData' => 0,
    'sumValue' => 0,
    'currency' => 0,
    'changeAmountSum' => 0,
    'savecur' => 0,
    'savedaily' => 0,
    'j' => 0,
    'k' => 0,
    'sumValOfVisaAccount' => 0,
    'changeAmountSum_account' => 0,
    'allMovements' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_6526e120bfede5_85477936',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_6526e120bfede5_85477936')) {function content_6526e120bfede5_85477936($_smarty_tpl) {?><style>
    .myresult {
        -webkit-print-color-adjust: exact;
    }
    .nodata{
        background-color: #72B4EC;
        color: white;
        border-radius: 13px;
        margin: 14px;
        font-size: 24px;
        text-align: center;
        padding: 5px;
    }

</style>

<div class="row">
    <div class="container <?php if ($_smarty_tpl->tpl_vars['lang_code']->value=='en'){?> gt4-ltr<?php }?>">
        <ol class="breadcrumb">
            <li><a href="#">التقارير</a></li>
            <li><a href="savedailyController.php?do=show">تقرير يومية الخزنة</a></li>
            <li class="active">عرض التقرير</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading">تقرير يومية الخزنة
                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[118]->url;?>
" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>
            </div>
            <div class="panel-body">

                <form class="form-inline hidden-print " action="savedailyController.php?do=show" method="post">

                    <?php if ($_smarty_tpl->tpl_vars['searchinonesave']->value==0){?>
                    <div class="form-group">

                        <label class="sr-only">الخزنة</label>
                        <select class="select2 wdt300"  name="saveId" id="saveid" >
                            <option value="-1">اختر خزنة</option>


                            <?php  $_smarty_tpl->tpl_vars['save'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['save']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['saveData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['save']->key => $_smarty_tpl->tpl_vars['save']->value){
$_smarty_tpl->tpl_vars['save']->_loop = true;
?>
                            <a href="show_ltr.html"></a>

                            <option value="<?php echo $_smarty_tpl->tpl_vars['save']->value->saveid;?>
"><?php echo $_smarty_tpl->tpl_vars['save']->value->savename;?>
</option>


                            <?php } ?>


                        </select>

                    </div>
                    <?php }?>
                    <div class="form-group">

                        <label class="sr-only">اسم العمليه</label>
                        <select class="select2 wdt300"  name="processid" id="processid" >
                            <option value="-1">  اختر عمليه </option>


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


                            <option value="<?php echo $_smarty_tpl->tpl_vars['process']->value->processname;?>
"><?php echo $_smarty_tpl->tpl_vars['process']->value->processname;?>
</option>


                            <?php } ?>


                        </select>

                    </div>
                    <div class="form-group">
                        <label class="sr-only">المستخدم</label>
                        <select class="select2 wdt300"  name="userId" id="userId" >
                            <option value="-1">  اختر مستخدم </option>
                            <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['usersData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['data']->iteration=0;
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
 $_smarty_tpl->tpl_vars['data']->iteration++;
?>
                            <option value="<?php echo $_smarty_tpl->tpl_vars['data']->value->userid;?>
"><?php echo $_smarty_tpl->tpl_vars['data']->value->employeename;?>
</option>
                            <?php } ?>
                        </select>
                    </div>
                    <div class="form-group">
                        <label class="sr-only">رصيد صافي</label>
                        <input type="checkbox" name="bure" checked="checked" id="bure" value="1" />
                        <label for="bure"></label>
                    </div>
                    <div class="form-group">
                        <label class="sr-only"> قاعدة البيانات</label>
                        <input type="checkbox" name="db"  id="db" value="1" onclick='localStorage.setItem("db", Number($(this).is(":checked")))'/>
                        <label for="bure"></label>
                    </div>
                    <br/>

                    <?php if ($_smarty_tpl->tpl_vars['savedailydate']->value==1){?>
                    <div id="dateTimeDiv">
                        <div class="form-group">
                            <label class="sr-only">من التاريخ</label>
                            <div  class="input-group date form_datetime col-md-5" data-date="" data-date-format="yyyy-mm-dd  h:i:s" data-link-field="dtp_input1">
                                <input class="form-control" size="16" type="text" value="" name="from" id="from" readonly="" >
                                <span class="input-group-addon " style="width: 0%;"><span class=" glyphicon glyphicon-remove col-lg-4"></span></span>
                                <span class="input-group-addon"  style="width: 0%;"><span class="glyphicon glyphicon-th col-lg-4"></span></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="sr-only">إلى التاريخ</label>
                            <div  class="input-group date form_datetime col-md-5" data-date="" data-date-format="yyyy-mm-dd  h:i:s" data-link-field="dtp_input1">
                                <input class="form-control" size="16" type="text" value="" name="to" id="to" readonly="" >
                                <span class="input-group-addon " style="width: 0%;"><span class=" glyphicon glyphicon-remove col-lg-4"></span></span>
                                <span class="input-group-addon" style="width: 0%;"><span class="glyphicon glyphicon-th col-lg-4"></span></span>
                            </div>
                        </div>
                    </div>

                    <div id="dateOnlyDiv">
                        <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>
                    </div>

                    <div class="form-group">
                        <label class="sr-only">بحث بـ</label>
                        <div  class="input-group">
                            <label>  <input value="dateOnly" name="search" id="searchdateOnly" type="radio" checked onclick='localStorage.setItem("search", "dateOnly");
                                    window.location.reload();'>
                                تاريخ</label>
                            <label>
                                <input value="dateTime" name="search" id="searchdateTime" type="radio" onclick='localStorage.setItem("search", "dateTime");
                                        window.location.reload();'>
                                تاريخ ووقت</label>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                    <button type="submit" class="btn btn-primary">بحث</button>
                </form>
                <?php }?>
            </div>

            <div class="clearfix"></div>
            <hr/>
            <div class="panel panel-default panel-m">
                <!-- Default panel contents -->
                <div class="panel-heading"><?php echo $_smarty_tpl->tpl_vars['message']->value;?>
</div>





                <!-- Tab panes -->
                <div class="tab-content">


                    <!-- Nav tabs -->
                    <ul class="nav nav-tabs hidden-print">
                        <li class="active"><a href="#savetab" data-toggle="tab">يومية الخزنة</a></li>
                        <?php if ($_smarty_tpl->tpl_vars['Programsetting']->value->visaPay==1){?><li><a href="#accountTab" data-toggle="tab">الدفع الالكترونى</a></li><?php }?>
                    </ul>
                    <div class="tab-pane active" id="savetab"><!-- start the 1st tab -->


                        <div class="panel-body">
                            <?php if (count($_smarty_tpl->tpl_vars['savedailyData']->value)>0){?>
                            <div class="col-lg-offset-8 col-lg-4">
                                <?php if ($_smarty_tpl->tpl_vars['savedailydate']->value==1){?>
                                <div class="well well-sm hidden-print">
                                    <h4 class="text-center">الاجمالى <?php echo $_smarty_tpl->tpl_vars['sumValue']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                                </div>

                                <?php }?>
                            </div>

                            <div class="col-lg-offset-8 col-lg-4">
                                <div class="well well-sm hidden-print">
                                    <h4 class="text-center">قيمة التغير <?php echo $_smarty_tpl->tpl_vars['changeAmountSum']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                                </div>
                            </div>

                            <div class="col-lg-offset-1 col-lg-4">
                                <div class="well well-sm">
                                    <h4 class="text-center">الرصيد الافتتاحي <?php echo $_smarty_tpl->tpl_vars['savecur']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                                </div>
                            </div>


                            <div class="clearfix"></div>
                            <table class="table table-black" >
                                <thead >
                                    <tr style="text-align:center">
                                        <th>اسم الخزينة</th>
                                        <th>اسم العملية</th>
                                        <th>اسم المستخدم</th>
                                        <th>التاريخ</th>
                                        <!---->       <th>المبلغ قبل </th><!---->
                                        <th>
                                            <table   class="table table-child" border="1" width="100%"  style="text-align:center" >
                                                <tr ><td colspan="2" class="">القيمة المتغيرة</td></tr>
                                                <tr class="">
                                                    <td>وارد</td>
                                                    <td>صادر</td></tr>

                                            </table>

                                        </th>
                                        <!---->         <th>المبلغ بعد</th><!---->
                                        <th class="hidden-print ">تفاصيل </th>
                                        <th class="hidden-print ">تفاصيل العملية بالخزنة</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php $_smarty_tpl->tpl_vars['j'] = new Smarty_variable(0, null, 0);?>
                                    <?php $_smarty_tpl->tpl_vars['k'] = new Smarty_variable(0, null, 0);?>
                                    <?php  $_smarty_tpl->tpl_vars['savedaily'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['savedaily']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['savedailyData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['savedaily']->key => $_smarty_tpl->tpl_vars['savedaily']->value){
$_smarty_tpl->tpl_vars['savedaily']->_loop = true;
?>


                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailyid;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1>0){?>
                                    <?php if (($_smarty_tpl->tpl_vars['savedaily']->value->savedailychangetype==0&&$_smarty_tpl->tpl_vars['savedaily']->value->savedailychangeamount>=0)||($_smarty_tpl->tpl_vars['savedaily']->value->savedailychangetype==1&&$_smarty_tpl->tpl_vars['savedaily']->value->savedailychangeamount<0)){?>
                                    <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'j', null); ob_start(); ?><?php ob_start();?><?php echo abs($_smarty_tpl->tpl_vars['savedaily']->value->savedailychangeamount);?>
<?php $_tmp2=ob_get_clean();?><?php echo $_smarty_tpl->tpl_vars['j']->value+$_tmp2;?>
<?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 }elseif(($_smarty_tpl->tpl_vars['savedaily']->value->savedailychangetype==1&&$_smarty_tpl->tpl_vars['savedaily']->value->savedailychangeamount>=0)||($_smarty_tpl->tpl_vars['savedaily']->value->savedailychangetype==0&&$_smarty_tpl->tpl_vars['savedaily']->value->savedailychangeamount<0)){?>
                                    <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'k', null); ob_start(); ?><?php ob_start();?><?php echo abs($_smarty_tpl->tpl_vars['savedaily']->value->savedailychangeamount);?>
<?php $_tmp3=ob_get_clean();?><?php echo $_smarty_tpl->tpl_vars['k']->value+$_tmp3;?>
<?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 ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailychangetype;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4==1){?>
                                    <tr class="danger"> <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailychangetype;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==0){?>
                                        <?php }else{ ?>
                                    <tr>
                                        <?php }}?>
                                        <td><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savename;?>
 </td>
                                        <td>
                                            <?php echo $_smarty_tpl->tpl_vars['savedaily']->value->processname;?>

                                            <?php if (($_smarty_tpl->tpl_vars['savedaily']->value->personName!='0'&&$_smarty_tpl->tpl_vars['savedaily']->value->personName!='')||$_smarty_tpl->tpl_vars['savedaily']->value->savecurrentvalue!=''){?>
                                            ( <?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savecurrentvalue;?>
 )
                                            <?php }?>
                                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp6=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp7=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp8=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp9=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp10=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp11=ob_get_clean();?><?php if ($_tmp6=="buyBillController.php"||$_tmp7=="returnBuyBillController.php"||$_tmp8=="buyAndReturnBillController.php"||$_tmp9=="sellbillController.php"||$_tmp10=="sellbillandruternController.php"||$_tmp11=="returnsellbillController.php"){?>
                                            رقم الفاتورة <?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailymodelid;?>

                                            <?php }?>
                                        </td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->username;?>
</td>
                                        <td nowrap="nowrap"><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailydate;?>
</td>
                                        <!---->
                                        <td>

                                            <?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailysavebefore;?>

                                        </td>
                                        <!---->
                                        <td>
                                            <table border="0" width="100%"  style="text-align:center" class="ddrt">

                                                <tr><td width="50%">
                                                        <?php if (($_smarty_tpl->tpl_vars['savedaily']->value->savedailychangetype==0&&$_smarty_tpl->tpl_vars['savedaily']->value->savedailychangeamount>=0)||($_smarty_tpl->tpl_vars['savedaily']->value->savedailychangetype==1&&$_smarty_tpl->tpl_vars['savedaily']->value->savedailychangeamount<0)){?><?php echo abs($_smarty_tpl->tpl_vars['savedaily']->value->savedailychangeamount);?>
<?php }?>
                                                    </td>
                                                    <td width="50%">
                                                        <?php if (($_smarty_tpl->tpl_vars['savedaily']->value->savedailychangetype==1&&$_smarty_tpl->tpl_vars['savedaily']->value->savedailychangeamount>=0)||($_smarty_tpl->tpl_vars['savedaily']->value->savedailychangetype==0&&$_smarty_tpl->tpl_vars['savedaily']->value->savedailychangeamount<0)){?><?php echo abs($_smarty_tpl->tpl_vars['savedaily']->value->savedailychangeamount);?>
<?php }?>
                                                    </td>
                                                </tr>

                                            </table>

                                        </td>
                                        <!---->
                                        <td>

                                            <?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailysaveafter;?>

                                        </td>
                                        <!---->
                                        <td class="hidden-print ">

                                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp12=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp13=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp14=ob_get_clean();?><?php if ($_tmp12=="buyBillController.php"||$_tmp13=="returnBuyBillController.php"||$_tmp14=="buyAndReturnBillController.php"){?>
                                            <a href="<?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
?do=details&id=<?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailymodelid;?>
" type="button" class="btn btn-default btn-lg editicon"></a>


                                            <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp15=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp16=ob_get_clean();?><?php if ($_tmp15=="sellbillController.php"||$_tmp16=="sellbillandruternController.php"){?>

                                            <a href="<?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
?do=showDetail&sellbillid=<?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailymodelid;?>
" type="button" class="btn btn-default btn-lg editicon"></a>


                                            <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp17=ob_get_clean();?><?php if ($_tmp17=="returnsellbillController.php"){?>

                                            <a href="<?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
?do=showDetail&returnsellbillid=<?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailymodelid;?>
" type="button" class="btn btn-default btn-lg editicon"></a>
                                            <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp18=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp19=ob_get_clean();?><?php if ($_tmp18=="bills.php"||$_tmp19=="billsreturn.php"){?>

                                            <a href="<?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
?do=details&id=<?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailymodelid;?>
" type="button" class="btn btn-default btn-lg editicon"></a>
                                            <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp20=ob_get_clean();?><?php if ($_tmp20=="dailyentry.php"){?>

                                            <a href="<?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
?id=<?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailymodelid;?>
" type="button" class="btn btn-default btn-lg editicon"></a>
                                            <?php }else{ ?>
                                            <a href="<?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
?do=editprint&id=<?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailymodelid;?>
" type="button" class="btn btn-default btn-lg editicon"></a>
                                            <?php }}}}}?>
                                        </td>
                                        <td class="hidden-print "> <a href="#" type="button" class="btn btn-default btn-lg editicon conformdel1" data-position="savedailyController.php?do=showDetail&savedailyid=<?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailyid;?>
"></a> </td>
                                    </tr>

                                    <?php }?>
                                    <?php } ?>
                                    <tr>
                                        <!---->
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <!---->
                                        <!--                                        <td></td>
                                                                                <td></td>
                                                                                <td></td>
                                                                                <td></td>-->
                                        <!---->
                                        <td> <table border="1" width="100%"  style="text-align:center" class="table-black">
                                                <tr><td width="50%">  <?php echo $_smarty_tpl->tpl_vars['j']->value;?>
</td><td width="50%"><?php echo $_smarty_tpl->tpl_vars['k']->value;?>
</td></tr>

                                            </table>
                                        </td>
                                        <!---->
                                        <td></td>
                                        <!---->
                                        <!-- <td></td>
                                        <td></td> -->
                                    </tr>

                                </tbody>

                            </table>

                            <div class="col-lg-offset-8 col-lg-4">
                                <?php if ($_smarty_tpl->tpl_vars['savedailydate']->value==1){?>
                                <div class="well well-sm">

                                    <h4 class="text-center">الاجمالى <?php echo $_smarty_tpl->tpl_vars['sumValue']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>

                                </div>
                                <?php }?>
                            </div>
                            <div class="col-lg-offset-8 col-lg-4">
                                <div class="well well-sm">
                                    <h4 class="text-center">قيمة التغير <?php echo $_smarty_tpl->tpl_vars['changeAmountSum']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                                </div>
                            </div>
                            <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>
                            <?php }else{ ?>
                            <div class="nodata">عفوا لا توجد نتائج</div>
                            <?php }?>




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



                        </div>
                    </div>

                    <?php if ($_smarty_tpl->tpl_vars['Programsetting']->value->visaPay==1){?>
                    <!-- Tab panes -->
                    <div class="tab-pane" id="accountTab"><!-- start the 1st tab -->

                        <div class="col-lg-offset-8 col-lg-4">
                            <?php if ($_smarty_tpl->tpl_vars['savedailydate']->value==1){?>
                            <div class="well well-sm">
                                <h4 class="text-center">الاجمالى <?php echo $_smarty_tpl->tpl_vars['sumValOfVisaAccount']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                            </div>

                            <?php }?>
                        </div>

                        <div class="col-lg-offset-8 col-lg-4">
                            <div class="well well-sm">
                                <h4 class="text-center">قيمة التغير <?php echo $_smarty_tpl->tpl_vars['changeAmountSum_account']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                            </div>
                        </div>

                        <table class="table table-black dataTableClass">
                            <thead>
                                <tr>
                                    <th rowspan="2">#</th>
                                    <th rowspan="2">العملية</th>
                                    <th rowspan="2">تاريخ العملية</th>
                                    <th rowspan="2">الرصيد قبل</th>
                                    <th colspan="2">قيمة العملية</th>
                                    <th rowspan="2">الرصيد بعد</th>
                                    <th rowspan="2">المستخدم</th>
                                    <th rowspan="2">التفاصيل</th>
                                </tr>
                                <tr>
                                    <td>وارد</td>
                                    <td>صادر</td>
                                </tr>
                            </thead>
                            <tbody>



                                <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allMovements']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['data']->iteration=0;
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
 $_smarty_tpl->tpl_vars['data']->iteration++;
?>
                                <tr class="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->accountmovementtype;?>
<?php $_tmp21=ob_get_clean();?><?php if ($_tmp21==1){?> danger <?php }?>">
                                    <td>
                                        <?php echo $_smarty_tpl->tpl_vars['data']->iteration;?>

                                    </td>

                                    <td><?php if ($_smarty_tpl->tpl_vars['data']->value->tablename=="cashTransferController.php"){?><?php echo $_smarty_tpl->tpl_vars['data']->value->processname;?>
<?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['data']->value->processname;?>
 (<?php echo $_smarty_tpl->tpl_vars['data']->value->bankname;?>
- <?php echo $_smarty_tpl->tpl_vars['data']->value->accountname;?>
 <?php if ($_smarty_tpl->tpl_vars['data']->value->clientname){?>/<?php echo $_smarty_tpl->tpl_vars['data']->value->clientname;?>
<?php }?>)<?php }?></td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->accountmovementdate;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->accountmovementbefore;?>
</td>
                                    <td>
                                        <?php if ($_smarty_tpl->tpl_vars['data']->value->accountmovementtype==0){?>
                                        <?php echo $_smarty_tpl->tpl_vars['data']->value->accountmovementamount;?>

                                        <?php }?>
                                    </td>
                                    <td>
                                        <?php if ($_smarty_tpl->tpl_vars['data']->value->accountmovementtype==1){?>
                                        <?php echo $_smarty_tpl->tpl_vars['data']->value->accountmovementamount;?>

                                        <?php }?>
                                    </td>


                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->accountmovementafter;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->employeename;?>
</td>
                                    <td>
                                        <a href="
                                           <?php if ($_smarty_tpl->tpl_vars['data']->value->tablename=='sellbillController.php'){?>
                                           <?php echo $_smarty_tpl->tpl_vars['data']->value->tablename;?>
?do=showDetail&sellbillid=<?php echo $_smarty_tpl->tpl_vars['data']->value->accountmovementmodelid;?>

                                           <?php }elseif($_smarty_tpl->tpl_vars['data']->value->tablename=='sellbillandruternController.php'){?>
                                           <?php echo $_smarty_tpl->tpl_vars['data']->value->tablename;?>
?do=showDetail&sellbillid=<?php echo $_smarty_tpl->tpl_vars['data']->value->accountmovementmodelid;?>

                                           <?php }elseif($_smarty_tpl->tpl_vars['data']->value->tablename=='returnsellbillController.php'){?>
                                           <?php echo $_smarty_tpl->tpl_vars['data']->value->tablename;?>
?do=showDetail&returnsellbillid=<?php echo $_smarty_tpl->tpl_vars['data']->value->accountmovementmodelid;?>

                                           <?php }else{ ?>
                                           <?php echo $_smarty_tpl->tpl_vars['data']->value->tablename;?>
?do=details&<?php if ($_smarty_tpl->tpl_vars['data']->value->tablename=='bankaccountController.php'){?>accountid=<?php }else{ ?>id=<?php }?><?php echo $_smarty_tpl->tpl_vars['data']->value->accountmovementmodelid;?>

                                           <?php }?>
                                           "
                                           target="_blank">التفاصيل</a></td>
                                </tr>
                                <?php } ?>


                            </tbody>
                        </table>

                        <div class="col-lg-offset-8 col-lg-4">
                            <?php if ($_smarty_tpl->tpl_vars['savedailydate']->value==1){?>
                            <div class="well well-sm">
                                <h4 class="text-center">الاجمالى <?php echo $_smarty_tpl->tpl_vars['sumValOfVisaAccount']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                            </div>

                            <?php }?>
                        </div>

                        <div class="col-lg-offset-8 col-lg-4">
                            <div class="well well-sm">
                                <h4 class="text-center">قيمة التغير <?php echo $_smarty_tpl->tpl_vars['changeAmountSum_account']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <?php }?>
                </div>


            </div>
        </div>
        <!--<input id="ddrt" name="ddrt" value="">-->
        
        <script>
            var search = localStorage.getItem("search");
            if (search == "dateTime") {
                $('#searchdateTime').attr('checked', 'checked');
                $('#searchdateOnly').removeAttr('checked');
                //
                $('#dateTimeDiv').show();
                $('#dateOnlyDiv').remove();
            } else {
                $('#searchdateOnly').attr('checked', 'checked');
                $('#searchdateTime').removeAttr('checked');
                //
                $('#dateOnlyDiv').show();
                $('#dateTimeDiv').remove();
            }
            var db = Number(localStorage.getItem("db"));
            if (db == 1) {
                $('#db').attr('checked', 'checked');
            } else {
                $('#db').removeAttr('checked');
            }
            /*
             //write number at input id=ddrt, mark it with sucess class @ value columns
             $('#ddrt').on('blur', function () {
             var val = $(this).val();
             $('.ddrt td').each(function () {
             if ($(this).text().trim() == val) {
             $(this).parent().parent().addClass('success');
             }
             })
             })
             $('.ddrt').on('click', function () {
             $(this).addClass('success');
             })
             */
        </script>
        <?php }} ?>