<!doctype html>
<html lang="en" class="h-100">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
    <meta name="generator" content="Hugo 0.88.1">
    <title>برنامج البسيط للمحاسبة</title>


    

    <!-- Bootstrap core CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
    <link rel="canonical" href="cover.css">

    <style>
      .bd-placeholder-img {
        font-size: 1.125rem;
        text-anchor: middle;
        -webkit-user-select: none;
        -moz-user-select: none;
        user-select: none;
      }
      
      tr{
          color:#fff;
          
      }
      table{
              direction: rtl;
      }

      @media (min-width: 768px) {
        .bd-placeholder-img-lg {
          font-size: 3.5rem;
        }
      }
    </style>

    
    <!-- Custom styles for this template -->
    <link href="cover.css" rel="stylesheet">
  </head>
  <body class="d-flex h-100 text-center text-white bg-dark" style='    background: url(../views/default/assets/img/bg-pay2.jpg);background-size: cover;font-size: 1.125rem;'>
    
<div class="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column">
    
   <div class="row">
              {literal}
                <form class="form-horizontal"  action="studentControllerAjax.php?do=detailbranches"   method="post"  enctype="multipart/form-data" >

                    {/literal}
             <div class="form-group"  >
              
                <div >
                    <label  class="control-label">الشهر </label>
                    <select name="months"   data-placeholder="اختر " class="selectnew">
                        <option value=""></option>
                        {for $foo=1 to 9}
                             <option value="0{$foo}" {if $month eq $foo} selected="" {/if}>{$foo}</option>
                        {/for}
                        <option value="10" {if $month eq 10} selected="" {/if}>10</option>
                        <option value="11" {if $month eq 11} selected="" {/if}>11</option>
                        <option value="12" {if $month eq 12} selected="" {/if}>12</option>
                    </select>
                </div>
            

                <div>
                     <label  class="control-label">السنه </label>
                    <select name="years"   data-placeholder="اختر " class="selectnew">
                        <option value=""></option>
                        {for $foo=2021 to 2040}
                             <option value="{$foo}" {if $year eq $foo} selected="" {/if}>{$foo}</option>
                        {/for}
                    </select>
                </div>

                        <div >
                             <button type="submit" class="btn btn-primary pull-right" >بحث </button>
                        </div>
                        </div>
                    </form>
                    
        </div>
