diff --git a/app/Http/Controllers/Api/Admin/ItemManagementApiController.php b/app/Http/Controllers/Api/Admin/ItemManagementApiController.php index 6ac82b1d..b83d0657 100644 --- a/app/Http/Controllers/Api/Admin/ItemManagementApiController.php +++ b/app/Http/Controllers/Api/Admin/ItemManagementApiController.php @@ -75,7 +75,18 @@ public function calculateFormula(Request $request, int $id): JsonResponse 'MP' => in_array($mp, ['single', 'three']) ? $mp : 'single', ]; - $formulaService = new FormulaApiService(); + // 제품모델/설치타입/마감타입 (입력값이 있으면 전달) + if ($request->filled('product_model')) { + $variables['product_model'] = $request->input('product_model'); + } + if ($request->filled('installation_type')) { + $variables['installation_type'] = $request->input('installation_type'); + } + if ($request->filled('finishing_type')) { + $variables['finishing_type'] = $request->input('finishing_type'); + } + + $formulaService = new FormulaApiService; $result = $formulaService->calculateBom( $item->code, $variables, diff --git a/resources/views/item-management/index.blade.php b/resources/views/item-management/index.blade.php index 06fcb13e..6562f566 100644 --- a/resources/views/item-management/index.blade.php +++ b/resources/views/item-management/index.blade.php @@ -61,7 +61,7 @@ class="bom-tab px-3 py-1.5 text-xs font-medium rounded-md bg-gray-100 text-gray-