feat:재무 대시보드에 최근 카드 사용내역 섹션 추가
This commit is contained in:
@@ -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'
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user