<?php /* Smarty version Smarty-3.1.11, created on 2026-03-21 11:29:57
         compiled from "..\views\default\savedailyview\show2.html" */ ?>
<?php /*%%SmartyHeaderCode:1321369be6515468c89-62943752%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '16c6134910a2128d1a5b26381c46febfe2329f65' => 
    array (
      0 => '..\\views\\default\\savedailyview\\show2.html',
      1 => 1752437506,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1321369be6515468c89-62943752',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'youtubes' => 0,
    'searchinonesave' => 0,
    'saveData' => 0,
    'save' => 0,
    'savedailydate' => 0,
    'message' => 0,
    'savedailyData' => 0,
    'sumValue' => 0,
    'currency' => 0,
    'changeAmountSum' => 0,
    'savedaily' => 0,
    'j' => 0,
    'k' => 0,
    'burex' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_69be6515c5c713_68844257',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_69be6515c5c713_68844257')) {function content_69be6515c5c713_68844257($_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;
    }
    th,td{
            text-align: center;
        }

    @media print {
        .table-black {
            // border : 1px solid black;
        }

        td,
        th{
            border: 1px solid #000 !important;
        }


        label {
            padding-top: 20px;
        }
        th,td{
            text-align: center;
        }

        .table thead{
            background-color:#3276b1!important;
        color:#fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        }

        /* p,
        h4,
        h3,
        h2,
        h1,
        span,
        label,
        td,
        th,
        div.dataTables_info,
        a,
        .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
        div.dataTables_wrapper div.dataTables_info,
        .panel-heading,
        tr.odd td.sorting_1 {
            color: #000 !important
        } */
    }
</style>

<div class="row">
    <div class="container">
        <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[119]->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=show2" method="post">


                    <?php if ($_smarty_tpl->tpl_vars['searchinonesave']->value==0){?>
                    <div class="form-group">
                        <label class="sr-only">الخزنة</label>
                        <select class="select2 wdt100" 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;
?>


                            <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 }?>

                    <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>
                    <?php }?>
                    <button type="submit" class="btn btn-primary">بحث</button>
                </form>
            </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>
                <?php if (count($_smarty_tpl->tpl_vars['savedailyData']->value)>0){?>
                <div class="panel-body"> <?php ob_start();?><?php echo count($_smarty_tpl->tpl_vars['savedailyData']->value);?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1>0){?>
                    <div class="col-lg-offset-8 col-lg-4">
                        <?php if ($_smarty_tpl->tpl_vars['savedailydate']->value==1){?>
                        <div class="well well-sm mytotal">
                            <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 mytotal">
                            <h4 class="text-center">قيمة التغير <?php echo $_smarty_tpl->tpl_vars['changeAmountSum']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                        </div>
                    </div>
                    <?php }?>
                    <div class="clearfix"></div>
                    <table class="table table-black" style="text-align:center">
                        <thead>
                            <tr>
                                <th>اسم الخزينة</th>
                                <th>اسم العملية</th>
                                <th>اسم المستخدم</th>
                                <th>التاريخ</th>
                                <th>نوع العمليه</th>

                                <th>
                                    <table class="table table-black " border="1" width="100%" style="text-align:center">
                                        <tr>
                                            <td colspan="2"> القيمة المتغيرة</td>
                                        </tr>
                                        <tr>
                                            <td>ايراد</td>
                                            <td>سحب</td>
                                        </tr>

                                    </table>
                                </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 $_tmp2=ob_get_clean();?><?php if ($_tmp2>0){?>
                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailychangetype;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3==0){?>
                            <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'j', null); ob_start(); ?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailychangeamount;?>
<?php $_tmp4=ob_get_clean();?><?php echo $_smarty_tpl->tpl_vars['j']->value+$_tmp4;?>
<?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 }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailychangetype;?>
<?php $_tmp5=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp5==1&&$_tmp6=="returnsellbillController.php"){?>
                            <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'k', null); ob_start(); ?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailychangeamount;?>
<?php $_tmp7=ob_get_clean();?><?php echo $_smarty_tpl->tpl_vars['k']->value-$_tmp7;?>
<?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 }else{ ?>
                            <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'k', null); ob_start(); ?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailychangeamount;?>
<?php $_tmp8=ob_get_clean();?><?php echo $_smarty_tpl->tpl_vars['k']->value+$_tmp8;?>
<?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 $_tmp9=ob_get_clean();?><?php if ($_tmp9==1){?>
                            <tr class="danger"> <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailychangetype;?>
<?php $_tmp10=ob_get_clean();?><?php if ($_tmp10==0){?>

                            <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 $_tmp11=ob_get_clean();?><?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 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 ($_tmp11=="buyBillController.php"||$_tmp12=="returnBuyBillController.php"||$_tmp13=="buyAndReturnBillController.php"||$_tmp14=="sellbillController.php"||$_tmp15=="sellbillandruternController.php"||$_tmp16=="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 if ($_smarty_tpl->tpl_vars['savedaily']->value->savedailychangetype==1){?>سحب <?php }else{ ?> ايداع<?php }?></td>
                                <td>
                                    <table border="1" width="100%" style="text-align:center" class="table-black">

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

                                    </table>
                                </td>
                                <td class="hidden-print ">
                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp19=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp20=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp21=ob_get_clean();?><?php if ($_tmp19=="buyBillController.php"||$_tmp20=="returnBuyBillController.php"||$_tmp21=="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 $_tmp22=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp23=ob_get_clean();?><?php if ($_tmp22=="sellbillController.php"||$_tmp23=="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 $_tmp24=ob_get_clean();?><?php if ($_tmp24=="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 $_tmp25=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['savedaily']->value->tablename;?>
<?php $_tmp26=ob_get_clean();?><?php if ($_tmp25=="bills.php"||$_tmp26=="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{ ?>
                                    <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="savedailyController.php?do=showDetail&savedailyid=<?php echo $_smarty_tpl->tpl_vars['savedaily']->value->savedailyid;?>
"
                                        type="button" class="btn btn-default btn-lg editicon"></a> </td>
                            </tr>
                            <?php }?>
                            <?php } ?>
                            <tr>
                                <?php if ($_smarty_tpl->tpl_vars['burex']->value!=1){?>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                    <?php }else{ ?>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                    <?php }?>
                                    <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>
                                    <?php if ($_smarty_tpl->tpl_vars['burex']->value!=1){?>
                                        <td class="hidden-print "></td>
                                        <?php }?>
                                        <td class="hidden-print "></td>
                                        <td class="hidden-print "></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 mytotal">

                            <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 mytotal">
                            <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>
                    <div class="clearfix"></div>
                </div>
            </div>
            <?php }else{ ?>
            <div class="nodata">عفوا لا توجد نتائج</div>
            <?php }?>
        </div>

        
        <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();
            }
        </script>
        <?php }} ?>