一句話:本檔擁有 tour 產品的價格政策(直客價、同業價、梯次覆寫價、訂金規則、團費包含 / 不包含、包團價);它不擁有收款狀態或付款分類帳,實際應收、訂金 / 尾款 schedule 與付款狀態由 order-money-model 產生。
Tour 成交單價由 resolveDeparturePrice 解析,順序如下:
解析結果必須包含:
unit_price_twd;price_channel(direct / agency / promo 等語意);成交時把單價與通路快照寫入 tour_booking_lines;之後 trip / departure 價格變更不回寫既有訂單。
member_profiles.customer_type 只表示客戶分類(直客或同業窗口)。它可作為 checkout 預設價格通路,但不是訂單事實。
訂單事實在 product line snapshot:
特殊人工改價不得直接改 product line 快照;應走 control-finance 的掛帳 / promo / audit 流程。
Trip / departure 可定義付款政策:
| 欄位語意 | 說明 |
|---|---|
deposit_mode | none / fixed / percent。 |
deposit_amount_twd | fixed 訂金金額。 |
deposit_percent | percent 訂金比例。 |
balance_due_days_before_departure | 尾款到期日相對出發日。 |
checkout 時,價格政策只輸出「應收要如何拆」。實際落地:
payment_schedules(purpose='full')。deposit + balance 兩筆 current schedules。adjustment schedule。payment_state 由 money helper 派生;UI 不自行用訂金欄位判斷狀態。
fee_inclusions 是行程內容政策,供前台 tour detail 與後台編輯使用。它不參與付款計算;付款計算只看成交價格與 charge lines。
包團是整梯議價,不是「一張 order 多 traveler」。
設計語意:
departures.booking_mode = regular | charter;charter_total_twd 表示整梯成交價;一般集體報名(一人代付多人)不另建模;現有 tour order 的 party size 已涵蓋。
order_charge_lines 聚合。payment_transactions 聚合。任何報表若要「已收」語意,必須用金流 helper 或現金分類帳;不要用價格政策欄位推測。
| 版本 | 日期 | 變更 | Commit |
|---|---|---|---|
| 3 | 2026-06-05 | 改為價格政策 SSOT;訂金 / 尾款落地改指向 payment_schedules,移除舊訂單付款欄位與單欄狀態敘述。 | — |
| 2 | 2026-06-03 | 補直客 / 同業價、訂金、尾款、團費包含與包團設計。 | — |
| 1 | 2026-05-30 | 初版:行程定價問題與設計方向。 | — |