@extends('layouts.admin_master')
@section('page-title') 
    Admin | Dashboard
@endsection
@section('page-content')
<div class="row">
<div class="col-md-12">
        <div class="hpanel">
            <div class="panel-heading">Sales from Merchants to end users</div>
            <div class="panel-body">
                <div class="table-responsive">
                <table cellpadding="1" cellspacing="1" class="table table-bordered table-striped">
                    <thead>
                    <tr>
                        <th>Merchant Name</th>
                        <th>Recipient Phone</th>
                        <th>Amount</th>
                        <th>Status</th>
                        <th>Date</th>
                    </tr>
                    </thead>
                    <tbody>
                    @forelse ($merchant_sales as $row)
                    <tr>
                        <td>{{ $row->merchant->fullname }}</td>
                        <td>{{ $row->msisdn }}</td>
                        <td>{{ number_format($row->amount) }}</td>
                        <td>{{ $row->status }}</td>
                        <td>{{ $row->created_at }}</td>
                    </tr>
                    @empty
                        <tr>                      
                            <td colspan="5">No Data</td>
                        </tr>
                    @endforelse
                    </tbody>
                </table>
                </div>
                {{ $merchant_sales->links() }}
            </div>
            <div class="panel-footer">
            Page : {{ $merchant_sales->currentPage() }} of {{ $merchant_sales->lastPage() }} |
            Total Records : <span id="totalRecords">{{ $merchant_sales->total() }}</span>
            </div>
        </div>
    </div>
</div>
            
            



@endsection
@section('page-js')


@endsection
