From 52e1ae70f235e1f6633d4d23527e58e709bef6c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Fri, 6 Feb 2026 08:23:48 +0900 Subject: [PATCH] =?UTF-8?q?feat:=EC=9E=AC=EB=AC=B4=20=EB=8C=80=EC=8B=9C?= =?UTF-8?q?=EB=B3=B4=EB=93=9C=EC=97=90=20=EC=B5=9C=EA=B7=BC=20=EC=B9=B4?= =?UTF-8?q?=EB=93=9C=20=EC=82=AC=EC=9A=A9=EB=82=B4=EC=97=AD=20=EC=84=B9?= =?UTF-8?q?=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Finance/FinanceDashboardController.php | 10 ++++ resources/views/finance/dashboard.blade.php | 56 +++++++++++++++++++ 2 files changed, 66 insertions(+) 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 + {{-- 최근 카드 사용내역 (바로빌) --}} +
+
+

최근 카드 사용내역

+ + 전체보기 + +
+
+ + + + + + + + + + + + @forelse($recentCardTransactions as $card) + @php + $useDate = \Carbon\Carbon::createFromFormat('Ymd', $card->use_date); + $isCancel = $card->approval_type === '취소'; + @endphp + + + + + + + + @empty + + + + @endforelse + +
사용일카드사가맹점승인금액승인유형
+ {{ $useDate->format('m/d') }} + + {{ $card->card_company_name ?? '-' }} + + {{ Str::limit($card->merchant_name, 15) }} + + {{ $isCancel ? '+' : '-' }}{{ number_format($card->approval_amount) }}원 + + + {{ $card->approval_type ?: '승인' }} + +
+ 최근 7일간 카드 사용내역이 없습니다. +
+
+
+ {{-- 은행별 분포 --}} @if($bankStats->count() > 0)