fix: 수주 삭제 시 견적 연결 해제 + 생산지시 공정 매핑 보완

- OrderService::destroy()에서 견적 order_id/status 초기화
- StoreOrderRequest/UpdateOrderRequest에 floor_code, symbol_code, item_code 추가
- createProductionOrder()에 item_code fallback 공정 매핑 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-10 19:03:22 +09:00
parent 6733a431bb
commit 2d68e5e669
3 changed files with 59 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ public function rules(): array
// 품목 배열
'items' => 'nullable|array',
'items.*.item_id' => 'nullable|integer|exists:items,id',
'items.*.item_code' => 'nullable|string|max:50',
'items.*.item_name' => 'required|string|max:200',
'items.*.specification' => 'nullable|string|max:500',
'items.*.quantity' => 'required|numeric|min:0',
@@ -66,6 +67,8 @@ public function rules(): array
'items.*.supply_amount' => 'nullable|numeric|min:0',
'items.*.tax_amount' => 'nullable|numeric|min:0',
'items.*.total_amount' => 'nullable|numeric|min:0',
'items.*.floor_code' => 'nullable|string|max:50',
'items.*.symbol_code' => 'nullable|string|max:50',
];
}