@extends('layouts.app') @section('page-title', 'Transactions') @push('styles') @endpush @section('content')
{{-- ======================================== PAGE HEADER ======================================== --}} {{-- ======================================== SUMMARY CARDS ======================================== --}}
Total Income

৳{{ number_format($totalIncome, 2) }}

Total Expenses

৳{{ number_format($totalExpense, 2) }}

{{-- ======================================== FILTERS ======================================== --}}
{{-- On desktop these sit inline; on mobile they span full width via .filter-actions-row --}}
{{-- ======================================== TRANSACTIONS TABLE (≥ 576px) ======================================== --}}
{{-- Desktop / tablet table --}}
@forelse($transactions as $transaction) @empty @endforelse
Date Type Amount Method Details Action
{{ $transaction->date->format('M d, Y') }} @if($transaction->type == 'income') @else @endif {{ ucfirst($transaction->type) }} {{ $transaction->type == 'income' ? '+' : '−' }}৳{{ number_format($transaction->amount, 2) }} @if($transaction->payment_method == 'cash') @elseif($transaction->payment_method == 'bank') @else @endif {{ ucfirst($transaction->payment_method) }} {{ $transaction->details ?? '—' }}

No transactions found.
+ Add Transaction

{{-- Mobile card list (shown only on < 576px via CSS) --}}
@forelse($transactions as $transaction)
{{ $transaction->date->format('M d, Y') }}
{{ $transaction->details ?? '—' }}
{{ $transaction->type == 'income' ? '+' : '−' }}৳{{ number_format($transaction->amount, 2) }}
{{ ucfirst($transaction->type) }} @if($transaction->payment_method == 'cash') @elseif($transaction->payment_method == 'bank') @else @endif {{ ucfirst($transaction->payment_method) }}
View
@empty

No transactions found.

+ Add Transaction
@endforelse
{{-- Pagination --}} @if($transactions->hasPages())
{{ $transactions->links() }}
@endif
@endsection