



<div class="row">

    <div class="col-md-6">
        <!-- Widget: user widget style 1 -->
        <div class="box box-widget widget-user">
            <!-- Add the bg color to the header using any of the bg-* classes -->

            <div class="box-footer">
                <div class="row">





                    <?php if ($this->session->userdata('group')): ?>
                        <div class="col-sm-3 border-right">
                            <div class="description-block">
                                <h5 class="description-header"><?= $all_bill1 ?></h5>
                                <span class="description-text"> الايراد</span>
                            </div>
                            <!-- /.description-block -->
                        </div>

                        <div class="col-sm-3 border-right">
                            <div class="description-block">
                                <h5 class="description-header"><?= $all_bill2 ?></h5>

                                <span class="description-text"> المصروفات</span>
                            </div>
                            <!-- /.description-block -->
                        </div>

                        <div class="col-sm-3 border-right">
                            <div class="description-block">
                                <h5 class="description-header"><?= $all_bill5-$all_cash ?></h5>

                                <span class="description-text"> التصدير</span>

                            </div>
                            <!-- /.description-block -->
                        </div>
                        <div class="col-sm-3 border-right">
                            <div class="description-block">
                                <h5 class="description-header"><?= $all_cash ?></h5>

                                <span class="description-text">تصدير الكاش</span>

                            </div>
                            <!-- /.description-block -->
                        </div>

                    <?php endif; ?>
                    <!-- /.col -->
                </div>
                <!-- /.row -->
            </div>
        </div>
        <!-- /.widget-user -->
    </div>


    <!-- /.col -->
</div>









<div class="row">
    <!-- Main content -->
    <div class="row">
        <div class="col-md-12">
            <div class="box">
                <div class="box-header with-border">
                    <h3 class="box-title">الاحصائيات  </h3>
                </div>
                <!-- /.box-header -->
                <div class="box-body" style="
                     white-space: nowrap;
                     direction: rtl;">
                    <table class="table table-bordered">
                        <tr>
                            <th >اليوم</th>
                            <th>الايراد</th>   
                              <th>الكي نت</th>  
                              
                              
                                <th>الحركات</th>
                                     <th>العملاء الجدد</th>
                                      <th> نسبة التشغيل</th>
                            <th>المصروفات</th>
                     
                            <th>التصدير</th>
                            <th>الكاش</th>
                        </tr>

                        <?php $count = 0;
                        
                        $booking = 0;
                        $clints = 0;
                        foreach ($all_groups as $row): ?>
                            <tr>
                                <td><?= $row['dateadd']; ?></td>
                                <td><?= $row['all_bill1']; ?></td>  
                                
                                <td><?= $row['all_billknet']; ?></td>
                                 <td><?= $row['all_booking']; ?> </td>
                                   <td><?= $row['all_clints']; ?> </td>
                                     <td><?= $row['all_roomfull']; ?> </td>
                                   
                                <td><?= $row['all_bill2']; ?> </td> 
                              
                         
                                <td><?= $count2=($row['all_bill5']-($row['all5_last']+$row['all_bill5knet']));
                                ?> </td>

                                <td><?= $row['all5_last']; ?> </td>













                            </tr>

<?php

   $booking = $row['all_booking']+$booking;
                        $clints =$clints+ $row['all_clints'];
$count=$count+$count2;
endforeach; ?>
                        <tr>
                            <th >المجموع</th>
                            <th><?= $all_bill1 ?></th>  
                              <th><?= '' ?></th>  
                            <th><?= $booking ?></th>
                                <th><?= $clints ?></th>
                                    <th><?= '' ?></th>
                                    <th><?= $all_bill2 ?></th>
                         
                            <th><?= $count ?></th>    
                            <th><?= $all_cash ?></th>
                        </tr>
                    </table>
                </div>
                <!-- /.box-body -->

            </div>
            <!-- /.box -->


            <!-- /.box -->
        </div>
    </div>
</div>
<!-- /.row -->

