{{--
# ────────────── lee_gwena ──────────────
# Code by: ashley_gwena
# Created: 2026-03-12
# Notes: Cashbook detail view
# ───────────────────────────────────────
--}}
@extends('layouts.master')

@section('title', 'Cashbook Details')

@section('content')
<div class="container py-4">
    <div class="d-flex justify-content-between align-items-center mb-3">
        <div>
            <h1 class="h3 mb-1">{{ $cashbook->name }}</h1>
            <p class="text-muted mb-0">Cashbook details.</p>
        </div>
        <div class="d-flex gap-2">
            <a href="{{ route('cashbooks.edit', $cashbook) }}" class="btn btn-outline-primary">Edit</a>
            <a href="{{ route('cashbooks.index') }}" class="btn btn-outline-secondary">Back</a>
        </div>
    </div>

        <div class="card p-4">
            <div class="row g-3">
            <div class="col-md-6"><strong>Account Number:</strong> {{ $cashbook->account_number }}</div>
            <div class="col-md-6"><strong>Currency:</strong> {{ $cashbook->currency?->currency_code ?? $cashbook->currency ?? 'N/A' }}</div>
            <div class="col-md-6"><strong>GL Account:</strong> {{ $cashbook->glAccount?->account_code ?? 'N/A' }}</div>
            <div class="col-md-6"><strong>Trust Cashbook:</strong> {{ $cashbook->is_trust ? 'Yes' : 'No' }}</div>
        </div>
    </div>
</div>
@endsection

