Commit Graph

910 Commits

Author SHA1 Message Date
d4125dc4ad fix: [견적관리] 견적-수주 역방향 참조 보정 및 자동 동기화
- QuoteService::show() - order_id가 null인 경우 Order.quote_id 역방향 탐색으로 연결된 수주 자동 보정
- QuoteService::update() - 역방향 참조 포함하여 syncFromQuote() 동기화 트리거 확장
- 수주에서 견적 수정 시 기존 수주에 자동 반영 + "수주 보기" 버튼 정상 표시

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 04:55:22 +09:00
487e651845 feat: 견적확정 밸리데이션, 작업지시 통계 공정별 카운트, 입고/재고 개선
- 견적확정 시 업체명/현장명/담당자/연락처 필수 검증 추가 (QuoteService)
- 작업지시 stats API에 by_process 공정별 카운트 반환 추가
- 작업지시 목록/상세 쿼리에 수주 개소(rootNodes) 연관 로딩
- 작업지시 품목에 sourceOrderItem.node 관계 추가
- 입고관리 완료건 수정 허용 및 재고 차이 조정
- work_order_step_progress 테이블 마이그레이션
- receivings 테이블 options 컬럼 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 03:27:07 +09:00
6b3e5c3e87 Merge remote-tracking branch 'origin/develop' into develop 2026-02-06 22:16:36 +09:00
김보곤
3a62a2a6e6 feat:인터뷰 시나리오 마이그레이션/모델 추가
- interview_categories, interview_templates, interview_questions 테이블 생성
- interview_sessions, interview_answers 테이블 생성
- InterviewCategory, InterviewTemplate, InterviewQuestion 모델 추가
- InterviewSession, InterviewAnswer 모델 추가
- 멀티테넌트(tenant_id) 지원, 감사 로깅(Auditable) 적용

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 21:01:24 +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
4ae7b438f1 feat: 품목 치수 정규화 Artisan 커맨드 추가
- items:normalize-dimensions 커맨드 신규 생성
- 101_specification_1/2/3에서 thickness/width/length 자동 추출
- --dry-run(미리보기) / --execute(실행) 모드 지원
- 기존 값이 있는 경우 안전하게 스킵

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 20:05:23 +09:00
6dbcb5337d feat: [수주관리] convertToOrder 개소 파싱 로직 추가
- convertToOrder에서 calculation_inputs.items[] 파싱하여 floor_code/symbol_code 매핑
- resolveLocationMapping() 공통 메소드 추출 (note 파싱 1순위, formula_source 2순위)
- syncFromQuote와 동일한 2단계 파싱 로직으로 일관성 확보
- Exception → Throwable 변경 (동기화 실패 catch 범위 확대)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 19:40:14 +09:00
b6f1c817d8 Merge remote-tracking branch 'origin/develop' into develop 2026-02-06 15:47:56 +09:00
김보곤
bdf6bcc480 feat:일반전표입력 마이그레이션 추가 (journal_entries, journal_entry_lines)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 15:23:37 +09:00
김보곤
edbd95053c feat:계좌 입출금 분개 테이블 마이그레이션 추가
- barobill_bank_transaction_splits 테이블 생성
- 계좌 입출금 거래를 여러 계정과목으로 분개하여 저장

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 14:43:10 +09:00
김보곤
28bf445844 feat:계좌 입출금내역 수동입력용 is_manual 컬럼 추가
barobill_bank_transactions 테이블에 is_manual boolean 컬럼 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 11:03:08 +09:00
김보곤
3406b12260 feat:바로빌 계좌 거래내역 오버라이드 테이블 마이그레이션 추가
- barobill_bank_transaction_overrides 테이블 생성
- tenant_id + unique_key 복합 유니크 인덱스
- modified_summary, modified_cast 필드로 수정값 저장

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 11:03:08 +09:00
6bc766411b feat: 생산지시 생성 시 공정 자동 분류 및 아이템 연결
- OrderService: 생산지시 생성 로직 개선
  - order_items.item_id → process_items 테이블에서 공정 자동 조회
  - 공정별로 아이템 그룹화 (미지정 아이템은 별도 그룹)
  - 각 공정별 작업지시 생성
  - work_order_items에 해당 공정의 아이템들 자동 추가

- WorkOrderService: 목록 조회 시 관계 추가
  - items 관계 추가 (틀수 계산용)
  - process.department 필드 추가 (부서 표시용)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-06 10:28:30 +09:00
