16 Commits

Author SHA1 Message Date
55270198d4 fix: 견적→수주 변환 시 담당자 정보 누락 수정
- Order::createFromQuote() 잘못된 필드명 수정 (contact_person→contact, delivery_date→completion_date)
- 견적 담당자(manager)를 orders.options.manager_name에 저장
- StoreOrderRequest/UpdateOrderRequest에 options.manager_name 유효성 검증 추가
- WorkOrderService show()에서 salesOrder.options 컬럼 포함하여 담당자 표시

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:50:13 +09:00
874bf97b8f feat: [수주관리] order_nodes 테이블 및 모델 생성 (N-depth 트리 구조)
- order_nodes 마이그레이션: 자기참조 parent_id, 고정코어(통계용) + options JSON(하이브리드)
- order_items에 order_node_id nullable FK 추가
- OrderNode 모델: BelongsToTenant, Auditable, SoftDeletes, 트리 관계(parent/children)
- Order 모델: nodes(), rootNodes() HasMany 관계 추가
- OrderItem 모델: order_node_id fillable + node() BelongsTo 관계 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 20:06:14 +09:00
189b38c936 feat: Auditable 트레이트 구현 및 97개 모델 적용
- Auditable 트레이트 신규 생성 (bootAuditable 패턴)
  - creating: created_by/updated_by 자동 채우기
  - updating: updated_by 자동 채우기
  - deleting: deleted_by 채우기 + saveQuietly()
  - created/updated/deleted: audit_logs 자동 기록
- 기존 AuditLogger 패턴과 동일한 try/catch 조용한 실패
- 변경된 필드만 before/after 기록 (updated 이벤트)
- auditExclude 프로퍼티로 모델별 제외 필드 설정 가능
- 제외 대상: Attendance, StockTransaction, TodayIssue 등 고빈도/시스템 모델

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:33:54 +09:00
e9894fef61 feat: 수주 목록/상세 필드 개선
- OrderService: client relation에 manager_name 추가
- Order 모델: shipping_cost_label accessor 추가 (common_codes 조회)
- $appends에 shipping_cost_label 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 22:24:21 +09:00
6d05ab815f feat:테넌트설정 API 및 다수 서비스 개선
- TenantSetting CRUD API 추가
- Calendar, Entertainment, VAT 서비스 개선
- 5130 BOM 계산 로직 수정
- quote_items에 item_type 컬럼 추가
- tenant_settings 테이블 마이그레이션
- Swagger 문서 업데이트
2026-01-26 20:29:22 +09:00
09db0da43b feat(API): 부실채권, 재고, 입고 기능 개선
- BadDebt 컨트롤러/서비스 기능 확장
- StockService 재고 조회 로직 개선
- ProcessReceivingRequest 검증 규칙 수정
- Item, Order, CommonCode, Shipment 모델 업데이트
- TodayIssueObserverService 개선

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:32:23 +09:00
c8d7990313 feat: 수주(Order) ↔ 매출(Sale) 연동 스키마 구현
- sales 테이블: order_id, shipment_id, source_type 컬럼 추가
- orders 테이블: sales_recognition, sale_id 컬럼 추가
- Sale 모델: order(), shipment() 관계 및 createFromOrder/Shipment 팩토리 메서드
- Order 모델: sale(), sales() 관계 및 shouldCreateSaleOnConfirm/Shipment 헬퍼
- 매출 인식 시점: 수주확정 시 / 출하완료 시 / 수동 선택 가능

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 17:23:36 +09:00
7246ac003f fix(WEB): 수주 페이지 필드 매핑 및 제품-부품 트리 구조 개선
- ApiClient 인터페이스: representative → manager_name, contact_person 변경
- transformApiToFrontend: client.representative → client.manager_name 수정
- ApiOrderItem에 floor_code, symbol_code 필드 추가 (제품-부품 매핑)
- ApiOrder에 options 타입 정의 추가
- ApiQuote에 calculation_inputs 타입 정의 추가
- 수주 상세 페이지 제품-부품 트리 구조 UI 개선
2026-01-20 16:14:46 +09:00
090c07605e fix(WEB): 수주 등록/수정 옵션 필드 저장 및 담당자 표시 문제 해결
- FormRequest에 options 필드 validation 추가 (StoreOrderRequest, UpdateOrderRequest)
  - shipping_cost_code, receiver, receiver_contact, shipping_address 등
- OrderService.show()에서 client 로드 시 manager_name 필드 추가
- 수주확정/생산지시 되돌리기 기능 추가 (revertOrderConfirmation, revertProductionOrder)
- 견적 calculation_inputs 포함하여 로드

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-16 21:58:57 +09:00
e3630c6196 fix: 수주 선택 모달 필터링 조건 수정
- Order 모델에 workOrders 관계 추가
- OrderService에 for_work_order 파라미터 처리 추가
- DRAFT 상태 & 작업지시 미생성 수주만 조회

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-15 16:13:34 +09:00
b7c635fb4f feat(API): Model 및 관계 추가
- HandoverReport, HandoverReportItem, HandoverReportManager 모델 추가
- SiteBriefing 모델 추가
- StructureReview, FcmSendLog, Position, Salary 수정
- Order 모델 정리

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-13 19:49:11 +09:00
1410cf725a feat(API): 견적-주문 연동 필드 및 마이그레이션 추가
- Order, OrderItem 모델에 견적 연동 필드 추가
- Quote 모델에 order_id 관계 추가
- QuoteService 개선
- 관련 마이그레이션 파일 추가

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 15:56:46 +09:00
4f3b218441 feat: Phase 5 - 참조 테이블 모델 item_id 마이그레이션
- Order 모델: product_id 제거, item_id 추가, item() 관계 추가
- OrderItem 모델: product_id 제거, item_id 추가, item() 관계 추가
- Quote 모델: product_id 제거, item_id 추가, item() 관계 추가
- MaterialReceipt 모델: material_id 제거, item_id 추가, material() → item() 변경
- Lot 모델: Material import 제거, material() → item() 변경

DB 스키마는 이미 마이그레이션됨 (2025_12_13_153544)
기존 product_id/material_id 컬럼은 DB에 남아있지만 fillable에서 제거

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 01:23:05 +09:00
cc206fdbed style: Laravel Pint 코드 포맷팅 적용
- PSR-12 스타일 가이드 준수
- 302개 파일 스타일 이슈 자동 수정
- 코드 로직 변경 없음 (포맷팅만)
2025-11-06 17:45:49 +09:00
3707b53ffc fix : _ide_helper.php 헬퍼 추가
- 개발 보조 기능
2025-08-21 09:50:15 +09:00
2a0f3471a8 fix : 주문 테이블 모델링 -> 추후 변경예정 (견적, 수주, 발주에 대한 각각의 컬럼을 위한 테이블 필요) 2025-07-29 23:22:31 +09:00