diff --git a/backend-node/src/controllers/receivingController.ts b/backend-node/src/controllers/receivingController.ts index 06d13b6e..0a40b6e8 100644 --- a/backend-node/src/controllers/receivingController.ts +++ b/backend-node/src/controllers/receivingController.ts @@ -472,7 +472,7 @@ export async function update(req: AuthenticatedRequest, res: Response) { await client.query("BEGIN"); - // 헤더 업데이트 (inbound_mng) — 헤더 레벨 필드만 + // 입고 레코드 업데이트 (헤더 + 품목 필드 모두) const headerResult = await client.query( `UPDATE inbound_mng SET inbound_date = COALESCE($1::date, inbound_date), @@ -482,6 +482,9 @@ export async function update(req: AuthenticatedRequest, res: Response) { inspector = COALESCE($5, inspector), manager = COALESCE($6, manager), memo = COALESCE($7, memo), + inbound_qty = COALESCE($11::numeric, inbound_qty), + unit_price = COALESCE($12::numeric, unit_price), + total_amount = COALESCE($13::numeric, total_amount), updated_date = NOW(), updated_by = $8 WHERE id = $9 AND company_code = $10 @@ -497,6 +500,9 @@ export async function update(req: AuthenticatedRequest, res: Response) { userId, id, companyCode, + inbound_qty || null, + unit_price || null, + total_amount || null, ], ); diff --git a/frontend/app/(main)/COMPANY_30/logistics/receiving/page.tsx b/frontend/app/(main)/COMPANY_30/logistics/receiving/page.tsx index a80f1e07..c6875196 100644 --- a/frontend/app/(main)/COMPANY_30/logistics/receiving/page.tsx +++ b/frontend/app/(main)/COMPANY_30/logistics/receiving/page.tsx @@ -56,7 +56,6 @@ import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover import { cn } from "@/lib/utils"; import { toast } from "sonner"; import { apiClient } from "@/lib/api/client"; -import { toast } from "sonner"; import { useTableSettings } from "@/hooks/useTableSettings"; import { TableSettingsModal } from "@/components/common/TableSettingsModal"; import { DynamicSearchFilter, FilterValue } from "@/components/common/DynamicSearchFilter";