From 6ecbcfd428f0bb99d6916972d4066f92eeee6812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Tue, 10 Feb 2026 18:46:38 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=EC=9D=BC=EB=B0=98=EC=A0=84=ED=91=9C?= =?UTF-8?q?=20=EC=83=81=ED=83=9C(status)=20=EC=97=B4=20=EC=A0=9C=EA=B1=B0,?= =?UTF-8?q?=20=EA=B8=B0=EB=B3=B8=EC=83=81=ED=83=9C=EB=A5=BC=20confirmed?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 프론트엔드: 전표목록 테이블에서 상태 컬럼/필터/통계 제거 - 프론트엔드: 임시저장/확정 stat cards를 차변합계/대변합계로 교체 - 백엔드: store(), storeFromBank() 기본 status를 draft→confirmed 변경 - 백엔드: index() 통계에서 draftCount/confirmedCount 제거 Co-Authored-By: Claude Opus 4.6 --- .../Finance/JournalEntryController.php | 6 +-- .../views/finance/journal-entries.blade.php | 52 +++++-------------- 2 files changed, 14 insertions(+), 44 deletions(-) diff --git a/app/Http/Controllers/Finance/JournalEntryController.php b/app/Http/Controllers/Finance/JournalEntryController.php index 3c55342e..6a8859d3 100644 --- a/app/Http/Controllers/Finance/JournalEntryController.php +++ b/app/Http/Controllers/Finance/JournalEntryController.php @@ -77,8 +77,6 @@ public function index(Request $request): JsonResponse 'totalCount' => $entries->count(), 'totalDebit' => $entries->sum('total_debit'), 'totalCredit' => $entries->sum('total_credit'), - 'draftCount' => $entries->where('status', 'draft')->count(), - 'confirmedCount' => $entries->where('status', 'confirmed')->count(), ]; return response()->json([ @@ -174,7 +172,7 @@ public function store(Request $request): JsonResponse 'description' => $request->description, 'total_debit' => $totalDebit, 'total_credit' => $totalCredit, - 'status' => 'draft', + 'status' => 'confirmed', 'created_by_name' => auth()->user()?->name ?? '시스템', 'attachment_note' => $request->attachment_note, ]); @@ -487,7 +485,7 @@ public function storeFromBank(Request $request): JsonResponse 'description' => $request->description, 'total_debit' => $totalDebit, 'total_credit' => $totalCredit, - 'status' => 'draft', + 'status' => 'confirmed', 'source_type' => 'bank_transaction', 'source_key' => $request->source_key, 'created_by_name' => auth()->user()?->name ?? '시스템', diff --git a/resources/views/finance/journal-entries.blade.php b/resources/views/finance/journal-entries.blade.php index 7affe0eb..f0e95aaf 100644 --- a/resources/views/finance/journal-entries.blade.php +++ b/resources/views/finance/journal-entries.blade.php @@ -1360,7 +1360,6 @@ className={`px-6 py-2 text-sm font-medium rounded-lg flex items-center gap-1 tra const [loading, setLoading] = useState(false); const [stats, setStats] = useState({}); const [searchTerm, setSearchTerm] = useState(''); - const [filterStatus, setFilterStatus] = useState('all'); const [dateRange, setDateRange] = useState({ start: getKoreanDate(-30), end: getKoreanDate(), @@ -1375,7 +1374,6 @@ className={`px-6 py-2 text-sm font-medium rounded-lg flex items-center gap-1 tra const params = new URLSearchParams({ start_date: dateRange.start, end_date: dateRange.end, - status: filterStatus, search: searchTerm, }); const res = await fetch(`/finance/journal-entries/list?${params}`); @@ -1422,14 +1420,9 @@ className={`px-6 py-2 text-sm font-medium rounded-lg flex items-center gap-1 tra 목록으로 -
+
전표번호: {selectedEntry.entry_no}
전표일자: {selectedEntry.entry_date}
-
상태: - - {selectedEntry.status === 'confirmed' ? '확정' : '임시저장'} - -
작성자: {selectedEntry.created_by_name || '-'}
{selectedEntry.description &&

적요: {selectedEntry.description}

} @@ -1489,7 +1482,7 @@ className="px-4 py-2 text-sm text-red-600 bg-red-50 rounded-lg hover:bg-red-100 return (
{/* 통계 카드 */} -
+
@@ -1501,31 +1494,22 @@ className="px-4 py-2 text-sm text-red-600 bg-red-50 rounded-lg hover:bg-red-100
-
-
-

임시저장

-

{stats.draftCount || 0}건

-
-
-
-
-
-
-
-

확정

-

{stats.confirmedCount || 0}건

-
-
-
-
-
-
+

차변 합계

{formatCurrency(stats.totalDebit)}

+
+
+
+
+

대변 합계

+

{formatCurrency(stats.totalCredit)}

+
+
+
{/* 필터 */} @@ -1538,12 +1522,6 @@ className="px-3 py-1.5 text-sm border border-stone-200 rounded-lg focus:ring-2 f setDateRange(prev => ({ ...prev, end: e.target.value }))} className="px-3 py-1.5 text-sm border border-stone-200 rounded-lg focus:ring-2 focus:ring-emerald-500 outline-none" />
-
setSearchTerm(e.target.value)} @@ -1577,7 +1555,6 @@ className="w-full pl-9 pr-3 py-1.5 text-sm border border-stone-200 rounded-lg fo 적요 차변합계 대변합계 - 상태 @@ -1588,11 +1565,6 @@ className="w-full pl-9 pr-3 py-1.5 text-sm border border-stone-200 rounded-lg fo {entry.description || '-'} {formatCurrency(entry.total_debit)} {formatCurrency(entry.total_credit)} - - - {entry.status === 'confirmed' ? '확정' : '임시저장'} - - ))}