From 053323c1440fa52ed8fc8620fcbb8742969ca4a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Tue, 17 Mar 2026 10:46:29 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[production]=20=EC=83=9D=EC=82=B0?= =?UTF-8?q?=EC=A7=80=EC=8B=9C=20=EC=83=9D=EC=84=B1=20=EC=8B=9C=20$isStock?= =?UTF-8?q?=20=EB=AF=B8=EC=A0=95=EC=9D=98=20=EC=98=A4=EB=A5=98=20=EB=B0=8F?= =?UTF-8?q?=20=EC=88=98=EB=9F=89=20=EC=A0=95=EC=88=98=20=EB=B3=80=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - DB::transaction 클로저 use절에 $isStock 변수 추가 - work_order_items 수량을 정수로 캐스팅 --- app/Services/OrderService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/OrderService.php b/app/Services/OrderService.php index 0ed30b6..f181d48 100644 --- a/app/Services/OrderService.php +++ b/app/Services/OrderService.php @@ -1376,7 +1376,7 @@ public function createProductionOrder(int $orderId, array $data) } } - return DB::transaction(function () use ($order, $data, $tenantId, $userId, $itemsByProcess, $nodesBomMap) { + return DB::transaction(function () use ($order, $data, $tenantId, $userId, $itemsByProcess, $nodesBomMap, $isStock) { $workOrders = []; // 담당자 ID 배열 처리 (assignee_ids 우선, fallback으로 assignee_id) @@ -1530,7 +1530,7 @@ public function createProductionOrder(int $orderId, array $data) 'item_id' => $itemId, 'item_name' => $orderItem->item_name, 'specification' => $orderItem->specification, - 'quantity' => $orderItem->quantity, + 'quantity' => (int) $orderItem->quantity, 'unit' => $orderItem->unit, 'sort_order' => $sortOrder++, 'status' => 'pending',