diff --git a/app/Http/Controllers/Finance/FinanceDashboardController.php b/app/Http/Controllers/Finance/FinanceDashboardController.php index 2e88fbb2..1c39e018 100644 --- a/app/Http/Controllers/Finance/FinanceDashboardController.php +++ b/app/Http/Controllers/Finance/FinanceDashboardController.php @@ -4,6 +4,7 @@ use App\Http\Controllers\Controller; use App\Models\Barobill\BankTransaction as BarobillBankTransaction; +use App\Models\Barobill\CardTransaction as BarobillCardTransaction; use App\Models\Finance\BankAccount; use App\Models\Finance\FundSchedule; use App\Services\BankAccountService; @@ -49,6 +50,14 @@ public function index(): View ->limit(10) ->get(); + // 최근 카드 사용내역 (바로빌 - 최근 7일, 최대 10건) + $recentCardTransactions = BarobillCardTransaction::where('tenant_id', $tenantId) + ->whereBetween('use_date', [$weekAgo, $today]) + ->orderBy('use_date', 'desc') + ->orderBy('use_time', 'desc') + ->limit(10) + ->get(); + // 계좌별 잔액 $accountBalances = BankAccount::active() ->ordered() @@ -63,6 +72,7 @@ public function index(): View 'monthlySummary', 'upcomingSchedules', 'recentTransactions', + 'recentCardTransactions', 'accountBalances', 'bankStats' )); diff --git a/resources/views/finance/dashboard.blade.php b/resources/views/finance/dashboard.blade.php index ed42ba4c..5cb2280c 100644 --- a/resources/views/finance/dashboard.blade.php +++ b/resources/views/finance/dashboard.blade.php @@ -282,6 +282,62 @@ class="inline-flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 te + {{-- 최근 카드 사용내역 (바로빌) --}} +
| 사용일 | +카드사 | +가맹점 | +승인금액 | +승인유형 | +
|---|---|---|---|---|
| + {{ $useDate->format('m/d') }} + | ++ {{ $card->card_company_name ?? '-' }} + | ++ {{ Str::limit($card->merchant_name, 15) }} + | ++ {{ $isCancel ? '+' : '-' }}{{ number_format($card->approval_amount) }}원 + | ++ + {{ $card->approval_type ?: '승인' }} + + | +
| + 최근 7일간 카드 사용내역이 없습니다. + | +||||