- ExportItemMasterDataCommand: tenant_id=287 데이터를 JSON으로 추출
- KyungdongItemMasterSeeder: JSON 기반 DELETE+재삽입 시더
- Phase 1: item_pages/sections/fields + entity_relationships
- Phase 2: categories(depth순) + items(배치500건)
- Phase 3: item_details + prices
- ID 매핑으로 환경별 충돌 없음, 트랜잭션 안전
- 8개 JSON 데이터 파일 포함 (총 약 1.5MB)
- .gitignore에 시더 데이터 예외 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 기존: attributes 전체 덮어쓰기 → 수정: 기존 값 보존 후 새 값만 머지
- 품목 수정 시 레거시 속성(sales_price, legacy 정보 등) 유실 방지
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 템플릿별 동적 필드 정의 (document_template_section_fields)
- 외부 키 매핑 동적화 (document_template_links + link_values)
- 문서 레벨 연결 (document_links)
- 시스템 프리셋 (document_template_field_presets)
- section_items에 field_values JSON 컬럼 추가
- 기존 고정 필드 → 동적 field_values 데이터 마이그레이션
- search_api → source_table 전환 마이그레이션
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- document_template_section_items에 tolerance(공차), measurement_type(측정유형) 컬럼 추가
- common_codes에 inspection_method 그룹 6개 코드 삽입
- DocumentTemplateSectionItem 모델 $fillable 업데이트
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- DocumentTemplate 모델 6개 생성 (Template, ApprovalLine, BasicField, Section, SectionItem, Column)
- DocumentTemplateService (list/show) + DocumentTemplateController (index/show)
- GET /v1/document-templates, GET /v1/document-templates/{id} 라우트
- DocumentTemplateApi.php Swagger (7개 스키마, 2개 엔드포인트)
- Document 결재 워크플로우 4개 엔드포인트 활성화 (submit/approve/reject/cancel)
- ApproveRequest, RejectRequest FormRequest 생성
- DocumentApi.php Swagger에 결재 엔드포인트 4개 추가
- Document.template() 참조 경로 수정 (DocumentTemplate → Documents 네임스페이스)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 벽면형/측면형: 단가×2 세트가격 후 round(세트가격×길이)×QTY
- 혼합형: (벽면단가+측면단가) 합산 후 단일 항목으로 계산
- 기존: round(단가×길이)×2×QTY → 수정: round(단가×2×길이)×QTY
- 검증: EGI 84/84 + SUS 44/44 + 가이드타입 36/36 = 164/164 ALL PASS
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- DB::table() 직접 쿼리 → CommonCode 모델 사용으로 변경
- SoftDeletes 자동 적용되어 삭제된 레코드 제외
- getComeCode()도 모델 전환 (TenantScope 자동 적용)
- index()는 TenantScope 해제 후 테넌트/글로벌 폴백 직접 처리
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- FormulaEvaluatorService: 슬랫 면적 공식 분리 (W0×(H0+50) vs W1×(H1+550))
- FormulaEvaluatorService: MOTOR_CAPACITY/BRACKET_SIZE 입력값 우선 처리
- KyungdongFormulaHandler: calculateDynamicItems 면적/중량 제품타입별 분기
- KyungdongFormulaHandler: normalizeGuideType() 추가 (벽면↔벽면형 호환)
- KyungdongFormulaHandler: guide_rail_spec 파라미터 별칭 지원
- 검증: 스크린/슬랫 5치수×3수량 전체 5130 정합성 확인 (±1원 이내)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- guide_type 매핑: installation_type → guide_type 파라미터 전달 추가 (측면형/혼합형 가이드레일 가격 반영)
- 제어기/뒷박스 수량: QTY 곱셈 제거 (5130 동일: col15/col16/col17은 고정 수량)
- 샤프트 규격 매핑: W0 기반 임의 길이 → 5130 고정 제품(5인치: 6/7/8.2m)으로 매핑
- 환봉/앵글 이중 곱셈 수정: 자동계산에 이미 QTY 포함, 추가 곱셈 제거
- 모터/브라켓 입력값 우선: MOTOR_CAPACITY/BRACKET_SIZE 입력 시 자동계산 대신 사용
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- app_versions 테이블 마이그레이션 (시스템 레벨, tenant_id 없음)
- AppVersion 모델 (SoftDeletes)
- AppVersionService: getLatestVersion, downloadApk
- AppVersionController: GET /api/v1/app/version, GET /api/v1/app/download/{id}
- ApiKeyMiddleware 화이트리스트에 api/v1/app/* 추가
- app_releases 스토리지 디스크 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- push_urgent → push_vendor_register (거래처등록)
- push_payment → push_approval_request (결재요청)
- push_income 신규 추가 (입금)
- config/fcm.php에 전체 7개 채널 등록 (기존 2개→7개)
- 서비스 파일 하드코딩을 config() 참조로 전환
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- getLabel(), getCodeMap()에서 withoutGlobalScopes() → query()로 변경
- BelongsToTenant 스코프가 적용되어 테넌트별 공통코드 정상 조회
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- scopeForTenant 등 스코프 메서드에서 Builder 타입힌트 사용하나 import 누락
- CalendarService, StatusBoardService에서 forTenant() 호출 시 500 발생
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- FormulaEvaluatorService: 완제품 미등록 상태에서도 경동 전용 계산 진행, product_model/finishing_type/installation_type 변수 추가
- LOGICAL_RELATIONSHIPS.md: stock_transactions 모델 관계 반영
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- UpdateReceivingRequest: status 허용값에 completed 추가, receiving_qty/receiving_date/lot_no 필드 추가
- ReceivingService::update(): status가 completed로 변경 시 LOT번호 자동생성, 입고수량/입고일 설정, 재고 연동(StockService) 처리
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- StatApi.php: Stats 태그, 4개 엔드포인트 Swagger 정의
- GET /stats/summary - 대시보드 통계 요약
- GET /stats/daily - 도메인별 일간 통계
- GET /stats/monthly - 도메인별 월간 통계
- GET /stats/alerts - 통계 알림 목록
- 스키마: StatSalesDaily, StatFinanceDaily, StatDashboardSummary, StatAlert
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 케이스 마구리: 수량 2 고정 → quantity 기반 (5130: maguriPrices × $su)
- 각파이프: 하드코딩 1개 → pipe_3000_qty/pipe_6000_qty 2종 분리 (5130: col68+col69)
- 기본값 fallback: 파이프 수량 미입력 시 W0 기준 자동 결정 유지
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 영업(Sales), 재무(Finance), 생산(Production) 3개 도메인 구현
- 일간/월간 통계 테이블 6개 마이그레이션 생성
- 도메인별 StatService (SalesStatService, FinanceStatService, ProductionStatService)
- Daily/Monthly 6개 Eloquent 모델 생성
- StatAggregatorService에 도메인 서비스 매핑 활성화
- StatJobLog duration_ms abs() 처리
- 스케줄러 등록 (일간 02:00, 월간 1일 03:00)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 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>
- QuoteStoreRequest/UpdateRequest에 discount_amount 필드 추가
- QuoteService: 프론트엔드에서 계산한 할인금액 우선 사용, 없으면 비율로 계산
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- stock_transactions 마이그레이션 생성 (type, qty, balance_qty, reference)
- StockTransaction 모델 (IN/OUT/RESERVE/RELEASE 타입, 사유 상수)
- StockService 5개 메서드에 거래 이력 기록 추가
- increaseFromReceiving → IN
- decreaseFIFO → OUT (LOT별)
- reserve → RESERVE (LOT별)
- releaseReservation → RELEASE (LOT별)
- decreaseForShipment → OUT (LOT별)
- Stock 모델에 transactions() 관계 추가
- 기존 audit_logs 기록은 유지 (감사 로그와 거래 이력 목적 분리)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ClientService.index()에 client_type 파라미터 필터 추가
- 쉼표 구분 복수 값 지원 (예: PURCHASE,BOTH)
- 매입 가능 거래처만 조회하는 용도
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- receiving_date 기준 → created_at(작성일) 기준으로 변경
- 입고처리 전(receiving_date=NULL) 데이터가 필터에서 누락되는 문제 해결
- creator 관계 eager loading 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 출금 건별 개별 이슈 → 해당일 누계 1건으로 upsert
- 첫 건: "거래처명 출금 금액원"
- 2건+: "첫거래처명 외 N건 출금 합계 금액원"
- 삭제 시 남은 건수/금액으로 자동 갱신
- FCM 푸시 미발송 (알림 설정 미구현)
- 기존 개별 source_id 레거시 이슈 자동 정리
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- QuoteController에 getItemPrices 엔드포인트 추가
- QuoteCalculationService에 품목 코드 배열로 단가 조회 기능 추가
- 불필요한 디버그 로그 제거
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- KdPriceTable 모델: 경동기업 단가 테이블 (motor, shaft, pipe, angle, raw_material, bdmodels)
- KyungdongFormulaHandler: 모터 용량, 브라켓 크기, 절곡품(10종), 부자재(3종) 계산
- FormulaEvaluatorService: tenant_id=287 라우팅 추가
- kd_price_tables 마이그레이션 및 시더 (47건 단가 데이터)
테스트 결과: W0=3000, H0=2500 입력 시 16개 항목, 합계 751,200원 정상 계산
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 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>
- handleExpectedExpenseChange()에서 source_type이 'purchases'인 경우 알림 제외
- 매입 알림은 결재 상신 시에만 발송되도록 변경
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>