 @extends('admin.layouts.main-layout')
 @section('content')
<div class="card">
      <div class="card-body">
           <div class="card-header">
           <form role="form" method="get" action="">
                  <div class="box-body">
                    <div class="row">
                      <div class="col-md-3">
                      <div class="form-group">
                              <!--<input type="text" name="search_mobile"  class="form-control  " value="{{Request::get('search_mobile')}}" placeholder="user mobile">-->
                          <select  name="search_user"  class="form-control  " >
                              <option value="">Select Customer</option>
                              @foreach($customerss as $customers)
                               <option value="{{ $customers->id}}" {{Request::get('search_user') == $customers->id ? 'selected' : ''}}>{{ $customers->name}}  {{ $customers->mobile_number}}</option>
                              @endforeach
                          </select>
                        </div>
                      </div>
                        
                         <input type="hidden" name="store_id"  class="form-control" value="{{Request::get('store_id')}}" >
                      <div class="col-md-3">
                       <button type="submit" class="btn btn-success mr-2">Search</button>
                       <a href="{{url('admin/your-store-palyed-open/'.$ids.'?store_id='.$storess->id)}}" class="btn btn-danger mr-2">Reset</a>
                        <!--<button type="submit" class="btn btn-danger mr-2">Reseat</button>-->
                  
                     </div>
                     
                   </div>
                 </div>
               </form>
        </div>
        <div class="card-header">
            <h3 class="card-title">{{$storess->name}} Open - {{currentDate()}}</h3>
            <h3 class="card-title">Total Bit Amount : ₹ {{$totalamount}}</h3>
        </div>
        
        </div>
    
        
        <div class="card-body">
            @if(session()->has('message'))
                <div class="alert alert-success">
                    {{ session()->get('message') }}
                </div>
            @endif
            <div id="example1_wrapper" class=" dt-bootstrap4">
                <div class="row">
                    <div class="col-sm-12">
                        <div style="overflow-x:auto;">
                       <div class='tablescroll'>
                            <div class="table-responsive">
                        <table id="example1" class="table table-bordered table-striped dataTable" role="grid"
                               aria-describedby="example1_info">
                            <thead>
                            <tr role="row">
                               @foreach($game as $games)
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                                    aria-label="Browser: activate to sort column ascending" style="width: 207px;">
                                    {{$games['name']}}<br>Total Amount : {{$games['amount']}}
                                </th>
                                @endforeach
                            </tr>
                            </thead>
                            <tbody>
                              <tr role="row">
                               @foreach($game as $games)
                                <td>
                                    @if($result[$games['id']]!='')
                                  
                                      @foreach($result[$games['id']] as $gamessss)
                                      <h5>
                                        
                                          @if($games['id'] == 9 || $games['id'] == 10)
                                         
                                            {{$gamessss->bit_place_panna}}, {{$gamessss->bit_place_single}}-{{$gamessss->total_val}}  
                                          @else
                                            {{$gamessss->bit_place}}-{{$gamessss->total_val}}  
                                          @endif
                                      
                                      </h5>
                                      <br>
                                      @endforeach
                                   
                                   @endif
                                </th>
                                @endforeach
                            </tr>
                            </tbody>
                   </table>
                   </div>
                   </div>
                   </div>

                  </div>
                </div>
              </div>
            </div>
          </div>


 @endsection
@section('js-content')
@endsection