@extends('layouts.app') @section('page-title', 'Dashboard') @section('content')

Dashboard

Selected Quarter: Q{{ $quarter }} {{ $year }}  |  Range: {{ $rangeStart->format('Y-m-d') }} to {{ $rangeEnd->format('Y-m-d') }}
Reset
Linked Bank Credits
PKR {{ number_format($linkedBankCredits, 0) }}
Approved Add Transactions — Entries: {{ $linkedBankEntries }}
PayFast Credits
PKR {{ number_format($payfastCredits, 0) }}
This quarter
Total Income
PKR {{ number_format($totalIncome, 0) }}
All sources combined
Total Expense
PKR {{ number_format($totalExpense, 0) }}
Invoices & outflows
Net Profit
PKR {{ number_format($netProfit, 0) }}
Income − Expense

In Stock Vouchers

@if($stockProducts->isEmpty())
No voucher products yet. Add one →
@else
@foreach($stockProducts as $p)
{{ $p->stock }}
{{ $p->name }}
Inventory Value: PKR {{ number_format($p->stock * (float) $p->cost_price, 0) }}
@endforeach
@endif

Bank Account Balances

@if($bankAccounts->isEmpty())
No bank accounts. Add one →
@else
@foreach($bankAccounts as $a) @endforeach
AccountBankTypeCurrent Balance
{{ $a->name }} {{ $a->bank_name }} {{ ucfirst($a->account_type) }} {{ $a->currency }} {{ number_format($a->current_balance, 2) }}
@endif

Recent Transactions

@if($recentTransactions->isEmpty())
No transactions yet. Record one →
@else
@foreach($recentTransactions as $t) @endforeach
DateTypeSourceAccountCounterpartyAmount
{{ $t->transaction_date->format('Y-m-d') }} {{ $t->type }} {{ $t->source }} {{ $t->bankAccount->name ?? '—' }} {{ $t->counterparty ?? '—' }} {{ $t->type === 'income' ? '+' : '−' }} PKR {{ number_format($t->amount, 2) }}
View all transactions →
@endif
@endsection