- 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>
- 090000 → 100500으로 변경 (100200 create, 100400 add_columns 이후 실행되도록)
- 로컬 fresh 환경에서 테이블 미존재 상태로 unique key 추가 시 에러 방지
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- sales_scenario_unique 인덱스 삭제 전 존재 여부 확인
- sales_scenario_checkpoint_unique 생성 전 존재 여부 확인
- 서버 환경에서 이미 수동으로 인덱스가 변경된 경우 대응
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>
- sales_commissions 테이블 생성 (영업수수료 정산)
- sales_commission_details 테이블 생성 (상품별 수당 내역)
- sales_tenant_managements 테이블에 입금 정보 컬럼 추가
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>
- sales_product_categories: 상품 카테고리 테이블
- sales_products: 영업 상품 테이블
- sales_contract_products: 계약별 선택 상품 테이블
- SalesProductSeeder: 제조업체 8개, 공사업체 3개 상품 초기 데이터
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>
sales_tenant_managements 테이블:
- hq_status: 본사 진행 상태 (pending, review, planning, coding, dev_test, dev_done, int_test, handover)
- incentive_status: 수당 지급 상태 (pending, eligible, paid)
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>
- 기존 유니크 키 (tenant_id, user_id, step_id, checkpoint_index) 삭제
- 새 유니크 키 (tenant_id, scenario_type, step_id, checkpoint_id) 생성
- checkpoint_index를 nullable로 변경
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- POST /quotes/{id}/finalize 라우트 추가
- POST /quotes/{id}/cancel-finalize 라우트 추가
- 라우트 누락으로 인한 404 오류 수정
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- sales_partners: 영업 파트너 정보
- sales_tenant_managements: 테넌트별 영업 관리 (tenant_id FK)
- sales_scenario_checklists: 시나리오 체크리스트
- sales_consultations: 상담 기록 (텍스트/음성/파일)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>