@extends('layouts.app') @section('title', '재무 대시보드') @section('content')
{{-- 페이지 헤더 --}}

재무 대시보드

{{ now()->format('Y년 n월 j일') }} 현재

{{-- 요약 카드 --}}
{{-- 총 잔액 --}}

총 잔액

{{ number_format($accountSummary['total_balance']) }}원

{{ $accountSummary['total_accounts'] }}개 계좌

{{-- 예정 수입 --}}

예정 수입

+{{ number_format($scheduleSummary['pending_income']) }}원

이번 달 예정

{{-- 예정 지출 --}}

예정 지출

-{{ number_format($scheduleSummary['pending_expense']) }}원

이번 달 예정

{{-- 7일내 일정 --}}

7일내 일정

{{ $scheduleSummary['upcoming_7days'] }}건

처리 필요

{{-- 이번 달 요약 --}}

{{ now()->format('n월') }} 자금 일정 요약

수입

+{{ number_format($monthlySummary['income']['total']) }}원

완료: {{ number_format($monthlySummary['income']['completed']) }}원 / 예정: {{ number_format($monthlySummary['income']['pending']) }}원

지출

-{{ number_format($monthlySummary['expense']['total']) }}원

완료: {{ number_format($monthlySummary['expense']['completed']) }}원 / 예정: {{ number_format($monthlySummary['expense']['pending']) }}원

순수익

{{ $monthlySummary['net'] >= 0 ? '+' : '' }}{{ number_format($monthlySummary['net']) }}원

총 {{ $monthlySummary['total_count'] }}건 일정

{{-- 계좌별 잔액 --}}

계좌별 잔액

전체보기
@forelse($accountBalances as $account)
{{ mb_substr($account->bank_name, 0, 2) }}

{{ $account->account_name ?: $account->bank_name }}

{{ $account->account_number }}

{{ number_format($account->balance) }}원

{{ $account->account_type }}

@empty
등록된 계좌가 없습니다.
@endforelse
{{-- 향후 7일 자금 일정 --}}

향후 7일 자금 일정

전체보기
@forelse($upcomingSchedules as $schedule)
@if($schedule->schedule_type === 'income') @else @endif

{{ $schedule->title }}

{{ $schedule->scheduled_date->format('m/d') }} @if($schedule->counterparty) - {{ $schedule->counterparty }} @endif

{{ $schedule->schedule_type === 'income' ? '+' : '-' }}{{ number_format($schedule->amount) }}원

{{ $schedule->status === 'pending' ? '대기' : ($schedule->status === 'completed' ? '완료' : '취소') }}
@empty
7일내 예정된 일정이 없습니다.
@endforelse
{{-- 최근 거래내역 --}}

최근 거래내역

전체보기
@forelse($recentTransactions as $tx) @empty @endforelse
날짜 계좌 유형 적요 금액 잔액
{{ $tx->transaction_date->format('m/d') }} {{ $tx->bankAccount?->bank_name ?? '-' }} @php $typeColors = [ 'deposit' => 'bg-green-100 text-green-700', 'withdrawal' => 'bg-red-100 text-red-700', 'transfer' => 'bg-blue-100 text-blue-700', ]; $typeLabels = [ 'deposit' => '입금', 'withdrawal' => '출금', 'transfer' => '이체', ]; @endphp {{ $typeLabels[$tx->transaction_type] ?? $tx->transaction_type }} {{ Str::limit($tx->description, 20) }} {{ $tx->transaction_type === 'deposit' ? '+' : '-' }}{{ number_format($tx->amount) }}원 {{ number_format($tx->balance_after) }}원
거래내역이 없습니다.
{{-- 은행별 분포 --}} @if($bankStats->count() > 0)

은행별 분포

@foreach($bankStats as $bank)

{{ $bank->bank_name }}

{{ number_format($bank->total_balance) }}원

{{ $bank->count }}개 계좌

@endforeach
@endif
@endsection