fix: [자재투입] 입고 로트번호 기반으로 자재 목록 변경

- getMaterials(): 품목당 1행 → StockLot(입고 로트)당 1행으로 변경
- ITEM-{id} 가짜 로트번호 → Receiving에서 생성된 실제 lot_no 반환
- registerMaterialInput(): material_ids → stock_lot_id+qty 로트별 수량 차감
- StockService::decreaseFromLot() 신규 추가 (특정 로트 지정 차감)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-07 05:06:28 +09:00
parent d4125dc4ad
commit 6318474b6f
3 changed files with 206 additions and 75 deletions

View File

@@ -149,12 +149,12 @@ public function materials(int $id)
}
/**
* 자재 투입 등록
* 자재 투입 등록 (로트별 수량 차감)
*/
public function registerMaterialInput(Request $request, int $id)
{
return ApiResponse::handle(function () use ($request, $id) {
return $this->service->registerMaterialInput($id, $request->input('material_ids', []));
return $this->service->registerMaterialInput($id, $request->input('inputs', []));
}, __('message.work_order.material_input_registered'));
}