Commit Graph

24 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
d2b0f028d4 feat: [수주관리] 전환/동기화 로직에 OrderNode 생성 및 아이템 연결
- convertToOrder: calculation_inputs.items[]로 OrderNode(location) 생성, order_items에 order_node_id 연결
- resolveLocationIndex() 헬퍼 추가 (formula_source/note 기반 개소 인덱스 매칭)
- syncFromQuote: 기존 nodes 삭제 후 재생성, 아이템 node 연결 동기화
- show(): rootNodes + withRecursiveChildren eager loading 추가
- createFromQuoteItem: order_node_id 매핑 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 20:15:00 +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
4fa38e39e6 feat(API): 채권현황 동적월 지원 및 year=0 파라미터 버그 수정
- ReceivablesController: boolean 유효성 검사를 string|in:true,false,1,0으로 변경
  - 쿼리 문자열의 "true" 문자열을 올바르게 처리
  - 디버깅용 Log::info 추가
- ReceivablesService: 동적 월 기간 지원
  - recent_year=true 시 최근 12개월 동적 계산
  - 월별 레이블 동적 생성 (예: 25.02, 25.03...)
  - 이월잔액(carry_forward_balance) 계산 추가
- Client 모델: is_overdue, memo 필드 추가
- 마이그레이션: clients 테이블에 is_overdue 컬럼 추가

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 14:47:51 +09:00
472cf53289 fix: 종합분석 오늘의 이슈 승인/반려 버그 수정
- ComprehensiveAnalysisService::getTodayIssue() 수정
  - 현재 사용자가 결재자인 문서만 조회하도록 whereHas 조건 추가
  - 이전: 테넌트의 모든 대기 결재 표시 → "결재 순서가 아닙니다" 오류
  - 수정: 현재 로그인 사용자가 approver_id인 문서만 표시

- ComprehensiveAnalysisSeeder 테스트 데이터 수정
  - Tenant 287 (프론트_테스트회사) 기준
  - User 33 (홍킬동) 기준으로 결재 단계 생성

- Client 모델 재무 컬럼 추가 (마이그레이션 포함)
  - outstanding_balance: 미수금
  - credit_limit: 여신한도

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 18:47:46 +09:00
8686b199ee feat: 더미 데이터 시더 추가 및 회계 관련 마이그레이션
- DummyDataSeeder 및 개별 시더 추가 (Client, BadDebt, Deposit 등)
- payments.paid_at nullable 마이그레이션
- subscriptions 취소 컬럼 추가
- clients 테이블 bad_debt 컬럼 제거
- PlanController, ClientService 수정
- 불필요한 claudedocs, flow-test 파일 정리
2025-12-24 08:54:52 +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
5f200054ea feat: clients.is_active CHAR(1) → TINYINT(1) Boolean 마이그레이션
- DB: CHAR(1) 'Y'/'N' → TINYINT(1) 0/1 컬럼 타입 변경
- Model: boolean 캐스트 추가, scopeActive() 수정
- Service: toggle(), index() Boolean 로직 적용
- FormRequest: 'in:Y,N' → 'boolean' 검증 규칙 변경
- Swagger: is_active type string → boolean 변경
2025-12-08 20:25:38 +09:00
d164bb4c4a feat: [client] 거래처 API 2차 필드 추가 및 견적 계획 업데이트
- 거래처 유형(client_type), 연락처(mobile, fax), 담당자 정보 필드 추가
- 발주처 설정(account_id/password, payment_day) 필드 추가
- 약정 세금(tax_agreement, tax_amount, tax_start/end_date) 필드 추가
- 악성채권(bad_debt 관련 5개 필드) 정보 필드 추가
- Model, Service, FormRequest, Swagger 문서 업데이트
- 견적 API 계획에 문서 발송 API(email/fax/kakao) 요구사항 추가
2025-12-04 21:13:58 +09:00
165512e121 feat: [client] Client API 사업자 정보 필드 및 toggle 버그 수정
- business_no, business_type, business_item 필드 추가
- toggle 로직 수정: boolean 캐스팅 호환 (is_active === 'Y' → !is_active)
2025-12-04 15:58:08 +09:00
cc206fdbed style: Laravel Pint 코드 포맷팅 적용
- PSR-12 스타일 가이드 준수
- 302개 파일 스타일 이슈 자동 수정
- 코드 로직 변경 없음 (포맷팅만)
2025-11-06 17:45:49 +09:00
a6b06be61d feat: 견적 단가 자동 적용 기능 추가
- 고객 그룹별 단가 조정 지원
- 견적 생성 시 자동 단가 조회
- 매출단가만 사용 (매입단가는 경고)
2025-10-13 21:52:34 +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