@extends('vendor.layout.main')
@section('content')
<div class="row">
    <div class="col-lg-12" style="padding-left: 4px;padding-right: 4px;">
        <div class="card m-b-30" style="border-radius: 5px;">
            <div class="card-header">
                <h5 class="card-title" style="font-weight: bold; padding-top: 15px; font-size: 20px;">Point Report</h5>
            </div>
            <div class="card-body">
            <div class="table-responsive">
                <table id="datatable" class="display table table-striped table-bordered" style="width: 100%;">
                        <thead style="background: #1f3740;">
                            <tr>
                                <th style="text-align: center; color: #fff;padding-top: 3px;padding-bottom: 3px;font-size: 13px;">No.</th>
                                <th style="color: #fff;padding-top: 3px;padding-bottom: 3px;font-size: 13px;min-width: 150px;">Date</th>
                                <th style="text-align: center; color: #fff;padding-top: 3px;padding-bottom: 3px;font-size: 13px;">Wallet</th>
                                <th style="text-align: center; color: #fff;padding-top: 3px;padding-bottom: 3px;font-size: 13px;">Action</th>
                                <th style="color: #fff;padding-top: 3px;padding-bottom: 3px;font-size: 13px;min-width: 90px;min-width: 180px;">Details</th>
                                <th style="text-align: center; color: #fff;padding-top: 3px;padding-bottom: 3px;font-size: 13px;min-width: 90px;">Amount</th>
                                <th style="text-align: center; color: #fff;padding-top: 3px;padding-bottom: 3px;font-size: 13px;min-width: 90px;">Balance</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $no=1; ?>
                            @foreach($reports as $repo)
                            <tr>
                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px;text-align: center; color: azure;">{{$no++}}</td>
                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px; color: azure;">{{$repo->created_at}}</td>
                                
                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px;text-align: center; color: azure;">{{$repo->bal_type}}</td>
                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px;text-align: center; color: azure;">{{$repo->action}}</td>
                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px;color: azure;">{{$repo->details}} {{$repo->from_user}}</td>
                                
                                @if(is_null($repo->bal_in))
                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px;text-align: center; color: red;">-{{$repo->bal_out}}</td>
                                @else
                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px;text-align: center; color: #00b302;">{{$repo->bal_in}}</td>
                                @endif

                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px;text-align: center; color: #fff400;">{{$repo->bal}}</td> 
                                
                                </td>
                            </tr>
                            @endforeach
                        </tbody>                      
                       
                    </table>
                </div>
            </div>
        </div>
    </div>
    <!-- End col -->
   
</div>
@endsection