@extends('layouts.app') @section('title', 'MPESA Transactions') @section('style') @endsection @section('content')

Total

{{ number_format($stats['total']) }}

Completed

{{ number_format($stats['completed']) }}

Unmatched

{{ number_format($stats['unmatched']) }}

Matched

{{ number_format($stats['matched']) }}

Failed

{{ number_format($stats['failed']) }}

Total Amount

Ksh {{ number_format($stats['total_amount'], 2) }}

@if(request()->hasAny(['search', 'status', 'date', 'start_date', 'end_date', 'phone', 'min_amount', 'max_amount', 'unmatched', 'matched', 'failed'])) @endif

@forelse($transactions as $transaction) @empty @endforelse
Transaction ID Phone Customer Amount Date Status Sale Actions
{{ $transaction->transaction_id }} @if($transaction->mpesa_receipt_number)
Receipt: {{ $transaction->mpesa_receipt_number }} @endif
{{ $transaction->formatted_phone }} @if($transaction->full_name) {{ $transaction->full_name }} @else - @endif @if($transaction->customer)
Registered @endif
Ksh {{ number_format($transaction->amount, 2) }} {{ $transaction->transaction_date->format('M d, Y') }}
{{ $transaction->transaction_date->format('h:i A') }}
@if($transaction->status == 'completed') Completed @elseif($transaction->status == 'pending') Pending @elseif($transaction->status == 'failed') Failed @elseif($transaction->status == 'reversed') Reversed @elseif($transaction->status == 'matched') Matched @endif @if($transaction->result_desc)
{{ $transaction->result_desc }} @endif
@if($transaction->sale_id) Sale #{{ $transaction->sale_id }} @if($transaction->match_type)
{{ ucfirst($transaction->match_type) }} @endif @elseif($transaction->status == 'completed') Unmatched @else - @endif
@if(!$transaction->sale_id && $transaction->status == 'completed') @endif @if($transaction->canBeReversed() && auth()->user()->can('mpesa.manage')) @endif
No transactions found

@if(request()->hasAny(['search', 'status', 'date', 'phone'])) Try adjusting your filters @else No MPESA transactions have been recorded yet @endif

@if($transactions->hasPages())
Showing {{ $transactions->firstItem() }} to {{ $transactions->lastItem() }} of {{ $transactions->total() }} entries
@endif
@endsection @section('script') @endsection