 
 <?php $__env->startSection('css-content'); ?>
 <style>
 
 .card-body {
     overflow: auto;
 }
     .colls p {
    margin-bottom: 0px;
    font-size: 19px;
    border: solid 1px #000;
    padding: 5px 0px;
    text-align: center;
}
.colls .col-sm {
    margin-left: 0px;
    margin-right: 0px;
    padding-right: 0px;
    padding-left: 0px;
}
.colls .col-sm {
    width: 20%;
}
.colls .row {
    margin-left: 0px;
    margin-right: 0px;
}

.bluebox {
    background: blue;
    padding-left: 2px;
    padding-right: 2px;
    border-radius: 7px;
    color: white;
}
.redbox {
    background: red;
    padding-left: 2px;
    padding-right: 2px;
    border-radius: 7px;
    color: white;
}

 </style>
 <?php $__env->stopSection(); ?>
 <?php $__env->startSection('content'); ?>
<div class="card">
      <div class="card-body">
        
        <h5>Customer Sell Report</h5>
        
        </div>
    
        
        <div class="card-body">
            
            <form action="" method="GET">

            <div class="row">

                <!-- Date -->
                <div class="col-md-4 mb-3">
                    <label><strong>Date</strong></label>
                    <input type="date" 
                           name="date" 
                           class="form-control"
                           value="<?php echo e(request('date') ?? date('Y-m-d')); ?>">
                </div>

                <!-- Game -->
                <div class="col-md-4 mb-3">
                    <label><strong>Game</strong></label>
                    <select name="stores_id" class="form-control select2">
                        <option value="">Select an option</option>

                        <?php $__currentLoopData = storeList(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $game): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($game->id); ?>"  <?php echo e(request('stores_id') == $game->id ? 'selected':''); ?>>
                                <?php echo e($game->name); ?>

                            </option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                </div>

                <!-- Game -->
                <div class="col-md-4 mb-3">
                    <label><strong>Session</strong></label>
                    <select name="type" class="form-control select2">
                        

                            <option value="open"  <?php echo e(request('type') == "open" ? 'selected':''); ?>>
                                Open
                            </option>
                            <option value="close"  <?php echo e(request('type') == "close" ? 'selected':''); ?>>
                                Close
                            </option>
                        
                    </select>
                </div>
                <!-- Game -->
                <div class="col-md-4 mb-3">
                    <label><strong>Game Type</strong></label>
                    <select name="game_id" class="form-control select2">

                        
                            <option value="all" <?php echo e(request('game_id') == "all" ? 'selected':''); ?>>
                                All
                            </option>
                             <option value="single"<?php echo e(request('game_id') == "single" ? 'selected':''); ?>>Single</option>
                             <option value="jodi"<?php echo e(request('game_id') == "jodi" ? 'selected':''); ?>>Jodi</option>
                             <option value="pana"<?php echo e(request('game_id') == "pana" ? 'selected':''); ?>>Pana</option>
                    </select>
                </div>


                <!-- Digit -->
                <div class="col-md-4 mb-3">
                    <label><strong>Sort By</strong></label>
                    <select name="sort" class="form-control select2">
                        

                            <option value="number"<?php echo e(request('sort') == "number" ? 'selected':''); ?>>
                                Sort By Number
                            </option>
                            <option value="amount"<?php echo e(request('sort') == "amount" ? 'selected':''); ?>>
                                Sort By Amount
                            </option>
                        
                    </select>
                </div>

                <!-- Save Button -->
                <div class="col-md-12 mt-2">
                    <button type="submit" class="btn btn-primary px-4">
                        Apply Filters
                    </button>
                    <a href="<?php echo e(url('admin/sell-report')); ?>">
                    <button type="button" class="btn btn-primary px-4">
                        Reset Filters
                    </button>
                    </a>
                </div>

            </div>
        </form>
        
        <?php
                                                                $sort = request('sort');
                                                                
                                                                ?>
            
           
            <div id="example1_wrapper" class=" dt-bootstrap4">
                <div class="row">
                    <div class="col-sm-12">
                         <div class='tablescroll'>
                            <div class="table-responsive">
                                    <div class="card-body" id="bets-table">
                                        <?php if(request('game_id') == 'all' || request('game_id') == 'single'): ?>
                                    <div class="row">
                                        <h4 class="game_title">Single</h4>
                                    </div>
                                    
                                    <div class="row" style="margin-bottom: 20px">
                                        <div class="container-fluid colls">
                                    
                                                            <?php
                                                            
                                                                if ($sort == 'number') {
                                                                    $single_ank = $single_ank->sortBy('bit_place');
                                                                } else {
                                                                    $single_ank = $single_ank->sortByDesc('total_amount');
                                                                }
                                                            ?>
                                            <?php $__currentLoopData = $single_ank->chunk(5); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $chunk): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <div class="row">
                                                    <div class="col-sm titls">
                                                        <p>Digit</p>
                                                        <p>Amount</p>
                                                    </div>
                                            
                                                    <?php $__currentLoopData = $chunk; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <div class="col-sm">
                                                            <p><?php echo e($item['bit_place']); ?></p>
                                                            <?php if($item['total_amount']): ?>
                                                            <p><span class="bluebox"><?php echo e($item['total_amount']); ?></span></p>
                                                            <?php else: ?>
                                                            <p><span class="redbox"><?php echo e($item['total_amount']); ?></span></p>
                                                            <?php endif; ?>
                                                        </div>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </div>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    
                                        </div>
                                    </div>
                                        <?php endif; ?>
                                
                                 <?php if((request('game_id') == 'all' || request('game_id') == 'jodi') && request('type') == 'open'): ?>
                                    <div class="row">
                                
                                        <h4 style="game_title">Jodi</h4>
                                
                                    </div>
                                        <div class="row" style="margin-bottom: 20px">
                                        <div class="container-fluid colls">
                                
                                
                                                            <?php
                                                            
                                                                if ($sort == 'number') {
                                                                    $jodi = $jodi->sortBy('bit_place');
                                                                } else {
                                                                    $jodi = $jodi->sortByDesc('total_amount');
                                                                }
                                                            ?>
                                                            <?php $__currentLoopData = $jodi->chunk(5); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $chunk): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                <div class="row">
                                                                    <div class="col-sm titls">
                                                                        <p>Digit</p>
                                                                        <p>Amount</p>
                                                                    </div>
                                                            
                                                                    <?php $__currentLoopData = $chunk; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                        <div class="col-sm">
                                                                            <p><?php echo e($item['bit_place']); ?></p>
                                                                            <?php if($item['total_amount']): ?>
                                                                            <p><span class="bluebox"><?php echo e($item['total_amount']); ?></span></p>
                                                                            <?php else: ?>
                                                                            <p><span class="redbox"><?php echo e($item['total_amount']); ?></span></p>
                                                                            <?php endif; ?>
                                                                        </div>
                                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                </div>
                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                
                                                    </div>
                                    </div>
                                
                                 <?php endif; ?>
                                 <?php if(request('game_id') == 'all' || request('game_id') == 'pana'): ?>
                                    <div class="row">
                                
                                        <h4 style="game_title">Pana</h4>
                                
                                    </div>
                                        <div class="row" style="margin-bottom: 20px">
                                        <div class="container-fluid colls">
                                
                                
                                                            <?php
                                                            
                                                                if ($sort == 'number') {
                                                                    $all_pannas = $all_pannas->sortBy('bit_place');
                                                                } else {
                                                                    $all_pannas = $all_pannas->sortByDesc('total_amount');
                                                                }
                                                            ?>
                                                            
                                                            <?php $__currentLoopData = $all_pannas->chunk(5); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $chunk): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                <div class="row">
                                                                    <div class="col-sm titls">
                                                                        <p>Digit</p>
                                                                        <p>Amount</p>
                                                                    </div>
                                                            
                                                                    <?php $__currentLoopData = $chunk; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                        <div class="col-sm">
                                                                            <p><?php echo e($item->bit_place); ?></p>
                                                            
                                                                            <?php if($item->total_amount > 0): ?>
                                                                                <p><span class="bluebox"><?php echo e($item->total_amount); ?></span></p>
                                                                            <?php else: ?>
                                                                                <p><span class="redbox"><?php echo e($item->total_amount); ?></span></p>
                                                                            <?php endif; ?>
                                                                        </div>
                                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                </div>
                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                
                                
                                                    </div>
                                    </div>
                                
                                <?php endif; ?>
                                 <?php if(request('game_id') == 'all' || request('game_id') == 'sangam'): ?>
                                    <div class="row">
                                
                                        <h4 style="game_title">Half sangam</h4>
                                
                                    </div>
                                        <div class="row" style="margin-bottom: 20px">
                                        <div class="container-fluid colls">
                                                            
                                                            <?php
                                                            
                                                                if ($sort == 'number') {
                                                                    $half_sangam = $half_sangam->sortBy('bit_place_panna');
                                                                } else {
                                                                    $half_sangam = $half_sangam->sortByDesc('total_amount');
                                                                }
                                                            ?>
                                                            
                                                            <?php $__currentLoopData = $half_sangam->chunk(5); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $chunk): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                <div class="row">
                                                                    <div class="col-sm titls">
                                                                        <p>Digit</p>
                                                                        <p>Amount</p>
                                                                    </div>
                                                            
                                                                    <?php $__currentLoopData = $chunk; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                        <div class="col-sm">
                                                                            <p><?php echo e($item->bit_place_panna); ?> - <?php echo e($item->bit_place_single); ?></p>
                                                            
                                                                            <?php if($item->total_amount > 0): ?>
                                                                                <p><span class="bluebox"><?php echo e($item->total_amount); ?></span></p>
                                                                            <?php else: ?>
                                                                                <p><span class="redbox"><?php echo e($item->total_amount); ?></span></p>
                                                                            <?php endif; ?>
                                                                        </div>
                                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                </div>
                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                
                                                    </div>
                                    </div>
                                
                                <?php endif; ?>
                                 <?php if((request('game_id') == 'all' || request('game_id') == 'sangam') && request('type') == 'open'): ?>
                                    <div class="row">
                                
                                        <h4 style="game_title">Full sangam</h4>
                                
                                    </div>
                                        <div class="row" style="margin-bottom: 20px">
                                        <div class="container-fluid colls">
                                <?php
                                                            
                                                                if ($sort == 'number') {
                                                                    $full_sangam = $full_sangam->sortBy('bit_place_panna');
                                                                } else {
                                                                    $full_sangam = $full_sangam->sortByDesc('total_amount');
                                                                }
                                                            ?>
                                                            
                                                            <?php $__currentLoopData = $full_sangam->chunk(5); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $chunk): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                <div class="row">
                                                                    <div class="col-sm titls">
                                                                        <p>Digit</p>
                                                                        <p>Amount</p>
                                                                    </div>
                                                            
                                                                    <?php $__currentLoopData = $chunk; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                        <div class="col-sm">
                                                                            <p><?php echo e($item->bit_place_panna); ?> - <?php echo e($item->bit_place_single); ?></p>
                                                            
                                                                            <?php if($item->total_amount > 0): ?>
                                                                                <p><span class="bluebox"><?php echo e($item->total_amount); ?></span></p>
                                                                            <?php else: ?>
                                                                                <p><span class="redbox"><?php echo e($item->total_amount); ?></span></p>
                                                                            <?php endif; ?>
                                                                        </div>
                                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                </div>
                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                
                                                    </div>
                                    </div>
                                
                                <?php endif; ?>
                                 </div>
                            </div>
                        </div>
                  </div>
                </div>
              </div>
            </div>
          </div>


 <?php $__env->stopSection(); ?>
<?php $__env->startSection('js-content'); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.main-layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/profcymadev/public_html/whatsappmatka.profcymadev.in/resources/views/admin/sell-report/index.blade.php ENDPATH**/ ?>