<?php /* Smarty version Smarty-3.1.11, created on 2025-01-27 15:20:59
         compiled from "../views/default/projectsaccountreportview/show.html" */ ?>
<?php /*%%SmartyHeaderCode:21473095846797883bb7fc25-23321180%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '859e9cfc425f6c2d06ea7a0077dcbe4b269093d5' => 
    array (
      0 => '../views/default/projectsaccountreportview/show.html',
      1 => 1697572092,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '21473095846797883bb7fc25-23321180',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'youtubes' => 0,
    'date' => 0,
    'projectid' => 0,
    'allexpensestype' => 0,
    'expensestype' => 0,
    'alltotals' => 0,
    'alltotalvalues' => 0,
    'clientdebtchanges' => 0,
    'clientdebtchange' => 0,
    'totalchange' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_6797883bc222b5_38848656',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_6797883bc222b5_38848656')) {function content_6797883bc222b5_38848656($_smarty_tpl) {?>

<div class="row">
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="#">المشروعات </a></li>
            <li><a href="projectsaccountreport.php">  تقرير حساب المشروعات </a></li>
            <li class="active">عرض   </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;"> عرض       </h3>
                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[198]->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="projectstagesController.php" class="hidden-print"><input type="button"  id="submit" style="margin-left: 12px" class="btn btn-primary pull-left " value="إضافة جديد"/></a>
            </div> -->
            
            <!-- <hr/> -->

            <form class="form-inline hidden-print" method="post" action="projectsaccountreport.php">
                    
                   
                        
                    <div class="form-group">
                        <label class="sr-only">من التاريخ</label>
                        <input type="text" class="form-control awdatepicker getprojectdatareport" autocomplete="off"   data-date-format="yyyy-mm-dd"  name="start_date" value="<?php echo $_smarty_tpl->tpl_vars['date']->value;?>
">
                    </div>
                    <div class="form-group">
                        <label class="sr-only">إلى التاريخ</label>
                        <input type="text" class="form-control awdatepicker getprojectdatareport" autocomplete="off"   data-date-format="yyyy-mm-dd"  name="end_date" value="<?php echo $_smarty_tpl->tpl_vars['date']->value;?>
">
                    </div>
                     
                     <div class="form-group"  >
                        <label class="sr-only">المشروعات</label>
                        <div style="width: 400px;">
                            <input type="text"  class=" getselectjoin getprojectdatareport" name="projectid" id="projectid"  data-placeholder="اختر  "   data-table="project"   
                            data-search="name"/> 
                        </div> 
                    </div>
                    <button type="submit" class="btn btn-primary">بحث</button>

                    
                   
            </form>
            <hr/>


            <?php if ($_smarty_tpl->tpl_vars['projectid']->value){?>
            <div class="row">
                <div class="col-lg-6" >
                    <div class="col-lg-12 text-center"  style="color: red;font-size: 20px">المصروفات </div>
                    <table class="col-lg-12 text-center table table-bordered">
                        <thead style="background: #ccc;font-size: 20px">
                            <tr>
                                <td width="40%">نوع المصروف</td>
                                <td width="20%">المصروف</td>
                                <td width="40%"> النسبه
                                    <table class="table billtable table-bordered">
                                        <tr>
                                            <td style="color:black!important;width: 50%" class="color-black"> النوع</td>
                                            <td style="color:black!important;width: 50%" class="color-black"> القيمه</td>
                                        </tr>
                                    </table>
                                </td>

                            </tr>
                        </thead>
                        <tbody>
                             <?php  $_smarty_tpl->tpl_vars['expensestype'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['expensestype']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allexpensestype']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['expensestype']->key => $_smarty_tpl->tpl_vars['expensestype']->value){
$_smarty_tpl->tpl_vars['expensestype']->_loop = true;
?>
                            <tr>
                                <td><?php echo $_smarty_tpl->tpl_vars['expensestype']->value['expensestypename'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['expensestype']->value['totalend'];?>
</td>
                                <td><span style="float: right;padding-right: 30px"><?php echo $_smarty_tpl->tpl_vars['expensestype']->value['amounttext'];?>
</span> <span style="float: left;padding-left: 30px"><?php echo $_smarty_tpl->tpl_vars['expensestype']->value['amount'];?>
</span></td>
                            </tr>
                            <?php } ?>
                             <tr style="background: #9effb0">
                                <td>الاجمالى</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['alltotals']->value;?>
</td>
                                <td style="text-align: center;"><?php echo $_smarty_tpl->tpl_vars['alltotalvalues']->value;?>
</td>
                            </tr>
                        </tbody>
                    </table>


                </div>
                <div class="col-lg-1" >

                </div>
                <div class="col-lg-5" >
                    <div class="col-lg-12 text-center" style="color: red;font-size: 20px">التحصيل </div>
                     <table class="col-lg-12 text-center table table-bordered">
                        <thead style="background: #ccc;font-size: 20px">
                            <tr>
                                <td width="50%">التاريخ</td>
                                <td width="50%">القيمه</td>
                            </tr>
                        </thead>
                        <tbody>
                              <?php $_smarty_tpl->tpl_vars['totalchange'] = new Smarty_variable(0, null, 0);?>
                            <?php  $_smarty_tpl->tpl_vars['clientdebtchange'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['clientdebtchange']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['clientdebtchanges']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['clientdebtchange']->key => $_smarty_tpl->tpl_vars['clientdebtchange']->value){
$_smarty_tpl->tpl_vars['clientdebtchange']->_loop = true;
?>
                            <tr>
                                <td><?php echo $_smarty_tpl->tpl_vars['clientdebtchange']->value['clientdebtchangedate'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['clientdebtchange']->value['clientdebtchangeamount'];?>
</td>
                            </tr>
                            <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'totalchange', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['totalchange']->value+$_smarty_tpl->tpl_vars['clientdebtchange']->value['clientdebtchangeamount'];?>
<?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 } ?>
                             <tr style="background: #9effb0">
                                <td>الاجمالى</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['totalchange']->value;?>
</td>
                            </tr>
                        </tbody>
                    </table>

                </div>
            </div>
            <div class="container">
                <table class="col-lg-12 text-center table table-bordered">
                    <thead style="background: #ccc;font-size: 20px">
                        <tr>
                            <td width="40%">اجمالى المصروفات </td>
                            <td width="30%">الاشراف</td>
                            <td width="40%">التحصيل</td>
                        </tr>
                    </thead>
                    <tbody>
                        
                        <tr>
                             <td><?php echo $_smarty_tpl->tpl_vars['alltotals']->value;?>
</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['alltotalvalues']->value;?>
</td>
                           <td><?php echo $_smarty_tpl->tpl_vars['totalchange']->value;?>
</td>
                        </tr>
                      
                    </tbody>
                </table>
            </div>
            <div class="row">
                <div class="col-lg-12 text-center" style="font-size: 30px"> المطلوب </div>
                <div class="col-lg-12 text-center" > <h2><?php echo ($_smarty_tpl->tpl_vars['alltotals']->value+$_smarty_tpl->tpl_vars['alltotalvalues']->value)-$_smarty_tpl->tpl_vars['totalchange']->value;?>
  </h2> </div>
            </div>
            <?php }?>
            <div class="clearfix"></div>
        </div>

    </div>

</div>



<?php }} ?>