fix: [production] 생산지시 생성 시 $isStock 미정의 오류 및 수량 정수 변환
- DB::transaction 클로저 use절에 $isStock 변수 추가 - work_order_items 수량을 정수로 캐스팅
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user