refactor: prices.item_type_code 통합 및 하드코딩 제거
- 레거시 PRODUCT/MATERIAL 값을 실제 item_type(FG, PT 등)으로 마이그레이션 - Price 모델에서 하드코딩된 ITEM_TYPE_* 상수 제거 - PricingService.getCost()에서 하드코딩된 자재 유형 배열을 common_codes.attributes.is_material 플래그 조회로 변경 - common_codes item_type 그룹에 is_material 플래그 추가 - FG, PT: is_material = false (제품) - SM, RM, CS: is_material = true (자재) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,16 +29,8 @@ class Price extends Model
|
||||
|
||||
public const STATUS_FINALIZED = 'finalized';
|
||||
|
||||
// 품목 유형 (items.item_type)
|
||||
public const ITEM_TYPE_FG = 'FG'; // Finished Goods (완제품)
|
||||
|
||||
public const ITEM_TYPE_PT = 'PT'; // Part (부품)
|
||||
|
||||
public const ITEM_TYPE_RM = 'RM'; // Raw Material (원자재)
|
||||
|
||||
public const ITEM_TYPE_SM = 'SM'; // Semi-finished (반제품)
|
||||
|
||||
public const ITEM_TYPE_CS = 'CS'; // Consumables/Supplies (소모품)
|
||||
// 품목 유형은 common_codes 테이블의 code_group='item_type'에서 관리
|
||||
// FG(완제품), PT(부품), RM(원자재), SM(반제품), CS(소모품)
|
||||
|
||||
protected $fillable = [
|
||||
'tenant_id',
|
||||
|
||||
Reference in New Issue
Block a user