<div class="container">
                   <div class="panel-body">     
                    <table class="table table-black border">
                        <thead>
                            <tr>
                                <th>الخزنه </th>
                                <th>  القيمه  </th>

                            </tr>
                        </thead>
                        <tbody>
                          
                           
                            {foreach $saves as $save}
                             <tr>
                                <td>{$save.savename}</td>
                                 <td>{$save.savecurrentvalue}</td>
                            </tr>
                           {/foreach}
                        </tbody>
                    </table>
                    
                  
                <div class="clearfix"></div>
        </div>
        {if $allcgstudentabsencesd gt 0 || $allcstudentspaysd gt 0} 
        <h2 style="text-align: center;"> تقرير الفروع اليوم </h2>
        <br>
        <div class="panel-body">     
                    <table class="table table-black border">
                        <thead>
                            <tr>
                                <th>الفرع </th>
                                   <th>  حق الحضور </th>
                                <th>عدد الحضور </th>
                                 <th>عدد الدفع </th>
                                 <th> اجمالى الدفع </th>
                               
                            </tr>
                        </thead>
                        <tbody>
                            {assign var = acrightstudentspays  value = 0}
                            {assign var = $acgstudentabsences  value = 0}
                            {assign var = acstudentspays  value = 0}
                            {assign var = atotalstudentspays  value = 0}
                           
                            {foreach $branches as $branch}
                             {if $branch->cstudentspays gt 0 || $branch->cgstudentabsences gt 0}
                             <tr>
                                <td>{$branch->branchName}</td>
                                <td>{$branch->crightstudentspays}</td>
                                <td>{$branch->cgstudentabsences}</td>
                                <td>{$branch->cstudentspays}</td>
                                <td>{$branch->totalstudentspays}</td>
                                {assign  var = acrightstudentspays value = $acrightstudentspays + $branch->crightstudentspays }
                                {assign  var = acgstudentabsences value = $acgstudentabsences + $branch->cgstudentabsences }
                                {assign  var = acstudentspays value = $acstudentspays + $branch->cstudentspays }
                                {assign  var = atotalstudentspays value = $atotalstudentspays + $branch->totalstudentspays }
                               
                            </tr>
                            {/if}
                           {/foreach}
                        </tbody>
                    </table>
                    <div class='form-group'>
                         <div class='newss'>
                            اجمالى حق الحضور  {$acrightstudentspays}
                        </div>
                        <div class='newss'>
                            اجمالى عدد الحضور  {$acgstudentabsences}
                        </div>
                        <div class='newss'>
                               اجمالى عدد الدفع {$acstudentspays}
                        </div>
                        <div class='newss'>
                             اجمالى  الدفع   {$atotalstudentspays}
                        </div>
                    </div>
                  
                <div class="clearfix"></div>
        </div>
         <hr> <hr>
         {/if}
         
         <h2 style="text-align: center;"> تقرير الفروع الشهر</h2>
          <div class='form-group' style='color: #23eb1f;font-weight: 900;'>
                 <div class='newss'>
                    اجمالى حق الحضور الشهري {$allscrightstudentspays}
                </div>
                <div class='newss'>
                    اجمالى عدد الحضور الشهري  {$allscgstudentabsences}
                </div>
                <div class='newss'>
                        اجمالى عدد الدفع الشهري  {$allscstudentspays}
                </div>
                <div class='newss'>
                     اجمالى  الدفع  الشهري{$allstotalstudentspays}
                </div>
            </div>
          <br>
        <div class="panel-body">  
            {assign var=itr value=1}
            {foreach $allmonth as $months}
            <h3 style="text-align: center;">{$months[0]->todays}</h3>
            <table class="table table-black border">
                <thead>
                    <tr>
                        <th>الفرع </th>
                        <!--<th>  عدد طلاب </th>-->
                        <th> حق الحضور </th>
                        <th>عدد الحضور </th>
                        <th>عدد الدفع </th>
                        <th> اجمالى الدفع </th>
                       
                    </tr>
                </thead>
                <tbody>
                    {assign var = macgstudentabsences  value = 0}
                    {assign var = macrightstudentspays  value = 0}
                    <!--{assign var = macstudentabsences  value = 0}-->
                    {assign var = macstudentspays  value = 0}
                    {assign var = matotalstudentspays  value = 0}
                    {foreach $months as $mbranch}
                    {if $mbranch->cstudentspays gt 0 || $mbranch->cgstudentabsences gt 0}
                             <tr>
                                <td>{$mbranch->branchName}</td>
                               
                                <td>{$mbranch->crightstudentspays}</td>
                                 <td>{$mbranch->cgstudentabsences}</td>
                                <!--<td>{$mbranch->cstudentabsences}</td>-->
                                <td>{$mbranch->cstudentspays}</td>
                                <td>{$mbranch->totalstudentspays}</td>
                                {assign  var = macgstudentabsences value = $macgstudentabsences + $mbranch->cgstudentabsences }
                                {assign  var = macrightstudentspays value = $macrightstudentspays + $mbranch->crightstudentspays }
                                <!--{assign  var = macstudentabsences value = $macstudentabsences + $mbranch->cstudentabsences }-->
                                {assign  var = macstudentspays value = $macstudentspays + $mbranch->cstudentspays }
                                {assign  var = matotalstudentspays value = $matotalstudentspays + $mbranch->totalstudentspays }
                               
                            </tr>
                            {/if}
                           {/foreach}
                   
                </tbody>
            </table>
            <div class='form-group'>
                        <!-- <div class='newss'>-->
                        <!--    اجمالى  الطلاب  {$macgstudentabsences}-->
                        <!--</div>-->
                         <div class='newss'>
                            اجمالى حق الحضور  {$macrightstudentspays}
                        </div>
                        <div class='newss'>
                            اجمالى عدد الحضور  {$macgstudentabsences}
                        </div>
                        <div class='newss'>
                               اجمالى عدد الدفع {$macstudentspays}
                        </div>
                        <div class='newss'>
                             اجمالى  الدفع    <span  style='font-weight: 900;'>           {$matotalstudentspays}  </span>
                        </div>
                    </div>
                    
            <div class="clearfix"></div>
            <hr>
              {capture assign=itr}{$itr+1}{/capture}
            {/foreach}
        </div>
    </div>
    <div class='form-group' style='color: red;font-weight: 900;'>
                 <div class='newss'>
                    اجمالى حق الحضور الشهري {$allscrightstudentspays}
                </div>
                <div class='newss'>
                    اجمالى عدد الحضور الشهري  {$allscgstudentabsences}
                </div>
                <div class='newss'>
                        اجمالى عدد الدفع الشهري  {$allscstudentspays}
                </div>
                <div class='newss'>
                     اجمالى  الدفع  الشهري{$allstotalstudentspays}
                </div>
            </div>
    

  <footer class="mt-auto text-white-50">
    <p> <a href="http://gt4host.com/home/" class="text-white"> GT4 البسيط للمحاسبه</a></p>
  </footer>
</div>


    
  </body>
</html>

