feat:재무 대시보드에 최근 카드 사용내역 섹션 추가

This commit is contained in:
김보곤
2026-02-06 08:23:48 +09:00
parent a9a9cc4c7e
commit 52e1ae70f2
2 changed files with 66 additions and 0 deletions

View File

@@ -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'
));