@extends('admin.layouts.app')
@section('title','Supplier Statement')
@section('content')
<div class="page-head"><div><h1 class="page-title">Supplier Statement - {{ $supplier->name }}</h1><div class="page-subtitle">Printable supplier statement</div></div><a class="btn" href="{{ route('admin.suppliers.ledger',$supplier) }}">Back to Ledger</a></div>
<div class="card card-body"><p><strong>Address:</strong> {{ $supplier->address ?: '—' }}<br><strong>Phone:</strong> {{ $supplier->phone ?: '—' }}<br><strong>Closing Balance:</strong> {{ number_format($balance,2) }}</p><table class="table"><thead><tr><th>Date</th><th>Ref</th><th>Type</th><th>Debit</th><th>Credit</th><th>Balance</th><th>Note</th></tr></thead><tbody>@foreach($ledger as $row)<tr><td>{{ $row->entry_date }}</td><td>{{ $row->reference_no }}</td><td>{{ $row->entry_type }}</td><td>{{ number_format($row->debit,2) }}</td><td>{{ number_format($row->credit,2) }}</td><td>{{ number_format($row->balance,2) }}</td><td>{{ $row->notes }}</td></tr>@endforeach</tbody></table></div>
@endsection
