feat:재무 대시보드 최근 거래내역을 바로빌 데이터로 표시
- barobill_bank_transactions 테이블에서 최근 7일 거래 조회 - 입금/출금/잔액 컬럼 표시 - 전체보기 링크를 계좌 입출금내역 페이지로 변경 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
namespace App\Http\Controllers\Finance;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Barobill\BankTransaction as BarobillBankTransaction;
|
||||
use App\Models\Finance\BankAccount;
|
||||
use App\Models\Finance\BankTransaction;
|
||||
use App\Models\Finance\FundSchedule;
|
||||
use App\Services\BankAccountService;
|
||||
use App\Services\FundScheduleService;
|
||||
@@ -37,9 +37,15 @@ public function index(): View
|
||||
// 향후 7일 자금 일정
|
||||
$upcomingSchedules = $this->fundScheduleService->getUpcomingSchedules(7);
|
||||
|
||||
// 최근 거래내역 (10건)
|
||||
$recentTransactions = BankTransaction::with('bankAccount:id,bank_name,account_number')
|
||||
->latest('transaction_date')
|
||||
// 최근 거래내역 (바로빌 - 최근 7일, 최대 10건)
|
||||
$tenantId = session('selected_tenant_id', 1);
|
||||
$weekAgo = now()->subDays(7)->format('Ymd');
|
||||
$today = now()->format('Ymd');
|
||||
|
||||
$recentTransactions = BarobillBankTransaction::where('tenant_id', $tenantId)
|
||||
->whereBetween('trans_date', [$weekAgo, $today])
|
||||
->orderBy('trans_date', 'desc')
|
||||
->orderBy('trans_time', 'desc')
|
||||
->limit(10)
|
||||
->get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user