매출 관리
테이블 (8)
company_mapping
- company_mapping_pid — int(10) — 기본 키 — NOT NULL
- dentist_pid — int(10) — NOT NULL — 치과 일련번호
- factory_pid — int(10) — NOT NULL — 기공소 일련번호
- nickname — varchar(45)
- supplier_pid — int(11) — NOT NULL
- transaction_period_pid — int(11) — NOT NULL
- create_date — datetime — NOT NULL
- discount_rate — tinyint(4) — NOT NULL — 계약시 기공 할인율
- balance — decimal(13, 2) — NOT NULL — 최신 잔액
confirmed_transactions
- pid — int(10) — 기본 키 — NOT NULL — 일련번호
- publish_company_pid — int(10) — NOT NULL — 공급자
- target_company_pid — int(10) — NOT NULL — 거래처 일련번호
- supplier_pid — int(10) — NOT NULL — 공급자 일련번호
- transactions_pid — int(10) — NOT NULL — 거래명세서 일련번호
- diff_amount — decimal(12, 2) — NOT NULL
- price — decimal(12, 2) — NOT NULL
- reduced_price — decimal(12, 2) — NOT NULL
- gold_price — decimal(12, 2) — NOT NULL
- total_price — decimal(12, 2) — NOT NULL
- confirmed_date — datetime — NOT NULL — 확정날짜
- create_at — datetime — NOT NULL — 생성날짜
- create_by — int(10) — NOT NULL — 생성자
- modified_at — datetime — NOT NULL — 수정날짜
- modified_by — varchar(100) — NOT NULL — 수정자
- payment_yn — varchar(4) — NOT NULL — 결제, 수금 완료
- description — varchar(64) — NOT NULL — 적요
- discounted_price — decimal(12, 2) — NOT NULL
- discount_rate — tinyint(4) — NOT NULL — 할인율
- select_start_date — datetime
- select_end_date — datetime
- public_id — varchar(36)
- currency — char(3) — NOT NULL
- exchange_rate — decimal(6, 2) — 환율
deposit
- pid — int(10) UNSIGNED — 기본 키 — NOT NULL — 일련번호
- amount_krw — decimal(10) — NOT NULL — 입금 금액(KRW)
- description — varchar(64) — NOT NULL — 적요
- partner_pid — int(10) — NOT NULL — 거래처
- factory_pid — int(10) — NOT NULL — 공장
- deposit_at — date — NOT NULL — 입금일
- created_by — int(10) UNSIGNED — NOT NULL — 생성자
- modified_by — int(10) UNSIGNED — NOT NULL
- created_at — datetime — NOT NULL — 생성일
- modified_at — datetime — NOT NULL — 수정일
foreign_deposit
- pid — int(10) UNSIGNED — 기본 키 — NOT NULL — 일련번호
- deposit_pid — int(10) UNSIGNED — 외래 키 → deposit.pid — NOT NULL — 입금 PID
- amount — decimal(10, 2) — NOT NULL — 외화 금액
- currency — char(3) — NOT NULL — 외화 통화
foreign_invoice
- pid — int(10) UNSIGNED — 기본 키 — NOT NULL — 일련번호
- invoice_pid — int(10) UNSIGNED — 외래 키 → invoice.pid — NOT NULL — 일련번호
- amount — decimal(10, 2) — NOT NULL — 외화 금액
- currency — char(3) — NOT NULL — 통화
- exchange_rate — decimal(6, 2) — NOT NULL — 환율
invoice
- pid — int(10) UNSIGNED — 기본 키 — NOT NULL — 일련번호
- confirmed_transactions_pid — int(10) — 외래 키 → confirmed_transactions.pid — NOT NULL — 확정된 거래명세서 일련번호
- amount_krw — decimal(10) — NOT NULL — 청구 금액(KRW)
- description — varchar(64) — NOT NULL — 적요
- partner_pid — int(10) — NOT NULL — 거래처
- factory_pid — int(10) — NOT NULL — 공장
- invoice_at — date — NOT NULL — 청구일
- created_by — int(10) UNSIGNED — NOT NULL — 생성자
- modified_by — int(10) UNSIGNED — NOT NULL — 수정자
- created_at (create_at) — datetime — NOT NULL — 생성일
- modified_at — datetime — NOT NULL — 수정일
revenue_ledger
- pid — int(10) — 기본 키 — NOT NULL — 일련번호
- type — varchar(16) — NOT NULL — 이벤트 타입
- action — varchar(16) — NOT NULL — 적용 / 취소
- source_pid — int(10) — NOT NULL — 원본 데이터 PID
- factory_pid — int(10) — NOT NULL — 파트너
- partner_pid — int(10) — NOT NULL — 기공소
- amount_krw — decimal(10, 0) — NOT NULL — 원화 금액
- amount_foreign — decimal(10, 2) — 외화 금액
- exchange_rate — decimal(10, 4) — 환율
- currency — char(3) — 통화
- is_active — tinyint(1) — NOT NULL — 활성 여부
- created_by — int(10) — NOT NULL — 생성자
- occurred_at — date — NOT NULL — 이벤트 발생일
- created_at — datetime — NOT NULL — 대상자 생성일
- recorded_at — datetime — NOT NULL — 장부 기록일(생성일)
transactions_audit
- id — bigint(20) — 기본 키 — NOT NULL
- pid — int(10) — NOT NULL
- rev — int(11) — NOT NULL
- rev_type — tinyint(4)
- publish_company_pid — int(11) — NOT NULL
- target_company_pid — int(11) — NOT NULL
- supplier_pid — int(11) — NOT NULL
- price — decimal(12, 2) — NOT NULL
- reduced_price — decimal(12, 2) — NOT NULL
- gold_price — decimal(12, 2)
- total_price — decimal(12, 2) — NOT NULL
- state — varchar(15) — NOT NULL
- memo — text
- select_start_date — datetime — NOT NULL
- select_end_date — datetime — NOT NULL
- created_at — datetime — NOT NULL
- created_by — int(11)
- modified_at — datetime — NOT NULL
- modified_by — int(11)
- diff_amount — decimal(12, 2)
- confirmed_label — tinyint(1) — 매출 확정 라벨
- audit_modified_at — datetime
- audit_modified_by — int(11) — 히스토리 수정자
- history_title — varchar(20) — NOT NULL
- discounted_price — decimal(12, 2) — NOT NULL
- discount_rate — tinyint(4) — NOT NULL — 할인율
- currency — char(3) — NOT NULL
- balance (잔액) — decimal(13, 2) — NOT NULL — 0