From 1925762cb606692fef8b6e804ac9db1d43d3c268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A0=EB=B3=91=EC=B2=A0?= Date: Wed, 18 Mar 2026 19:57:52 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[accounting]=20=EC=9D=BC=EB=B0=98?= =?UTF-8?q?=EC=A0=84=ED=91=9C=20=EC=88=98=EB=8F=99=EC=9E=85=EB=A0=A5=20?= =?UTF-8?q?=EB=AA=A8=EB=8B=AC=20=EA=B0=9C=EC=84=A0=20+=20=EC=9E=85?= =?UTF-8?q?=EA=B3=A0=20=EC=83=81=EC=84=B8=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GeneralJournalEntry/ManualJournalEntryModal.tsx | 13 +++++++++++-- .../accounting/GeneralJournalEntry/actions.ts | 2 ++ .../ReceivingManagement/ReceivingDetail.tsx | 4 +--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/components/accounting/GeneralJournalEntry/ManualJournalEntryModal.tsx b/src/components/accounting/GeneralJournalEntry/ManualJournalEntryModal.tsx index bfb15412..ffded344 100644 --- a/src/components/accounting/GeneralJournalEntry/ManualJournalEntryModal.tsx +++ b/src/components/accounting/GeneralJournalEntry/ManualJournalEntryModal.tsx @@ -78,6 +78,7 @@ export function ManualJournalEntryModal({ const [journalDate, setJournalDate] = useState(() => getTodayString()); const [journalNumber, setJournalNumber] = useState('자동생성'); const [description, setDescription] = useState(''); + const [receiptNo, setReceiptNo] = useState(''); // 분개 행 const [rows, setRows] = useState([createEmptyRow()]); @@ -93,6 +94,7 @@ export function ManualJournalEntryModal({ setJournalDate(getTodayString()); setJournalNumber('자동생성'); setDescription(''); + setReceiptNo(''); setRows([createEmptyRow()]); getVendorList().then((vendorsRes) => { @@ -172,6 +174,7 @@ export function ManualJournalEntryModal({ const result = await createManualJournal({ journalDate, description, + receiptNo: receiptNo || undefined, rows, }); if (result.success) { @@ -186,7 +189,7 @@ export function ManualJournalEntryModal({ } finally { setIsSubmitting(false); } - }, [journalDate, description, rows, totals, onOpenChange, onSuccess]); + }, [journalDate, description, receiptNo, rows, totals, onOpenChange, onSuccess]); return ( @@ -197,7 +200,7 @@ export function ManualJournalEntryModal({ {/* 거래 정보 */} -
+
{/* 분개 내역 헤더 */} diff --git a/src/components/accounting/GeneralJournalEntry/actions.ts b/src/components/accounting/GeneralJournalEntry/actions.ts index 5e486062..92ad2353 100644 --- a/src/components/accounting/GeneralJournalEntry/actions.ts +++ b/src/components/accounting/GeneralJournalEntry/actions.ts @@ -62,6 +62,7 @@ export async function getJournalSummary(params: { export async function createManualJournal(data: { journalDate: string; description: string; + receiptNo?: string; rows: JournalEntryRow[]; }): Promise { return executeServerAction({ @@ -70,6 +71,7 @@ export async function createManualJournal(data: { body: { journal_date: data.journalDate, description: data.description, + receipt_no: data.receiptNo || null, rows: data.rows.map((r) => ({ side: r.side, account_subject_id: r.accountSubjectId, diff --git a/src/components/material/ReceivingManagement/ReceivingDetail.tsx b/src/components/material/ReceivingManagement/ReceivingDetail.tsx index 32523ebd..e8f51812 100644 --- a/src/components/material/ReceivingManagement/ReceivingDetail.tsx +++ b/src/components/material/ReceivingManagement/ReceivingDetail.tsx @@ -224,9 +224,7 @@ export function ReceivingDetail({ id, mode = 'view' }: Props) { if (templateCheck.success) { setHasInspectionTemplate(templateCheck.hasTemplate); } - if (templateCheck.attachments && templateCheck.attachments.length > 0) { - setInspectionAttachments(templateCheck.attachments); - } + setInspectionAttachments(templateCheck.attachments ?? []); } else { setHasInspectionTemplate(false); }