<?php /* Smarty version Smarty-3.1.11, created on 2025-12-30 20:03:39
         compiled from "..\views\default\expensesReportview\showbytype.html" */ ?>
<?php /*%%SmartyHeaderCode:14746695413fbb881a5-55864990%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '2812cbd1a0fb063f80065b9d3bfe782d329751ac' => 
    array (
      0 => '..\\views\\default\\expensesReportview\\showbytype.html',
      1 => 1752437506,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '14746695413fbb881a5-55864990',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'youtubes' => 0,
    'outputString' => 0,
    'alldata' => 0,
    'type' => 0,
    'allSaves' => 0,
    'data' => 0,
    'allUsers' => 0,
    'message' => 0,
    'sum' => 0,
    'results' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_695413fbe22c88_67883354',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_695413fbe22c88_67883354')) {function content_695413fbe22c88_67883354($_smarty_tpl) {?><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">تقرير تصنيفات المصروفات
                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[103]->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">

                <!---------- start outputString alert ----------->
                <div id="outputString" class="alert alert-block alert-success fade in" style="display:none">
                    <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">&times;</button>
                    <p id="outputStringValue"><?php echo $_smarty_tpl->tpl_vars['outputString']->value;?>
</p>
                    <div class="clearfix"></div>
                </div>
                <!---------  end outputString alert ------------>

                <form class="form-inline hidden-print" method="post" action="expensesReportController.php?do=showByType">
                    <div class="form-group">
                        <label class="sr-only"> نوع المصروف</label>
                        <select class="select2 wdt100"  name="expensestypeid" id="expensestypeid" >
                            <option value="-1">كل الانواع</option>
                            <?php  $_smarty_tpl->tpl_vars['type'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['type']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['alldata']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['type']->key => $_smarty_tpl->tpl_vars['type']->value){
$_smarty_tpl->tpl_vars['type']->_loop = true;
?>
                            <option value="<?php echo $_smarty_tpl->tpl_vars['type']->value->expensestypeid;?>
"><?php echo $_smarty_tpl->tpl_vars['type']->value->expensestypename;?>
</option>
                            <?php } ?>
                        </select>
                    </div>
                    <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['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allSaves']->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;
?>
                            <option value="<?php echo $_smarty_tpl->tpl_vars['data']->value->saveid;?>
"><?php echo $_smarty_tpl->tpl_vars['data']->value->savename;?>
</option>
                            <?php } ?>
                        </select>
                    </div>
                    <div class="form-group">
                        <label class="sr-only">المستخدم</label>
                        <select class="select2 wdt100"  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['allUsers']->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;
?>
                            <option value="<?php echo $_smarty_tpl->tpl_vars['data']->value->userid;?>
"><?php echo $_smarty_tpl->tpl_vars['data']->value->employeename;?>
</option>
                            <?php } ?>
                        </select>
                    </div>
                    <br />
                    <div class="form-group">
                        <label class="sr-only">من التاريخ</label>
                        <input type="text" class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd" name="from" >
                    </div>
                    <div class="form-group">
                        <label class="sr-only">إلى التاريخ</label>
                        <input type="text" class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd" name="to" >
                    </div>
                    <button type="submit" class="btn btn-primary hidden-print">بحث</button>
                </form>
                <div class="panel panel-default">
                    <!-- Default panel contents -->
                    <div class="panel-heading"><?php echo $_smarty_tpl->tpl_vars['message']->value;?>
</div>
                    <div class="panel-body">
                        <!--
                                                <div class="col-lg-offset-6 col-lg-4 ">
                                                    <div class="well well-sm">
                                                        <h4 class="text-center">إجمالي المصروفات:  <?php echo $_smarty_tpl->tpl_vars['sum']->value;?>
</h4>

                                                    </div>

                                                </div>
                                                <br /><br /><br /><br /><br />-->
                        <!-- Table -->
                        <table class="table table-black">
                            <thead>
                                <tr>

                                    <th>نوع المصروف</th>
                                    <th>المبلغ</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $_smarty_tpl->tpl_vars['sum'] = new Smarty_variable(0, null, 0);?>
                                <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['results']->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->conditions;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==1){?>
                                <tr class="danger">
                                    <?php }else{ ?>
                                <tr>
                                    <?php }?>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->expensestypename;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->sumExpensesValue;?>
</td>
                                </tr>
                                <?php $_smarty_tpl->tpl_vars['sum'] = new Smarty_variable($_smarty_tpl->tpl_vars['sum']->value+$_smarty_tpl->tpl_vars['data']->value->sumExpensesValue, null, 0);?>
                                <?php } ?>

                            </tbody>

                        </table>
                        <div class="clearfix hidden-print"></div>
                        <hr />
                        <div  class="">

                            <div class="col-lg-offset-8 col-lg-4 ">
                                <div class="well well-sm">
                                    <h4 class="text-center">إجمالي المصروفات:  <?php echo $_smarty_tpl->tpl_vars['sum']->value;?>
</h4>
                                </div>
                            </div>
                            <div class="clearfix"></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>
                </div>
            </div>
        </div>

<?php }} ?>