<?php /* Smarty version Smarty-3.1.11, created on 2025-01-19 19:28:27
         compiled from "../views/default/incomeview/show.html" */ ?>
<?php /*%%SmartyHeaderCode:1280180462678d363bc207f7-96973481%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'd82951edfec59262479f3257b118993fa2b6d24b' => 
    array (
      0 => '../views/default/incomeview/show.html',
      1 => 1697572092,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1280180462678d363bc207f7-96973481',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'youtubes' => 0,
    'outputString' => 0,
    'alldata' => 0,
    'type' => 0,
    'allCostcenter' => 0,
    'myallCostcenter' => 0,
    'projectid' => 0,
    'Programsettingdata' => 0,
    'clientsData' => 0,
    'data' => 0,
    'searchinonesave' => 0,
    'saves' => 0,
    'saveid' => 0,
    'message' => 0,
    'sum' => 0,
    'incomeData' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_678d363bd125f2_07386690',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_678d363bd125f2_07386690')) {function content_678d363bd125f2_07386690($_smarty_tpl) {?><div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#"><?php echo @EXPENSES_REVENUE;?>
</a></li>
            <li><a href="#"> <?php echo @REVENUE;?>
</a></li>
            <li class="active"><?php echo @REVENUE_SHOW;?>
</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading" style="padding:5px 15px 15px">
                <h3 class="panel-title" style="display: inline-block;"><?php echo @REVENUE_SHOW;?>
</h3>
                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[102]->url;?>
" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>
                <a href="incomeController.php" class="hidden-print"><input type="button" style="margin-left: 12px" id="submit"  class="btn btn-primary pull-left " value="<?php echo @REVENUE_ADD_NEW;?>
"/></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="incomeController.php?do=show">
                    <div class="form-group">
                        <label class="sr-only"><?php echo @REVENUE_NAME_TYPE;?>
</label>
                        <select data-placeholder="<?php echo @REVENUE_CHOOSE_TYPE;?>
"  class="select2 wdt100"  name="incomeTypeId" id="incomeTypeId" >
                            <option value="-1"><?php echo @REVENUE_CHOOSE_TYPE;?>
</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->incomeTypeId;?>
"><?php echo $_smarty_tpl->tpl_vars['type']->value->incomeTypeName;?>
</option>

                            <?php } ?>

                        </select>

                    </div>
                    <div class="form-group"   >
                        <label class="sr-only"><?php echo @REVENUE_COST_CENTER;?>
</label>
                            <select class="select2 wdt100" name="Costcenterid" id="Costcenterid" >
                                <option value="-1" ><?php echo @REVENUE_CHOOSE_COST_CENTER;?>
</option>
                                <?php  $_smarty_tpl->tpl_vars['myallCostcenter'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['myallCostcenter']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allCostcenter']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['myallCostcenter']->key => $_smarty_tpl->tpl_vars['myallCostcenter']->value){
$_smarty_tpl->tpl_vars['myallCostcenter']->_loop = true;
?>
                                <option value="<?php echo $_smarty_tpl->tpl_vars['myallCostcenter']->value->id;?>
" <?php if ($_smarty_tpl->tpl_vars['myallCostcenter']->value->id==$_smarty_tpl->tpl_vars['projectid']->value){?>selected=""<?php }?>><?php echo $_smarty_tpl->tpl_vars['myallCostcenter']->value->name;?>
</option>
                                <?php } ?>
                            </select>
                    </div>
                    <div class="form-group"  <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->incomeclient==1){?> style="display:none" <?php }?> >
                        <label class="sr-only"><?php echo @REVENUE_CLIENTS;?>
</label>
                            <select class="select2 wdt100" name="clientid" id="clientid" >
                               <option value="-1"><?php echo @REVENUE_CHOOSE_CLIENT;?>
</option>
                                    <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['clientsData']->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->clientid;?>
" ><?php echo $_smarty_tpl->tpl_vars['data']->value->clientname;?>
</option>
                                    <?php } ?>
                            </select>
                    </div>
         

                    <?php if ($_smarty_tpl->tpl_vars['searchinonesave']->value==1){?>
                    <input type="hidden" name="saveid" id="saveid" value="<?php echo $_smarty_tpl->tpl_vars['saves']->value;?>
" />
                    <?php }else{ ?>
                    <div class="form-group">
                        <label class="sr-only"><?php echo @REVENUE_SAFE;?>
</label>
                        <select name="saveid" id="saveid" class="select2 wdt100">
                                <option value="-1"><?php echo @REVENUE_CHOOSE_SAFE;?>
</option>
                            <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['saves']->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 if ($_smarty_tpl->tpl_vars['saveid']->value==$_smarty_tpl->tpl_vars['data']->value->saveid){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->savename;?>
</option>
                            <?php } ?>
                        </select>
                    </div>
                    <?php }?>


                    <br />
                    <div class="form-group">
                        <label class="sr-only"><?php echo @REVENUE_FROM_DATE;?>
</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"><?php echo @REVENUE_TO_DATE;?>
</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"><?php echo @REVENUE_SEARCH;?>
</button>
                </form>


                <div class="panel panel-default panel-m">
                    <!-- 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-8 col-lg-4 ">
                            <div class="well well-sm">
                                <h4 class="text-center"><?php echo @REVENUE_TOTAL;?>
 :  <?php echo $_smarty_tpl->tpl_vars['sum']->value;?>
</h4>
                            </div>
                        </div>
                        
                        <br />        <br />
                        <br />
                        <br />

                        <form id="form1" name="form1" method="post" action="incomeController.php?do=show">
                            
                            <!-- Table -->
                            <table class="table table-black">
                                <thead>
                                    <tr>

                                        <th ><?php echo @REVENUE_NAME;?>
</th>
                                        <th><?php echo @REVENUE_TYPE;?>
</th>
                                        <th <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->incomeclient==1){?> style="display:none" <?php }?>>العميل</th>
                                         <th><?php echo @REVENUE_SAFE;?>
</th>
                                        <th><?php echo @REVENUE_DATE;?>
</th>
                                        <th><?php echo @REVENUE_AMOUNT;?>
</th>
                                        <th><?php echo @REVENUE_COMMIT;?>
</th>
                                        <th class="hidden-print"><?php echo @REVENUE_TEMPORARY_DELETE;?>
/<?php echo @REVENUE_UNDELETE;?>
</th>
                                        <th class="hidden-print"><?php echo @REVENUE_EDIT;?>
</th>
                                        <th class="hidden-print"><?php echo @REVENUE_DELETE;?>
</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['incomeData']->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{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->conditions;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2==0){?>

                                    <tr> <?php }}?>

                                        <td> <?php echo $_smarty_tpl->tpl_vars['data']->value->incomeName;?>
 </td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->incomeTypeName;?>
</td>
                                        <td <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->incomeclient==1){?> style="display:none" <?php }?>> <?php echo $_smarty_tpl->tpl_vars['data']->value->clientid;?>
 </td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->savename;?>
</td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->incomeDate;?>
</td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->incomeValue;?>
</td>
                                        <td><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->incomeDetails;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3!=''){?>
                                            <?php echo $_smarty_tpl->tpl_vars['data']->value->incomeDetails;?>

                                            <?php }else{ ?><?php echo @REVENUE_NO_COMMENT;?>

                                            <?php }?> </td>
                                        <td  class="hidden-print">

                                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->conditions;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4==0){?> <a href="incomeController.php?do=tempdelete&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->incomeId;?>
" type="button" class="btn btn-default btn-lg removeicon"> </a>
                                            <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->conditions;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==1){?> <a  href="incomeController.php?do=returndelete&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->incomeId;?>
" type="button" class="btn btn-default btn-lg correcticon"> </a>
                                            <?php }}?>
                                        </td>


                                        <td  class="hidden-print"> <a href="incomeController.php?do=edit&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->incomeId;?>
"  type="button" class="btn btn-default btn-lg editicon"></a></td>
                                        <td class="hidden-print" ><!--<a onclick="getValue(<?php echo $_smarty_tpl->tpl_vars['data']->value->expensesid;?>
)" name="dd" > حذف </a>-->
                                            <a href="incomeController.php?do=delete&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->incomeId;?>
&action=<?php echo $_smarty_tpl->tpl_vars['data']->value->dailyentryid;?>
" name="dd"  type="button" class="btn btn-default btn-lg deleteicon"
                                               onclick="getValue(<?php echo $_smarty_tpl->tpl_vars['data']->value->incomeId;?>
);"> </a> </td>
                                    </tr>
                                    <?php } ?>

                                </tbody>

                            </table>

                        </form>
                        <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"><?php echo @REVENUE_PRINT;?>
</button>
                                    </div>
                                </div>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        
        <script type="text/javascript">

            function getValue(idval)
            {
                var confirmDel = window.confirm("هل تريد حذف العنصر؟");
                //alert(confirmDel);

                if (confirmDel == true)
                {
                    // x="You pressed OK!";
                    window.location.href = "incomeController.php?do=delete&id=" + idval;
                }
                else
                {
                    // x="You pressed Cancel!";
                    event.preventDefault();
                }


            }



        </script>
        <?php }} ?>