- Migrate5130BendingStock: BD-* 품목 초기 재고 셋팅으로 목적 변경, --min-stock 옵션 추가
- ValidateBendingItems: BD-* 품목 존재 여부 검증 커맨드 신규
- BendingItemSeeder: 경동 절곡 품목 시딩 신규
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- StockTransaction: REASON_PRODUCTION_OUTPUT 상수 및 '생산입고' 라벨 추가
- StockLot: work_order_id FK 컬럼 마이그레이션 + 모델 fillable/casts/relation 추가
- StockService: increaseFromProduction() 메서드 구현 (increaseFromReceiving 기반)
- WorkOrderService: 완료 시 sales_order_id 유무에 따라 출하/재고입고 분기
- stockInFromProduction(): 품목별 양품 재고 입고 처리
- shouldStockIn(): items.options 기반 입고 대상 판단
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 마이그레이션: work_orders.options JSON nullable 컬럼 추가
- WorkOrder 모델: $fillable, $casts에 options 추가
- bending_info 등 작업지시 레벨 추가 옵션 저장용
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- KyungdongFormulaHandler: product_type 자동 추론(item_category 기반), 철재 주자재 EGI코일로 변경, 조인트바 steel 공통 지원
- FormulaEvaluatorService: FG item_category에서 product_type 자동 판별
- MapItemsToProcesses: 경동 품목-공정 매핑 커맨드 정비
- KyungdongItemMasterSeeder: BOM child_item_id code 기반 재매핑
- ItemsBomController: ghost ID 유효성 검증 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- field_variable, metadata, variables 컬럼 마이그레이션 추가
- EsignContract 모델에 metadata (JSON cast) 추가
- EsignSignField 모델에 field_variable 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- esign_field_templates 테이블에 file_path, file_name, file_hash, file_size 컬럼 추가
- 템플릿에 PDF 파일을 포함할 수 있도록 스키마 확장
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- quote_revisions(quote_id, tenant_id, revision_number) 복합 인덱스 추가
- previous_data JSON 대용량 컬럼 포함 정렬 시 filesort OOM 방지
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- quotes(tenant_id, registration_date, id) 복합 인덱스 추가
- ORDER BY registration_date DESC, id DESC 정렬 시 filesort 제거
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- completion_type 값을 한글(클릭 시 완료)에서 영문 코드(click_complete)로 변환
- FormRequest에 in 검증 규칙 추가 (click_complete, selection_complete, inspection_complete)
- 기존 데이터 마이그레이션 포함
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- work_order_material_inputs 테이블 신규 생성 (개소별 자재 투입 추적)
- 개소별 자재 조회/투입/이력/삭제/수정 API 5개 추가
- StockService.increaseToLot: LOT 수량 복원 메서드 추가
- WorkOrderService에 개소별 자재 투입 비즈니스 로직 구현
- WorkOrder, WorkOrderItem 모델에 materialInputs 관계 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 마이그레이션 4개 (esign_contracts, esign_signers, esign_sign_fields, esign_audit_logs)
- 모델 4개 (EsignContract, EsignSigner, EsignSignField, EsignAuditLog)
- 서비스 4개 (EsignContractService, EsignSignService, EsignPdfService, EsignAuditService)
- 컨트롤러 2개 (EsignContractController, EsignSignController)
- FormRequest 4개 (ContractStore, FieldConfigure, SignSubmit, SignReject)
- Mail 1개 (EsignRequestMail + 이메일 템플릿)
- API 라우트 (인증 계약 관리 + 토큰 기반 서명 프로세스)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- needs_work_log 개별 컬럼 → options JSON 구조로 전환
- StoreProcessRequest, UpdateProcessRequest 유효성 규칙 갱신
- Process 모델 $fillable, $casts 갱신
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Process 모델에 document_template_id, needs_work_log, work_log_template_id 추가
- ProcessStep에서 해당 필드 제거
- WorkOrderService의 검사 관련 3개 메서드(getInspectionTemplate, resolveInspectionDocument, createInspectionDocument) 공정 레벨 참조로 변경
- ProcessService eager loading에 documentTemplate, workLogTemplateRelation 추가
- FormRequest 검증 규칙 이동 (ProcessStep → Process)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 원본 거래 추적용 source_type(bank_transaction, hometax_invoice, manual) 컬럼 추가
- 원본 거래 고유키 source_key 컬럼 추가
- tenant_id + source_type + source_key 복합 인덱스 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- process_steps 테이블에 document_template_id FK 추가 (migration)
- ProcessStep 모델에 documentTemplate BelongsTo 관계 추가
- ProcessStepService에서 documentTemplate eager loading
- StoreProcessStepRequest/UpdateProcessStepRequest에 document_template_id 유효성 검증
- WorkOrderService에 getInspectionTemplate(), createInspectionDocument() 메서드 추가
- WorkOrderController에 inspection-template/inspection-document 엔드포인트 추가
- DocumentService.formatTemplateForReact() 접근자 public으로 변경
- i18n 메시지 키 추가 (inspection_document_created, no_inspection_template)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>