
<?php $__env->startSection('content'); ?>
    <div id="main">
        <header class="mb-3">
            <a href="#" class="burger-btn d-block d-xl-none">
                <i class="bi bi-justify fs-3"></i>
            </a>
        </header>

        <div class="page-heading">
            <div class="page-title">
                <div class="row">
                    <div class="col-12 col-md-6 order-md-1 order-last">
                        <h3>Today Revenue Report</h3>
                        <p class="text-subtitle text-muted"></p>
                    </div>
                    <div class="col-12 col-md-6 order-md-2 order-first">
                        <nav aria-label="breadcrumb" class="breadcrumb-header float-start float-lg-end">
                            <ol class="breadcrumb">
                                <li class="breadcrumb-item"><a href="<?php echo e(url('dashboard')); ?>">Dashboard</a></li>
                                <li class="breadcrumb-item active" aria-current="page">Today Revenue Report</li>
                            </ol>
                        </nav>
                    </div>
                </div>
            </div>
           <?php if(session('success')): ?>
                <div class="alert alert-success"><i class="bi bi-check-circle"></i> <?php echo e(session('success')); ?></div>
            <?php endif; ?>
            <?php if(session('error')): ?>
                <div class="alert alert-danger"><i class="bi bi-exclamation-triangle"></i>
                    <?php echo e(session('error')); ?>

                </div>
            <?php endif; ?>
            <section class="section">
                <div class="card">
                    <div class="card-header">
                       Revenue Report
                       
                    </div>

                    <div class="card-body">
                      <form action="<?php echo e(url()->current()); ?>" method="GET">
                        <div class="row m-1">

                          
                            <div class="form-group col-12 col-sm-6 col-md-3 col-lg-3">
                                <label class="input-label" for="exampleFormControlInput1">Select from date</label>
                               <select class="choices form-select <?php $__errorArgs = [''];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" required="" name="region">
                                      <option value="">Select Region</option>
                                      
                                      <?php $__currentLoopData = $regions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $region): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                          <option value="<?php echo e($region->id); ?>"><?php echo e($region->name); ?></option>
                                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                  </select>
                            </div>

                           

                            <div class="col-12 ">
                                <div class="row d-flex ">
                                    <button class="btn btn-success col-3 mr-1" style="margin-right: 6px;">Filter</button>
                                    <a href="<?php echo e(url('admin/sales_reports/daily')); ?>" class="btn btn-danger col-3 mr-1">Reset</a>
                                </div>
                            </div>


                    </div>
                    </form>
                         <table class="table table-bordered" id="table1">
                <thead>
                  <tr>
                    <th>#</th>
                    <th>User</th>
                    <th>Service</th>
                     <th>Region</th>
                      <th>Amount</th>
                   
                   
                  </tr>
                </thead>
                <tbody>
                  <?php $__currentLoopData = $subscriptions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $subscription): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                  <tr>
                    <?php

                    $user = App\Models\User::where('phone',$subscription->username)->first();
                    $region = App\Models\Region::where('id',$user->region)->first();
                    $service = App\Models\Package::where('id',$subscription->package)->first();

                    ?>
                    <th scope="row"><?php echo e($loop->iteration); ?></th>
                   
                   <td><?php echo e($user->name); ?></td>
                   <td><?php echo e($service->type); ?></td>
                    <td><?php echo e($region->name); ?></td>
                     <td><?php echo e(number_format($subscription->amount, 2)); ?> Ksh</td>
              
                  </tr>


                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                
                </tbody>
                <tr>
                    <td  style=" border-bottom-style: hidden;
                 
                    border-right-style: hidden;
                    border-left-style: hidden;">
                      
                    </td>
                     <td style=" border-bottom-style: hidden;
                    
                    border-right-style: hidden;
                    border-left-style: hidden;"></td>
                      
                       
                    <td style=" border-bottom-style: hidden;
                
                    border-left-style: hidden;"></td>
                    <td style=" border-bottom-style: hidden;
                
                    border-left-style: hidden; border-top-style: hidden; display: none">SalesSalesSalesSalesSalesSalesSal</td>

                          <td style="background-color: #435ebe; color: #fff;">Total Today Revenue</td>
                  
                       <td style="background-color: #435ebe; color: #fff;"><?php echo e(number_format($total,2)); ?> Ksh</td>
                  </tr>
              </table>
                    </div>
                </div>

            </section>
        </div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\xampp\htdocs\swiftnet\resources\views/admin/reports/daily.blade.php ENDPATH**/ ?>