From 816c25a6313ced3cbbd75adaa6068135253f9ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A0=EB=B3=91=EC=B2=A0?= Date: Fri, 6 Mar 2026 13:26:58 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[finance]=20=EC=9D=BC=EB=B0=98=EC=A0=84?= =?UTF-8?q?=ED=91=9C=20=EB=AA=A9=EB=A1=9D=20source=20=ED=95=84=EB=93=9C=20?= =?UTF-8?q?=EB=B0=8F=20=ED=8E=98=EC=9D=B4=EC=A7=80=EB=84=A4=EC=9D=B4?= =?UTF-8?q?=EC=85=98=20=EA=B5=AC=EC=A1=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - deposits/withdrawals 조회 시 source를 항상 'linked'로 고정 - 페이지네이션 meta 래핑 제거하여 플랫 구조로 변경 Co-Authored-By: Claude Opus 4.6 --- app/Services/GeneralJournalEntryService.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/Services/GeneralJournalEntryService.php b/app/Services/GeneralJournalEntryService.php index 3e2d1f9..8056c0c 100644 --- a/app/Services/GeneralJournalEntryService.php +++ b/app/Services/GeneralJournalEntryService.php @@ -46,7 +46,7 @@ public function index(array $params): array DB::raw('0 as withdrawal_amount'), DB::raw('COALESCE(journal_entries.total_debit, 0) as debit_amount'), DB::raw('COALESCE(journal_entries.total_credit, 0) as credit_amount'), - DB::raw("CASE WHEN journal_entries.id IS NOT NULL THEN 'linked' ELSE 'manual' END as source"), + DB::raw("'linked' as source"), 'deposits.created_at', 'deposits.updated_at', DB::raw('journal_entries.id as journal_entry_id'), @@ -73,7 +73,7 @@ public function index(array $params): array 'withdrawals.amount as withdrawal_amount', DB::raw('COALESCE(journal_entries.total_debit, 0) as debit_amount'), DB::raw('COALESCE(journal_entries.total_credit, 0) as credit_amount'), - DB::raw("CASE WHEN journal_entries.id IS NOT NULL THEN 'linked' ELSE 'manual' END as source"), + DB::raw("'linked' as source"), 'withdrawals.created_at', 'withdrawals.updated_at', DB::raw('journal_entries.id as journal_entry_id'), @@ -170,12 +170,10 @@ public function index(array $params): array return [ 'data' => $items->toArray(), - 'meta' => [ - 'current_page' => $page, - 'last_page' => (int) ceil($totalCount / $perPage), - 'per_page' => $perPage, - 'total' => $totalCount, - ], + 'current_page' => $page, + 'last_page' => (int) ceil($totalCount / $perPage), + 'per_page' => $perPage, + 'total' => $totalCount, ]; }