f640a837e9 feat:경동기업 견적/수주 전환 로직 개선
- KyungdongFormulaHandler: 수식 계산 로직 리팩토링 및 확장
- OrderService: 수주 전환 시 BOM 품목 매핑 로직 추가
- QuoteService: 견적 상태 처리 개선
- FormulaEvaluatorService: 디버그 로깅 추가
- Quote 모델: 캐스팅 타입 수정

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 21:58:49 +09:00
9f2b1cf44a feat:품목 검색 API에 수입검사 양식 연결 필드 추가
- has_inspection_template 필드 추가 (수입검사 양식 연결 여부)
- getItemsWithInspectionTemplate() 헬퍼 메서드 추가
- name 필드에 코드 합치기 제거 (중복 표시 해결)
- exclude_process_id 파라미터 추가 (공정별 품목 선택 시 중복 방지)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 21:58:00 +09:00
김보곤
70aab06364 feat:holidays 테이블 마이그레이션 생성
달력 휴일 관리를 위한 holidays 테이블 추가 (시작일/종료일, 유형, 반복 여부)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 19:59:31 +09:00
김보곤
44079f0f0e feat:재무관리 컬럼 추가 마이그레이션 (tax_type, tax_invoice_issued, deduction_type)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 18:26:47 +09:00
bc23debb26 Merge remote-tracking branch 'origin/develop' into develop 2026-02-05 17:37:54 +09:00
김보곤
a94c68ea91 feat:바로빌 카드 거래 숨김 테이블 마이그레이션 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 17:27:14 +09:00
김보곤
f941ca17b9 feat:분개 테이블에 공급가액/부가세 컬럼 추가
- split_supply_amount (decimal 18,2, nullable) 컬럼 추가
- split_tax (decimal 18,2, nullable) 컬럼 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 15:44:28 +09:00
229ebc7483 feat:문서 resolve/upsert API 추가- React 연동용 resolve API (GET /documents/resolve)
- Upsert API (POST /documents/upsert)
- ResolveRequest, UpsertRequest FormRequest 생성
- DocumentService에 resolve/upsert 로직 추가
- document_category common_codes 마이그레이션
- 에러/성공 메시지 i18n 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 14:45:53 +09:00
83d12a8ca2 Merge remote-tracking branch 'origin/develop' into develop 2026-02-05 12:46:38 +09:00
김보곤
bc4a41263a feat:카드 사용내역 수동입력 is_manual 컬럼 마이그레이션 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 11:24:32 +09:00
김보곤
49d68e3b3e fix:이력 테이블 마이그레이션 기존 테이블 충돌 방지
- 이전 실행에서 테이블만 생성되고 FK 추가 실패한 상태 대응
- dropIfExists 추가하여 재실행 가능하도록 수정

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 10:50:18 +09:00
김보곤
98ab3dac9a fix:이력 테이블 외래키 이름 길이 초과 수정
- MySQL 64자 제한으로 자동생성 외래키명 실패
- foreignId()->constrained() → 수동 foreign() + 짧은 이름(bb_amount_log_trans_fk)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 10:49:53 +09:00
5118c364ef Merge remote-tracking branch 'origin/develop' into develop 2026-02-05 10:49:28 +09:00
김보곤
ba34fb09df feat:카드 사용내역 금액 수정 마이그레이션 추가
- modified_supply_amount, modified_tax 컬럼 추가 (사용자 수정 공급가액/부가세)
- barobill_card_transaction_amount_logs 이력 테이블 생성

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 10:02:46 +09:00
김보곤
9626bca7eb feat:purchases 테이블에 MNG용 컬럼 추가 마이그레이션
- date, vendor, item, category, amount, vat, invoice_no, memo 컬럼 추가
- MNG 매입관리 페이지 500 에러 수정용

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 09:35:04 +09:00
김보곤
2b5ac4c54d feat:법인카드 거래내역(card_transactions) 마이그레이션 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 07:44:09 +09:00
김보곤
00470b7d30 feat:일일자금일보 마이그레이션 추가 (daily_fund_transactions, daily_fund_memos)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 07:43:55 +09:00
김보곤
422bad7dfc feat:부가세 관리 vat_records 테이블 마이그레이션 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 06:14:18 +09:00
e364239572 feat: 견적 참조 데이터 API, 수주 전환 로직 개선, 검사기준서 필드 통합
- 견적 참조 데이터(현장명, 부호) 조회 API 추가 (GET /quotes/reference-data)
- 수주 전환 시 floor_code/symbol_code를 quoteItem.note에서 파싱하도록 변경
- 수주 전환 시 note에 formula_category 저장
- 검사기준서 프리셋: standard + standard_criteria → text_with_criteria로 통합
- tolerance 컬럼 width 조정 (120px → 85px)
- LOGICAL_RELATIONSHIPS.md 문서 갱신

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:07:08 +09:00
김보곤
9c276ed8c3 fix:기존 테이블 충돌 방지를 위한 hasTable 체크 추가 (sales_records, purchases, subscriptions)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:53:02 +09:00
김보곤
343d7f6256 feat:고객/매출/매입/정산 등 재무 관련 8개 테이블 마이그레이션 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:50:44 +09:00
fa07e5b58a feat: 경동기업 품목 기준 데이터 배포용 시더 구현
- 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>
2026-02-04 22:47:03 +09:00
a6fc537a02 Merge remote-tracking branch 'origin/develop' into develop 2026-02-04 22:40:58 +09:00
김보곤
0d1b088463 feat:환불/해지 관리 테이블 마이그레이션 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:37:35 +09:00
김보곤
cee37b3e20 feat:미지급금(payables) 테이블 마이그레이션 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:27:13 +09:00
김보곤
0e9f8be423 feat:미수금(receivables) 테이블 마이그레이션 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:22:20 +09:00
김보곤
c7029f9eef feat:거래처(trading_partners) 테이블 마이그레이션 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:13:26 +09:00
a7975f7270 fix: ItemService update 시 attributes 머지 로직 추가
- 기존: attributes 전체 덮어쓰기 → 수정: 기존 값 보존 후 새 값만 머지
- 품목 수정 시 레거시 속성(sales_price, legacy 정보 등) 유실 방지

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 20:30:07 +09:00
d27061bbdc Merge remote-tracking branch 'origin/develop' into develop 2026-02-04 20:26:01 +09:00
af42c115ae feat:검사 기준서 동적화 + 외부 키 매핑 동적화
- 템플릿별 동적 필드 정의 (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>
2026-02-04 08:37:55 +09:00
김보곤
d012be69eb feat:차량정비이력 테이블 마이그레이션 추가 2026-02-03 19:56:38 +09:00
3d20c6979d feat: 공정 단계(ProcessStep) CRUD API 구현
- process_steps 테이블 마이그레이션 생성 (step_code, sort_order, boolean 플래그 등)
- ProcessStep 모델 생성 (child entity 패턴, HasFactory만 사용)
- ProcessStepService: CRUD + reorder + STP-001 자동채번
- ProcessStepController: DI + ApiResponse::handle 패턴
- FormRequest 3개: Store, Update, Reorder
- Process 모델에 steps() HasMany 관계 추가
- ProcessService eager-load에 steps 추가 (5곳)
- Nested routes: /processes/{processId}/steps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 18:59:12 +09:00
김보곤
83f0f69643 feat:홈택스 세금계산서 로컬 저장 테이블 추가
- hometax_invoices 테이블 생성 마이그레이션
- 국세청승인번호 기준 중복 방지 인덱스
- 매출/매입 구분, 금액정보, 거래처정보 저장
- 메모/분류/확인여부 등 자체 관리 필드

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 17:13:04 +09:00
김보곤
529c587023 feat:차량일지 구분 유형 확장 및 라벨 수정
- 구분 유형 추가: 출퇴근용(왕복), 업무용(왕복), 비업무용(왕복)
- 비업무 라벨을 '비업무용(개인)'으로 변경
- 출발지/도착지 장소명 라벨 수정 (장소명 → 출발지명/도착지명)
- 새 유형별 색상 추가

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-03 13:27:34 +09:00
김보곤
6c2e74d6ce feat:차량일지(운행기록부) 테이블 마이그레이션 추가
- vehicle_logs 테이블 생성
- 운행 정보 (날짜, 부서, 운전자, 구분)
- 출발지/도착지 정보 (분류, 장소명, 주소)
- 주행거리, 비고

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 11:32:27 +09:00
2779caed6e feat:문서양식 결재라인 user_id 및 연결 필드 마이그레이션 추가
- document_template_approval_lines에 user_id 컬럼 추가
- document_templates에 linked_item_ids(JSON), linked_process_id 컬럼 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 10:33:37 +09:00